add retries for restart of kube-apiserver (#9256)
* add retries for restart of kube-apiserver * change var name
This commit is contained in:
parent
ad7cefa352
commit
6386ec029c
1 changed files with 4 additions and 0 deletions
|
@ -95,6 +95,10 @@
|
||||||
|
|
||||||
- name: Preinstall | restart kube-apiserver crio/containerd
|
- 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 %'"
|
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:
|
when:
|
||||||
- container_manager in ['crio', 'containerd']
|
- container_manager in ['crio', 'containerd']
|
||||||
- inventory_hostname in groups['kube_control_plane']
|
- inventory_hostname in groups['kube_control_plane']
|
||||||
|
|
Loading…
Reference in a new issue