Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.

Ensure subsequent attempts of patching enmasse auth images succeeds #307

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions evals/roles/enmasse/tasks/patch-auth-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

- name: "Patch keycloak-controller image"
shell: oc patch deployment/keycloak-controller -p '{{ keycloak_controller_image_contents.stdout }}' -n {{ enmasse_namespace }}
register: patch_kc_controller_output
failed_when: patch_kc_controller_output.rc != 0 and not "not patched" in patch_kc_controller_output.stdout # oc versions less than 3.11 will return rc 1 if there was no change after patching
changed_when: patch_kc_controller_output.rc == 0

- copy:
src: patch-keycloak-plugin-image.json
Expand All @@ -20,6 +23,9 @@

- name: "Patch keycloak-plugin image"
shell: oc patch deployment/keycloak -p '{{ keycloak_plugin_image_contents.stdout }}' -n {{ enmasse_namespace }}
register: patch_kc_plugin_output
failed_when: patch_kc_plugin_output.rc != 0 and not "not patched" in patch_kc_plugin_output.stdout # oc versions less than 3.11 will return rc 1 if there was no change after patching
changed_when: patch_kc_plugin_output.rc == 0

- name: "Verify patched deployments are ready"
shell: sleep 5; oc get pods | awk '{print $2}' | grep '0/1'
Expand Down