Refactor Helm template to properly handle ApplicationSet namespaces splitting and quoting.
Signed-off-by: leehosu <hosu4549@gmail.com>
This commit is contained in:
parent
9f0a20d26c
commit
a45d241163
2 changed files with 8 additions and 7 deletions
|
@ -13,11 +13,12 @@ subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ include "argo-cd.controller.serviceAccountName" . }}
|
name: {{ include "argo-cd.controller.serviceAccountName" . }}
|
||||||
namespace: {{ include "argo-cd.namespace" . }}
|
namespace: {{ include "argo-cd.namespace" . }}
|
||||||
{{- if .Values.configs.params.applicationsetcontroller.namespaces }}
|
{{- $namespaces := index .Values.configs.params "applicationsetcontroller.namespaces" -}}
|
||||||
{{- range (split "," .Values.configs.params.applicationsetcontroller.namespaces) }}
|
{{- range $namespace := (split "," $namespaces) }}
|
||||||
|
{{- if $namespaces }}
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ include "argo-cd.controller.serviceAccountName" $root }}
|
name: {{ include "argo-cd.controller.serviceAccountName" $ }}
|
||||||
namespace: {{ . | trim }}
|
namespace: {{ $namespace | trim | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -279,8 +279,8 @@ configs:
|
||||||
# -- Enables use of the Progressive Syncs capability
|
# -- Enables use of the Progressive Syncs capability
|
||||||
applicationsetcontroller.enable.progressive.syncs: false
|
applicationsetcontroller.enable.progressive.syncs: false
|
||||||
|
|
||||||
+ # -- A list of glob patterns specifying where to look for ApplicationSet resources. (e.g. `"namespace1, namespace2"`)
|
# -- A list of glob patterns specifying where to look for ApplicationSet resources. (e.g. `"namespace1, namespace2"`)
|
||||||
applicationsetcontroller.namespaces: ""
|
applicationsetcontroller.namespaces: "namespace1, namespace2"
|
||||||
|
|
||||||
# -- Enables [Applications in any namespace]
|
# -- Enables [Applications in any namespace]
|
||||||
## List of additional namespaces where applications may be created in and reconciled from.
|
## List of additional namespaces where applications may be created in and reconciled from.
|
||||||
|
|
Loading…
Reference in a new issue