Skip to content

Commit 89d3608

Browse files
authored
use istio tag instead of version for namespace labeling (#1021)
Signed-off-by: Gerd Oberlechner <[email protected]>
1 parent a4a3dc6 commit 89d3608

File tree

10 files changed

+19
-9
lines changed

10 files changed

+19
-9
lines changed

backend/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ deploy:
3939
-g ${RESOURCEGROUP} \
4040
-n backend \
4141
--query clientId -o tsv) && \
42-
ISTO_VERSION=$$(az aks show -n ${AKS_NAME} -g ${RESOURCEGROUP} --query serviceMeshProfile.istio.revisions[-1] -o tsv) && \
4342
DB_URL=$$(az cosmosdb show -n ${DB_NAME} -g ${RESOURCEGROUP} --query documentEndpoint -o tsv) && \
4443
kubectl create namespace aro-hcp --dry-run=client -o json | kubectl apply -f - && \
45-
kubectl label namespace aro-hcp "istio.io/rev=$${ISTO_VERSION}" --overwrite=true && \
44+
kubectl label namespace aro-hcp "istio.io/rev=${ISTO_TAG}" --overwrite=true && \
4645
${HELM_CMD} aro-hcp-backend-dev \
4746
deploy/helm/backend/ \
4847
--set configMap.databaseName=${DB_NAME} \

backend/pipeline.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ resourceGroups:
2626
configRef: frontend.cosmosDB.name
2727
- name: COMMIT
2828
configRef: backend.imageTag
29+
- name: ISTO_TAG
30+
configRef: svc.istio.tag

cluster-service/Makefile

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ ZONE_NAME ?= "${REGIONAL_DNS_SUBDOMAIN}.${BASE_DNS_ZONE_NAME}"
44

55

66
deploy: provision-shard
7-
@ISTO_VERSION=$(shell az aks show -n ${AKS_NAME} -g ${RESOURCEGROUP} --query serviceMeshProfile.istio.revisions[-1] -o tsv) && \
8-
kubectl create namespace cluster-service --dry-run=client -o json | kubectl apply -f - && \
9-
kubectl label namespace cluster-service "istio.io/rev=$${ISTO_VERSION}" --overwrite=true && \
7+
@kubectl create namespace cluster-service --dry-run=client -o json | kubectl apply -f - && \
8+
kubectl label namespace cluster-service "istio.io/rev=${ISTO_TAG}" --overwrite=true && \
109
AZURE_CS_MI_CLIENT_ID=$(shell az identity show -g ${RESOURCEGROUP} -n clusters-service --query clientId -o tsv) && \
1110
CS_SERVICE_PRINCIPAL_CREDS_BASE64='$(shell az keyvault secret show --vault-name "${SERVICE_KV}" --name "aro-hcp-dev-sp-cs" | jq .value -r | base64 | tr -d '\n')' && \
1211
TENANT_ID=$(shell az account show --query tenantId --output tsv) && \

cluster-service/pipeline.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ resourceGroups:
7272
configRef: clusterService.azureOperatorsManagedIdentities.imageRegistry.roleName
7373
- name: OP_CLOUD_NETWORK_CONFIG_ROLE_NAME
7474
configRef: clusterService.azureOperatorsManagedIdentities.cloudNetworkConfig.roleName
75+
- name: ISTO_TAG
76+
configRef: svc.istio.tag
77+
7578

7679
# this is maestro consumer registration stuff
7780
# this goes away when we have a real registration process

dev-infrastructure/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ svc: svc.rg
213213
configurations/svc-cluster.bicepparam \
214214
--parameters \
215215
persist=${PERSIST}
216+
@TARGET_VERSION=$(ISTIO_TARGET_VERSION) ISTIOCTL_VERSION=$(ISTIOCTL_VERSION) TAG=$(ISTIO_TAG) scripts/istio.sh
216217
.PHONY: svc
217218

218219
svc.enable-aks-metrics:

dev-infrastructure/config.tmpl.mk

+4
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ OIDC_STORAGE_ACCOUNT ?= {{ .oidcStorageAccountName }}
1616
CX_KV_NAME ?= {{ .cxKeyVault.name }}
1717
MSI_KV_NAME ?= {{ .msiKeyVault.name }}
1818
MGMT_KV_NAME ?= {{ .mgmtKeyVault.name }}
19+
20+
ISTIO_TARGET_VERSION ?= {{ .svc.istio.targetVersion }}
21+
ISTIOCTL_VERSION ?= {{ .svc.istio.istioctlVersion }}
22+
ISTIO_TAG ?= {{ .svc.istio.tag }}

frontend/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ deploy:
4949
--name ${AKS_NAME} \
5050
--query addonProfiles.azureKeyvaultSecretsProvider.identity.clientId \
5151
--output tsv); \
52-
ISTO_VERSION=$$(az aks show -n ${AKS_NAME} -g ${RESOURCEGROUP} --query serviceMeshProfile.istio.revisions[-1] -o tsv) && \
5352
DB_URL=$$(az cosmosdb show -n ${DB_NAME} -g ${RESOURCEGROUP} --query documentEndpoint -o tsv) && \
5453
TENANT_ID=$(shell az account show --query tenantId --output tsv) && \
5554
kubectl create namespace aro-hcp --dry-run=client -o json | kubectl apply -f - && \
56-
kubectl label namespace aro-hcp "istio.io/rev=$${ISTO_VERSION}" --overwrite=true && \
55+
kubectl label namespace aro-hcp "istio.io/rev=${ISTO_TAG}" --overwrite=true && \
5756
${HELM_CMD} aro-hcp-frontend-dev \
5857
deploy/helm/frontend/ \
5958
--set azure.clientId=$${SECRET_STORE_MI_CLIENT_ID} \

frontend/pipeline.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ resourceGroups:
3030
configRef: serviceKeyVault.name
3131
- name: CERTIFICATE_NAME
3232
configRef: frontend.cert.name
33+
- name: ISTO_TAG
34+
configRef: svc.istio.tag

maestro/server/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
deploy:
44
@kubectl create namespace maestro --dry-run=client -o json | kubectl apply -f -
5-
@ISTO_VERSION=$(shell az aks show -n ${AKS_NAME} -g ${SVC_RG} --query serviceMeshProfile.istio.revisions[-1] -o tsv) && \
6-
kubectl label ${KUBECTL_DRY_RUN} namespace maestro "istio.io/rev=$${ISTO_VERSION}" --overwrite=true
5+
@kubectl label ${KUBECTL_DRY_RUN} namespace maestro "istio.io/rev=${ISTO_TAG}" --overwrite=true
76
@EVENTGRID_HOSTNAME=$(shell az resource show -n ${EVENTGRID_NAME} -g ${REGION_RG} --resource-type "Microsoft.EventGrid/namespaces" --query properties.topicSpacesConfiguration.hostname -o tsv) && \
87
TENANT_ID=$(shell az account show --query tenantId --output tsv) && \
98
MAESTRO_MI_CLIENT_ID=$(shell az identity show -g "${SVC_RG}" -n maestro-server --query clientId -o tsv) && \

maestro/server/pipeline.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ resourceGroups:
3838
configRef: serviceKeyVault.name
3939
- name: MQTT_CLIENT_NAME
4040
configRef: maestro.serverMqttClientName
41+
- name: ISTO_TAG
42+
configRef: svc.istio.tag

0 commit comments

Comments
 (0)