From dcecb36131c372a03affb5c089fc0c0d6bb12183 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Fri, 7 May 2021 10:02:35 +0530 Subject: [PATCH] Wait for deployments to be created using rollout before checking for availability (#991) Signed-off-by: Ketan Umare --- docker/sandbox/wait-for-flyte.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/sandbox/wait-for-flyte.sh b/docker/sandbox/wait-for-flyte.sh index c99e722944..2a35b3cb6f 100755 --- a/docker/sandbox/wait-for-flyte.sh +++ b/docker/sandbox/wait-for-flyte.sh @@ -12,6 +12,12 @@ until k3s kubectl explain deployment &> /dev/null; do sleep 1; done # Wait for Flyte namespace to be created. This is necessary for the next step. timeout 600 sh -c "until k3s kubectl get namespace flyte &> /dev/null; do sleep 1; done" || ( echo >&2 "Timed out while waiting for the Flyte namespace to be created"; exit 1 ) +# Wait for Flyte deployment to be created. This is necessary for the next step. +timeout 600 sh -c "until k3s kubectl rollout status deployment datacatalog -n flyte &> /dev/null; do sleep 1; done" || ( echo >&2 "Timed out while waiting for the datacatalog rollout to be created"; exit 1 ) +timeout 600 sh -c "until k3s kubectl rollout status deployment flyteadmin -n flyte &> /dev/null; do sleep 1; done" || ( echo >&2 "Timed out while waiting for the flyteadmin rollout to be created"; exit 1 ) +timeout 600 sh -c "until k3s kubectl rollout status deployment flyteconsole -n flyte &> /dev/null; do sleep 1; done" || ( echo >&2 "Timed out while waiting for the flyteconsole rollout to be created"; exit 1 ) +timeout 600 sh -c "until k3s kubectl rollout status deployment flytepropeller -n flyte &> /dev/null; do sleep 1; done" || ( echo >&2 "Timed out while waiting for the flytepropeller rollout to be created"; exit 1 ) + # Wait for flyte deployment k3s kubectl wait --for=condition=available deployment/datacatalog deployment/flyteadmin deployment/flyteconsole deployment/flytepropeller -n flyte --timeout=10m || ( echo >&2 "Timed out while waiting for the Flyte deployment to start"; exit 1 )