This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.3.3. 为 OpenStack 用户置备的基础架构配置 registry
您可以配置在您自己的 Red Hat OpenStack Platform(RHOSP)基础架构中运行的集群的 registry。
3.3.1. 配置 Image Registry Operator 以信任 Swift 存储 复制链接链接已复制到粘贴板!
您必须将 Image Registry Operator 配置为信任 Red Hat OpenStack Platform(RHOSP)Swift 存储。
流程
在命令行中输入以下命令将
config.imageregistry
对象中的spec.disableRedirect
字段的值更改为true
:oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"disableRedirect":true}}'
$ oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"disableRedirect":true}}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.2. 为 Image Registry Operator 配置一个 secret 复制链接链接已复制到粘贴板!
除了configs.imageregistry.operator.openshift.io
及 ConfigMap 资源外,还可以通过openshift-image-registry
命名空间中的独立的 secret 资源为 Operator 提供其他配置。
image-registry-private-configuration-user
secret 提供了存储访问和管理所需的凭证。如果找到默认凭据,它将覆盖 Operator 使用的默认凭据。
对于 Red Hat OpenStack Platform(RHOSP)存储上的 Swift,secret 应该包含以下两个键:
-
REGISTRY_STORAGE_SWIFT_USER
-
REGISTRY_STORAGE_SWIFT_PASSWORD
流程
创建一个包括了所需键的 OpenShift Container Platform secret。
oc create secret generic image-registry-private-configuration-user --from-literal=REGISTRY_STORAGE_SWIFT_USER=<username> --from-literal=REGISTRY_STORAGE_SWIFT_PASSWORD=<password> -n openshift-image-registry
$ oc create secret generic image-registry-private-configuration-user --from-literal=REGISTRY_STORAGE_SWIFT_USER=<username> --from-literal=REGISTRY_STORAGE_SWIFT_PASSWORD=<password> -n openshift-image-registry
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.3. 使用用户置备的基础架构 RHOSP 的 registry 存储 复制链接链接已复制到粘贴板!
您必须手动设置存储介质,并在 registry CR 中配置设置。
先决条件
- 在具有用户置备的 Red Hat OpenStack Platform(RHOSP)上的集群。
- 要为 RHOSP 配置 registry 存储,您需要提供 Registry Operator 云凭证。
对于 RHOSP 存储上的 Swift,secret 应该包含以下两个键:
-
REGISTRY_STORAGE_SWIFT_USER
-
REGISTRY_STORAGE_SWIFT_PASSWORD
-
3.3.4. RHOSP Swift 的 Image Registry Operator 配置参数 复制链接链接已复制到粘贴板!
以下配置参数可用于 Red Hat OpenStack Platform(RHOSP)Swift registry 存储。
参数 | 描述 |
---|---|
| 这个值是可选的。 |
| 这个值是可选的。 |
| 这个值是可选的。 |
| 这个值是可选的。 |
| 这个值是可选的。 |
| 这个值是可选的。 |
| 这个值是可选的。 |
| 这个值是可选的。 |