Skip to content

Commit

Permalink
Merge pull request #1018 from Azure/jonachang/istiocheck
Browse files Browse the repository at this point in the history
Add extra step to check the health of istio version before update
  • Loading branch information
weinong authored Dec 23, 2024
2 parents 8c6eacd + d8f64ec commit a897e5a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dev-infrastructure/scripts/istio.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/bin/bash

set -euo pipefail
ISTIO_NAMESPACE="aks-istio-system"
echo "********** Check istio is up and running **************"
ISTIO_PODS_COUNT=$(kubectl get pods -n ${ISTIO_NAMESPACE} -l istio.io/rev="${TARGET_VERSION}" --field-selector=status.phase=Running --no-headers | wc -l)
if [[ $ISTIO_PODS_COUNT -lt 2 ]]; then
echo "Istio pods are not running, Please check the istio pods"
exit 1
fi

echo "********** Download istioctl **************"
# Determines the operating system.
Expand Down Expand Up @@ -53,7 +60,7 @@ cd istio-"${ISTIOCTL_VERSION}"
export PATH=$PWD/bin:$PATH
echo "=========================================================================="

ISTIO_NAMESPACE="aks-istio-system"


echo "********** ISTIO Upgrade **************"
# Followed this guide for istio upgrade https://learn.microsoft.com/en-us/azure/aks/istio-upgrade
Expand Down

0 comments on commit a897e5a

Please sign in to comment.