OpenShift: Persistent Local Registry

Apr 11, 2021

Author: Brandon B. Jozsa

Patch the configs.imageregistry.operator.openshift.io named cluster:

oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"logLevel":"Normal","managementState":"Managed","storage":{"pvc":{"claim":"image-registry-storage"},"managementState":"Managed"}}}'

Create the PersistentVolumeClaim:

---
apiVersion: "v1"
kind: "PersistentVolumeClaim"
metadata:
  name: "image-registry-storage"
  namespace: "openshift-image-registry"
spec:
  storageClassName: "ocs-storagecluster-cephfs"
  accessModes:
  - "ReadWriteMany"
  resources:
    requests:
      storage: "100Gi"