第3章 Operator imageContentSourcePolicy を作成します。

oc adm catalog mirror コマンドが完了すると、imageContentSourcePolicy.yaml ファイルが作成されます。通常、このファイルの出力ディレクトリーは ./[catalog image name]-manifests) です。以下の手順を使用して、不足しているエントリーを .yaml ファイルに追加し、それらをクラスターに適用します。

手順

  1. このファイルの内容で、以下のようにミラーマッピングを確認します。

    spec:
      repositoryDigestMirrors:
        - mirrors:
          - <your_registry>/ocs4
          source: registry.redhat.io/ocs4
        - mirrors:
          - <your_registry>/rhceph
          source: registry.redhat.io/rhceph
        - mirrors:
          - <your_registry>/openshift4
          source: registry.redhat.io/openshift4
        - mirrors:
          - <your_registry>/rhscl
          source: registry.redhat.io/rhscl
  2. 不足しているエントリーを imageContentSourcePolicy.yaml ファイルの最後に追加します。
  3. imageContentSourcePolicy.yaml ファイルをクラスターに適用します。

    $ oc apply -f ./[output dir]/imageContentSourcePolicy.yaml

    Image Content Source Policy を更新したら、クラスター内のすべてのノード(マスター、インフラストラクチャー、およびワーカー)を更新し、再起動する必要があります。このプロセスは Machine Config Pool Operator で自動的に処理され、実際の経過時間は OpenShift クラスターのノード数によって異なる可能性がありますが、最長で 30 分の時間がかかります。oc get mcp コマンドまたは oc get node コマンドを使用して更新プロセスをモニターできます。