Skip to content

Commit f8f9239

Browse files
committed
Enable goTemplate in ApplicationSet configurations and update appInstance value formatting; add new testing configuration file.
1 parent b31e9e8 commit f8f9239

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

appSets.yaml.gotmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ applicationsets:
44
namespace: argocd
55
finalizers:
66
- resources-finalizer.argocd.argoproj.io
7-
goTemplate: false
7+
goTemplate: true
88
goTemplateOptions: ["missingkey=invalid"]
99
applyNestedSelectors: true
1010

@@ -33,8 +33,8 @@ applicationsets:
3333
- path: "{{ .Values | get "baseDir" "baseDir missing" }}{{`/{{ .values.clusterGroup }}/{{ .values.clusterName }}/apps/*`}}"
3434
- path: "{{ .Values | get "baseDir" "baseDir missing" }}{{`/{{ .values.clusterName }}/apps/*`}}"
3535
values:
36-
appInstance: "{{`{{- printf '{{ .path.basename }}' -}}`}}"
37-
appInstancePath: "{{`{{- printf '{{ .path.path }}' -}}`}}"
36+
appInstance: '{{ printf "%s" "{{- printf `{{ .path.basename }}` -}}" }}'
37+
appInstancePath: '{{ printf "%s" "{{- printf `{{ .path.path }}` -}}" }}'
3838

3939
- merge:
4040
mergeKeys:
@@ -115,7 +115,7 @@ applicationsets:
115115
namespace: argocd
116116
finalizers:
117117
- resources-finalizer.argocd.argoproj.io
118-
goTemplate: false
118+
goTemplate: true
119119
goTemplateOptions: ["missingkey=invalid"]
120120

121121
generators:
@@ -143,8 +143,8 @@ applicationsets:
143143
- path: "{{ .Values | get "baseDir" "baseDir missing" }}{{`/{{ .values.clusterGroup }}/{{ .values.clusterName }}/apps/*`}}"
144144
- path: "{{ .Values | get "baseDir" "baseDir missing" }}{{`/{{ .values.clusterName }}/apps/*`}}"
145145
values:
146-
appInstance: "{{`{{- printf '{{ .path.basename }}' -}}`}}"
147-
appInstancePath: "{{`{{- printf '{{ .path.path }}' -}}`}}"
146+
appInstance: '{{ printf "%s" "{{- printf `{{ .path.basename }}` -}}" }}'
147+
appInstancePath: '{{ printf "%s" "{{- printf `{{ .path.path }}` -}}" }}'
148148

149149
- merge:
150150
mergeKeys:

testing/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
foo: "bar"

0 commit comments

Comments
 (0)