diff --git a/cluster-service/Makefile b/cluster-service/Makefile index 0e862280e5..f64c159c31 100644 --- a/cluster-service/Makefile +++ b/cluster-service/Makefile @@ -92,13 +92,7 @@ deploy: --set csDeploymentStrategy.rollingUpdate.maxSurge=${CS_DEPLOYMENT_ROLLINGUPDATE_MAX_SURGE} \ --set csDeploymentStrategy.rollingUpdate.maxUnavailable=${CS_DEPLOYMENT_ROLLINGUPDATE_MAX_UNAVAILABLE} \ --set provisionShardClusterLimit=${PROVISION_SHARD_CLUSTER_LIMIT} \ - --set ocpVersions.defaultVersion.version=${OCP_VERSIONS_DEFAULT_VERSION_VERSION} \ - --set ocpVersions.channelGroups.stable.minVersion=${OCP_VERSIONS_CHANNEL_GROUPS_STABLE_MIN_VERSION} \ - --set ocpVersions.channelGroups.stable.maxVersion=${OCP_VERSIONS_CHANNEL_GROUPS_STABLE_MAX_VERSION} \ - --set ocpVersions.channelGroups.candidate.minVersion=${OCP_VERSIONS_CHANNEL_GROUPS_CANDIDATE_MIN_VERSION} \ - --set ocpVersions.channelGroups.candidate.maxVersion=${OCP_VERSIONS_CHANNEL_GROUPS_CANDIDATE_MAX_VERSION} \ - --set ocpVersions.channelGroups.nightly.minVersion=${OCP_VERSIONS_CHANNEL_GROUPS_NIGHTLY_MIN_VERSION} \ - --set ocpVersions.channelGroups.nightly.maxVersion=${OCP_VERSIONS_CHANNEL_GROUPS_NIGHTLY_MAX_VERSION} \ + --set ocpVersionsConfigFile=${OCP_VERSIONS_CONFIG_FILE} \ --set azureOperatorsMI.roleSetName=${OPERATOR_ROLE_SET_NAME} \ --set deployment.zoneCount=${AVAILABILITY_ZONE_COUNT} @@ -173,16 +167,7 @@ local-azure-operators-managed-identities-config: .PHONY: local-azure-operators-managed-identities-config local-aro-hcp-ocp-versions-config: - helm template helm-charts/cluster-service \ - --set ocpVersions.defaultVersion.version=${OCP_VERSIONS_DEFAULT_VERSION_VERSION} \ - --set ocpVersions.channelGroups.stable.minVersion=${OCP_VERSIONS_CHANNEL_GROUPS_STABLE_MIN_VERSION} \ - --set ocpVersions.channelGroups.stable.maxVersion=${OCP_VERSIONS_CHANNEL_GROUPS_STABLE_MAX_VERSION} \ - --set ocpVersions.channelGroups.candidate.minVersion=${OCP_VERSIONS_CHANNEL_GROUPS_CANDIDATE_MIN_VERSION} \ - --set ocpVersions.channelGroups.candidate.maxVersion=${OCP_VERSIONS_CHANNEL_GROUPS_CANDIDATE_MAX_VERSION} \ - --set ocpVersions.channelGroups.nightly.minVersion=${OCP_VERSIONS_CHANNEL_GROUPS_NIGHTLY_MIN_VERSION} \ - --set ocpVersions.channelGroups.nightly.maxVersion=${OCP_VERSIONS_CHANNEL_GROUPS_NIGHTLY_MAX_VERSION} \ - --set azureOperatorsMI.roleSetName=${OPERATOR_ROLE_SET_NAME} \ - -s templates/aro-hcp-ocp-versions-config.configmap.yaml | yq '.data["aro-hcp-ocp-versions-config.yaml"]' > local/aro-hcp-ocp-versions-config.yaml + @cat helm-charts/cluster-service/static-configs/${OCP_VERSIONS_CONFIG_FILE} | yq > local/aro-hcp-ocp-versions-config.yaml .PHONY: local-aro-hcp-ocp-versions-config # diff --git a/cluster-service/helm-charts/cluster-service/static-configs/ocp-versions-current.yaml b/cluster-service/helm-charts/cluster-service/static-configs/ocp-versions-current.yaml new file mode 100644 index 0000000000..f1f0190099 --- /dev/null +++ b/cluster-service/helm-charts/cluster-service/static-configs/ocp-versions-current.yaml @@ -0,0 +1,8 @@ +defaultVersion: + channelGroupName: stable + version: "4.20.8" +channelGroups: + - url: "https://api.openshift.com/api/upgrades_info/graph" + channelGroupName: stable + minVersion: "4.19.0" + maxVersion: "4.20.9" diff --git a/cluster-service/helm-charts/cluster-service/static-configs/ocp-versions-next.yaml b/cluster-service/helm-charts/cluster-service/static-configs/ocp-versions-next.yaml new file mode 100644 index 0000000000..e4e6b4403c --- /dev/null +++ b/cluster-service/helm-charts/cluster-service/static-configs/ocp-versions-next.yaml @@ -0,0 +1,34 @@ +defaultVersion: + channelGroupName: stable + version: "4.20.8" +channelGroups: + - url: "https://api.openshift.com/api/upgrades_info/graph" + channelGroupName: stable + minVersion: "4.19.0" + maxVersion: "4.20.9" + minorVersionsConfiguration: + - name: "4.19" + zStreamUpgradeConfig: + enabled: true + targetVersion: "4.19.21" + - name: "4.20" + zStreamUpgradeConfig: + enabled: true + targetVersion: "4.20.8" + - url: "https://api.openshift.com/api/upgrades_info/graph" + channelGroupName: candidate + minVersion: "4.19.7" + maxVersion: "" + minorVersionsConfiguration: + - name: "4.19" + zStreamUpgradeConfig: + enabled: true + targetVersion: "4.19.22" + - name: "4.20" + zStreamUpgradeConfig: + enabled: true + targetVersion: "4.20.10" + - url: "https://multi.ocp.releases.ci.openshift.org/graph" + channelGroupName: nightly + minVersion: "4.19.0-0.nightly-20200101" + maxVersion: "" diff --git a/cluster-service/helm-charts/cluster-service/templates/aro-hcp-ocp-versions-config.configmap.yaml b/cluster-service/helm-charts/cluster-service/templates/aro-hcp-ocp-versions-config.configmap.yaml index 9773c5561e..3eb32e6440 100644 --- a/cluster-service/helm-charts/cluster-service/templates/aro-hcp-ocp-versions-config.configmap.yaml +++ b/cluster-service/helm-charts/cluster-service/templates/aro-hcp-ocp-versions-config.configmap.yaml @@ -5,29 +5,4 @@ metadata: namespace: '{{ .Release.Namespace }}' data: aro-hcp-ocp-versions-config.yaml: | - defaultVersion: - channelGroupName: stable - version: {{ .Values.ocpVersions.defaultVersion.version }} - channelGroups: - - url: https://api.openshift.com/api/upgrades_info/graph - channelGroupName: stable - minVersion: {{ .Values.ocpVersions.channelGroups.stable.minVersion }} - {{- if .Values.ocpVersions.channelGroups.stable.maxVersion }} - maxVersion: {{ .Values.ocpVersions.channelGroups.stable.maxVersion }} - {{- end }} - {{- if .Values.ocpVersions.channelGroups.candidate.minVersion }} - - url: https://api.openshift.com/api/upgrades_info/graph - channelGroupName: candidate - minVersion: {{ .Values.ocpVersions.channelGroups.candidate.minVersion }} - {{- if .Values.ocpVersions.channelGroups.candidate.maxVersion }} - maxVersion: {{ .Values.ocpVersions.channelGroups.candidate.maxVersion }} - {{- end }} - {{- end }} - {{- if .Values.ocpVersions.channelGroups.nightly.minVersion }} - - url: https://multi.ocp.releases.ci.openshift.org/graph - channelGroupName: nightly - minVersion: {{ .Values.ocpVersions.channelGroups.nightly.minVersion }} - {{- if .Values.ocpVersions.channelGroups.nightly.maxVersion }} - maxVersion: {{ .Values.ocpVersions.channelGroups.nightly.maxVersion }} - {{- end }} - {{- end }} + {{- .Files.Get (printf "static-configs/%s" .Values.ocpVersionsConfigFile) | nindent 4 }} diff --git a/cluster-service/helm-charts/cluster-service/values.yaml b/cluster-service/helm-charts/cluster-service/values.yaml index 2425f46407..1cc35a4e06 100644 --- a/cluster-service/helm-charts/cluster-service/values.yaml +++ b/cluster-service/helm-charts/cluster-service/values.yaml @@ -308,22 +308,10 @@ csDeploymentStrategy: rollingUpdate: maxSurge: 1 maxUnavailable: 0 -ocpVersions: - defaultVersion: - version: "" - channelGroups: - stable: - url: "" - minVersion: "" - maxVersion: "" - candidate: - url: "" - minVersion: "" - maxVersion: "" - nightly: - url: "" - minVersion: "" - maxVersion: "" +# OCP versions configuration is loaded from static config files in: +# cluster-service/helm-charts/cluster-service/static-configs/ +# The ocpVersionsConfigFile value (from config.yaml) specifies which file to load +ocpVersionsConfigFile: "ocp-versions-current.yaml" deployment: zoneCount: "" # controls if a debug job is deployed to the cluster. diff --git a/cluster-service/pipeline.yaml b/cluster-service/pipeline.yaml index 14675baf50..076f0cccf1 100644 --- a/cluster-service/pipeline.yaml +++ b/cluster-service/pipeline.yaml @@ -161,20 +161,9 @@ resourceGroups: name: ocpAcrLoginServer - name: PROVISION_SHARD_CLUSTER_LIMIT configRef: clustersService.provisionShardClusterLimit - - name: OCP_VERSIONS_DEFAULT_VERSION_VERSION - configRef: clustersService.ocpVersions.defaultVersion.version - - name: OCP_VERSIONS_CHANNEL_GROUPS_STABLE_MIN_VERSION - configRef: clustersService.ocpVersions.channelGroups.stable.minVersion - - name: OCP_VERSIONS_CHANNEL_GROUPS_STABLE_MAX_VERSION - configRef: clustersService.ocpVersions.channelGroups.stable.maxVersion - - name: OCP_VERSIONS_CHANNEL_GROUPS_CANDIDATE_MIN_VERSION - configRef: clustersService.ocpVersions.channelGroups.candidate.minVersion - - name: OCP_VERSIONS_CHANNEL_GROUPS_CANDIDATE_MAX_VERSION - configRef: clustersService.ocpVersions.channelGroups.candidate.maxVersion - - name: OCP_VERSIONS_CHANNEL_GROUPS_NIGHTLY_MIN_VERSION - configRef: clustersService.ocpVersions.channelGroups.nightly.minVersion - - name: OCP_VERSIONS_CHANNEL_GROUPS_NIGHTLY_MAX_VERSION - configRef: clustersService.ocpVersions.channelGroups.nightly.maxVersion + # OCP versions configuration now provided via static Helm values files + - name: OCP_VERSIONS_CONFIG_FILE + configRef: clustersService.ocpVersionsConfigFile # this is maestro consumer registration stuff # this goes away when we have a real registration process - name: CONSUMER_NAME diff --git a/config/config.schema.json b/config/config.schema.json index 74c0e04c0f..842d0b065d 100644 --- a/config/config.schema.json +++ b/config/config.schema.json @@ -1235,6 +1235,11 @@ "channelGroups" ], "additionalProperties": false + }, + "ocpVersionsConfigFile": { + "type": "string", + "pattern": "^ocp-versions-[a-z0-9]+(-[a-z0-9]+)*\\.yaml$", + "description": "The filename of the static OCP versions configuration file to use for this environment. File must exist in cluster-service/helm-charts/cluster-service/static-configs/" } }, "additionalProperties": false, @@ -1248,7 +1253,7 @@ "postgres", "tracing", "azureRuntimeConfig", - "ocpVersions" + "ocpVersionsConfigFile" ] }, "cxKeyVault": { diff --git a/config/config.yaml b/config/config.yaml index df47c98b02..6d4014cc3f 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -732,6 +732,8 @@ defaults: azureRuntimeConfig: tlsCertificatesIssuer: OneCertV2-PublicCA # OCP Versions configuration + # Static config file path: cluster-service/helm-charts/cluster-service/static-configs/ + ocpVersionsConfigFile: "ocp-versions-current.yaml" ocpVersions: defaultVersion: version: 4.20.8 @@ -920,12 +922,8 @@ clouds: azureRuntimeConfig: tlsCertificatesIssuer: Self # OCP Versions configuration - ocpVersions: - channelGroups: - candidate: - minVersion: 4.19.7 - nightly: - minVersion: 4.19.0-0.nightly-20200101 + # Static config file path: cluster-service/helm-charts/cluster-service/static-configs/ + ocpVersionsConfigFile: "ocp-versions-next.yaml" # Hypershift Operator hypershift: image: diff --git a/config/dev.digests.yaml b/config/dev.digests.yaml index 03512366b8..9723e2bf50 100644 --- a/config/dev.digests.yaml +++ b/config/dev.digests.yaml @@ -3,19 +3,19 @@ clouds: environments: cspr: regions: - westus3: 8674c688fcff1393ae35b0b1102914fc0681f4f087e449a336e55041abc05877 + westus3: d22db86fcbd49e84f823864569f0a1278bef8e08b86984107952cb3316988e34 dev: regions: - westus3: 75f82a2dfb11ebda98044ec1e72eaf8dfe9fd8220416a033ff8e8a3fdadf55c9 + westus3: 567f672687c324bd26dbaef9ed5c730e30a1980632a4cf979bd08dadbe50f9d6 perf: regions: - westus3: 4594cac19e139a410bb712b846094a047da510b0e25ab53b56bde8222adeefb1 + westus3: f450009c74dfefe172328bbced4d095a94e062c4e1cdd21e8d6c07d7234414e7 pers: regions: - westus3: 6212e673b5ecb245029d12c1a34d41557e575f66e90112778d2fb705e53d69f7 + westus3: 9a5cc3f2da4a185bd7c4d0365355e68d414cf44e24577c5c4842735b4a9cb74d prow: regions: - westus3: d703201afa2752b41e5fc97c0b90b803b858bad8e66be23b526fd4ef731fb93d + westus3: ee57549a0fc202f4da4e89f6e62599813719021129cbb23548c377d95aa8775e swft: regions: - uksouth: b6a3a6ef34d8af6bc7a315cd8dc0d5d77783309f50ac6a8f8718925da1ffb4cf + uksouth: 506c9c77c9ed19db058fad30472f6e5cc07d18e7f35a292479be4cc61fd5da69 diff --git a/config/rendered/dev/cspr/westus3.yaml b/config/rendered/dev/cspr/westus3.yaml index c8296d0bdd..7fc4766b94 100755 --- a/config/rendered/dev/cspr/westus3.yaml +++ b/config/rendered/dev/cspr/westus3.yaml @@ -142,15 +142,16 @@ clustersService: channelGroups: candidate: maxVersion: "" - minVersion: 4.19.7 + minVersion: "" nightly: maxVersion: "" - minVersion: 4.19.0-0.nightly-20200101 + minVersion: "" stable: maxVersion: 4.20.9 minVersion: 4.19.0 defaultVersion: version: 4.20.8 + ocpVersionsConfigFile: ocp-versions-next.yaml postgres: backupRetentionDays: 7 containerizedDb: diff --git a/config/rendered/dev/dev/westus3.yaml b/config/rendered/dev/dev/westus3.yaml index 97e37bd194..f2584618de 100755 --- a/config/rendered/dev/dev/westus3.yaml +++ b/config/rendered/dev/dev/westus3.yaml @@ -142,15 +142,16 @@ clustersService: channelGroups: candidate: maxVersion: "" - minVersion: 4.19.7 + minVersion: "" nightly: maxVersion: "" - minVersion: 4.19.0-0.nightly-20200101 + minVersion: "" stable: maxVersion: 4.20.9 minVersion: 4.19.0 defaultVersion: version: 4.20.8 + ocpVersionsConfigFile: ocp-versions-next.yaml postgres: backupRetentionDays: 7 containerizedDb: diff --git a/config/rendered/dev/perf/westus3.yaml b/config/rendered/dev/perf/westus3.yaml index 40d30cf857..2c6c8cad0f 100755 --- a/config/rendered/dev/perf/westus3.yaml +++ b/config/rendered/dev/perf/westus3.yaml @@ -142,15 +142,16 @@ clustersService: channelGroups: candidate: maxVersion: "" - minVersion: 4.19.7 + minVersion: "" nightly: maxVersion: "" - minVersion: 4.19.0-0.nightly-20200101 + minVersion: "" stable: maxVersion: 4.20.9 minVersion: 4.19.0 defaultVersion: version: 4.20.8 + ocpVersionsConfigFile: ocp-versions-next.yaml postgres: backupRetentionDays: 7 containerizedDb: diff --git a/config/rendered/dev/pers/westus3.yaml b/config/rendered/dev/pers/westus3.yaml index 5c3659b94b..5302961549 100755 --- a/config/rendered/dev/pers/westus3.yaml +++ b/config/rendered/dev/pers/westus3.yaml @@ -142,15 +142,16 @@ clustersService: channelGroups: candidate: maxVersion: "" - minVersion: 4.19.7 + minVersion: "" nightly: maxVersion: "" - minVersion: 4.19.0-0.nightly-20200101 + minVersion: "" stable: maxVersion: 4.20.9 minVersion: 4.19.0 defaultVersion: version: 4.20.8 + ocpVersionsConfigFile: ocp-versions-next.yaml postgres: backupRetentionDays: 7 containerizedDb: diff --git a/config/rendered/dev/prow/westus3.yaml b/config/rendered/dev/prow/westus3.yaml index c736da681b..6301ae3500 100755 --- a/config/rendered/dev/prow/westus3.yaml +++ b/config/rendered/dev/prow/westus3.yaml @@ -142,15 +142,16 @@ clustersService: channelGroups: candidate: maxVersion: "" - minVersion: 4.19.7 + minVersion: "" nightly: maxVersion: "" - minVersion: 4.19.0-0.nightly-20200101 + minVersion: "" stable: maxVersion: 4.20.9 minVersion: 4.19.0 defaultVersion: version: 4.20.8 + ocpVersionsConfigFile: ocp-versions-next.yaml postgres: backupRetentionDays: 7 containerizedDb: diff --git a/config/rendered/dev/swft/uksouth.yaml b/config/rendered/dev/swft/uksouth.yaml index 9d73138501..1bfe193c6d 100755 --- a/config/rendered/dev/swft/uksouth.yaml +++ b/config/rendered/dev/swft/uksouth.yaml @@ -142,15 +142,16 @@ clustersService: channelGroups: candidate: maxVersion: "" - minVersion: 4.19.7 + minVersion: "" nightly: maxVersion: "" - minVersion: 4.19.0-0.nightly-20200101 + minVersion: "" stable: maxVersion: 4.20.9 minVersion: 4.19.0 defaultVersion: version: 4.20.8 + ocpVersionsConfigFile: ocp-versions-next.yaml postgres: backupRetentionDays: 7 containerizedDb: