From 6e1e7c0e16ffc12ef87fbababefcaac3ab92ed42 Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Mon, 16 Dec 2024 14:37:33 -0800 Subject: [PATCH] change to newversion --- config/config.yaml | 4 ++-- config/public-cloud-cs-pr.json | 2 +- config/public-cloud-dev.json | 2 +- config/public-cloud-msft-int.json | 4 ++-- config/public-cloud-personal-dev.json | 2 +- dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam | 2 +- dev-infrastructure/scripts/istio.sh | 2 ++ 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index 597c4440c..5129734f4 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -31,7 +31,7 @@ defaults: url: "https://istio.io/downloadIstio" istioctlVersion: "1.23.1" tag: "prod-stable" - newVersion: "" + targetVersion: "" version: "asm-1-22" # MGMT cluster specifics @@ -270,7 +270,7 @@ clouds: istioctlVersion: "1.23.1" tag: "prod-stable" version: "asm-1-22" - newVersion: "" + targetVersion: "" mgmt: # MGMTM AKS nodepools - big enough for 2 HCPs systemAgentPool: diff --git a/config/public-cloud-cs-pr.json b/config/public-cloud-cs-pr.json index 3c4ae8ca9..7d85c5350 100644 --- a/config/public-cloud-cs-pr.json +++ b/config/public-cloud-cs-pr.json @@ -159,8 +159,8 @@ }, "istio": { "istioctlVersion": "1.23.1", - "newVersion": "", "tag": "prod-stable", + "targetVersion": "", "url": "https://istio.io/downloadIstio", "version": "asm-1-22" }, diff --git a/config/public-cloud-dev.json b/config/public-cloud-dev.json index c37b8f675..e97ab0444 100644 --- a/config/public-cloud-dev.json +++ b/config/public-cloud-dev.json @@ -159,8 +159,8 @@ }, "istio": { "istioctlVersion": "1.23.1", - "newVersion": "", "tag": "prod-stable", + "targetVersion": "", "url": "https://istio.io/downloadIstio", "version": "asm-1-22" }, diff --git a/config/public-cloud-msft-int.json b/config/public-cloud-msft-int.json index 27261b132..42e9ed9bd 100644 --- a/config/public-cloud-msft-int.json +++ b/config/public-cloud-msft-int.json @@ -157,9 +157,9 @@ "kvSoftDelete": true }, "istio": { - "istioctlVersion": "1.23.1", - "newVersion": "", + "istioctlVersion": "1.24.1", "tag": "prod-stable", + "targetVersion": "asm-1-23", "url": "https://istio.io/downloadIstio", "version": "asm-1-22" }, diff --git a/config/public-cloud-personal-dev.json b/config/public-cloud-personal-dev.json index eb4d55d7c..64fc7e34e 100644 --- a/config/public-cloud-personal-dev.json +++ b/config/public-cloud-personal-dev.json @@ -159,8 +159,8 @@ }, "istio": { "istioctlVersion": "1.23.1", - "newVersion": "", "tag": "prod-stable", + "targetVersion": "", "url": "https://istio.io/downloadIstio", "version": "asm-1-22" }, diff --git a/dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam b/dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam index 458a72e9e..d7cbbc01c 100644 --- a/dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam +++ b/dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam @@ -1,7 +1,7 @@ using '../templates/svc-cluster.bicep' param kubernetesVersion = '{{ .kubernetesVersion }}' -param istioVersion = ['{{ .svc.istio.version }}', '{{ .svc.istio.newVersion }}'] +param istioVersion = ['{{ .svc.istio.version }}', '{{ .svc.istio.targetVersion }}'] param vnetAddressPrefix = '{{ .vnetAddressPrefix }}' param subnetPrefix = '{{ .subnetPrefix }}' param podSubnetPrefix = '{{ .podSubnetPrefix }}' diff --git a/dev-infrastructure/scripts/istio.sh b/dev-infrastructure/scripts/istio.sh index dcd77880f..974ba27c2 100755 --- a/dev-infrastructure/scripts/istio.sh +++ b/dev-infrastructure/scripts/istio.sh @@ -3,6 +3,7 @@ set -euxo pipefail echo "********** ISTIO Upgrade Started **************" +# Followed this guide for istio upgrade https://learn.microsoft.com/en-us/azure/aks/istio-upgrade # Get the current istio and check if it match target version export CURRENTVERSION=$(kubectl get pods -n aks-istio-system -o jsonpath='{.items[*].metadata.name}' | tr ' ' '\n' | tail -n +2 | head -n 1 | cut -d '-' -f 2,3,4) if [[ "$CURRENTVERSION" == "$TARGET_VERSION" ]] || [[ -z "$TARGET_VERSION" ]]; then @@ -27,6 +28,7 @@ istioctl tag set prod-canary --revision "${NEWVERSION}" --istioNamespace aks-ist # Get the namespaces with the label istio.io/rev=$TAG export namespaces=$(kubectl get namespaces --selector=istio.io/rev="$TAG") +# Label the current namespace the TAG for ns in $namespaces; do kubectl label "$ns" default istio.io/rev="$TAG" --overwrite done