From b05e8a5e246e18857aee6a5e9721788b36700be2 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Wed, 12 Jul 2023 14:49:44 -0700 Subject: [PATCH] Replace sleep with kubectl wait in prepare-supervisor-on-kind.sh - Now that the FederationDomain has `status.conditions`, we can use `kubectl wait` to wait for it to be ready in this hack script --- hack/prepare-supervisor-on-kind.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hack/prepare-supervisor-on-kind.sh b/hack/prepare-supervisor-on-kind.sh index e8c937d0..0696e17b 100755 --- a/hack/prepare-supervisor-on-kind.sh +++ b/hack/prepare-supervisor-on-kind.sh @@ -351,8 +351,7 @@ spec: EOF echo "Waiting for FederationDomain to initialize or update..." -# Sleeping is a race, but that's probably good enough for the purposes of this script. -sleep 5 +kubectl wait --for=condition=Ready FederationDomain/my-federation-domain -n "$PINNIPED_TEST_SUPERVISOR_NAMESPACE" # Test that the federation domain is working before we proceed. echo "Fetching FederationDomain discovery info via command: https_proxy=\"$PINNIPED_TEST_PROXY\" curl -fLsS --cacert \"$root_ca_crt_path\" \"$issuer/.well-known/openid-configuration\""