Skip to content

Commit 5f9095f

Browse files
committed
E2E: Add additional check to verify if the components are ready
Signed-off-by: Yuki Iwai <[email protected]>
1 parent 888bec3 commit 5f9095f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/e2e/v1beta1/scripts/gh-actions/setup-katib.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,32 @@ echo "Deploying Katib"
6565
cd ../../../../../ && WITH_DATABASE_TYPE=$WITH_DATABASE_TYPE make deploy && cd -
6666

6767
# Wait until all Katib pods is running.
68+
MAX_RETRY_COUNT=10
69+
until [ "$(kubectl get pods -n kubeflow -l "katib.kubeflow.org/component in ($WITH_DATABASE_TYPE,controller,ui,db-manager)" -oname | wc -l)" = "4" ]; do
70+
echo "Waiting for katib components to be created"
71+
sleep 2
72+
MAX_RETRY_COUNT=$((MAX_RETRY_COUNT - 1))
73+
if [ "${MAX_RETRY_COUNT}" = "0" ]; then
74+
echo "Failed to create katib components"
75+
exit 1
76+
fi
77+
done
78+
6879
TIMEOUT=120s
6980
kubectl wait --for=condition=ready --timeout=${TIMEOUT} -l "katib.kubeflow.org/component in ($WITH_DATABASE_TYPE,controller,db-manager,ui)" -n kubeflow pod ||
7081
(kubectl get pods -n kubeflow && kubectl describe pods -n kubeflow && exit 1)
7182

83+
MAX_RETRY_COUNT=10
84+
until [ "$(kubectl get pod -n kubeflow -l katib.kubeflow.org/component=controller -ojson | jq '.items[].status.conditions[] | select(.type=="ContainersReady").status')" = "True" ]; do
85+
echo "Waiting for Katib controller to be ready"
86+
sleep 2
87+
MAX_RETRY_COUNT=$((MAX_RETRY_COUNT - 1))
88+
if [ "${MAX_RETRY_COUNT}" = "0" ]; then
89+
echo "Failed to set up Katib controller"
90+
exit 1
91+
fi
92+
done
93+
7294
echo "All Katib components are running."
7395
echo "Katib deployments"
7496
kubectl -n kubeflow get deploy

0 commit comments

Comments
 (0)