Skip to content

Commit

Permalink
add line
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Chang committed Dec 17, 2024
1 parent f8b8fcb commit 741fce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev-infrastructure/scripts/istio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ echo "********** Istio UpGrade Started with version ${NEWVERSION} **************

istioctl tag set "$TAG" --revision "${NEWVERSION}" --istioNamespace aks-istio-system --overwrite
# Get the namespaces with the label istio.io/rev=$TAG
namespaces=$(kubectl get namespaces --selector=istio.io/rev="$TAG" -o jsonpath='{.items[*].metadata.name}')
namespaces=$(kubectl get namespaces --selector=istio.io/rev="$TAG" -o jsonpath='{.items[*].metadata.name}' | xargs -n1 echo)

for ns in $namespaces; do
pods=$(kubectl get pods -n "$ns" -o jsonpath='{.items[*].metadata.name}')
pods=$(kubectl get pods -n "$ns" -o jsonpath='{.items[*].metadata.name}'| xargs -n1 echo)
for pod_name in $pods; do
istio_version=$(kubectl get pod "$pod_name" -n "$ns" -o jsonpath='{.metadata.annotations.sidecar\.istio\.io/status}' | grep -oP '(?<="revision":")[^"]*')
if [[ "$istio_version" != "$NEWVERSION" ]]; then
Expand Down

0 comments on commit 741fce7

Please sign in to comment.