Document URL: https://docs.openshift.com/enterprise/3.1/install_config/install/docker_registry.html#production-use Describe the issue: - The docs say that for production use persistent storage using PersistentVolume and PersistentVolumeClaim objects for storage - Then provides and example that does not create the object but instead directly mounts the nfs to the pod. Additional information: I ran: # oc volume deploymentconfigs/docker-registry --add --overwrite --name=registry-storage --mount-path=/registry -t pvc --claim-name=registry-claim AFTER I CREATE the following Registry volumes: apiVersion: v1 kind: PersistentVolumeClaim metadata: name: registry-claim spec: accessModes: - ReadWriteMany resources: requests: storage: 5Gi volumeName: registry-volume status: {} apiVersion: v1 kind: PersistentVolume metadata: name: registry-volume spec: accessModes: - ReadWriteMany capacity: storage: 10Gi nfs: path: /share/registry server: 172.17.28.3 persistentVolumeReclaimPolicy: Recycle status: {} Document URL: Section Number and Name: Describe the issue: Suggestions for improvement: Additional information:
Example Steps 1. Create PV [1] # oc create pv.json 2. CreatePVC [2] # oc create pvc.json -n default 3. Add this to your existing registry # oc volume deploymentconfigs/docker-registry --add --overwrite --name=registry-storage --mount-path=/registry -t pvc --claim-name=registry-claim 4. (optional) Run the following if using a replicated registry: # oc get -o yaml svc docker-registry | sed 's/\(sessionAffinity:\s*\).*/\1ClientIP/' | oc replace -f - --------------- [1] cat pv.json "kind": "PersistentVolume", "apiVersion": "v1", "metadata": { "name": "registry-volume", "creationTimestamp": null }, "spec": { "capacity": { "storage": "10Gi" }, "nfs": { "server": "172.17.28.3", "path": "/share/share4" }, "accessModes": [ "ReadWriteMany" ], "persistentVolumeReclaimPolicy": "Recycle" }, "status": {} [2] cat pvc.json "kind": "PersistentVolumeClaim", "apiVersion": "v1", "metadata": { "name": "registry-claim", "creationTimestamp": null }, "spec": { "accessModes": [ "ReadWriteMany" ], "resources": { "requests": { "storage": "5Gi" } }, "volumeName": "registry-volume" }, "status": {}
This discrepancy has since been addressed by: - https://github.com/openshift/openshift-docs/commit/ec81f7879bfefc52aae93b4b747f98c2d33a50f8 Verified live (same as Document URL in the Description): - https://docs.openshift.com/enterprise/3.1/install_config/install/docker_registry.html#production-use Moving status to CLOSED CURRENTRELEASE.