From 6570b7fc7eb0acbd78ee9f8af43e209745d44d74 Mon Sep 17 00:00:00 2001 From: Felix Matouschek Date: Fri, 9 May 2025 10:19:58 +0200 Subject: [PATCH] fix(e2e-setup.sh): Wait for CDI to be available Wait for CDI to be available after deploying it. Also add the missing --deploy-kubevirt-cdi flag to the usage help. Signed-off-by: Felix Matouschek --- hack/e2e-setup.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hack/e2e-setup.sh b/hack/e2e-setup.sh index 02681a2..4ef5ff7 100755 --- a/hack/e2e-setup.sh +++ b/hack/e2e-setup.sh @@ -239,6 +239,12 @@ deploy_kubevirt_containerized_data_importer() { echo "Deploying KubeVirt containerized-data-importer" ${KUBECTL} apply -f "https://github.com/kubevirt/containerized-data-importer/releases/download/${KUBEVIRT_CDI_VERSION}/cdi-operator.yaml" ${KUBECTL} apply -f "https://github.com/kubevirt/containerized-data-importer/releases/download/${KUBEVIRT_CDI_VERSION}/cdi-cr.yaml" + + echo "Waiting for KubeVirt containerized-data-importer to be ready" + ${KUBECTL} wait --for=condition=Available cdi cdi --timeout=5m + + echo "Successfully deployed KubeVirt containerized-data-importer:" + ${KUBECTL} get pods -n cdi } deploy_cnao() { @@ -307,7 +313,7 @@ cleanup() { } usage() { - echo -n "$0 [--install-kind] [--install-kubectl] [--configure-inotify-limits] [--create-registry] [--create-cluster] [--deploy-kubevirt] [--deploy-cnao] [--create-nad] [--cleanup] [--namespace]" + echo -n "$0 [--install-kind] [--install-kubectl] [--configure-inotify-limits] [--create-registry] [--create-cluster] [--deploy-kubevirt] [--deploy-kubevirt-cdi] [--deploy-cnao] [--create-nad] [--cleanup] [--namespace]" } set_default_options() {