Browse Source

add retries for restart of kube-apiserver (#9256)

* add retries for restart of kube-apiserver

* change var name
pull/9259/head
Krystian Młynek 2 years ago
committed by GitHub
parent
commit
6386ec029c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. 4
      roles/kubernetes/preinstall/handlers/main.yml

4
roles/kubernetes/preinstall/handlers/main.yml

@ -95,6 +95,10 @@
- name: Preinstall | restart kube-apiserver crio/containerd
shell: "{{ bin_dir }}/crictl pods --name kube-apiserver* -q | xargs -I% --no-run-if-empty bash -c '{{ bin_dir }}/crictl stopp % && {{ bin_dir }}/crictl rmp %'"
register: preinstall_restart_apiserver
retries: 10
until: preinstall_restart_apiserver.rc == 0
delay: 1
when:
- container_manager in ['crio', 'containerd']
- inventory_hostname in groups['kube_control_plane']

Loading…
Cancel
Save