Skip to content

Commit

Permalink
try to fix the installation script and tests
Browse files Browse the repository at this point in the history
Signed-off-by: juliusvonkohout <[email protected]>
  • Loading branch information
juliusvonkohout committed Nov 19, 2024
1 parent 46c393d commit 8f1724a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
17 changes: 13 additions & 4 deletions tests/gh-actions/install_knative-cni.sh
Original file line number Diff line number Diff line change
@@ -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
15 changes: 12 additions & 3 deletions tests/gh-actions/install_knative.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8f1724a

Please sign in to comment.