From d46f4bc4df304a9b5cb459bb37c0d414711881d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Tue, 13 Feb 2024 10:39:52 +0100 Subject: [PATCH] Check all the deployments once at the end Also wait for the deployments resources before waiting for others to avoid race conditions (desired pods might not exist yet). Change-Id: Icbf7426c80511707b10d7522b22b30ea8c434a93 --- playbooks/helm/run.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/playbooks/helm/run.yaml b/playbooks/helm/run.yaml index 2686879..4762c92 100644 --- a/playbooks/helm/run.yaml +++ b/playbooks/helm/run.yaml @@ -6,10 +6,18 @@ vars: helm_release_name: "{{ zj_item.key }}" helm_chart: "{{ zj_item.value }}" + helm_wait_for_pods: false # we want this once and with more control loop: "{{ helm_charts | dict2items }}" loop_control: loop_var: 'zj_item' + - name: Wait for the deployments + command: kubectl wait --for=condition=Available --timeout=120s deployment --all + + - name: Wait for the remaining resources + include_role: + name: wait-for-pods + - name: Check pod restarts after helm chart installations include_role: name: check-pod-restarts