From 3a9ad9b91138a54d7eab45c4942d4934052083c1 Mon Sep 17 00:00:00 2001 From: katherinelc321 Date: Mon, 24 Feb 2025 15:50:39 -0500 Subject: [PATCH] rm istio from personal-dev --- Makefile | 7 ++++++- config/config.schema.json | 6 ++++++ config/config.yaml | 4 ++++ .../configurations/svc-cluster.tmpl.bicepparam | 1 + dev-infrastructure/scripts/istio.sh | 5 +++++ dev-infrastructure/svc-pipeline.yaml | 2 ++ dev-infrastructure/templates/svc-cluster.bicep | 5 ++++- istio/Makefile | 4 ++++ tooling/templatize/testdata/pipeline.yaml | 3 +++ 9 files changed, 35 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e103fd243..b2741f199 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,12 @@ services_all = $(join services_svc,services_mgmt) # Pipelines section # This sections is used to reference pipeline runs and should replace # the usage of `svc-deploy.sh` script in the future. -services_svc_pipelines = istio acrpull backend frontend cluster-service maestro.server +# Don't install istio in persona dev +ifeq ($(DEPLOY_ENV), personal-dev) + services_svc_pipelines = acrpull backend frontend cluster-service maestro.server +else + services_svc_pipelines = istio acrpull backend frontend cluster-service maestro.server +endif # Don't apply mgmt cluster fixes to personal clusters ifeq ($(DEPLOY_ENV), personal-dev) services_mgmt_pipelines = hypershiftoperator maestro.agent acm diff --git a/config/config.schema.json b/config/config.schema.json index 6c071d74d..07888efb1 100644 --- a/config/config.schema.json +++ b/config/config.schema.json @@ -133,6 +133,11 @@ } }, "properties": { + "envType": { + "type": "string", + "enum": ["personal-dev", "personal-perfscale", "dev", "cs-pr"], + "description": "Defines the environment type for conditional logic or templating." + }, "aroDevopsMsiId": { "type": "string" }, @@ -192,6 +197,7 @@ "imageTag" ] }, + "clusterService": { "type": "object", "properties": { diff --git a/config/config.yaml b/config/config.yaml index 8ecd5c25f..e2cee60af 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -308,6 +308,7 @@ clouds: dev: # this is the integrated DEV environment defaults: + envType: 'dev' mgmt: aks: systemAgentPool: @@ -337,6 +338,7 @@ clouds: cs-pr: # this is the cluster service PR check and full cycle test environment defaults: + envType: 'cs-pr' svc: aks: # MC AKS nodepools @@ -374,6 +376,7 @@ clouds: personal-dev: # this is the personal DEV environment defaults: + envType: 'personal-dev' # Cluster Service clusterService: postgres: @@ -394,6 +397,7 @@ clouds: zoneRedundantMode: 'Disabled' personal-perfscale: defaults: + envType: 'personal-perfscale' dns: regionalSubdomain: '{{ .ctx.regionShort }}' mgmt: diff --git a/dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam b/dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam index 84ede427c..c6c18d49a 100644 --- a/dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam +++ b/dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam @@ -1,5 +1,6 @@ using '../templates/svc-cluster.bicep' +param envType = '{{ .envType }}' param istioVersions = '{{ .svc.istio.versions }}' // AKS diff --git a/dev-infrastructure/scripts/istio.sh b/dev-infrastructure/scripts/istio.sh index 5fc6c1a49..144499486 100755 --- a/dev-infrastructure/scripts/istio.sh +++ b/dev-infrastructure/scripts/istio.sh @@ -1,6 +1,11 @@ #!/bin/bash set -euo pipefail +# Exit early if running in personal-dev environment +if [[ "${DEPLOY_ENV:-}" == "personal-dev" ]]; then + echo "Skipping Istio upgrade: Running in personal-dev environment." + exit 0 +fi 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) diff --git a/dev-infrastructure/svc-pipeline.yaml b/dev-infrastructure/svc-pipeline.yaml index f518845d0..211026be6 100644 --- a/dev-infrastructure/svc-pipeline.yaml +++ b/dev-infrastructure/svc-pipeline.yaml @@ -81,6 +81,8 @@ resourceGroups: input: step: region-output name: azureMonitoringWorkspaceId + - name: envType + configRef: envType dependsOn: - svc-oncert-private-kv-issuer - svc-oncert-public-kv-issuer diff --git a/dev-infrastructure/templates/svc-cluster.bicep b/dev-infrastructure/templates/svc-cluster.bicep index db8caf9e3..4ab27b47f 100644 --- a/dev-infrastructure/templates/svc-cluster.bicep +++ b/dev-infrastructure/templates/svc-cluster.bicep @@ -1,5 +1,8 @@ import { getLocationAvailabilityZonesCSV, determineZoneRedundancy, csvToArray } from '../modules/common.bicep' +@description('Environment type, e.g., personal-dev, int') +param envType string + @description('Azure Region Location') param location string = resourceGroup().location @@ -217,7 +220,7 @@ module svcCluster '../modules/aks-cluster-base.bicep' = { aksEtcdKVEnableSoftDelete: aksEtcdKVEnableSoftDelete aksClusterOutboundIPAddressIPTags: aksClusterOutboundIPAddressIPTags kubernetesVersion: kubernetesVersion - deployIstio: true + deployIstio: envType != 'personal-dev' istioVersions: split(istioVersions, ',') istioIngressGatewayIPAddressName: istioIngressGatewayIPAddressName istioIngressGatewayIPAddressIPTags: istioIngressGatewayIPAddressIPTags diff --git a/istio/Makefile b/istio/Makefile index ffbf0a525..b166be039 100644 --- a/istio/Makefile +++ b/istio/Makefile @@ -3,9 +3,13 @@ HELM_CMD ?= helm upgrade --install deploy: +ifeq ($(DEPLOY_ENV), personal-dev) + @echo "Skipping Istio deployment: Running in personal-dev environment." +else ${HELM_CMD} istio \ deploy/helm/istio/ \ --namespace aks-istio-system +endif .PHONY: deploy undeploy: diff --git a/tooling/templatize/testdata/pipeline.yaml b/tooling/templatize/testdata/pipeline.yaml index 3a7a492a1..d479d05ff 100644 --- a/tooling/templatize/testdata/pipeline.yaml +++ b/tooling/templatize/testdata/pipeline.yaml @@ -24,6 +24,9 @@ resourceGroups: template: templates/svc-cluster.bicep parameters: test.bicepparam deploymentLevel: ResourceGroup + variables: + - name: envType + configRef: envType - name: cxChildZone action: DelegateChildZone parentZone: