Skip to content

Commit

Permalink
Workarund restart rabbitmq pods during patching #1395
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Arendt committed Jul 20, 2020
1 parent d359bb4 commit 5af5774
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,24 @@
when:
- not rabbit_mq_namespace.stdout == ""
- not image_registry_address in rabbit_mq_repository.stdout
- name: upgrade-master | | Get rabbitmq pod names
environment:
KUBECONFIG: /home/{{ admin_user.name }}/.kube/config
shell: |-
kubectl get pod -n {{ rabbit_mq_namespace }} -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}
changed_when: false
register: rabbit_mq_pod_names
args:
executable: /bin/bash
- name: upgrade-master | Delete rabbitmq pods
environment:
KUBECONFIG: /home/{{ admin_user.name }}/.kube/config
shell: |-
kubectl delete pod --namespace queue {{ item }}
changed_when: false
args:
executable: /bin/bash
loop: "{{ rabbit_mq_pod_names.stdout_lines }}"
when:
- not rabbit_mq_namespace.stdout == ""
- not rabbit_mq_pod_names.stdout == ""

0 comments on commit 5af5774

Please sign in to comment.