From aa6be98f3c48923f3c862ba7435e8ee1282996f1 Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Tue, 17 Dec 2024 15:14:01 -0800 Subject: [PATCH] fix break --- dev-infrastructure/scripts/istio.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev-infrastructure/scripts/istio.sh b/dev-infrastructure/scripts/istio.sh index eb9d29e69..aa888d02e 100755 --- a/dev-infrastructure/scripts/istio.sh +++ b/dev-infrastructure/scripts/istio.sh @@ -35,7 +35,7 @@ cd istio-"${ISTIOCTL_VERSION}" export PATH=$PWD/bin:$PATH echo "==========================================================================" -NEWVERSION="$TARGET_VERSION" +NEWVERSION="${ISTIOCTL_VERSION}" echo "********** Istio UpGrade Started with version ${NEWVERSION} **************" istioctl tag set "$TAG" --revision "${NEWVERSION}" --istioNamespace aks-istio-system --overwrite @@ -55,6 +55,7 @@ for ns in $namespaces; do deployment=$(kubectl get replicaset "$owner_name" -n "$ns" -o jsonpath='{.metadata.ownerReferences[0].name}') if [[ -n "$deployment" ]]; then kubectl rollout restart deployment "$deployment" -n "$ns" + break 2 else kubectl delete pod "$pod_name" -n "$ns" fi @@ -62,6 +63,7 @@ for ns in $namespaces; do "StatefulSet") deployment=$(kubectl get replicaset "$owner_name" -n "$ns" -o jsonpath='{.metadata.ownerReferences[0].name}') kubectl rollout restart deployment "$deployment" -n "$ns" + break 2 ;; *) # Don't do anything for (Cron)Job, or no owner pod for now.