Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aro 15108 #2

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -119,6 +119,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 @@ -178,6 +183,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 @@ -306,6 +306,7 @@ clouds:
dev:
# this is the integrated DEV environment
defaults:
envType: 'dev'
mgmt:
aks:
systemAgentPool:
Expand Down Expand Up @@ -335,6 +336,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 @@ -372,6 +374,7 @@ clouds:
personal-dev:
# this is the personal DEV environment
defaults:
envType: 'personal-dev'
# Cluster Service
clusterService:
postgres:
Expand All @@ -392,6 +395,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
Loading