Skip to content

Commit

Permalink
E2E: Add additional check to verify if the components are ready
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <[email protected]>
  • Loading branch information
tenzen-y committed Aug 13, 2023
1 parent 888bec3 commit 8691375
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
3 changes: 0 additions & 3 deletions manifests/v1beta1/components/webhook/webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ webhooks:
admissionReviewVersions:
- v1
clientConfig:
caBundle: Cg==
service:
name: katib-controller
namespace: kubeflow
Expand All @@ -35,7 +34,6 @@ webhooks:
admissionReviewVersions:
- v1
clientConfig:
caBundle: Cg==
service:
name: katib-controller
namespace: kubeflow
Expand All @@ -55,7 +53,6 @@ webhooks:
admissionReviewVersions:
- v1
clientConfig:
caBundle: Cg==
service:
name: katib-controller
namespace: kubeflow
Expand Down
21 changes: 20 additions & 1 deletion test/e2e/v1beta1/scripts/gh-actions/setup-katib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,27 @@ echo "Deploying Katib"
cd ../../../../../ && WITH_DATABASE_TYPE=$WITH_DATABASE_TYPE make deploy && cd -

# Wait until all Katib pods is running.
MAX_RETRY_COUNT=24
COMPONENTS_NUM=3
if "${DEPLOY_KATIB_UI}"; then
COMPONENTS_NUM=4
fi
until [ "$(kubectl get pods -n kubeflow -l "katib.kubeflow.org/component in ($WITH_DATABASE_TYPE,controller,ui,db-manager)" -oname | wc -l | tr -d ' ')" = "${COMPONENTS_NUM}" ]; do
echo -e "\nWaiting for katib components to be created"
kubectl get pods -n kubeflow || :
kubectl describe replicasets -n kubeflow || :

sleep 5
MAX_RETRY_COUNT=$((MAX_RETRY_COUNT - 1))
if [ "${MAX_RETRY_COUNT}" = "0" ]; then
echo "Failed to create katib components"
exit 1
fi
done

TIMEOUT=120s
kubectl wait --for=condition=ready --timeout=${TIMEOUT} -l "katib.kubeflow.org/component in ($WITH_DATABASE_TYPE,controller,db-manager,ui)" -n kubeflow pod ||

kubectl wait --for=condition=ContainersReady=True --timeout=${TIMEOUT} -l "katib.kubeflow.org/component in ($WITH_DATABASE_TYPE,controller,db-manager,ui)" -n kubeflow pod ||
(kubectl get pods -n kubeflow && kubectl describe pods -n kubeflow && exit 1)

echo "All Katib components are running."
Expand Down

0 comments on commit 8691375

Please sign in to comment.