Skip to content

Commit

Permalink
fix break
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Chang committed Dec 17, 2024
1 parent 741fce7 commit aa6be98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dev-infrastructure/scripts/istio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -55,13 +55,15 @@ 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
;;
"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.
Expand Down

0 comments on commit aa6be98

Please sign in to comment.