From 848cf01de8d8b99504e9d29ccaf509293bf12ca8 Mon Sep 17 00:00:00 2001 From: Martin Kravec Date: Tue, 4 Jul 2023 14:27:01 +0200 Subject: [PATCH] Fix wait for rancher startup --- .github/workflows/playwright.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index bf7d09a0..60c0efc3 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -125,7 +125,8 @@ jobs: # Wait for rancher for i in {1..20}; do - output=$(kubectl get pods --no-headers -o wide -n cattle-system | grep -vw Completed || echo 'Wait: cattle-system')$'\n' + output=$(kubectl get pods --no-headers -o wide -n cattle-system -l app=rancher-webhook | grep -vw Completed || echo 'Wait: cattle-system')$'\n' + output+=$(kubectl get pods --no-headers -o wide -n cattle-system | grep -vw Completed || echo 'Wait: cattle-system')$'\n' output+=$(kubectl get pods --no-headers -o wide -n cattle-fleet-system | grep -vw Completed || echo 'Wait: cattle-fleet-system')$'\n' grep -vE '([0-9]+)/\1 +Running|^$' <<< $output || break [ $i -ne 20 ] && sleep 30 || { echo "Godot: pods not running"; exit 1; }