From 20b0dd0b39aa19e1be1913bace8045e3f8f05977 Mon Sep 17 00:00:00 2001 From: Gerd Oberlechner Date: Thu, 28 Nov 2024 17:12:54 +0100 Subject: [PATCH] prepare global resources pipeline Signed-off-by: Gerd Oberlechner --- config/config.msft.yaml | 8 ++++++-- config/config.schema.json | 18 +++++++++++++++--- config/config.yaml | 6 ++++-- config/public-cloud-cs-pr.json | 5 ++++- config/public-cloud-dev.json | 5 ++++- config/public-cloud-msft-int.json | 5 ++++- config/public-cloud-personal-dev.json | 5 ++++- dev-infrastructure/svc-pipeline.yaml | 9 +++++++++ 8 files changed, 50 insertions(+), 11 deletions(-) diff --git a/config/config.msft.yaml b/config/config.msft.yaml index f8a337509..ed4ee7a13 100644 --- a/config/config.msft.yaml +++ b/config/config.msft.yaml @@ -1,9 +1,13 @@ $schema: config.schema.json defaults: region: {{ .ctx.region }} + # Resourcegroups - globalRG: global-shared-resources - regionRG: '{{ .ctx.region }}-shared-resources' + regionRG: 'global-shared-resources' + + global: + rg: global-shared-resources + subscription: hcp-{{ .ctx.region }} # General AKS config kubernetesVersion: 1.30.5 diff --git a/config/config.schema.json b/config/config.schema.json index 3569ae1d8..e3ef80475 100644 --- a/config/config.schema.json +++ b/config/config.schema.json @@ -142,8 +142,20 @@ "cosmosDB" ] }, - "globalRG": { - "type": "string" + "global": { + "type": "object", + "properties": { + "rg": { + "type": "string" + }, + "subscription": { + "type": "string" + } + }, + "required": [ + "rg", + "subscription" + ] }, "hypershift": { "type": "object", @@ -610,7 +622,7 @@ "externalDNS", "firstPartyAppClientId", "frontend", - "globalRG", + "global", "hypershift", "hypershiftOperator", "imageSync", diff --git a/config/config.yaml b/config/config.yaml index f13eb75b6..38df15805 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -1,10 +1,12 @@ $schema: config.schema.json defaults: region: {{ .ctx.region }} - # Resourcegroups - globalRG: global regionRG: hcp-underlay-{{ .ctx.regionShort }} + global: + rg: global-shared-resources + subscription: hcp-{{ .ctx.region }} + # General AKS config kubernetesVersion: 1.30.5 istioVersion: "asm-1-22" diff --git a/config/public-cloud-cs-pr.json b/config/public-cloud-cs-pr.json index 6409c8a29..526f1bfc6 100644 --- a/config/public-cloud-cs-pr.json +++ b/config/public-cloud-cs-pr.json @@ -33,7 +33,10 @@ "private": false } }, - "globalRG": "global", + "global": { + "rg": "global-shared-resources", + "subscription": "hcp-westus3" + }, "hypershift": { "additionalInstallArg": "--tech-preview-no-upgrade", "externalDNSManagedIdentityName": "external-dns", diff --git a/config/public-cloud-dev.json b/config/public-cloud-dev.json index be870536c..aff10772b 100644 --- a/config/public-cloud-dev.json +++ b/config/public-cloud-dev.json @@ -33,7 +33,10 @@ "private": false } }, - "globalRG": "global", + "global": { + "rg": "global-shared-resources", + "subscription": "hcp-westus3" + }, "hypershift": { "additionalInstallArg": "--tech-preview-no-upgrade", "externalDNSManagedIdentityName": "external-dns", diff --git a/config/public-cloud-msft-int.json b/config/public-cloud-msft-int.json index 0d7d0ced4..d6f27756e 100644 --- a/config/public-cloud-msft-int.json +++ b/config/public-cloud-msft-int.json @@ -33,7 +33,10 @@ "private": false } }, - "globalRG": "global-shared-resources", + "global": { + "rg": "global-shared-resources", + "subscription": "hcp-westus3" + }, "hypershift": { "additionalInstallArg": "--tech-preview-no-upgrade", "externalDNSManagedIdentityName": "external-dns", diff --git a/config/public-cloud-personal-dev.json b/config/public-cloud-personal-dev.json index 923f7f834..a7af73a3c 100644 --- a/config/public-cloud-personal-dev.json +++ b/config/public-cloud-personal-dev.json @@ -33,7 +33,10 @@ "private": false } }, - "globalRG": "global", + "global": { + "rg": "global-shared-resources", + "subscription": "hcp-westus3" + }, "hypershift": { "additionalInstallArg": "--tech-preview-no-upgrade", "externalDNSManagedIdentityName": "external-dns", diff --git a/dev-infrastructure/svc-pipeline.yaml b/dev-infrastructure/svc-pipeline.yaml index cee2de6ef..31a1fd6e2 100644 --- a/dev-infrastructure/svc-pipeline.yaml +++ b/dev-infrastructure/svc-pipeline.yaml @@ -1,6 +1,15 @@ serviceGroup: Microsoft.Azure.ARO.HCP.Service.Infra rolloutName: Service Cluster Rollout resourceGroups: +# deploying the global resources does not belong into this pipeline +# this is just for testing purposes and deserves its own pipeline +- name: {{ .global.rg }} + subscription: {{ .global.subscription }} + steps: + - name: acr-ocp + action: ARM + template: templates/dev-acr.bicep + parameters: configurations/acr-ocp.tmpl.bicepparam - name: {{ .svc.rg }} subscription: {{ .svc.subscription }} aksCluster: {{ .aksName }}