Skip to content

Commit 4cc6640

Browse files
Skip launching ironic in case of capm3 e2e tests
Signed-off-by: Muhammad Adil Ghaffar <[email protected]>
1 parent f22ad46 commit 4cc6640

File tree

2 files changed

+36
-24
lines changed

2 files changed

+36
-24
lines changed

03_launch_mgmt_cluster.sh

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -829,24 +829,30 @@ fi
829829
patch_ipam
830830
launch_cluster_api_provider_metal3
831831
BMO_NAME_PREFIX="${NAMEPREFIX}"
832-
launch_baremetal_operator
832+
if [[ "${SKIP_APPLY_BMH:-false}" != "true" ]]; then
833+
launch_baremetal_operator
834+
fi
833835
if [[ "${USE_IRSO}" = true ]]; then
834-
launch_ironic_standalone_operator
835-
launch_ironic_via_irso
836+
if [[ "${SKIP_APPLY_BMH:-false}" = "false" ]]; then
837+
launch_ironic_standalone_operator
838+
launch_ironic_via_irso
839+
fi
836840
else
837841
launch_ironic
838842
fi
839843

840-
if [[ "${BMO_RUN_LOCAL}" != true ]]; then
841-
if ! kubectl rollout status deployment "${BMO_NAME_PREFIX}"-controller-manager -n "${IRONIC_NAMESPACE}" --timeout="${BMO_ROLLOUT_WAIT}"m; then
842-
echo "baremetal-operator-controller-manager deployment can not be rollout"
843-
exit 1
844+
if [[ "${SKIP_APPLY_BMH:-false}" != "true" ]]; then
845+
if [[ "${BMO_RUN_LOCAL}" != true ]]; then
846+
if ! kubectl rollout status deployment "${BMO_NAME_PREFIX}"-controller-manager -n "${IRONIC_NAMESPACE}" --timeout="${BMO_ROLLOUT_WAIT}"m; then
847+
echo "baremetal-operator-controller-manager deployment can not be rollout"
848+
exit 1
849+
fi
850+
else
851+
# There is no certificate to run validation webhook on local.
852+
# Thus we are deleting validatingwebhookconfiguration resource if exists
853+
# to let BMO is working properly on local runs.
854+
kubectl delete validatingwebhookconfiguration/"${BMO_NAME_PREFIX}"-validating-webhook-configuration --ignore-not-found=true
844855
fi
845-
else
846-
# There is no certificate to run validation webhook on local.
847-
# Thus we are deleting validatingwebhookconfiguration resource if exists
848-
# to let BMO is working properly on local runs.
849-
kubectl delete validatingwebhookconfiguration/"${BMO_NAME_PREFIX}"-validating-webhook-configuration --ignore-not-found=true
850856
fi
851857

852858
# Tests might want to apply bmh inside the test scipt

03_launch_mgmt_cluster_pre_1_10.sh

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -744,24 +744,30 @@ kubectl create namespace metal3
744744
patch_clusterctl
745745
launch_cluster_api_provider_metal3
746746
BMO_NAME_PREFIX="${NAMEPREFIX}"
747-
launch_baremetal_operator
747+
if [[ "${SKIP_APPLY_BMH:-false}" != "true" ]]; then
748+
launch_baremetal_operator
749+
fi
748750
if [[ "${USE_IRSO}" = true ]]; then
749-
launch_ironic_standalone_operator
750-
launch_ironic_via_irso
751+
if [[ "${SKIP_APPLY_BMH:-false}" = "false" ]]; then
752+
launch_ironic_standalone_operator
753+
launch_ironic_via_irso
754+
fi
751755
else
752756
launch_ironic
753757
fi
754758

755-
if [[ "${BMO_RUN_LOCAL}" != true ]]; then
756-
if ! kubectl rollout status deployment "${BMO_NAME_PREFIX}"-controller-manager -n "${IRONIC_NAMESPACE}" --timeout="${BMO_ROLLOUT_WAIT}"m; then
757-
echo "baremetal-operator-controller-manager deployment can not be rollout"
758-
exit 1
759+
if [[ "${SKIP_APPLY_BMH:-false}" != "true" ]]; then
760+
if [[ "${BMO_RUN_LOCAL}" != true ]]; then
761+
if ! kubectl rollout status deployment "${BMO_NAME_PREFIX}"-controller-manager -n "${IRONIC_NAMESPACE}" --timeout="${BMO_ROLLOUT_WAIT}"m; then
762+
echo "baremetal-operator-controller-manager deployment can not be rollout"
763+
exit 1
764+
fi
765+
else
766+
# There is no certificate to run validation webhook on local.
767+
# Thus we are deleting validatingwebhookconfiguration resource if exists
768+
# to let BMO is working properly on local runs.
769+
kubectl delete validatingwebhookconfiguration/"${BMO_NAME_PREFIX}"-validating-webhook-configuration --ignore-not-found=true
759770
fi
760-
else
761-
# There is no certificate to run validation webhook on local.
762-
# Thus we are deleting validatingwebhookconfiguration resource if exists
763-
# to let BMO is working properly on local runs.
764-
kubectl delete validatingwebhookconfiguration/"${BMO_NAME_PREFIX}"-validating-webhook-configuration --ignore-not-found=true
765771
fi
766772

767773
# Tests might want to apply bmh inside the test scipt

0 commit comments

Comments
 (0)