From 54056c7fe138ea250ab47d7e17114d29f540772d Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Mon, 10 Jul 2023 16:35:08 +0900 Subject: [PATCH 01/11] Split off global helm variables to a helper definition We can only split out bits of yaml that reference $.* variables. This is because these sinppets in _helpers.tbl are passed a single context either $ or . and cannot use both like the top-level domain. --- clustergroup/templates/_helpers.tpl | 25 +++++++++++++++++++ .../templates/plumbing/applications.yaml | 19 +------------- 2 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 clustergroup/templates/_helpers.tpl diff --git a/clustergroup/templates/_helpers.tpl b/clustergroup/templates/_helpers.tpl new file mode 100644 index 00000000..250eae68 --- /dev/null +++ b/clustergroup/templates/_helpers.tpl @@ -0,0 +1,25 @@ +{{/* +Default always defined top-level variables for helm charts +*/}} +{{- define "clustergroup.app.globalvalues.helmparameters" -}} +- name: global.repoURL + value: $ARGOCD_APP_SOURCE_REPO_URL +- name: global.targetRevision + value: $ARGOCD_APP_SOURCE_TARGET_REVISION +- name: global.namespace + value: $ARGOCD_APP_NAMESPACE +- name: global.pattern + value: {{ $.Values.global.pattern }} +- name: global.clusterDomain + value: {{ $.Values.global.clusterDomain }} +- name: global.clusterVersion + value: "{{ $.Values.global.clusterVersion }}" +- name: global.clusterPlatform + value: "{{ $.Values.global.clusterPlatform }}" +- name: global.hubClusterDomain + value: {{ $.Values.global.hubClusterDomain }} +- name: global.localClusterDomain + value: {{ coalesce $.Values.global.localClusterDomain $.Values.global.hubClusterDomain }} +{{- end }} {{/* clustergroup.globalvaluesparameters */}} + + diff --git a/clustergroup/templates/plumbing/applications.yaml b/clustergroup/templates/plumbing/applications.yaml index 206e420f..39d51cc6 100644 --- a/clustergroup/templates/plumbing/applications.yaml +++ b/clustergroup/templates/plumbing/applications.yaml @@ -172,24 +172,7 @@ spec: {{- end }} # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - - name: global.repoURL - value: $ARGOCD_APP_SOURCE_REPO_URL - - name: global.targetRevision - value: $ARGOCD_APP_SOURCE_TARGET_REVISION - - name: global.namespace - value: $ARGOCD_APP_NAMESPACE - - name: global.pattern - value: {{ $.Values.global.pattern }} - - name: global.clusterDomain - value: {{ $.Values.global.clusterDomain }} - - name: global.clusterVersion - value: "{{ $.Values.global.clusterVersion }}" - - name: global.clusterPlatform - value: "{{ $.Values.global.clusterPlatform }}" - - name: global.hubClusterDomain - value: {{ $.Values.global.hubClusterDomain }} - - name: global.localClusterDomain - value: {{ coalesce $.Values.global.localClusterDomain $.Values.global.hubClusterDomain }} + {{- include "clustergroup.app.globalvalues.helmparameters" $ | nindent 8 }} {{- range .extraHubClusterDomainFields }} - name: {{ . }} value: {{ $.Values.global.hubClusterDomain }} From fdee136e65e513468ce5b4aecfd5839f8f82502a Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Mon, 10 Jul 2023 16:39:18 +0900 Subject: [PATCH 02/11] Switch ApplicationSets to use the newly-introduced helpers I only remove the variables that are defined identically in ApplicationSet and in the helper. Leaving the other ones as is as their presence is not entirely clear to me and I do not want to risk breaking things. --- clustergroup/templates/plumbing/applications.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/clustergroup/templates/plumbing/applications.yaml b/clustergroup/templates/plumbing/applications.yaml index 39d51cc6..0fbe71ec 100644 --- a/clustergroup/templates/plumbing/applications.yaml +++ b/clustergroup/templates/plumbing/applications.yaml @@ -69,24 +69,13 @@ spec: {{ `{{ values }}` }} {{- end }} parameters: - - name: global.clusterDomain - value: {{ $.Values.global.clusterDomain }} - - name: global.clusterVersion - value: "{{ $.Values.global.clusterVersion }}" - - name: global.clusterPlatform - value: "{{ $.Values.global.clusterPlatform }}" - - name: global.hubClusterDomain - value: {{ $.Values.global.hubClusterDomain }} - - name: global.localClusterDomain - value: {{ coalesce $.Values.global.localClusterDomain $.Values.global.hubClusterDomain }} + {{- include "clustergroup.app.globalvalues.helmparameters" $ | nindent 12 }} - name: global.repoURL value: {{ $.Values.global.repoURL }} - name: global.targetRevision value: {{ $.Values.global.targetRevision }} - name: global.namespace value: {{ $.Values.global.namespace }} - - name: global.pattern - value: {{ $.Values.global.pattern }} - name: clusterGroup.name value: {{ .Values.clusterGroup.name }} {{- range .extraHubClusterDomainFields }} From 4e1f360daab2159baf97ab6d5d97080efc9cad3a Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Mon, 10 Jul 2023 16:45:07 +0900 Subject: [PATCH 03/11] Split off valueFiles to _helpers.tbl --- clustergroup/templates/_helpers.tpl | 17 +++++++++++++++++ .../templates/plumbing/applications.yaml | 13 +------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/clustergroup/templates/_helpers.tpl b/clustergroup/templates/_helpers.tpl index 250eae68..c3a730fb 100644 --- a/clustergroup/templates/_helpers.tpl +++ b/clustergroup/templates/_helpers.tpl @@ -23,3 +23,20 @@ Default always defined top-level variables for helm charts {{- end }} {{/* clustergroup.globalvaluesparameters */}} +{{/* +Default always defined valueFiles to be included in Applications +*/}} +{{- define "clustergroup.app.globalvalues.valuefiles" -}} +- "/values-global.yaml" +- "/values-{{ $.Values.clusterGroup.name }}.yaml" +{{- if $.Values.global.clusterPlatform }} +- "/values-{{ $.Values.global.clusterPlatform }}.yaml" + {{- if $.Values.global.clusterVersion }} +- "/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.global.clusterVersion }}.yaml" + {{- end }} +- "/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.clusterGroup.name }}.yaml" +{{- end }} +{{- if $.Values.global.clusterVersion }} +- "/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml" +{{- end }} +{{- end }} {{/* clustergroup.app.globalvalues.valuefiles */}} diff --git a/clustergroup/templates/plumbing/applications.yaml b/clustergroup/templates/plumbing/applications.yaml index 0fbe71ec..e57f1199 100644 --- a/clustergroup/templates/plumbing/applications.yaml +++ b/clustergroup/templates/plumbing/applications.yaml @@ -144,18 +144,7 @@ spec: helm: ignoreMissingValueFiles: true valueFiles: - - "/values-global.yaml" - - "/values-{{ $.Values.clusterGroup.name }}.yaml" - {{- if $.Values.global.clusterPlatform }} - - "/values-{{ $.Values.global.clusterPlatform }}.yaml" - {{- if $.Values.global.clusterVersion }} - - "/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.global.clusterVersion }}.yaml" - {{- end }} - - "/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.clusterGroup.name }}.yaml" - {{- end }} - {{- if $.Values.global.clusterVersion }} - - "/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml" - {{- end }} + {{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 6 }} {{- range $valueFile := .extraValueFiles }} - {{ $valueFile | quote }} {{- end }} From 35e79901bd5d048662af87bbcc2e2f1de817a45a Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Mon, 10 Jul 2023 16:48:13 +0900 Subject: [PATCH 04/11] Switch applicationsets to use the new helper --- clustergroup/templates/plumbing/applications.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/clustergroup/templates/plumbing/applications.yaml b/clustergroup/templates/plumbing/applications.yaml index e57f1199..0c275a35 100644 --- a/clustergroup/templates/plumbing/applications.yaml +++ b/clustergroup/templates/plumbing/applications.yaml @@ -57,10 +57,7 @@ spec: helm: ignoreMissingValueFiles: true valueFiles: - - "values.yaml" - {{- if $.Values.global.clusterVersion }} - - "/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml" - {{- end }} + {{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 12 }} {{- range .extraValueFiles }} - {{ . | quote }} {{- end }} From e85c3ab58ed201dc40376d24ca5308acec806ac1 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Tue, 11 Jul 2023 11:18:45 +0900 Subject: [PATCH 05/11] Drop some older comments --- .../templates/plumbing/applications.yaml | 2 -- ...roup-industrial-edge-factory.expected.yaml | 3 --- ...tergroup-industrial-edge-hub.expected.yaml | 15 ----------- ...rgroup-medical-diagnosis-hub.expected.yaml | 26 ------------------- tests/clustergroup-normal.expected.yaml | 4 --- 5 files changed, 50 deletions(-) diff --git a/clustergroup/templates/plumbing/applications.yaml b/clustergroup/templates/plumbing/applications.yaml index 0c275a35..6e52e667 100644 --- a/clustergroup/templates/plumbing/applications.yaml +++ b/clustergroup/templates/plumbing/applications.yaml @@ -145,7 +145,6 @@ spec: {{- range $valueFile := .extraValueFiles }} - {{ $valueFile | quote }} {{- end }} - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: {{- include "clustergroup.app.globalvalues.helmparameters" $ | nindent 8 }} {{- range .extraHubClusterDomainFields }} @@ -201,7 +200,6 @@ spec: automated: {} retry: limit: {{ default 20 $.Values.global.applicationRetryLimit }} - # selfHeal: true {{- end }} --- {{- end }} diff --git a/tests/clustergroup-industrial-edge-factory.expected.yaml b/tests/clustergroup-industrial-edge-factory.expected.yaml index 649463a3..ac7ddf1a 100644 --- a/tests/clustergroup-industrial-edge-factory.expected.yaml +++ b/tests/clustergroup-industrial-edge-factory.expected.yaml @@ -385,7 +385,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -409,7 +408,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-factory.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -433,7 +431,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/argocd.yaml apiVersion: argoproj.io/v1alpha1 diff --git a/tests/clustergroup-industrial-edge-hub.expected.yaml b/tests/clustergroup-industrial-edge-hub.expected.yaml index c4c7dddc..d4a208c0 100644 --- a/tests/clustergroup-industrial-edge-hub.expected.yaml +++ b/tests/clustergroup-industrial-edge-hub.expected.yaml @@ -683,7 +683,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -716,7 +715,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -740,7 +738,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -764,7 +761,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -788,7 +784,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -812,7 +807,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -836,7 +830,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -890,7 +883,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -914,7 +906,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -938,7 +929,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -962,7 +952,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -986,7 +975,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1012,7 +1000,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1036,7 +1023,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1078,7 +1064,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/argocd.yaml apiVersion: argoproj.io/v1alpha1 diff --git a/tests/clustergroup-medical-diagnosis-hub.expected.yaml b/tests/clustergroup-medical-diagnosis-hub.expected.yaml index dccc6e92..30442f2b 100644 --- a/tests/clustergroup-medical-diagnosis-hub.expected.yaml +++ b/tests/clustergroup-medical-diagnosis-hub.expected.yaml @@ -628,7 +628,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -652,7 +651,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -676,7 +674,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -700,7 +697,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -724,7 +720,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -748,7 +743,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -772,7 +766,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -796,7 +789,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -820,7 +812,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -844,7 +835,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -868,7 +858,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -892,7 +881,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -916,7 +904,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -940,7 +927,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -964,7 +950,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1006,7 +991,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1030,7 +1014,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1054,7 +1037,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1078,7 +1060,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1102,7 +1083,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1126,7 +1106,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1159,7 +1138,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1183,7 +1161,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1216,7 +1193,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1240,7 +1216,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1264,7 +1239,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/argocd.yaml apiVersion: argoproj.io/v1alpha1 diff --git a/tests/clustergroup-normal.expected.yaml b/tests/clustergroup-normal.expected.yaml index c0af256d..33d0663e 100644 --- a/tests/clustergroup-normal.expected.yaml +++ b/tests/clustergroup-normal.expected.yaml @@ -533,7 +533,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-example.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -566,7 +565,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -590,7 +588,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-example.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -614,7 +611,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/hosted-sites.yaml apiVersion: argoproj.io/v1alpha1 From 16fab03e098a6c1f333b2fc1eea0f41470203b52 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Thu, 13 Jul 2023 16:13:52 +0900 Subject: [PATCH 06/11] Tweak the load secret debug message to be clearer When HOME is set we replace it with '~' in this debug message because when run from inside the container the HOME is /pattern-home which is confusing for users. Printing out '~' when at the start of the string is less confusing. Before: ok: [localhost] => { "msg": "/home/michele/.config/hybrid-cloud-patterns/values-secret-multicloud-gitops.yaml" } After: ok: [localhost] => { "msg": "~/.config/hybrid-cloud-patterns/values-secret-multicloud-gitops.yaml" } --- ansible/roles/vault_utils/tasks/push_secrets.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/roles/vault_utils/tasks/push_secrets.yaml b/ansible/roles/vault_utils/tasks/push_secrets.yaml index 101b83af..a820f40a 100644 --- a/ansible/roles/vault_utils/tasks/push_secrets.yaml +++ b/ansible/roles/vault_utils/tasks/push_secrets.yaml @@ -80,9 +80,12 @@ register: encrypted failed_when: (encrypted.rc not in [0, 1]) +# When HOME is set we replace it with '~' in this debug message +# because when run from inside the container the HOME is /pattern-home +# which is confusing for users - name: Is found values secret file encrypted ansible.builtin.debug: - msg: "Using {{ found_file }} to parse secrets" + msg: "Using {{ (lookup('env', 'HOME') | length > 0) | ternary(found_file | regex_replace('^' + lookup('env', 'HOME'), '~'), found_file) }} to parse secrets" - name: Set encryption bool fact no_log: true From 4193c08f816a1b928ea779dceafd9eb256da9190 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 14 Jul 2023 05:10:26 +0000 Subject: [PATCH 07/11] Include an example SNO cluster pool in the tests --- examples/values-example.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/values-example.yaml b/examples/values-example.yaml index 6f84820c..740da650 100644 --- a/examples/values-example.yaml +++ b/examples/values-example.yaml @@ -104,11 +104,18 @@ clusterGroup: name: aws-ap openshiftVersion: 4.10.18 baseDomain: blueprints.rhecoeng.com + controlPlane: + count: 1 + platform: + aws: + type: m5.xlarge + workers: + count: 0 platform: aws: region: ap-southeast-2 clusters: - - one + - One exampleAzurePool: name: azure-us openshiftVersion: 4.10.18 @@ -118,7 +125,7 @@ clusterGroup: baseDomainResourceGroupName: dojo-dns-zones region: eastus clusters: - - two + - Two - three acmlabels: - name: clusterGroup From ad39f4d5c6fb6bd15d38cd5d4e13fafddb67b450 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 14 Jul 2023 05:11:03 +0000 Subject: [PATCH 08/11] Enforce lowercase names for cluster claims --- acm/templates/provision/clusterpool.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acm/templates/provision/clusterpool.yaml b/acm/templates/provision/clusterpool.yaml index 31a22224..73bf4aa8 100644 --- a/acm/templates/provision/clusterpool.yaml +++ b/acm/templates/provision/clusterpool.yaml @@ -51,7 +51,7 @@ spec: installConfigSecretTemplateRef: name: {{ $poolName }}-install-config imageSetRef: - name: img{{ .openshiftVersion }}-x86-64-appsub + name: img{{ .openshiftVersion }}-multi-appsub pullSecretRef: name: {{ $poolName }}-pull-secret skipMachinePools: true # Disable MachinePool as using custom install-config @@ -65,13 +65,13 @@ spec: apiVersion: hive.openshift.io/v1 kind: ClusterClaim metadata: - name: '{{ . }}-{{ $group.name }}' + name: '{{ lower . }}-{{ lower $group.name }}' annotations: argocd.argoproj.io/sync-wave: "20" argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true cluster.open-cluster-management.io/createmanagedcluster: "true" labels: - clusterClaimName: {{ . }}-{{ $group.name }} + clusterClaimName: {{ lower . }}-{{ lower $group.name }} {{- if (not $group.acmlabels) }} clusterGroup: {{ $group.name }} {{- else if eq (len $group.acmlabels) 0 }} From b087e876f244dfb39a2c7af6bcad04173eba7940 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 14 Jul 2023 05:11:37 +0000 Subject: [PATCH 09/11] Avoid mixing yaml and json in the OCP install-config --- acm/templates/provision/_install-config.tpl | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/acm/templates/provision/_install-config.tpl b/acm/templates/provision/_install-config.tpl index 39aa03eb..b0336627 100644 --- a/acm/templates/provision/_install-config.tpl +++ b/acm/templates/provision/_install-config.tpl @@ -24,7 +24,10 @@ controlPlane: name: controlPlane {{- if .controlPlane }} replicas: {{ default 3 .controlPlane.count }} - platform: {{- .controlPlane.platform | toPrettyJson }} + {{- if .controlPlane.platform }} + platform: + {{- toYaml .controlPlane.platform | nindent 4 }} + {{- end }} {{- else }} replicas: 3 platform: @@ -36,8 +39,11 @@ compute: architecture: amd64 name: 'worker' {{- if .workers }} - replicas: {{ default 3 .workers.count }} - platform: {{- .workers.platform | toPrettyJson }} + replicas: {{ default 0 .workers.count }} + {{- if .workers.platform }} + platform: + {{- toYaml .workers.platform | nindent 4 }} + {{- end }} {{- else }} replicas: 3 platform: @@ -50,10 +56,11 @@ networking: hostPrefix: 23 machineNetwork: - cidr: 10.0.0.0/16 - networkType: OpenShiftSDN + networkType: OVNKubernetes serviceNetwork: - 172.30.0.0/16 -platform: {{ .platform | toPrettyJson }} +platform: +{{- toYaml .platform | nindent 2 }} pullSecret: "" # skip, hive will inject based on it's secrets sshKey: "" # skip, hive will inject based on it's secrets -{{- end -}} \ No newline at end of file +{{- end -}} From 38d83ec3cb2be3447672df19606aa4a015c95f37 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 14 Jul 2023 05:11:57 +0000 Subject: [PATCH 10/11] Update provisioning tests --- tests/acm-normal.expected.yaml | 8 ++++---- tests/clustergroup-normal.expected.yaml | 11 +++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/acm-normal.expected.yaml b/tests/acm-normal.expected.yaml index 7c7ac7d5..b233b9d1 100644 --- a/tests/acm-normal.expected.yaml +++ b/tests/acm-normal.expected.yaml @@ -6,7 +6,7 @@ metadata: name: aws-ap-acm-provision-edge-install-config data: # Base64 encoding of install-config ya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YW5lOgogIGFyY2hpdGVjdHVyZTogYW1kNjQKICBoeXBlcnRocmVhZGluZzogRW5hYmxlZAogIG5hbWU6IGNvbnRyb2xQbGFuZQogIHJlcGxpY2FzOiAxCiAgcGxhdGZvcm06CiAgICBhd3M6CiAgICAgIHR5cGU6IG01LnhsYXJnZQpjb21wdXRlOgotIGh5cGVydGhyZWFkaW5nOiBFbmFibGVkCiAgYXJjaGl0ZWN0dXJlOiBhbWQ2NAogIG5hbWU6ICd3b3JrZXInCiAgcmVwbGljYXM6IDAKbmV0d29ya2luZzoKICBjbHVzdGVyTmV0d29yazoKICAtIGNpZHI6IDEwLjEyOC4wLjAvMTQKICAgIGhvc3RQcmVmaXg6IDIzCiAgbWFjaGluZU5ldHdvcms6CiAgLSBjaWRyOiAxMC4wLjAuMC8xNgogIG5ldHdvcmtUeXBlOiBPVk5LdWJlcm5ldGVzCiAgc2VydmljZU5ldHdvcms6CiAgLSAxNzIuMzAuMC4wLzE2CnBsYXRmb3JtOgogIGF3czoKICAgIHJlZ2lvbjogYXAtc291dGhlYXN0LTIKcHVsbFNlY3JldDogIiIgIyBza2lwLCBoaXZlIHdpbGwgaW5qZWN0IGJhc2VkIG9uIGl0J3Mgc2VjcmV0cwpzc2hLZXk6ICIiICAgICAjIHNraXAsIGhpdmUgd2lsbCBpbmplY3QgYmFzZWQgb24gaXQncyBzZWNyZXRz type: Opaque --- # Source: acm/templates/provision/secrets-common.yaml @@ -16,7 +16,7 @@ metadata: name: azure-us-acm-provision-edge-install-config data: # Base64 encoding of install-config yaml - install-config.yaml: CgphcGlWZXJzaW9uOiB2MQptZXRhZGF0YToKICBuYW1lOiAnYXp1cmUtdXMnIApiYXNlRG9tYWluOiBibHVlcHJpbnRzLnJoZWNvZW5nLmNvbQpjb250cm9sUGxhbmU6CiAgYXJjaGl0ZWN0dXJlOiBhbWQ2NAogIGh5cGVydGhyZWFkaW5nOiBFbmFibGVkCiAgbmFtZTogY29udHJvbFBsYW5lCiAgcmVwbGljYX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GFuZGFyZF9EOHNfdjMKY29tcHV0ZToKLSBoeXBlcnRocmVhZGluZzogRW5hYmxlZAogIGFyY2hpdGVjdHVyZTogYW1kNjQKICBuYW1lOiAnd29ya2VyJwogIHJlcGxpY2FzOiAzCiAgcGxhdGZvcm06CiAgICBhenVyZToKICAgICAgdHlwZTogU3RhbmRhcmRfRDhzX3YzCm5ldHdvcmtpbmc6CiAgY2x1c3Rlck5ldHdvcms6CiAgLSBjaWRyOiAxMC4xMjguMC4wLzE0CiAgICBob3N0UHJlZml4OiAyMwogIG1hY2hpbmVOZXR3b3JrOgogIC0gY2lkcjogMTAuMC4wLjAvMTYKICBuZXR3b3JrVHlwZTogT1ZOS3ViZXJuZXRlcwogIHNlcnZpY2VOZXR3b3JrOgogIC0gMTcyLjMwLjAuMC8xNgpwbGF0Zm9ybToKICBhenVyZToKICAgIGJhc2VEb21haW5SZXNvdXJjZUdyb3VwTmFtZTogZG9qby1kbnMtem9uZXMKICAgIHJlZ2lvbjogZWFzdHVzCnB1bGxTZWNyZXQ6ICIiICMgc2tpcCwgaGl2ZSB3aWxsIGluamVjdCBiYXNlZCBvbiBpdCdzIHNlY3JldHMKc3NoS2V5OiAiIiAgICAgIyBza2lwLCBoaXZlIHdpbGwgaW5qZWN0IGJhc2VkIG9uIGl0J3Mgc2VjcmV0cw== type: Opaque --- # Source: acm/templates/policies/acm-hub-ca-policy.yaml @@ -87,7 +87,7 @@ spec: installConfigSecretTemplateRef: name: aws-ap-acm-provision-edge-install-config imageSetRef: - name: img4.10.18-x86-64-appsub + name: img4.10.18-multi-appsub pullSecretRef: name: aws-ap-acm-provision-edge-pull-secret skipMachinePools: true # Disable MachinePool as using custom install-config @@ -117,7 +117,7 @@ spec: installConfigSecretTemplateRef: name: azure-us-acm-provision-edge-install-config imageSetRef: - name: img4.10.18-x86-64-appsub + name: img4.10.18-multi-appsub pullSecretRef: name: azure-us-acm-provision-edge-pull-secret skipMachinePools: true # Disable MachinePool as using custom install-config diff --git a/tests/clustergroup-normal.expected.yaml b/tests/clustergroup-normal.expected.yaml index 33d0663e..92b13045 100644 --- a/tests/clustergroup-normal.expected.yaml +++ b/tests/clustergroup-normal.expected.yaml @@ -123,17 +123,24 @@ data: exampleAWSPool: baseDomain: blueprints.rhecoeng.com clusters: - - one + - One + controlPlane: + count: 1 + platform: + aws: + type: m5.xlarge name: aws-ap openshiftVersion: 4.10.18 platform: aws: region: ap-southeast-2 size: 3 + workers: + count: 0 exampleAzurePool: baseDomain: blueprints.rhecoeng.com clusters: - - two + - Two - three name: azure-us openshiftVersion: 4.10.18 From 4d984faa4124f80092fb0947740e70dd54448849 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Fri, 14 Jul 2023 14:22:23 +0900 Subject: [PATCH 11/11] Fix up common/ tests --- tests/common-acm-normal.expected.yaml | 8 +++--- ...roup-industrial-edge-factory.expected.yaml | 3 --- ...tergroup-industrial-edge-hub.expected.yaml | 15 ----------- ...rgroup-medical-diagnosis-hub.expected.yaml | 26 ------------------- .../common-clustergroup-normal.expected.yaml | 15 ++++++----- 5 files changed, 13 insertions(+), 54 deletions(-) diff --git a/tests/common-acm-normal.expected.yaml b/tests/common-acm-normal.expected.yaml index 7c7ac7d5..b233b9d1 100644 --- a/tests/common-acm-normal.expected.yaml +++ b/tests/common-acm-normal.expected.yaml @@ -6,7 +6,7 @@ metadata: name: aws-ap-acm-provision-edge-install-config data: # Base64 encoding of install-config yaml - install-config.yaml: CgphcGlWZXJzaW9uOiB2MQptZXRhZGF0YToKICBuYW1lOiAnYXdzLWFwJyAKYmFzZURvbWFpbjogYmx1ZXByaW50cy5yaGVjb2VuZy5jb20KY29udHJvbFBsYW5lOgogIGFyY2hpdGVjdHVyZTogYW1kNjQKICBoeXBlcnRocmVhZGluZzogRW5hYmxlZAogIG5hbWU6IGNvbnRyb2xQbGFuZQogIHJlcGxpY2FzOiAzCiAgcGxhdGZvcm06CiAgICBhd3M6CiAgICAgIHR5cGU6IG01LnhsYXJnZQpjb21wd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KICBjbHVzdGVyTmV0d29yazoKICAtIGNpZHI6IDEwLjEyOC4wLjAvMTQKICAgIGhvc3RQcmVmaXg6IDIzCiAgbWFjaGluZU5ldHdvcms6CiAgLSBjaWRyOiAxMC4wLjAuMC8xNgogIG5ldHdvcmtUeXBlOiBPVk5LdWJlcm5ldGVzCiAgc2VydmljZU5ldHdvcms6CiAgLSAxNzIuMzAuMC4wLzE2CnBsYXRmb3JtOgogIGF3czoKICAgIHJlZ2lvbjogYXAtc291dGhlYXN0LTIKcHVsbFNlY3JldDogIiIgIyBza2lwLCBoaXZlIHdpbGwgaW5qZWN0IGJhc2VkIG9uIGl0J3Mgc2VjcmV0cwpzc2hLZXk6ICIiICAgICAjIHNraXAsIGhpdmUgd2lsbCBpbmplY3QgYmFzZWQgb24gaXQncyBzZWNyZXRz type: Opaque --- # Source: acm/templates/provision/secrets-common.yaml @@ -16,7 +16,7 @@ metadata: name: azure-us-acm-provision-edge-install-config data: # Base64 encoding of install-config yaml - install-config.yaml: CgphcGlWZXJzaW9uOiB2MQptZXRhZGF0YToKICBuYW1lOiAnYXp1cmUtdXMnIApiYXNlRG9tYWluOiBibHVlcHJpbnRzLnJoZWNvZW5nLmNvbQpjb250cm9sUGxhbmU6CiAgYXJjaGl0ZWN0dXJlOiBhbWQ2NAogIGh5cGVydGhyZWFkaW5nOiBFbmFibGVkCiAgbmFtZTogY29udHJvbFBsYW5lCiAgcmVwbGljYXM6IDMKICBwbGF0Zm9ybToKICAgIGF6dXJlOgogICAgICB0eXBlOiBTdGFuZGFyZF9EOHNfdjMKY29tcHV0ZToKLSBoeXBlcnRocmVhZGluZzogRW5hYmxlZAogIGFyY2hpdGVjdHVyZTogYW1kNjQKICBuYW1lOiAnd29ya2VyJwogIHJlcGxpY2FzOiAzCiAgcGxhdGZvcm06CiAgICBhenVyZToKICAgICAgdHlwZTogU3RhbmRhcmRfRDhzX3YzCm5ldHdvcmtpbmc6CiAgY2x1c3Rlck5ldHdvcms6CiAgLSBjaWRy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pbmVOZXR3b3JrOgogIC0gY2lkcjogMTAuMC4wLjAvMTYKICBuZXR3b3JrVHlwZTogT1ZOS3ViZXJuZXRlcwogIHNlcnZpY2VOZXR3b3JrOgogIC0gMTcyLjMwLjAuMC8xNgpwbGF0Zm9ybToKICBhenVyZToKICAgIGJhc2VEb21haW5SZXNvdXJjZUdyb3VwTmFtZTogZG9qby1kbnMtem9uZXMKICAgIHJlZ2lvbjogZWFzdHVzCnB1bGxTZWNyZXQ6ICIiICMgc2tpcCwgaGl2ZSB3aWxsIGluamVjdCBiYXNlZCBvbiBpdCdzIHNlY3JldHMKc3NoS2V5OiAiIiAgICAgIyBza2lwLCBoaXZlIHdpbGwgaW5qZWN0IGJhc2VkIG9uIGl0J3Mgc2VjcmV0cw== type: Opaque --- # Source: acm/templates/policies/acm-hub-ca-policy.yaml @@ -87,7 +87,7 @@ spec: installConfigSecretTemplateRef: name: aws-ap-acm-provision-edge-install-config imageSetRef: - name: img4.10.18-x86-64-appsub + name: img4.10.18-multi-appsub pullSecretRef: name: aws-ap-acm-provision-edge-pull-secret skipMachinePools: true # Disable MachinePool as using custom install-config @@ -117,7 +117,7 @@ spec: installConfigSecretTemplateRef: name: azure-us-acm-provision-edge-install-config imageSetRef: - name: img4.10.18-x86-64-appsub + name: img4.10.18-multi-appsub pullSecretRef: name: azure-us-acm-provision-edge-pull-secret skipMachinePools: true # Disable MachinePool as using custom install-config diff --git a/tests/common-clustergroup-industrial-edge-factory.expected.yaml b/tests/common-clustergroup-industrial-edge-factory.expected.yaml index a0857f41..8aa8002e 100644 --- a/tests/common-clustergroup-industrial-edge-factory.expected.yaml +++ b/tests/common-clustergroup-industrial-edge-factory.expected.yaml @@ -380,7 +380,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -404,7 +403,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-factory.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -428,7 +426,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/argocd.yaml apiVersion: argoproj.io/v1alpha1 diff --git a/tests/common-clustergroup-industrial-edge-hub.expected.yaml b/tests/common-clustergroup-industrial-edge-hub.expected.yaml index 57b15f95..214628ea 100644 --- a/tests/common-clustergroup-industrial-edge-hub.expected.yaml +++ b/tests/common-clustergroup-industrial-edge-hub.expected.yaml @@ -678,7 +678,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -711,7 +710,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -735,7 +733,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -759,7 +756,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -783,7 +779,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -807,7 +802,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -831,7 +825,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -885,7 +878,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -909,7 +901,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -933,7 +924,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -957,7 +947,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -981,7 +970,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1007,7 +995,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1031,7 +1018,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-datacenter.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1073,7 +1059,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/argocd.yaml apiVersion: argoproj.io/v1alpha1 diff --git a/tests/common-clustergroup-medical-diagnosis-hub.expected.yaml b/tests/common-clustergroup-medical-diagnosis-hub.expected.yaml index d4c42419..dd87d483 100644 --- a/tests/common-clustergroup-medical-diagnosis-hub.expected.yaml +++ b/tests/common-clustergroup-medical-diagnosis-hub.expected.yaml @@ -623,7 +623,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -647,7 +646,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -671,7 +669,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -695,7 +692,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -719,7 +715,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -743,7 +738,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -767,7 +761,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -791,7 +784,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -815,7 +807,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -839,7 +830,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -863,7 +853,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -887,7 +876,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -911,7 +899,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -935,7 +922,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -959,7 +945,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1001,7 +986,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1025,7 +1009,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1049,7 +1032,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1073,7 +1055,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1097,7 +1078,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1121,7 +1101,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1154,7 +1133,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1178,7 +1156,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1211,7 +1188,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -1235,7 +1211,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-hub.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -1259,7 +1234,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/argocd.yaml apiVersion: argoproj.io/v1alpha1 diff --git a/tests/common-clustergroup-normal.expected.yaml b/tests/common-clustergroup-normal.expected.yaml index 61cf20b3..7370fae4 100644 --- a/tests/common-clustergroup-normal.expected.yaml +++ b/tests/common-clustergroup-normal.expected.yaml @@ -123,17 +123,24 @@ data: exampleAWSPool: baseDomain: blueprints.rhecoeng.com clusters: - - one + - One + controlPlane: + count: 1 + platform: + aws: + type: m5.xlarge name: aws-ap openshiftVersion: 4.10.18 platform: aws: region: ap-southeast-2 size: 3 + workers: + count: 0 exampleAzurePool: baseDomain: blueprints.rhecoeng.com clusters: - - two + - Two - three name: azure-us openshiftVersion: 4.10.18 @@ -528,7 +535,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-example.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -561,7 +567,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/applications.yaml apiVersion: argoproj.io/v1alpha1 @@ -585,7 +590,6 @@ spec: valueFiles: - "/values-global.yaml" - "/values-example.yaml" - # Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly parameters: - name: global.repoURL value: $ARGOCD_APP_SOURCE_REPO_URL @@ -609,7 +613,6 @@ spec: automated: {} retry: limit: 20 - # selfHeal: true --- # Source: pattern-clustergroup/templates/plumbing/hosted-sites.yaml apiVersion: argoproj.io/v1alpha1