From c6ab6406c2439a4993110114610c918d562adaf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A3=20=E8=88=AA?= Date: Mon, 25 Sep 2023 10:54:56 +0800 Subject: [PATCH] Add Retry for Applying PriorityClass (#10469) Signed-off-by: hang.jiang --- roles/kubernetes-apps/cluster_roles/tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/kubernetes-apps/cluster_roles/tasks/main.yml b/roles/kubernetes-apps/cluster_roles/tasks/main.yml index e4c37d39b..fdb3205d6 100644 --- a/roles/kubernetes-apps/cluster_roles/tasks/main.yml +++ b/roles/kubernetes-apps/cluster_roles/tasks/main.yml @@ -80,4 +80,8 @@ resource: "PriorityClass" filename: "{{ kube_config_dir }}/k8s-cluster-critical-pc.yml" state: latest + register: result + until: result is succeeded + retries: 10 + delay: 6 when: inventory_hostname == groups['kube_control_plane'] | last