|
71 | 71 | delay: 30
|
72 | 72 | until: storage_cluster_success is not failed
|
73 | 73 |
|
| 74 | +- name: Unset default storage class for nfs |
| 75 | + ansible.builtin.command: > |
| 76 | + oc patch storageclass nfs |
| 77 | + -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' |
| 78 | + register: default_nfsclass_success |
| 79 | + retries: 1 |
| 80 | + delay: 30 |
| 81 | + until: default_nfsclass_success is not failed |
| 82 | + when: ocp4_aio_deploy_nfs |
| 83 | + |
74 | 84 | - name: Set default storage class to be ocs-storagecluster-ceph-rbd
|
75 | 85 | ansible.builtin.command: >
|
76 | 86 | oc patch storageclass ocs-storagecluster-ceph-rbd
|
|
80 | 90 | delay: 30
|
81 | 91 | until: default_class_success is not failed
|
82 | 92 |
|
| 93 | +- name: Create PVC for the Image Registry on OCS |
| 94 | + k8s: |
| 95 | + state: present |
| 96 | + definition: "{{ lookup('file', 'ceph-imgreg-pvc.yaml') }}" |
| 97 | + register: imgreg_volume_success |
| 98 | + retries: 5 |
| 99 | + delay: 30 |
| 100 | + until: imgreg_volume_success is not failed |
| 101 | + |
| 102 | +- name: Enable OCS based PVC based storage for Image Registry |
| 103 | + ansible.builtin.shell: > |
| 104 | + oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"pvc": {"claim": "ocs-imgreg"}}}}' |
| 105 | +
|
| 106 | +- name: Delete the old PVC that may have been created for NFS |
| 107 | + k8s: |
| 108 | + kind: pvc |
| 109 | + namespace: openshift-image-registry |
| 110 | + name: image-registry-storage |
| 111 | + state: absent |
| 112 | + |
| 113 | +- name: Wait for image registry to stabilise on OCS |
| 114 | + pause: |
| 115 | + minutes: 2 |
| 116 | + |
83 | 117 | - name: Enable Ceph Tools pod for troubleshooting
|
84 | 118 | ansible.builtin.command: >
|
85 | 119 | oc patch OCSInitialization ocsinit -n openshift-storage
|
|
0 commit comments