第 4 章 对 registry.redhat.io 进行身份验证以进行 Wasm 插件访问
对于 RateLimitPolicy 和 AuthPolicy,您必须对 registry.redhat.io
进行身份验证,以访问用于 OpenShift Service Mesh 作为网关 API 供应商的 Wasm 插件镜像。
先决条件
-
有访问
registry.redhat.io
的凭证。如果您没有访问权限,请参阅创建 Registry 服务帐户。
流程
为网关创建命名空间,例如:
oc create ns api-gateway
oc create ns api-gateway
Copy to Clipboard Copied! 在网关命名空间中创建以下 secret:
oc create secret docker-registry wasm-plugin-pull-secret -n api-gateway \ --docker-server=registry.redhat.io \ --docker-username=your-registry-service-account-username \ --docker-password=your-registry-service-account-password
oc create secret docker-registry wasm-plugin-pull-secret -n api-gateway \ --docker-server=registry.redhat.io \ --docker-username=your-registry-service-account-username \ --docker-password=your-registry-service-account-password
Copy to Clipboard Copied! - 在部署 RateLimitPolicy 或 AuthPolicy 的每个网关命名空间中重复此步骤。