From 8f1724aa98f8ee89ec9148741206c77717205bfe Mon Sep 17 00:00:00 2001 From: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:27:52 +0100 Subject: [PATCH] try to fix the installation script and tests Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> --- tests/gh-actions/install_knative-cni.sh | 17 +++++++++++++---- tests/gh-actions/install_knative.sh | 15 ++++++++++++--- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/tests/gh-actions/install_knative-cni.sh b/tests/gh-actions/install_knative-cni.sh index e361e87d3..c3d6a7132 100755 --- a/tests/gh-actions/install_knative-cni.sh +++ b/tests/gh-actions/install_knative-cni.sh @@ -1,14 +1,23 @@ #!/bin/bash set -euo pipefail -echo "Installing KNative with istio-cni ..." + +echo "Installing KNative with Istio-CNI ..." + +# Retry mechanism for applying Knative manifests set +e -kustomize build common/knative/knative-serving/base | kubectl apply -f - +for i in {1..5}; do + kustomize build common/knative/knative-serving/base | kubectl apply -f - + if [[ $? -eq 0 ]]; then + break + fi + echo "Retrying in 30 seconds..." + sleep 30 +done set -e -kustomize build common/knative/knative-serving/base | kubectl apply -f - kustomize build common/istio-cni-1-23/cluster-local-gateway/base | kubectl apply -f - kustomize build common/istio-cni-1-23/kubeflow-istio-resources/base | kubectl apply -f - -kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=600s \ +kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s \ --field-selector=status.phase!=Succeeded kubectl patch cm config-domain --patch '{"data":{"example.com":""}}' -n knative-serving diff --git a/tests/gh-actions/install_knative.sh b/tests/gh-actions/install_knative.sh index c9b04b36c..1d84031d5 100755 --- a/tests/gh-actions/install_knative.sh +++ b/tests/gh-actions/install_knative.sh @@ -1,14 +1,23 @@ #!/bin/bash set -euo pipefail + echo "Installing KNative ..." + +# Retry mechanism for applying Knative manifests set +e -kustomize build common/knative/knative-serving/base | kubectl apply -f - +for i in {1..5}; do + kustomize build common/knative/knative-serving/base | kubectl apply -f - + if [[ $? -eq 0 ]]; then + break + fi + echo "Retrying in 30 seconds..." + sleep 30 +done set -e -kustomize build common/knative/knative-serving/base | kubectl apply -f - kustomize build common/istio-1-23/cluster-local-gateway/base | kubectl apply -f - kustomize build common/istio-1-23/kubeflow-istio-resources/base | kubectl apply -f - -kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=600s \ +kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s \ --field-selector=status.phase!=Succeeded kubectl patch cm config-domain --patch '{"data":{"example.com":""}}' -n knative-serving