Created
June 1, 2020 13:44
-
-
Save ralvares/d9c949b5701021ee6ae382e2730a9e03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}' | |
oc patch configs.imageregistry.operator.openshift.io/cluster --type merge --patch '{"spec":{"managementState": "Managed"}}' | |
cat > nfs.yaml << EOF | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: nfs-registry-storage | |
spec: | |
accessModes: | |
- ReadWriteMany | |
capacity: | |
storage: 20Gi | |
nfs: | |
path: "/exports/pv-infra-registry" | |
server: "192.168.150.10" | |
persistentVolumeReclaimPolicy: Recycle | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: registry-storage | |
namespace: openshift-image-registry | |
spec: | |
accessModes: | |
- ReadWriteMany | |
resources: | |
requests: | |
storage: 20Gi | |
EOF | |
oc apply -f nfs.yaml | |
oc patch configs.imageregistry.operator.openshift.io cluster --type='json' -p='[{"op": "remove", "path": "/spec/storage" },{"op": "add", "path": "/spec/storage", "value": {"pvc":{"claim": "registry-storage"}}}]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment