Skip to content

Commit

Permalink
rm istio from personal-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
katherinelc321 committed Feb 24, 2025
1 parent ae6684d commit 3a9ad9b
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions config/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -192,6 +197,7 @@
"imageTag"
]
},

"clusterService": {
"type": "object",
"properties": {
Expand Down
4 changes: 4 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ clouds:
dev:
# this is the integrated DEV environment
defaults:
envType: 'dev'
mgmt:
aks:
systemAgentPool:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -374,6 +376,7 @@ clouds:
personal-dev:
# this is the personal DEV environment
defaults:
envType: 'personal-dev'
# Cluster Service
clusterService:
postgres:
Expand All @@ -394,6 +397,7 @@ clouds:
zoneRedundantMode: 'Disabled'
personal-perfscale:
defaults:
envType: 'personal-perfscale'
dns:
regionalSubdomain: '{{ .ctx.regionShort }}'
mgmt:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using '../templates/svc-cluster.bicep'

param envType = '{{ .envType }}'
param istioVersions = '{{ .svc.istio.versions }}'

// AKS
Expand Down
5 changes: 5 additions & 0 deletions dev-infrastructure/scripts/istio.sh
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 2 additions & 0 deletions dev-infrastructure/svc-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion dev-infrastructure/templates/svc-cluster.bicep
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions istio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions tooling/templatize/testdata/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3a9ad9b

Please sign in to comment.