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

EV2 pipeline tests #895

Closed
wants to merge 9 commits into from
Closed
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
12 changes: 6 additions & 6 deletions config/config.msft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ defaults:
maestro:
eventGrid:
name: arohcp-maestro-{{ .ctx.regionShort }}
maxClientSessionsPerAuthName: '4'
maxClientSessionsPerAuthName: 4
private: false
certDomain: 'selfsigned.maestro.keyvault.azure.com'
postgres:
name: arohcp-maestro-{{ .ctx.regionShort }}
serverVersion: '15'
serverStorageSizeGB: '32'
serverStorageSizeGB: 32
deploy: false
private: false
minTLSVersion: 'TLSV1.2'
Expand Down Expand Up @@ -89,7 +89,7 @@ defaults:

serviceKeyVault:
name: arohcp-svc-{{ .ctx.regionShort }}
rg: hcp-underlay-{{ .ctx.regionShort }}
rg: hcp-underlay-{{ .ctx.region }}-svc
region: {{ .ctx.region }}
softDelete: false
private: false
Expand Down Expand Up @@ -162,7 +162,7 @@ clouds:
osDiskSizeGB: 100
azCount: 3
# DNS
baseDnsZoneName: aro-hcp.azure-test.net'
baseDnsZoneName: aro-hcp.azure-test.net
regionalDNSSubdomain: '{{ .ctx.region }}'

# ACR
Expand Down Expand Up @@ -191,9 +191,9 @@ clouds:

# Grafana
monitoring:
grafanaAdminGroupPrincipalId: '??? the one to be used as Grafana Admin in grafana.bicep ???'
grafanaAdminGroupPrincipalId: '2fdb57d4-3fd3-415d-b604-1d0e37a188fe' # Azure Red Hat OpenShift MSFT Engineering

# DEVOPS MSI
# lets create this MSI manually for the time being and automate soon
# but we should use the MSI name as an input and not the resource ID of the MSI
aroDevopsMsiId: '??? the one for OIDC deployment script / lives in the global RG / needs to be created first thing on regional buildout ???'
aroDevopsMsiId: '/subscriptions/5299e6b7-b23b-46c8-8277-dc1147807117/resourcegroups/global-shared-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aroint-int-public-oidc'
4 changes: 2 additions & 2 deletions config/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
"type": "object",
"properties": {
"maxClientSessionsPerAuthName": {
"type": "string"
"type": "integer"
},
"name": {
"type": "string"
Expand Down Expand Up @@ -264,7 +264,7 @@
"type": "boolean"
},
"serverStorageSizeGB": {
"type": "string"
"type": "integer"
},
"serverVersion": {
"type": "string"
Expand Down
6 changes: 3 additions & 3 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defaults:

# General AKS config
kubernetesVersion: 1.30.5
istioVersion: "['asm-1-22']"
istioVersion: "asm-1-22"
vnetAddressPrefix: "10.128.0.0/14"
subnetPrefix: "10.128.8.0/21"
podSubnetPrefix: "10.128.64.0/18"
Expand Down Expand Up @@ -51,13 +51,13 @@ defaults:
maestro:
eventGrid:
name: arohcp-maestro-{{ .ctx.regionShort }}
maxClientSessionsPerAuthName: '4'
maxClientSessionsPerAuthName: 4
private: false
certDomain: 'selfsigned.maestro.keyvault.azure.com'
postgres:
name: arohcp-maestro-{{ .ctx.regionShort }}
serverVersion: '15'
serverStorageSizeGB: '32'
serverStorageSizeGB: 32
deploy: true
private: false
minTLSVersion: 'TLSV1.2'
Expand Down
6 changes: 3 additions & 3 deletions config/public-cloud-cs-pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
"repositories": "registry.k8s.io/external-dns/external-dns,quay.io/acm-d/rhtap-hypershift-operator,quay.io/app-sre/uhc-clusters-service,quay.io/package-operator/package-operator-package",
"rg": "hcp-underlay-westus3-imagesync-dev"
},
"istioVersion": "['asm-1-22']",
"istioVersion": "asm-1-22",
"kubernetesVersion": "1.30.5",
"maestro": {
"certDomain": "selfsigned.maestro.keyvault.azure.com",
"consumerName": "hcp-underlay-cspr-mgmt-1",
"eventGrid": {
"maxClientSessionsPerAuthName": "4",
"maxClientSessionsPerAuthName": 4,
"name": "arohcp-maestro-cspr",
"private": false
},
Expand All @@ -68,7 +68,7 @@
"minTLSVersion": "TLSV1.2",
"name": "arohcp-maestro-cspr",
"private": false,
"serverStorageSizeGB": "32",
"serverStorageSizeGB": 32,
"serverVersion": "15"
},
"restrictIstioIngress": false,
Expand Down
6 changes: 3 additions & 3 deletions config/public-cloud-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
"repositories": "registry.k8s.io/external-dns/external-dns,quay.io/acm-d/rhtap-hypershift-operator,quay.io/app-sre/uhc-clusters-service,quay.io/package-operator/package-operator-package",
"rg": "hcp-underlay-westus3-imagesync-dev"
},
"istioVersion": "['asm-1-22']",
"istioVersion": "asm-1-22",
"kubernetesVersion": "1.30.5",
"maestro": {
"certDomain": "selfsigned.maestro.keyvault.azure.com",
"consumerName": "hcp-underlay-dev-mgmt-1",
"eventGrid": {
"maxClientSessionsPerAuthName": "4",
"maxClientSessionsPerAuthName": 4,
"name": "arohcp-maestro-dev",
"private": false
},
Expand All @@ -68,7 +68,7 @@
"minTLSVersion": "TLSV1.2",
"name": "arohcp-maestro-dev",
"private": false,
"serverStorageSizeGB": "32",
"serverStorageSizeGB": 32,
"serverVersion": "15"
},
"restrictIstioIngress": true,
Expand Down
12 changes: 6 additions & 6 deletions config/public-cloud-msft-int.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"acrName": "arohcpint",
"aksName": "aro-hcp-aks",
"aroDevopsMsiId": "??? the one for OIDC deployment script / lives in the global RG / needs to be created first thing on regional buildout ???",
"baseDnsZoneName": "aro-hcp.azure-test.net'",
"aroDevopsMsiId": "/subscriptions/5299e6b7-b23b-46c8-8277-dc1147807117/resourcegroups/global-shared-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aroint-int-public-oidc",
"baseDnsZoneName": "aro-hcp.azure-test.net",
"baseDnsZoneRG": "westus3-shared-resources",
"clusterService": {
"acrRG": "westus3-shared-resources",
Expand Down Expand Up @@ -57,7 +57,7 @@
"certDomain": "selfsigned.maestro.keyvault.azure.com",
"consumerName": "hcp-underlay-int-mgmt-1",
"eventGrid": {
"maxClientSessionsPerAuthName": "4",
"maxClientSessionsPerAuthName": 4,
"name": "arohcp-maestro-int",
"private": false
},
Expand All @@ -68,7 +68,7 @@
"minTLSVersion": "TLSV1.2",
"name": "arohcp-maestro-int",
"private": false,
"serverStorageSizeGB": "32",
"serverStorageSizeGB": 32,
"serverVersion": "15"
},
"restrictIstioIngress": true,
Expand Down Expand Up @@ -102,7 +102,7 @@
"softDelete": false
},
"monitoring": {
"grafanaAdminGroupPrincipalId": "??? the one to be used as Grafana Admin in grafana.bicep ???",
"grafanaAdminGroupPrincipalId": "2fdb57d4-3fd3-415d-b604-1d0e37a188fe",
"grafanaName": "arohcp-int",
"msiName": "aro-hcp-metrics-msi-int",
"workspaceName": "arohcp-int"
Expand All @@ -127,7 +127,7 @@
"name": "arohcp-svc-int",
"private": false,
"region": "westus3",
"rg": "hcp-underlay-int",
"rg": "hcp-underlay-westus3-svc",
"softDelete": false
},
"subnetPrefix": "10.128.8.0/21",
Expand Down
6 changes: 3 additions & 3 deletions config/public-cloud-personal-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
"repositories": "registry.k8s.io/external-dns/external-dns,quay.io/acm-d/rhtap-hypershift-operator,quay.io/app-sre/uhc-clusters-service,quay.io/package-operator/package-operator-package",
"rg": "hcp-underlay-westus3-imagesync-dev"
},
"istioVersion": "['asm-1-22']",
"istioVersion": "asm-1-22",
"kubernetesVersion": "1.30.5",
"maestro": {
"certDomain": "selfsigned.maestro.keyvault.azure.com",
"consumerName": "hcp-underlay-usw3tst-mgmt-1",
"eventGrid": {
"maxClientSessionsPerAuthName": "4",
"maxClientSessionsPerAuthName": 4,
"name": "arohcp-maestro-usw3tst",
"private": false
},
Expand All @@ -68,7 +68,7 @@
"minTLSVersion": "TLSV1.2",
"name": "arohcp-maestro-usw3tst",
"private": false,
"serverStorageSizeGB": "32",
"serverStorageSizeGB": 32,
"serverVersion": "15"
},
"restrictIstioIngress": true,
Expand Down
32 changes: 16 additions & 16 deletions dev-infrastructure/configurations/svc-cluster.tmpl.bicepparam
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
using '../templates/svc-cluster.bicep'

param kubernetesVersion = '{{ .kubernetesVersion }}'
param istioVersion = {{ .istioVersion }}
param istioVersion = ['{{ .istioVersion }}']
param vnetAddressPrefix = '{{ .vnetAddressPrefix }}'
param subnetPrefix = '{{ .subnetPrefix }}'
param podSubnetPrefix = '{{ .podSubnetPrefix }}'
param aksClusterName = '{{ .aksName }}'
param aksKeyVaultName = '{{ .svc.etcd.kvName }}'
param aksEtcdKVEnableSoftDelete = {{ .svc.etcd.kvSoftDelete }}
param aksEtcdKVEnableSoftDelete = any('{{ .svc.etcd.kvSoftDelete }}')

param userAgentMinCount = {{ .svc.userAgentPool.minCount }}
param userAgentMaxCount = {{ .svc.userAgentPool.maxCount }}
param userAgentMinCount = any('{{ .svc.userAgentPool.minCount }}')
param userAgentMaxCount = any('{{ .svc.userAgentPool.maxCount }}')
param userAgentVMSize = '{{ .svc.userAgentPool.vmSize }}'
param aksUserOsDiskSizeGB = {{ .svc.userAgentPool.osDiskSizeGB }}
param userAgentPoolAZCount = {{ .svc.userAgentPool.azCount }}
param aksUserOsDiskSizeGB = any({{ .svc.userAgentPool.osDiskSizeGB }})
param userAgentPoolAZCount = any('{{ .svc.userAgentPool.azCount }}')

param disableLocalAuth = {{ .frontend.cosmosDB.disableLocalAuth }}
param deployFrontendCosmos = {{ .frontend.cosmosDB.deploy }}
param disableLocalAuth = any('{{ .frontend.cosmosDB.disableLocalAuth }}')
param deployFrontendCosmos = any('{{ .frontend.cosmosDB.deploy }}')
param rpCosmosDbName = '{{ .frontend.cosmosDB.name }}'
param rpCosmosDbPrivate = {{ .frontend.cosmosDB.private }}
param rpCosmosDbPrivate = any('{{ .frontend.cosmosDB.private }}')

param maestroEventGridNamespacesName = '{{ .maestro.eventGrid.name }}'
param maestroServerMqttClientName = '{{ .maestro.serverMqttClientName }}'
param maestroCertDomain = '{{ .maestro.certDomain}}'
param maestroPostgresServerName = '{{ .maestro.postgres.name }}'
param maestroPostgresServerMinTLSVersion = '{{ .maestro.postgres.minTLSVersion }}'
param maestroPostgresServerVersion = '{{ .maestro.postgres.serverVersion }}'
param maestroPostgresServerStorageSizeGB = {{ .maestro.postgres.serverStorageSizeGB }}
param deployMaestroPostgres = {{ .maestro.postgres.deploy }}
param maestroPostgresPrivate = {{ .maestro.postgres.private }}
param maestroPostgresServerStorageSizeGB = any('{{ .maestro.postgres.serverStorageSizeGB }}')
param deployMaestroPostgres = any('{{ .maestro.postgres.deploy }}')
param maestroPostgresPrivate = any('{{ .maestro.postgres.private }}')

param deployCsInfra = {{ .clusterService.postgres.deploy }}
param deployCsInfra = any('{{ .clusterService.postgres.deploy }}')
param csPostgresServerName = '{{ .clusterService.postgres.name }}'
param csPostgresServerMinTLSVersion = '{{ .clusterService.postgres.minTLSVersion }}'
param clusterServicePostgresPrivate = {{ .clusterService.postgres.private }}
param clusterServicePostgresPrivate = any('{{ .clusterService.postgres.private }}')

param serviceKeyVaultName = '{{ .serviceKeyVault.name }}'
param serviceKeyVaultResourceGroup = '{{ .serviceKeyVault.rg }}'
param serviceKeyVaultLocation = '{{ .serviceKeyVault.region }}'
param serviceKeyVaultSoftDelete = {{ .serviceKeyVault.softDelete }}
param serviceKeyVaultPrivate = {{ .serviceKeyVault.private }}
param serviceKeyVaultSoftDelete = any('{{ .serviceKeyVault.softDelete }}')
param serviceKeyVaultPrivate = any('{{ .serviceKeyVault.private }}')

param acrPullResourceGroups = ['{{ .serviceComponentAcrResourceGroups }}']
param clustersServiceAcrResourceGroupNames = ['{{ .clusterService.acrRG }}']
Expand Down
2 changes: 1 addition & 1 deletion dev-infrastructure/svc-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
serviceGroup: Microsoft.Azure.ARO.Test
serviceGroup: Microsoft.Azure.ARO.HCP.Service.Infra
rolloutName: Service Cluster Rollout
resourceGroups:
- name: {{ .svc.rg }}
Expand Down
4 changes: 2 additions & 2 deletions dev-infrastructure/templates/svc-cluster.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ module csDnsZoneContributor '../modules/dns/zone-contributor.bicep' = {
}
}

resource clustersServiceAcrResourceGroups 'Microsoft.Resources/resourceGroups@2023-07-01' existing = [
/*resource clustersServiceAcrResourceGroups 'Microsoft.Resources/resourceGroups@2023-07-01' existing = [
for rg in clustersServiceAcrResourceGroupNames: {
name: rg
scope: subscription()
Expand All @@ -362,7 +362,7 @@ module acrManageTokenRole '../modules/acr-permissions.bicep' = [
acrResourceGroupid: clustersServiceAcrResourceGroups[i].id
}
}
]
]*/

// oidc

Expand Down
2 changes: 1 addition & 1 deletion frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ deploy:
DB_URL=$$(az cosmosdb show -n ${DB_NAME} -g ${RESOURCEGROUP} --query documentEndpoint -o tsv) && \
kubectl create namespace aro-hcp --dry-run=client -o json | kubectl apply -f - && \
kubectl label namespace aro-hcp "istio.io/rev=$${ISTO_VERSION}" --overwrite=true && \
helm upgrade --install aro-hcp-frontend-dev \
helm upgrade --install ${HELM_DRY_RUN} aro-hcp-frontend-dev \
deploy/helm/frontend/ \
--set configMap.databaseName=${DB_NAME} \
--set configMap.databaseUrl="$${DB_URL}" \
Expand Down
4 changes: 4 additions & 0 deletions frontend/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ resourceGroups:
- name: deploy
action: Shell
command: ["make", "deploy"]
dryRun:
envVars:
- name: HELM_DRY_RUN
value: "--dry-run=server --debug"
env:
- name: ARO_HCP_IMAGE_ACR
configRef: svcAcrName
Expand Down
2 changes: 1 addition & 1 deletion tooling/templatize/pkg/ev2/mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func EV2Mapping(input config.Variables, prefix []string) (map[string]string, map
}
replaced[key] = replacement
} else {
placeholder := fmt.Sprintf("__%s__", strings.ToUpper(strings.Join(nestedKey, "_")))
placeholder := fmt.Sprintf("__%s__", strings.Join(nestedKey, "_"))
output[placeholder] = strings.Join(nestedKey, ".")
replaced[key] = placeholder
}
Expand Down
20 changes: 10 additions & 10 deletions tooling/templatize/pkg/ev2/mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ func TestMapping(t *testing.T) {
},
}
expectedFlattened := map[string]string{
"__KEY1__": "key1",
"__KEY2__": "key2",
"__KEY3__": "key3",
"__PARENT_NESTED__": "parent.nested",
"__PARENT_DEEPER_DEEPEST__": "parent.deeper.deepest",
"__key1__": "key1",
"__key2__": "key2",
"__key3__": "key3",
"__parent_nested__": "parent.nested",
"__parent_deeper_deepest__": "parent.deeper.deepest",
}
expectedReplace := map[string]interface{}{
"key1": "__KEY1__",
"key2": "__KEY2__",
"key3": "__KEY3__",
"key1": "__key1__",
"key2": "__key2__",
"key3": "__key3__",
"parent": map[string]interface{}{
"nested": "__PARENT_NESTED__",
"deeper": map[string]interface{}{"deepest": "__PARENT_DEEPER_DEEPEST__"},
"nested": "__parent_nested__",
"deeper": map[string]interface{}{"deepest": "__parent_deeper_deepest__"},
},
}
flattened, replace := EV2Mapping(testData, []string{})
Expand Down
2 changes: 1 addition & 1 deletion tooling/templatize/pkg/ev2/pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func TestProcessPipelineForEV2(t *testing.T) {
configProvider := config.NewConfigProvider("../../testdata/config.yaml")
vars, err := configProvider.GetVariables("public", "int", "", NewEv2ConfigReplacements())
vars, err := configProvider.GetVariables("public", "int", "", NewEv2SystemVariableReplacements())
if err != nil {
t.Errorf("failed to get variables: %v", err)
}
Expand Down
Loading
Loading