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

refactor DNS settings #1077

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion cluster-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-include ../helm-cmd.mk
HELM_CMD ?= helm upgrade --install

ZONE_NAME ?= "${REGIONAL_DNS_SUBDOMAIN}.${BASE_DNS_ZONE_NAME}"
ZONE_NAME ?= "${REGIONAL_DNS_SUBDOMAIN}.${CX_PARENT_DNS_ZONE_NAME}"


deploy:
Expand Down
6 changes: 3 additions & 3 deletions cluster-service/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ resourceGroups:
value: msiMockCert
- name: ARM_HELPER_CERT_NAME
value: armHelperCert
- name: BASE_DNS_ZONE_NAME
configRef: baseDnsZoneName
- name: CX_PARENT_DNS_ZONE_NAME
configRef: dns.cxParentZoneName
- name: REGIONAL_DNS_SUBDOMAIN
configRef: regionalDNSSubdomain
configRef: dns.regionalSubdomain
- name: USE_AZURE_DB
configRef: clusterService.postgres.deploy
- name: DATABASE_SERVER_NAME
Expand Down
12 changes: 7 additions & 5 deletions config/config.msft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ defaults:
private: false

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

# Metrics
monitoring:
Expand Down Expand Up @@ -196,10 +197,11 @@ clouds:
vmSize: 'Standard_D16s_v3'
osDiskSizeGB: 128
azCount: 3

# DNS
baseDnsZoneName: aroapp-hcp.azure-test.net
regionalDNSSubdomain: '{{ .ctx.region }}'
svcParentZoneName: "aro-hcp.azure-test.net"
dns:
cxParentZoneName: aroapp-hcp.azure-test.net
svcParentZoneName: aro-hcp.azure-test.net

# ACR
svcAcrName: arohcpsvcint
Expand Down
42 changes: 27 additions & 15 deletions config/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,33 @@
"aroDevopsMsiId": {
"type": "string"
},
"baseDnsZoneName": {
"type": "string"
},
"svcParentZoneName": {
"type": "string",
"description": "The service cluster component domain name"
},
"baseDnsZoneRG": {
"type": "string"
"dns": {
"type": "object",
"properties": {
"baseDnsZoneRG": {
"type": "string",
"description": "The Azure RG that holds the parent DNS zones"
},
"cxParentZoneName": {
"type": "string",
"description": "The parent DNS zone name for regional HCP cluster DNS zones"
},
"svcParentZoneName": {
"type": "string",
"description": "The parent DNS zone name for regional ARO-HCP infrastructure, e.g. the RP"
},
"regionalSubdomain": {
"type": "string",
"description": "The regional subdomain to be used to construct the regional hcp and svc zones under their respective parents, e.g. regionalSubdomain.svcParentZoneName"
}
},
"additionalProperties": false,
"required": [
"baseDnsZoneRG",
"cxParentZoneName",
"svcParentZoneName",
"regionalSubdomain"
]
},
"clusterService": {
"type": "object",
Expand Down Expand Up @@ -642,9 +660,6 @@
"regionRG": {
"type": "string"
},
"regionalDNSSubdomain": {
"type": "string"
},
"serviceKeyVault": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -772,8 +787,6 @@
"required": [
"aksName",
"aroDevopsMsiId",
"baseDnsZoneName",
"baseDnsZoneRG",
"clusterService",
"cxKeyVault",
"firstPartyAppClientId",
Expand All @@ -794,7 +807,6 @@
"podSubnetPrefix",
"region",
"regionRG",
"regionalDNSSubdomain",
"serviceKeyVault",
"subnetPrefix",
"svc",
Expand Down
17 changes: 10 additions & 7 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,16 @@ defaults:
softDelete: true
private: true

# DNS
baseDnsZoneRG: 'global'
clouds:
public:
# this configuration serves as a template for for all RH DEV subscription deployments
# the following vars need approprivate overrides:
defaults:
# DNS
baseDnsZoneName: 'hcp.osadev.cloud'
svcParentZoneName: "hcpsvc.osadev.cloud"
dns:
baseDnsZoneRG: global
cxParentZoneName: hcp.osadev.cloud
svcParentZoneName: hcpsvc.osadev.cloud
# 1P app
firstPartyAppClientId: 57e54810-3138-4f38-bd3b-29cb33f4c358
# Mock Managed Identities Service Princiapl
Expand Down Expand Up @@ -246,7 +246,8 @@ clouds:
minCount: 2
maxCount: 12
# DNS
regionalDNSSubdomain: '{{ .ctx.region }}'
dns:
regionalSubdomain: '{{ .ctx.region }}'
# Maestro
maestro:
serverMqttClientName: 'maestro-server-{{ .ctx.regionShort }}-dev'
Expand All @@ -269,7 +270,8 @@ clouds:
minCount: 2
maxCount: 12
# DNS
regionalDNSSubdomain: '{{ .ctx.region }}-cs'
dns:
regionalSubdomain: '{{ .ctx.region }}-cs'
# Maestro
maestro:
restrictIstioIngress: false
Expand All @@ -286,7 +288,8 @@ clouds:
postgres:
deploy: false
# DNS
regionalDNSSubdomain: '{{ .ctx.regionShort }}'
dns:
regionalSubdomain: '{{ .ctx.regionShort }}'
# Maestro
maestro:
postgres:
Expand Down
10 changes: 6 additions & 4 deletions config/public-cloud-cs-pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"backend": {
"imageTag": ""
},
"baseDnsZoneName": "hcp.osadev.cloud",
"baseDnsZoneRG": "global",
"clusterService": {
"acrRG": "global",
"azureOperatorsManagedIdentities": {
Expand Down Expand Up @@ -45,6 +43,12 @@
"private": false,
"softDelete": false
},
"dns": {
"baseDnsZoneRG": "global",
"cxParentZoneName": "hcp.osadev.cloud",
"regionalSubdomain": "westus3-cs",
"svcParentZoneName": "hcpsvc.osadev.cloud"
},
"extraVars": {},
"firstPartyAppClientId": "57e54810-3138-4f38-bd3b-29cb33f4c358",
"frontend": {
Expand Down Expand Up @@ -169,7 +173,6 @@
"podSubnetPrefix": "10.128.64.0/18",
"region": "westus3",
"regionRG": "hcp-underlay-cspr",
"regionalDNSSubdomain": "westus3-cs",
"serviceKeyVault": {
"name": "aro-hcp-dev-svc-kv",
"private": false,
Expand Down Expand Up @@ -200,6 +203,5 @@
}
},
"svcAcrName": "arohcpsvcdev",
"svcParentZoneName": "hcpsvc.osadev.cloud",
"vnetAddressPrefix": "10.128.0.0/14"
}
10 changes: 6 additions & 4 deletions config/public-cloud-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"backend": {
"imageTag": ""
},
"baseDnsZoneName": "hcp.osadev.cloud",
"baseDnsZoneRG": "global",
"clusterService": {
"acrRG": "global",
"azureOperatorsManagedIdentities": {
Expand Down Expand Up @@ -45,6 +43,12 @@
"private": false,
"softDelete": false
},
"dns": {
"baseDnsZoneRG": "global",
"cxParentZoneName": "hcp.osadev.cloud",
"regionalSubdomain": "westus3",
"svcParentZoneName": "hcpsvc.osadev.cloud"
},
"extraVars": {},
"firstPartyAppClientId": "57e54810-3138-4f38-bd3b-29cb33f4c358",
"frontend": {
Expand Down Expand Up @@ -169,7 +173,6 @@
"podSubnetPrefix": "10.128.64.0/18",
"region": "westus3",
"regionRG": "hcp-underlay-dev",
"regionalDNSSubdomain": "westus3",
"serviceKeyVault": {
"name": "aro-hcp-dev-svc-kv",
"private": false,
Expand Down Expand Up @@ -200,6 +203,5 @@
}
},
"svcAcrName": "arohcpsvcdev",
"svcParentZoneName": "hcpsvc.osadev.cloud",
"vnetAddressPrefix": "10.128.0.0/14"
}
10 changes: 6 additions & 4 deletions config/public-cloud-msft-int.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"backend": {
"imageTag": "0b3c08f"
},
"baseDnsZoneName": "aroapp-hcp.azure-test.net",
"baseDnsZoneRG": "global-shared-resources",
"clusterService": {
"acrRG": "global-shared-resources",
"azureOperatorsManagedIdentities": {
Expand Down Expand Up @@ -45,6 +43,12 @@
"private": false,
"softDelete": false
},
"dns": {
"baseDnsZoneRG": "global-shared-resources",
"cxParentZoneName": "aroapp-hcp.azure-test.net",
"regionalSubdomain": "westus3",
"svcParentZoneName": "aro-hcp.azure-test.net"
},
"extraVars": {},
"firstPartyAppClientId": "??? the one used by CS to do first party stuff ???",
"frontend": {
Expand Down Expand Up @@ -164,7 +168,6 @@
"podSubnetPrefix": "10.128.64.0/18",
"region": "westus3",
"regionRG": "westus3-shared-resources",
"regionalDNSSubdomain": "westus3",
"serviceKeyVault": {
"name": "arohcp-svc-int",
"private": false,
Expand Down Expand Up @@ -195,6 +198,5 @@
}
},
"svcAcrName": "arohcpsvcint",
"svcParentZoneName": "aro-hcp.azure-test.net",
"vnetAddressPrefix": "10.128.0.0/14"
}
10 changes: 6 additions & 4 deletions config/public-cloud-personal-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"backend": {
"imageTag": ""
},
"baseDnsZoneName": "hcp.osadev.cloud",
"baseDnsZoneRG": "global",
"clusterService": {
"acrRG": "global",
"azureOperatorsManagedIdentities": {
Expand Down Expand Up @@ -45,6 +43,12 @@
"private": false,
"softDelete": false
},
"dns": {
"baseDnsZoneRG": "global",
"cxParentZoneName": "hcp.osadev.cloud",
"regionalSubdomain": "usw3tst",
"svcParentZoneName": "hcpsvc.osadev.cloud"
},
"extraVars": {},
"firstPartyAppClientId": "57e54810-3138-4f38-bd3b-29cb33f4c358",
"frontend": {
Expand Down Expand Up @@ -169,7 +173,6 @@
"podSubnetPrefix": "10.128.64.0/18",
"region": "westus3",
"regionRG": "hcp-underlay-usw3tst",
"regionalDNSSubdomain": "usw3tst",
"serviceKeyVault": {
"name": "aro-hcp-dev-svc-kv",
"private": false,
Expand Down Expand Up @@ -200,6 +203,5 @@
}
},
"svcAcrName": "arohcpsvcdev",
"svcParentZoneName": "hcpsvc.osadev.cloud",
"vnetAddressPrefix": "10.128.0.0/14"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using '../templates/global-infra.bicep'

param globalMSIName = '{{ .global.globalMSIName }}'
param cxParentZoneName = '{{ .baseDnsZoneName }}'
param svcParentZoneName = '{{ .svcParentZoneName }}'
param cxParentZoneName = '{{ .dns.cxParentZoneName }}'
param svcParentZoneName = '{{ .dns.svcParentZoneName }}'
7 changes: 4 additions & 3 deletions dev-infrastructure/configurations/region.tmpl.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ param ocpAcrName = '{{ .ocpAcrName }}'
param svcAcrName = '{{ .svcAcrName }}'

// dns
param baseDNSZoneName = '{{ .baseDnsZoneName }}'
param baseDNSZoneResourceGroup = '{{ .baseDnsZoneRG }}'
param regionalDNSSubdomain = '{{ .regionalDNSSubdomain }}'
param cxBaseDNSZoneName = '{{ .dns.cxParentZoneName }}'
param svcBaseDNSZoneName = '{{ .dns.svcParentZoneName }}'
param baseDNSZoneResourceGroup = '{{ .dns.baseDnsZoneRG }}'
param regionalDNSSubdomain = '{{ .dns.regionalSubdomain }}'

// maestro
param maestroEventGridNamespacesName = '{{ .maestro.eventGrid.name }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ param useCustomACRTokenManagementRole = {{ .global.manageTokenCustomRole }}
param oidcStorageAccountName = '{{ .oidcStorageAccountName }}'
param aroDevopsMsiId = '{{ .aroDevopsMsiId }}'

param regionalDNSZoneName = '{{ .regionalDNSSubdomain}}.{{ .baseDnsZoneName }}'
param regionalCXDNSZoneName = '{{ .dns.regionalSubdomain }}.{{ .dns.cxParentZoneName }}'

param regionalResourceGroup = '{{ .regionRG }}'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param serviceKeyVaultLocation = '{{ .serviceKeyVault.region }}'
param serviceKeyVaultSoftDelete = {{ .serviceKeyVault.softDelete }}
param serviceKeyVaultPrivate = {{ .serviceKeyVault.private }}

param regionalDNSZoneName = '{{ .regionalDNSSubdomain}}.{{ .svcParentZoneName }}'
param regionalSvcDNSZoneName = '{{ .dns.regionalSubdomain }}.{{ .dns.svcParentZoneName }}'


// MI for deployment scripts
Expand Down
6 changes: 4 additions & 2 deletions dev-infrastructure/docs/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,13 @@ defaults: (1)
clouds:
public: (2)
defaults: (3)
baseDnsZoneName: "arohcp.azure.com"
dns:
cxParentZoneName: "arohcp.azure.com"
environments:
personal-dev: (4)
defaults:
baseDnsZoneName: "hcp.osadev.cloud" (5)
dns:
cxParentZoneName: "hcp.osadev.cloud" (5)
production:
defaults:
regions:
Expand Down
Loading
Loading