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 22, 2020
1 parent d359bb4 commit 6b7c5e5
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,28 @@
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: |-
set -o pipefail &&
kubectl get pod -n {{ rabbit_mq_namespace.stdout }} -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}'
changed_when: false
register: rabbit_mq_pod_names
args:
executable: /bin/bash
when:
- not rabbit_mq_namespace.stdout == ""
- name: upgrade-master | Delete rabbitmq pods
environment:
KUBECONFIG: /home/{{ admin_user.name }}/.kube/config
shell: |-
set -o pipefail &&
kubectl delete pod --namespace {{ rabbit_mq_namespace.stdout }} {{ 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 6b7c5e5

Please sign in to comment.