From 741fce70d45b2ee1a85705e0491ab40f386f72f1 Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Tue, 17 Dec 2024 14:52:27 -0800 Subject: [PATCH] add line --- dev-infrastructure/scripts/istio.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-infrastructure/scripts/istio.sh b/dev-infrastructure/scripts/istio.sh index ee6911bef..eb9d29e69 100755 --- a/dev-infrastructure/scripts/istio.sh +++ b/dev-infrastructure/scripts/istio.sh @@ -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