diff --git a/dev-infrastructure/scripts/istio.sh b/dev-infrastructure/scripts/istio.sh index c9568d5dc..437c68d01 100755 --- a/dev-infrastructure/scripts/istio.sh +++ b/dev-infrastructure/scripts/istio.sh @@ -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. @@ -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