Skip to content

Commit

Permalink
prepare global resources pipeline (#909)
Browse files Browse the repository at this point in the history
* introduce a `global` section in the config schema
* refine config for image sync
* define a pipeline yaml for the global ACRs and image sync
* introduce a KV for imagesync secrets living in the global context
* rework custom token management role code
  * make it optional (quota issues in other tenants)
  * ... and fallback to a wider role in that case
  • Loading branch information
geoberle authored Dec 10, 2024
1 parent dc385bb commit 0a2e63f
Show file tree
Hide file tree
Showing 31 changed files with 500 additions and 215 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aro-hcp-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
cd dev-infrastructure/
# Manage ACR
make acr-svc acr-ocp
make acr acr-svc-cfg acr-ocp-cfg
# Setup operator roles for platform workload identity
make operator-roles
Expand Down
45 changes: 28 additions & 17 deletions config/config.msft.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
$schema: config.schema.json
defaults:
region: {{ .ctx.region }}

# Resourcegroups
globalRG: global-shared-resources
regionRG: '{{ .ctx.region }}-shared-resources'

global:
rg: global-shared-resources
subscription: hcp-{{ .ctx.region }}
manageTokenCustomRole: false
region: uksouth

# General AKS config
kubernetesVersion: 1.30.6
istioVersion: "asm-1-22"
Expand All @@ -13,9 +19,6 @@ defaults:
podSubnetPrefix: "10.128.64.0/18"
aksName: aro-hcp-aks

# ACR
serviceComponentAcrResourceGroups: '{{ .ctx.region }}-shared-resources'

# Hypershift
hypershift:
namespace: hypershift
Expand Down Expand Up @@ -66,8 +69,7 @@ defaults:

# Cluster Service
clusterService:
#acrRG: '{{ .ctx.region }}-shared-resources'
acrRG: ''
acrRG: 'global-shared-resources'
postgres:
name: arohcp-cs-{{ .ctx.regionShort }}
deploy: true
Expand All @@ -77,14 +79,19 @@ defaults:
# Image Sync
imageSync:
rg: hcp-underlay-imagesync
acrRG: '{{ .ctx.region }}-shared-resources'
environmentName: aro-hcp-image-sync
repositories: quay.io/acm-d/rhtap-hypershift-operator,quay.io/app-sre/uhc-clusters-service,quay.io/package-operator/package-operator-package
imageRepo: image-sync/component-sync
imageTag: latest
ocMirror:
imageRepo: image-sync/oc-mirror
imageTag: 7abc8af
acrRG: global-shared-resources
environmentName: global-shared-resources
componentSync:
enabled: true
imageRepo: image-sync/component-sync
repositories: quay.io/acm-d/rhtap-hypershift-operator,quay.io/app-sre/uhc-clusters-service,quay.io/package-operator/package-operator-package
ocMirror:
enabled: true
imageRepo: image-sync/oc-mirror
keyVault:
name: arohcp-imagesync-int
private: false
softDelete: true

serviceKeyVault:
name: arohcp-svc-{{ .ctx.regionShort }}
Expand All @@ -108,7 +115,7 @@ defaults:
private: false

# DNS
baseDnsZoneRG: '{{ .ctx.region }}-shared-resources'
baseDnsZoneRG: global-shared-resources
regionalDNSSubdomain: '{{ .ctx.region }}'

# Metrics
Expand All @@ -129,6 +136,11 @@ clouds:
imageRepo: app-sre/uhc-clusters-service
hypershiftOperator:
imageTag: 9aca808
imageSync:
componentSync:
imageTag: 0b3c08f
ocMirror:
imageTag: 0b3c08f

environments:
int:
Expand Down Expand Up @@ -159,11 +171,10 @@ clouds:
osDiskSizeGB: 100
azCount: 3
# DNS
baseDnsZoneName: aro-hcp.azure-test.net
baseDnsZoneName: aroapp-hcp.azure-test.net
regionalDNSSubdomain: '{{ .ctx.region }}'

# ACR
acrName: arohcpint
svcAcrName: arohcpsvcint
ocpAcrName: arohcpocpint

Expand Down
124 changes: 87 additions & 37 deletions config/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"title": "Generated schema for Root",
"type": "object",
"properties": {
"acrName": {
"type": "string"
},
"aksName": {
"type": "string"
},
Expand Down Expand Up @@ -136,8 +133,28 @@
"cosmosDB"
]
},
"globalRG": {
"type": "string"
"global": {
"type": "object",
"properties": {
"rg": {
"type": "string"
},
"subscription": {
"type": "string"
},
"manageTokenCustomRole": {
"type": "boolean"
},
"region": {
"type": "string"
}
},
"required": [
"rg",
"subscription",
"manageTokenCustomRole",
"region"
]
},
"hypershift": {
"type": "object",
Expand Down Expand Up @@ -176,14 +193,69 @@
"environmentName": {
"type": "string"
},
"imageRepo": {
"type": "string"
"componentSync": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"imageRepo": {
"type": "string"
},
"imageTag": {
"type": "string"
},
"repositories": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"enabled",
"imageRepo",
"imageTag",
"repositories"
]
},
"imageTag": {
"type": "string"
"ocMirror": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"imageRepo": {
"type": "string"
},
"imageTag": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"enabled",
"imageRepo",
"imageTag"
]
},
"repositories": {
"type": "string"
"keyVault": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"private": {
"type": "boolean"
},
"softDelete": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"name",
"private",
"softDelete"
]
},
"rg": {
"type": "string"
Expand All @@ -193,9 +265,9 @@
"required": [
"acrRG",
"environmentName",
"imageRepo",
"imageTag",
"repositories",
"componentSync",
"ocMirror",
"keyVault",
"rg"
]
},
Expand Down Expand Up @@ -447,22 +519,6 @@
"softDelete"
]
},
"ocMirror": {
"type": "object",
"properties": {
"imageRepo": {
"type": "string"
},
"imageTag": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"imageRepo",
"imageTag"
]
},
"ocpAcrName": {
"type": "string"
},
Expand All @@ -481,9 +537,6 @@
"regionalDNSSubdomain": {
"type": "string"
},
"serviceComponentAcrResourceGroups": {
"type": "string"
},
"serviceKeyVault": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -586,7 +639,6 @@
},
"additionalProperties": false,
"required": [
"acrName",
"aksName",
"aroDevopsMsiId",
"baseDnsZoneName",
Expand All @@ -595,7 +647,7 @@
"cxKeyVault",
"firstPartyAppClientId",
"frontend",
"globalRG",
"global",
"hypershift",
"hypershiftOperator",
"imageSync",
Expand All @@ -606,14 +658,12 @@
"mgmtKeyVault",
"monitoring",
"msiKeyVault",
"ocMirror",
"ocpAcrName",
"oidcStorageAccountName",
"podSubnetPrefix",
"region",
"regionRG",
"regionalDNSSubdomain",
"serviceComponentAcrResourceGroups",
"serviceKeyVault",
"subnetPrefix",
"svc",
Expand Down
31 changes: 19 additions & 12 deletions config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
$schema: config.schema.json
defaults:
region: {{ .ctx.region }}
# Resourcegroups
globalRG: global
regionRG: hcp-underlay-{{ .ctx.regionShort }}

global:
rg: global
subscription: hcp-{{ .ctx.region }}
manageTokenCustomRole: true
region: westus3

# General AKS config
kubernetesVersion: 1.30.6
istioVersion: "asm-1-22"
Expand All @@ -13,9 +17,6 @@ defaults:
podSubnetPrefix: "10.128.64.0/18"
aksName: aro-hcp-aks

# ACR
serviceComponentAcrResourceGroups: global

# Hypershift
hypershift:
namespace: hypershift
Expand Down Expand Up @@ -78,12 +79,19 @@ defaults:
rg: hcp-underlay-{{ .ctx.regionShort }}-imagesync
acrRG: global
environmentName: aro-hcp-image-sync
repositories: quay.io/acm-d/rhtap-hypershift-operator,quay.io/app-sre/uhc-clusters-service,quay.io/package-operator/package-operator-package
imageRepo: image-sync/component-sync
imageTag: latest
ocMirror:
imageRepo: image-sync/oc-mirror
imageTag: 7abc8af
componentSync:
enabled: true
imageRepo: image-sync/component-sync
imageTag: latest
repositories: quay.io/acm-d/rhtap-hypershift-operator,quay.io/app-sre/uhc-clusters-service,quay.io/package-operator/package-operator-package
ocMirror:
enabled: true
imageRepo: image-sync/oc-mirror
imageTag: 0b3c08f
keyVault:
name: arohcp-imagesync-dev
private: false
softDelete: false

serviceKeyVault:
name: arohcp-svc-{{ .ctx.regionShort }}
Expand Down Expand Up @@ -179,7 +187,6 @@ clouds:
kvSoftDelete: false
subscription: ARO Hosted Control Planes (EA Subscription 1)
# Shared ACRs
acrName: arohcpdev
svcAcrName: arohcpsvcdev
ocpAcrName: arohcpocpdev
# Shared Image Sync
Expand Down
Loading

0 comments on commit 0a2e63f

Please sign in to comment.