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.2.2. イメージレジストリー Operator の設定リソース
configs.imageregistry.operator.openshift.io
リソースのほかにも、openshift-image-registry
namespace に置かれる別個の ConfigMap およびシークレットリソースによって追加の設定が Operator に提供されます。
前提条件
- CA は PEM でエンコードされている必要があります。
手順
ConfigMap を openshift-config
namespace に作成し、その名前を image.config.openshift.io
リソースの AdditionalTrustedCA
で使用し、追加の CA を指定することができます。この CA は外部レジストリーと通信する際に信頼される必要があります。image-registry-private-configuration
(シークレット) は、ストレージのアクセスおよび管理に必要な認証情報を提供します。これは、デフォルト認証情報が見つからない場合に Operator によって使用されるデフォルト認証情報を上書きします。
イメージレジストリー CA の例
- 1
- レジストリーにポートがある場合 (例:
registry-with-port.example.com:5000
)、「: 」は..
に置き換える必要があります。
S3 ストレージの場合、ConfigMap には 2 つのキーが含まれることが予想されます。
- REGISTRY_STORAGE_S3_ACCESSKEY
- REGISTRY_STORAGE_S3_SECRETKEY
以下の手順で追加の CA を設定することができます。
追加の CA を設定するには、以下を実行します。
oc create configmap registry-config --from-file=<external_registry_address>=ca.crt -n openshift-config oc edit image.config.openshift.io cluster
$ oc create configmap registry-config --from-file=<external_registry_address>=ca.crt -n openshift-config $ oc edit image.config.openshift.io cluster spec: additionalTrustedCA: name: registry-config
Copy to Clipboard Copied! Toggle word wrap Toggle overflow image-registry
Pod 内のイメージを確認します。oc rsh image-registry-xxxxx ls /etc/pki/ca-trust/source/anchors
$ oc rsh image-registry-xxxxx sh-4.2 $ ls /etc/pki/ca-trust/source/anchors <external_registry_address> image-registry.openshift-image-registry.svc..5000 image-registry.openshift-image-registry.svc.cluster.local..5000
Copy to Clipboard Copied! Toggle word wrap Toggle overflow