Skip to content

Commit

Permalink
Wait for deployments to be created using rollout before checking for …
Browse files Browse the repository at this point in the history
…availability (#991)

Signed-off-by: Ketan Umare <ketan.umare@gmail.com>
  • Loading branch information
pmahindrakar-oss authored May 7, 2021
1 parent db2b09c commit dcecb36
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker/sandbox/wait-for-flyte.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 )

Expand Down

0 comments on commit dcecb36

Please sign in to comment.