Skip to content

Commit

Permalink
Merge pull request #230 from ccamacho/master
Browse files Browse the repository at this point in the history
fix: wait for image registry resource exists
  • Loading branch information
ccamacho authored Mar 19, 2021
2 parents eaabb2c + 6804da8 commit 971bda8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions kubeinit/roles/kubeinit_nfs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,19 @@
args:
executable: /bin/bash

- name: Wait for the image registry operator to start its componentes
ansible.builtin.shell: |
export KUBECONFIG=~/.kube/config
oc get configs.imageregistry.operator.openshift.io cluster
register: iregistry_result
retries: 5
delay: 20
until: iregistry_result.rc == 0
changed_when: "iregistry_result.rc == 0"
when: kubeinit_inventory_cluster_distro == 'okd'
args:
executable: /bin/bash

- name: patch imageregistry operator to claim storage
ansible.builtin.shell: |
# We patch the imageregistry operator to create a claim that managed-nfs-storage will satisfy
Expand All @@ -275,5 +288,6 @@
oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec": {"managementState": "Managed" }}'
register: patch_imageregistry_operator
changed_when: "patch_imageregistry_operator.rc == 0"
when: kubeinit_inventory_cluster_distro == 'okd'
args:
executable: /bin/bash

0 comments on commit 971bda8

Please sign in to comment.