Add Retry for restart kube-controller-manager (#10013)

Signed-off-by: hang.jiang <hang.jiang@daocloud.io>
pull/10026/head
蒋航 2023-04-26 04:04:16 +08:00 committed by GitHub
parent f9f5143c93
commit 4ddbd2bd2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

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