Configuring Image Registry to use OpenShift Data Foundation
1. Create a Persistent Volume Claim for the Image Registry to use.
1. In the OpenShift Web Console, click Storage → Persistent Volume Claims.
2. Set the Project to openshift-image-registry.
3. Click Create Persistent Volume Claim.
From the list of available storage classes retrieved above, specify the Storage Class with the provisioner openshift-storage.cephfs.csi.ceph.com.
Specify the Persistent Volume Claim Name, for example, ocsregistry.
Specify an Access Mode of Shared Access (RWX).
Specify a Size of at least 100 GB.
Click Create.
Wait until the status of the new Persistent Volume Claim is listed as Bound.
2. Configure the cluster’s Image Registry to use the new Persistent Volume Claim.
1. Click Administration → Custom Resource Definitions.
2. Click the Config custom resource definition associated with the imageregistry.operator.openshift.io group.
3. Click the Instances tab.
4. Beside the cluster instance, click the Action Menu (⋮) → Edit Config.
5. Add the new Persistent Volume Claim as persistent storage for the Image Registry.
Add the following under spec:, replacing the existing storage: section if necessary.
storage:
pvc:
claim: <new-pvc-name>
For example:
storage:
pvc:
claim: ocs4registry
Click Save
3. Verify that the new configuration is being used.
1. Click Workloads → Pods.
2. Set the Project to openshift-image-registry.
3. Verify that the new image-registry-* pod appears with a status of Running, and that the previous image-registry-* pod terminates.
4. Click the new image-registry-* pod to view pod details.
5. Scroll down to Volumes and verify that the registry-storage volume has a Type that matches your new Persistent Volume Claim, for example, ocsregistry.