From d3d6ee149572f64fb80423af0cb403c9c8f4d775 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Mon, 25 Sep 2023 10:35:09 +0200 Subject: [PATCH 01/10] Release 0.0.3 golang-external-secrets --- golang-external-secrets/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang-external-secrets/Chart.yaml b/golang-external-secrets/Chart.yaml index c8ef35ae9..9b2c3b6d9 100644 --- a/golang-external-secrets/Chart.yaml +++ b/golang-external-secrets/Chart.yaml @@ -3,7 +3,7 @@ description: A Helm chart to configure the golang-based external-secrets. keywords: - pattern name: golang-external-secrets -version: 0.0.2 +version: 0.0.3 dependencies: - name: external-secrets version: "0.9.5" From fc06ec7368ff7493821f4de0f6d34dfde45d24d4 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Wed, 27 Sep 2023 07:59:57 +0200 Subject: [PATCH 02/10] Release 0.0.3 clustergroup --- clustergroup/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clustergroup/Chart.yaml b/clustergroup/Chart.yaml index 031b6ff0e..98e44d9da 100644 --- a/clustergroup/Chart.yaml +++ b/clustergroup/Chart.yaml @@ -3,4 +3,4 @@ description: A Helm chart to create per-clustergroup ArgoCD applications and any keywords: - pattern name: clustergroup -version: 0.0.2 +version: 0.0.3 From edab5060c1605227e6be8e0d274c31063166d825 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 29 Sep 2023 08:17:28 +0000 Subject: [PATCH 03/10] Allow custom templating in .extraValueFiles --- clustergroup/templates/plumbing/applications.yaml | 6 +++--- clustergroup/values.yaml | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/clustergroup/templates/plumbing/applications.yaml b/clustergroup/templates/plumbing/applications.yaml index c09e3c8ca..227efab36 100644 --- a/clustergroup/templates/plumbing/applications.yaml +++ b/clustergroup/templates/plumbing/applications.yaml @@ -59,8 +59,8 @@ spec: ignoreMissingValueFiles: true valueFiles: {{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 12 }} - {{- range .extraValueFiles }} - - {{ . | quote }} + {{- range $valueFile := .extraValueFiles }} + - {{ tpl $valueFile $.Values.global | quote }} {{- end }} {{- if .useGeneratorValues }} values: |- @@ -212,7 +212,7 @@ spec: valueFiles: {{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 6 }} {{- range $valueFile := .extraValueFiles }} - - {{ $valueFile | quote }} + - {{ tpl $valueFile $.Values.global | quote }} {{- end }} parameters: {{- include "clustergroup.app.globalvalues.helmparameters" $ | nindent 8 }} diff --git a/clustergroup/values.yaml b/clustergroup/values.yaml index b63e8cc24..71ad088d8 100644 --- a/clustergroup/values.yaml +++ b/clustergroup/values.yaml @@ -8,6 +8,11 @@ global: installPlanApproval: Automatic applicationRetryLimit: 20 + # This is deeply unpleasant but makes values files easier to template + Template: + BasePath: "global-vars.yml" + Name: "global-vars" + enabled: "all" # Note that sometimes changing helm values might require a hard refresh (https://github.com/helm/helm/issues/3486) From ba686e2a6b58920b658d81b16a92d340eff9555b Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 29 Sep 2023 09:05:10 +0000 Subject: [PATCH 04/10] Support pattern-wide templated value files --- clustergroup/templates/plumbing/applications.yaml | 15 ++++++++++++--- clustergroup/values.schema.json | 4 ++++ clustergroup/values.yaml | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/clustergroup/templates/plumbing/applications.yaml b/clustergroup/templates/plumbing/applications.yaml index 227efab36..a54ed99f0 100644 --- a/clustergroup/templates/plumbing/applications.yaml +++ b/clustergroup/templates/plumbing/applications.yaml @@ -59,8 +59,11 @@ spec: ignoreMissingValueFiles: true valueFiles: {{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 12 }} + {{- range $valueFile := $.Values.clusterGroup.sharedValueFiles }} + - {{ tpl $valueFile $ | quote }} + {{- end }} {{- range $valueFile := .extraValueFiles }} - - {{ tpl $valueFile $.Values.global | quote }} + - {{ tpl $valueFile $ | quote }} {{- end }} {{- if .useGeneratorValues }} values: |- @@ -147,8 +150,11 @@ spec: ignoreMissingValueFiles: true valueFiles: {{- include "clustergroup.app.globalvalues.prefixedvaluefiles" $ | nindent 8 }} + {{- range $valueFile := $.Values.clusterGroup.sharedValueFiles }} + - {{ tpl $valueFile $ | quote }} + {{- end }} {{- range $valueFile := .extraValueFiles }} - - {{ $valueFile | quote }} + - {{ tpl $valueFile $ | quote }} {{- end }} parameters: {{- include "clustergroup.app.globalvalues.helmparameters" $ | nindent 8 }} @@ -211,8 +217,11 @@ spec: ignoreMissingValueFiles: true valueFiles: {{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 6 }} + {{- range $valueFile := $.Values.clusterGroup.sharedValueFiles }} + - {{ tpl $valueFile $ | quote }} + {{- end }} {{- range $valueFile := .extraValueFiles }} - - {{ tpl $valueFile $.Values.global | quote }} + - {{ tpl $valueFile $ | quote }} {{- end }} parameters: {{- include "clustergroup.app.globalvalues.helmparameters" $ | nindent 8 }} diff --git a/clustergroup/values.schema.json b/clustergroup/values.schema.json index 07f8e7171..4b94bf262 100644 --- a/clustergroup/values.schema.json +++ b/clustergroup/values.schema.json @@ -234,6 +234,10 @@ "type": "boolean", "description": "If set to true the values is used to identify whether this is the hub cluster or an edge/spoke cluster configuration." }, + "sharedValueFiles": { + "type": "array", + "description": "Templated value file paths." + }, "namespaces": { "type": "array", "description": "This is the array of namespaces that the VP framework will create. In addition, operator groups will also be created for each namespace.", diff --git a/clustergroup/values.yaml b/clustergroup/values.yaml index 71ad088d8..36e026361 100644 --- a/clustergroup/values.yaml +++ b/clustergroup/values.yaml @@ -20,6 +20,7 @@ clusterGroup: name: example isHubCluster: true targetCluster: in-cluster + sharedValueFiles: [] imperative: jobs: [] From 79453fd6cc09c6be22ff0b682095cd3d804aa979 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 29 Sep 2023 08:25:07 +0000 Subject: [PATCH 05/10] Update tests --- tests/clustergroup-industrial-edge-factory.expected.yaml | 3 +++ tests/clustergroup-industrial-edge-hub.expected.yaml | 3 +++ tests/clustergroup-medical-diagnosis-hub.expected.yaml | 3 +++ tests/clustergroup-naked.expected.yaml | 3 +++ tests/clustergroup-normal.expected.yaml | 3 +++ 5 files changed, 15 insertions(+) diff --git a/tests/clustergroup-industrial-edge-factory.expected.yaml b/tests/clustergroup-industrial-edge-factory.expected.yaml index 6ff3a8481..dfed17f24 100644 --- a/tests/clustergroup-industrial-edge-factory.expected.yaml +++ b/tests/clustergroup-industrial-edge-factory.expected.yaml @@ -135,6 +135,9 @@ data: targetCluster: in-cluster enabled: all global: + Template: + BasePath: global-vars.yml + Name: global-vars clusterDomain: region.example.com extraValueFiles: [] git: diff --git a/tests/clustergroup-industrial-edge-hub.expected.yaml b/tests/clustergroup-industrial-edge-hub.expected.yaml index 3f5207ab6..75683c47d 100644 --- a/tests/clustergroup-industrial-edge-hub.expected.yaml +++ b/tests/clustergroup-industrial-edge-hub.expected.yaml @@ -296,6 +296,9 @@ data: targetCluster: in-cluster enabled: all global: + Template: + BasePath: global-vars.yml + Name: global-vars clusterDomain: region.example.com extraValueFiles: [] git: diff --git a/tests/clustergroup-medical-diagnosis-hub.expected.yaml b/tests/clustergroup-medical-diagnosis-hub.expected.yaml index 4ffbd77da..561feb8cd 100644 --- a/tests/clustergroup-medical-diagnosis-hub.expected.yaml +++ b/tests/clustergroup-medical-diagnosis-hub.expected.yaml @@ -283,6 +283,9 @@ data: targetCluster: in-cluster enabled: all global: + Template: + BasePath: global-vars.yml + Name: global-vars clusterDomain: region.example.com extraValueFiles: [] git: diff --git a/tests/clustergroup-naked.expected.yaml b/tests/clustergroup-naked.expected.yaml index 7f167c748..95a8a4106 100644 --- a/tests/clustergroup-naked.expected.yaml +++ b/tests/clustergroup-naked.expected.yaml @@ -65,6 +65,9 @@ data: targetCluster: in-cluster enabled: all global: + Template: + BasePath: global-vars.yml + Name: global-vars extraValueFiles: [] options: applicationRetryLimit: 20 diff --git a/tests/clustergroup-normal.expected.yaml b/tests/clustergroup-normal.expected.yaml index 4767db6c7..5780ef8b2 100644 --- a/tests/clustergroup-normal.expected.yaml +++ b/tests/clustergroup-normal.expected.yaml @@ -192,6 +192,9 @@ data: targetCluster: in-cluster enabled: all global: + Template: + BasePath: global-vars.yml + Name: global-vars clusterDomain: region.example.com extraValueFiles: [] git: From 2c5974c61f8691d7b676525194674426be30e878 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 29 Sep 2023 08:35:39 +0000 Subject: [PATCH 06/10] Pass in platform and ocp version as charts would expect --- Makefile | 16 ++- tests/acm-industrial-edge-hub.expected.yaml | 2 +- tests/acm-medical-diagnosis-hub.expected.yaml | 2 +- tests/acm-normal.expected.yaml | 4 +- ...roup-industrial-edge-factory.expected.yaml | 12 +- ...tergroup-industrial-edge-hub.expected.yaml | 72 +++++++--- ...rgroup-medical-diagnosis-hub.expected.yaml | 132 ++++++++++++------ tests/clustergroup-normal.expected.yaml | 22 ++- 8 files changed, 185 insertions(+), 77 deletions(-) diff --git a/Makefile b/Makefile index ad61cafe4..f05935525 100644 --- a/Makefile +++ b/Makefile @@ -150,10 +150,18 @@ argo-healthcheck: ## Checks if all argo applications are synced CHARTS=$(shell find . -type f -iname 'Chart.yaml' -exec dirname "{}" \; | grep -v examples | sed -e 's/.\///') # Section related to tests and linting -TEST_OPTS= -f values-global.yaml --set global.repoURL="https://github.com/pattern-clone/mypattern" \ - --set main.git.repoURL="https://github.com/pattern-clone/mypattern" --set main.git.revision=main --set global.pattern="mypattern" \ - --set global.namespace="pattern-namespace" --set global.hubClusterDomain=apps.hub.example.com --set global.localClusterDomain=apps.region.example.com --set global.clusterDomain=region.example.com\ - --set "clusterGroup.imperative.jobs[0].name"="test" --set "clusterGroup.imperative.jobs[0].playbook"="ansible/test.yml" +TEST_OPTS= -f values-global.yaml \ + --set global.repoURL="https://github.com/pattern-clone/mypattern" \ + --set main.git.repoURL="https://github.com/pattern-clone/mypattern" \ + --set main.git.revision=main --set global.pattern="mypattern" \ + --set global.namespace="pattern-namespace" \ + --set global.hubClusterDomain=apps.hub.example.com \ + --set global.localClusterDomain=apps.region.example.com \ + --set global.clusterDomain=region.example.com \ + --set global.clusterVersion="4.12" \ + --set global.clusterPlatform=aws \ + --set "clusterGroup.imperative.jobs[0].name"="test" \ + --set "clusterGroup.imperative.jobs[0].playbook"="ansible/test.yml" PATTERN_OPTS=-f common/examples/values-example.yaml EXECUTABLES=git helm oc ansible diff --git a/tests/acm-industrial-edge-hub.expected.yaml b/tests/acm-industrial-edge-hub.expected.yaml index 444b833cb..a474b4e32 100644 --- a/tests/acm-industrial-edge-hub.expected.yaml +++ b/tests/acm-industrial-edge-hub.expected.yaml @@ -234,7 +234,7 @@ spec: - name: global.clusterVersion value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}' - name: global.clusterPlatform - value: + value: aws - name: clusterGroup.name value: factory - name: clusterGroup.isHubCluster diff --git a/tests/acm-medical-diagnosis-hub.expected.yaml b/tests/acm-medical-diagnosis-hub.expected.yaml index f79e013b8..f54648fe1 100644 --- a/tests/acm-medical-diagnosis-hub.expected.yaml +++ b/tests/acm-medical-diagnosis-hub.expected.yaml @@ -225,7 +225,7 @@ spec: - name: global.clusterVersion value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}' - name: global.clusterPlatform - value: + value: aws - name: clusterGroup.name value: region-one - name: clusterGroup.isHubCluster diff --git a/tests/acm-normal.expected.yaml b/tests/acm-normal.expected.yaml index 900cc2919..0429824db 100644 --- a/tests/acm-normal.expected.yaml +++ b/tests/acm-normal.expected.yaml @@ -628,7 +628,7 @@ spec: - name: global.clusterVersion value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}' - name: global.clusterPlatform - value: + value: aws - name: clusterGroup.name value: acm-edge - name: clusterGroup.isHubCluster @@ -722,7 +722,7 @@ spec: - name: global.clusterVersion value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}' - name: global.clusterPlatform - value: + value: aws - name: clusterGroup.name value: acm-provision-edge - name: clusterGroup.isHubCluster diff --git a/tests/clustergroup-industrial-edge-factory.expected.yaml b/tests/clustergroup-industrial-edge-factory.expected.yaml index dfed17f24..42d0c9752 100644 --- a/tests/clustergroup-industrial-edge-factory.expected.yaml +++ b/tests/clustergroup-industrial-edge-factory.expected.yaml @@ -139,6 +139,8 @@ data: BasePath: global-vars.yml Name: global-vars clusterDomain: region.example.com + clusterPlatform: aws + clusterVersion: "4.12" extraValueFiles: [] git: account: hybrid-cloud-patterns @@ -415,7 +417,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-factory.yaml" + - "/values-factory.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-factory.yaml" + - "/values-4.12-factory.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -428,9 +434,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain diff --git a/tests/clustergroup-industrial-edge-hub.expected.yaml b/tests/clustergroup-industrial-edge-hub.expected.yaml index 75683c47d..5a112b6e4 100644 --- a/tests/clustergroup-industrial-edge-hub.expected.yaml +++ b/tests/clustergroup-industrial-edge-hub.expected.yaml @@ -300,6 +300,8 @@ data: BasePath: global-vars.yml Name: global-vars clusterDomain: region.example.com + clusterPlatform: aws + clusterVersion: "4.12" extraValueFiles: [] git: account: hybrid-cloud-patterns @@ -688,7 +690,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -701,9 +707,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -745,7 +751,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -758,9 +768,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -793,7 +803,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -806,9 +820,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -841,7 +855,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -854,9 +872,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -919,7 +937,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -932,9 +954,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -967,7 +989,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -980,9 +1006,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1042,7 +1068,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1055,9 +1085,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain diff --git a/tests/clustergroup-medical-diagnosis-hub.expected.yaml b/tests/clustergroup-medical-diagnosis-hub.expected.yaml index 561feb8cd..0f7541097 100644 --- a/tests/clustergroup-medical-diagnosis-hub.expected.yaml +++ b/tests/clustergroup-medical-diagnosis-hub.expected.yaml @@ -287,6 +287,8 @@ data: BasePath: global-vars.yml Name: global-vars clusterDomain: region.example.com + clusterPlatform: aws + clusterVersion: "4.12" extraValueFiles: [] git: account: hybrid-cloud-patterns @@ -633,7 +635,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -646,9 +652,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -681,7 +687,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -694,9 +704,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -729,7 +739,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -742,9 +756,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -777,7 +791,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -790,9 +808,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -825,7 +843,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -838,9 +860,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -873,7 +895,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -886,9 +912,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -921,7 +947,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -934,9 +964,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -969,7 +999,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -982,9 +1016,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1035,7 +1069,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1048,9 +1086,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1083,7 +1121,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1096,9 +1138,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1131,7 +1173,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1144,9 +1190,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1188,7 +1234,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1201,9 +1251,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1245,7 +1295,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1258,9 +1312,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain diff --git a/tests/clustergroup-normal.expected.yaml b/tests/clustergroup-normal.expected.yaml index 5780ef8b2..551af9594 100644 --- a/tests/clustergroup-normal.expected.yaml +++ b/tests/clustergroup-normal.expected.yaml @@ -196,6 +196,8 @@ data: BasePath: global-vars.yml Name: global-vars clusterDomain: region.example.com + clusterPlatform: aws + clusterVersion: "4.12" extraValueFiles: [] git: account: hybrid-cloud-patterns @@ -543,7 +545,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-example.yaml" + - "/values-example.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-example.yaml" + - "/values-4.12-example.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -556,9 +562,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -600,7 +606,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-example.yaml" + - "/values-example.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-example.yaml" + - "/values-4.12-example.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -613,9 +623,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain From 491d5218221a2deada15299bbe0f839c40d4a211 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 29 Sep 2023 09:04:43 +0000 Subject: [PATCH 07/10] Add test for value file template expansion --- examples/values-example.yaml | 5 +++++ .../clustergroup-industrial-edge-factory.expected.yaml | 1 + tests/clustergroup-industrial-edge-hub.expected.yaml | 1 + tests/clustergroup-medical-diagnosis-hub.expected.yaml | 1 + tests/clustergroup-naked.expected.yaml | 1 + tests/clustergroup-normal.expected.yaml | 10 ++++++++++ 6 files changed, 19 insertions(+) diff --git a/examples/values-example.yaml b/examples/values-example.yaml index 4035c4313..2a224b625 100644 --- a/examples/values-example.yaml +++ b/examples/values-example.yaml @@ -11,6 +11,9 @@ clusterGroup: name: example #insecureUnsealVaultInsideCluster: false isHubCluster: true + sharedValueFiles: + - /values/{{ .Values.global.clusterPlatform }}.yaml + - /values/{{ .Values.global.clusterVersion }}.yaml namespaces: - open-cluster-management: @@ -63,6 +66,8 @@ clusterGroup: namespace: application-ci project: datacenter path: charts/datacenter/pipelines + extraValueFiles: + - /values/{{ .Values.global.clusterVersion }}/{{ .Values.global.clusterPlatform }}.yaml imperative: namespace: imperative diff --git a/tests/clustergroup-industrial-edge-factory.expected.yaml b/tests/clustergroup-industrial-edge-factory.expected.yaml index 42d0c9752..8c37450e7 100644 --- a/tests/clustergroup-industrial-edge-factory.expected.yaml +++ b/tests/clustergroup-industrial-edge-factory.expected.yaml @@ -115,6 +115,7 @@ data: - manuela-factory-ml-workspace projects: - factory + sharedValueFiles: [] subscriptions: - channel: stable name: opendatahub-operator diff --git a/tests/clustergroup-industrial-edge-hub.expected.yaml b/tests/clustergroup-industrial-edge-hub.expected.yaml index 5a112b6e4..24f370537 100644 --- a/tests/clustergroup-industrial-edge-hub.expected.yaml +++ b/tests/clustergroup-industrial-edge-hub.expected.yaml @@ -257,6 +257,7 @@ data: - production-datalake - golang-external-secrets - vault + sharedValueFiles: [] subscriptions: acm: channel: release-2.6 diff --git a/tests/clustergroup-medical-diagnosis-hub.expected.yaml b/tests/clustergroup-medical-diagnosis-hub.expected.yaml index 0f7541097..eb367bcea 100644 --- a/tests/clustergroup-medical-diagnosis-hub.expected.yaml +++ b/tests/clustergroup-medical-diagnosis-hub.expected.yaml @@ -260,6 +260,7 @@ data: projects: - hub - medical-diagnosis + sharedValueFiles: [] subscriptions: amq-streams: channel: stable diff --git a/tests/clustergroup-naked.expected.yaml b/tests/clustergroup-naked.expected.yaml index 95a8a4106..1ec018603 100644 --- a/tests/clustergroup-naked.expected.yaml +++ b/tests/clustergroup-naked.expected.yaml @@ -61,6 +61,7 @@ data: name: example namespaces: [] projects: [] + sharedValueFiles: [] subscriptions: {} targetCluster: in-cluster enabled: all diff --git a/tests/clustergroup-normal.expected.yaml b/tests/clustergroup-normal.expected.yaml index 551af9594..f96708a9e 100644 --- a/tests/clustergroup-normal.expected.yaml +++ b/tests/clustergroup-normal.expected.yaml @@ -81,6 +81,8 @@ data: path: common/acm project: datacenter pipe: + extraValueFiles: + - /values/4.12/aws.yaml name: pipelines namespace: application-ci path: charts/datacenter/pipelines @@ -175,6 +177,9 @@ data: - excludes-ci projects: - datacenter + sharedValueFiles: + - /values/aws.yaml + - /values/4.12.yaml subscriptions: acm: channel: release-2.4 @@ -550,6 +555,8 @@ spec: - "/values-aws-4.12.yaml" - "/values-aws-example.yaml" - "/values-4.12-example.yaml" + - "/values/aws.yaml" + - "/values/4.12.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -611,6 +618,9 @@ spec: - "/values-aws-4.12.yaml" - "/values-aws-example.yaml" - "/values-4.12-example.yaml" + - "/values/aws.yaml" + - "/values/4.12.yaml" + - "/values/4.12/aws.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL From 7cda9c48f9861563dada519de40d89134e0eb683 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 29 Sep 2023 09:29:38 +0000 Subject: [PATCH 08/10] Drop the Template.{Name,BasePath} hack due to problems with the imperative configmap --- clustergroup/values.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/clustergroup/values.yaml b/clustergroup/values.yaml index 36e026361..e9720d20e 100644 --- a/clustergroup/values.yaml +++ b/clustergroup/values.yaml @@ -8,10 +8,6 @@ global: installPlanApproval: Automatic applicationRetryLimit: 20 - # This is deeply unpleasant but makes values files easier to template - Template: - BasePath: "global-vars.yml" - Name: "global-vars" enabled: "all" From 8d84b0abaa14a11d9aa5df87d0ecdbee2f513925 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Mon, 2 Oct 2023 11:30:55 +0200 Subject: [PATCH 09/10] Fix up tests after last PR --- tests/clustergroup-industrial-edge-factory.expected.yaml | 3 --- tests/clustergroup-industrial-edge-hub.expected.yaml | 3 --- tests/clustergroup-medical-diagnosis-hub.expected.yaml | 3 --- tests/clustergroup-naked.expected.yaml | 3 --- tests/clustergroup-normal.expected.yaml | 3 --- 5 files changed, 15 deletions(-) diff --git a/tests/clustergroup-industrial-edge-factory.expected.yaml b/tests/clustergroup-industrial-edge-factory.expected.yaml index 8c37450e7..3eed32969 100644 --- a/tests/clustergroup-industrial-edge-factory.expected.yaml +++ b/tests/clustergroup-industrial-edge-factory.expected.yaml @@ -136,9 +136,6 @@ data: targetCluster: in-cluster enabled: all global: - Template: - BasePath: global-vars.yml - Name: global-vars clusterDomain: region.example.com clusterPlatform: aws clusterVersion: "4.12" diff --git a/tests/clustergroup-industrial-edge-hub.expected.yaml b/tests/clustergroup-industrial-edge-hub.expected.yaml index 24f370537..12e1ee289 100644 --- a/tests/clustergroup-industrial-edge-hub.expected.yaml +++ b/tests/clustergroup-industrial-edge-hub.expected.yaml @@ -297,9 +297,6 @@ data: targetCluster: in-cluster enabled: all global: - Template: - BasePath: global-vars.yml - Name: global-vars clusterDomain: region.example.com clusterPlatform: aws clusterVersion: "4.12" diff --git a/tests/clustergroup-medical-diagnosis-hub.expected.yaml b/tests/clustergroup-medical-diagnosis-hub.expected.yaml index eb367bcea..9efc2431a 100644 --- a/tests/clustergroup-medical-diagnosis-hub.expected.yaml +++ b/tests/clustergroup-medical-diagnosis-hub.expected.yaml @@ -284,9 +284,6 @@ data: targetCluster: in-cluster enabled: all global: - Template: - BasePath: global-vars.yml - Name: global-vars clusterDomain: region.example.com clusterPlatform: aws clusterVersion: "4.12" diff --git a/tests/clustergroup-naked.expected.yaml b/tests/clustergroup-naked.expected.yaml index 1ec018603..753599028 100644 --- a/tests/clustergroup-naked.expected.yaml +++ b/tests/clustergroup-naked.expected.yaml @@ -66,9 +66,6 @@ data: targetCluster: in-cluster enabled: all global: - Template: - BasePath: global-vars.yml - Name: global-vars extraValueFiles: [] options: applicationRetryLimit: 20 diff --git a/tests/clustergroup-normal.expected.yaml b/tests/clustergroup-normal.expected.yaml index f96708a9e..d6886bed6 100644 --- a/tests/clustergroup-normal.expected.yaml +++ b/tests/clustergroup-normal.expected.yaml @@ -197,9 +197,6 @@ data: targetCluster: in-cluster enabled: all global: - Template: - BasePath: global-vars.yml - Name: global-vars clusterDomain: region.example.com clusterPlatform: aws clusterVersion: "4.12" From d8606dc66a4000572e693e7c516587843fff691a Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Mon, 2 Oct 2023 11:36:44 +0200 Subject: [PATCH 10/10] Fix up common tests --- ...mmon-acm-industrial-edge-hub.expected.yaml | 2 +- ...on-acm-medical-diagnosis-hub.expected.yaml | 2 +- tests/common-acm-normal.expected.yaml | 4 +- ...roup-industrial-edge-factory.expected.yaml | 13 +- ...tergroup-industrial-edge-hub.expected.yaml | 73 +++++++--- ...rgroup-medical-diagnosis-hub.expected.yaml | 133 +++++++++++++----- tests/common-clustergroup-naked.expected.yaml | 1 + .../common-clustergroup-normal.expected.yaml | 32 ++++- 8 files changed, 187 insertions(+), 73 deletions(-) diff --git a/tests/common-acm-industrial-edge-hub.expected.yaml b/tests/common-acm-industrial-edge-hub.expected.yaml index 444b833cb..a474b4e32 100644 --- a/tests/common-acm-industrial-edge-hub.expected.yaml +++ b/tests/common-acm-industrial-edge-hub.expected.yaml @@ -234,7 +234,7 @@ spec: - name: global.clusterVersion value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}' - name: global.clusterPlatform - value: + value: aws - name: clusterGroup.name value: factory - name: clusterGroup.isHubCluster diff --git a/tests/common-acm-medical-diagnosis-hub.expected.yaml b/tests/common-acm-medical-diagnosis-hub.expected.yaml index f79e013b8..f54648fe1 100644 --- a/tests/common-acm-medical-diagnosis-hub.expected.yaml +++ b/tests/common-acm-medical-diagnosis-hub.expected.yaml @@ -225,7 +225,7 @@ spec: - name: global.clusterVersion value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}' - name: global.clusterPlatform - value: + value: aws - name: clusterGroup.name value: region-one - name: clusterGroup.isHubCluster diff --git a/tests/common-acm-normal.expected.yaml b/tests/common-acm-normal.expected.yaml index 900cc2919..0429824db 100644 --- a/tests/common-acm-normal.expected.yaml +++ b/tests/common-acm-normal.expected.yaml @@ -628,7 +628,7 @@ spec: - name: global.clusterVersion value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}' - name: global.clusterPlatform - value: + value: aws - name: clusterGroup.name value: acm-edge - name: clusterGroup.isHubCluster @@ -722,7 +722,7 @@ spec: - name: global.clusterVersion value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}' - name: global.clusterPlatform - value: + value: aws - name: clusterGroup.name value: acm-provision-edge - name: clusterGroup.isHubCluster diff --git a/tests/common-clustergroup-industrial-edge-factory.expected.yaml b/tests/common-clustergroup-industrial-edge-factory.expected.yaml index 3cc9378d4..426d9f7ec 100644 --- a/tests/common-clustergroup-industrial-edge-factory.expected.yaml +++ b/tests/common-clustergroup-industrial-edge-factory.expected.yaml @@ -115,6 +115,7 @@ data: - manuela-factory-ml-workspace projects: - factory + sharedValueFiles: [] subscriptions: - channel: stable name: opendatahub-operator @@ -136,6 +137,8 @@ data: enabled: all global: clusterDomain: region.example.com + clusterPlatform: aws + clusterVersion: "4.12" extraValueFiles: [] hubClusterDomain: apps.hub.example.com localClusterDomain: apps.region.example.com @@ -407,7 +410,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-factory.yaml" + - "/values-factory.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-factory.yaml" + - "/values-4.12-factory.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -420,9 +427,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain diff --git a/tests/common-clustergroup-industrial-edge-hub.expected.yaml b/tests/common-clustergroup-industrial-edge-hub.expected.yaml index 88b060890..c808fc45a 100644 --- a/tests/common-clustergroup-industrial-edge-hub.expected.yaml +++ b/tests/common-clustergroup-industrial-edge-hub.expected.yaml @@ -257,6 +257,7 @@ data: - production-datalake - golang-external-secrets - vault + sharedValueFiles: [] subscriptions: acm: channel: release-2.6 @@ -297,6 +298,8 @@ data: enabled: all global: clusterDomain: region.example.com + clusterPlatform: aws + clusterVersion: "4.12" extraValueFiles: [] hubClusterDomain: apps.hub.example.com localClusterDomain: apps.region.example.com @@ -680,7 +683,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -693,9 +700,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -737,7 +744,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -750,9 +761,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -785,7 +796,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -798,9 +813,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -833,7 +848,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -846,9 +865,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -911,7 +930,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -924,9 +947,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -959,7 +982,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -972,9 +999,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1034,7 +1061,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-datacenter.yaml" + - "/values-datacenter.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-datacenter.yaml" + - "/values-4.12-datacenter.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1047,9 +1078,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain diff --git a/tests/common-clustergroup-medical-diagnosis-hub.expected.yaml b/tests/common-clustergroup-medical-diagnosis-hub.expected.yaml index afb9615fc..3d346ca77 100644 --- a/tests/common-clustergroup-medical-diagnosis-hub.expected.yaml +++ b/tests/common-clustergroup-medical-diagnosis-hub.expected.yaml @@ -260,6 +260,7 @@ data: projects: - hub - medical-diagnosis + sharedValueFiles: [] subscriptions: amq-streams: channel: stable @@ -284,6 +285,8 @@ data: enabled: all global: clusterDomain: region.example.com + clusterPlatform: aws + clusterVersion: "4.12" extraValueFiles: [] hubClusterDomain: apps.hub.example.com localClusterDomain: apps.region.example.com @@ -625,7 +628,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -638,9 +645,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -673,7 +680,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -686,9 +697,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -721,7 +732,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -734,9 +749,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -769,7 +784,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -782,9 +801,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -817,7 +836,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -830,9 +853,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -865,7 +888,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -878,9 +905,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -913,7 +940,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -926,9 +957,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -961,7 +992,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -974,9 +1009,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1027,7 +1062,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1040,9 +1079,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1075,7 +1114,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1088,9 +1131,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1123,7 +1166,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1136,9 +1183,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1180,7 +1227,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1193,9 +1244,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -1237,7 +1288,11 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-hub.yaml" + - "/values-hub.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-hub.yaml" + - "/values-4.12-hub.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1250,9 +1305,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain diff --git a/tests/common-clustergroup-naked.expected.yaml b/tests/common-clustergroup-naked.expected.yaml index 7f167c748..753599028 100644 --- a/tests/common-clustergroup-naked.expected.yaml +++ b/tests/common-clustergroup-naked.expected.yaml @@ -61,6 +61,7 @@ data: name: example namespaces: [] projects: [] + sharedValueFiles: [] subscriptions: {} targetCluster: in-cluster enabled: all diff --git a/tests/common-clustergroup-normal.expected.yaml b/tests/common-clustergroup-normal.expected.yaml index c1e0d8762..75bbaca95 100644 --- a/tests/common-clustergroup-normal.expected.yaml +++ b/tests/common-clustergroup-normal.expected.yaml @@ -81,6 +81,8 @@ data: path: common/acm project: datacenter pipe: + extraValueFiles: + - /values/4.12/aws.yaml name: pipelines namespace: application-ci path: charts/datacenter/pipelines @@ -175,6 +177,9 @@ data: - excludes-ci projects: - datacenter + sharedValueFiles: + - /values/aws.yaml + - /values/4.12.yaml subscriptions: acm: channel: release-2.4 @@ -193,6 +198,8 @@ data: enabled: all global: clusterDomain: region.example.com + clusterPlatform: aws + clusterVersion: "4.12" extraValueFiles: [] hubClusterDomain: apps.hub.example.com localClusterDomain: apps.region.example.com @@ -535,7 +542,13 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-example.yaml" + - "/values-example.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-example.yaml" + - "/values-4.12-example.yaml" + - "/values/aws.yaml" + - "/values/4.12.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -548,9 +561,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain @@ -592,7 +605,14 @@ spec: ignoreMissingValueFiles: true valueFiles: - "/values-global.yaml" - - "/values-example.yaml" + - "/values-example.yaml" + - "/values-aws.yaml" + - "/values-aws-4.12.yaml" + - "/values-aws-example.yaml" + - "/values-4.12-example.yaml" + - "/values/aws.yaml" + - "/values/4.12.yaml" + - "/values/4.12/aws.yaml" parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -605,9 +625,9 @@ spec: - name: global.clusterDomain value: region.example.com - name: global.clusterVersion - value: "" + value: "4.12" - name: global.clusterPlatform - value: "" + value: "aws" - name: global.hubClusterDomain value: apps.hub.example.com - name: global.localClusterDomain