3.3. 为 Azure 用户置备的基础架构配置 registry

3.3.1. 为 Image Registry Operator 配置一个 secret

除了configs.imageregistry.operator.openshift.io及 ConfigMap 资源外,还可以通过openshift-image-registry命名空间中的独立的 secret 资源为 Operator 提供其他配置。

image-registry-private-configuration-user secret 提供了存储访问和管理所需的凭证。如果找到默认凭据,它将覆盖 Operator 使用的默认凭据。

对于 Azure registry 存储,secret 应该包含这个键,其值是 Azure 提供的凭据文件的内容:

  • REGISTRY_STORAGE_AZURE_ACCOUNTKEY

流程

  • 创建一个包括了所需键的 OpenShift Container Platform secret。

    $ oc create secret generic image-registry-private-configuration-user --from-literal=REGISTRY_STORAGE_AZURE_ACCOUNTKEY=<accountkey> --namespace openshift-image-registry