From 7d3060256645d864aa2408bc11ad80b950b5debb Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:12:44 +0200 Subject: [PATCH] USe same approche for gatewayd --- .github/workflows/helm-test.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 61d0433..f18bdc7 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -50,18 +50,13 @@ jobs: kubectl rollout status --watch deployment/gatewayd --timeout=5m - name: Wait for gatewayd to start run: | - for ((i=0; i<5; i++)); do - deployment_status=$(kubectl get deployment gatewayd | awk '{print $2}' | grep 0) - - if [ -z "$deployment_status" ]; then - echo "Deployment is ready" - break - else - echo "Deployment is not ready" - if [ $i -eq 4 ]; then - exit 1 - fi - fi - sleep 60 + for n in [ 0 1 2 3 4 5 6 7 8 9 ] + do + if kubectl get deployment gatewayd | awk '{print $2}' | grep 1/1 + then + exit 0 + fi + sleep 30 done - \ No newline at end of file + echo gatewayd did not start within 300 seconds! + exit 1