From 9b746e376365404d61294b0ebd383747bb7dd2d0 Mon Sep 17 00:00:00 2001 From: Smriti Dahal Date: Wed, 20 Sep 2023 16:52:50 -0700 Subject: [PATCH] getting rollout status --- hack/e2e/aks-addon.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hack/e2e/aks-addon.sh b/hack/e2e/aks-addon.sh index 65c8d869..401cc830 100755 --- a/hack/e2e/aks-addon.sh +++ b/hack/e2e/aks-addon.sh @@ -158,7 +158,14 @@ kubectl create configmap test-vars -n kube-system \ sed -e "s|TEST_INIT_IMAGE|$IMG_URL/$INIT_IMG_REPO:$INIT_IMG_TAG|g" -e "s|TEST_IMAGE|$IMG_URL/$IMG_REPO:$IMG_TAG|g" deploy/deployment.yaml | kubectl apply -n kube-system -f - -kubectl wait --for=condition=available deploy "virtual-kubelet-azure-aci" -n kube-system --timeout=300s +# Check deployment rollout status every 30 seconds (max 5 minutes) until complete. +ATTEMPTS=0 +ROLLOUT_STATUS_CMD="kubectl rollout status deployment/virtual-kubelet-azure-aci -n kube-system" +until $ROLLOUT_STATUS_CMD || [ $ATTEMPTS -eq 10 ]; do + $ROLLOUT_STATUS_CMD + ATTEMPTS=$((attempts + 1)) + sleep 30 +done while true; do kubectl get node "$TEST_NODE_NAME" &> /dev/null && break