feat: support multiple namespaces in ClusterRoleBinding using comma-separated string

Signed-off-by: leehosu <hosu4549@gmail.com>
This commit is contained in:
leehosu 2024-09-24 00:26:20 +09:00
parent 7b9deb03f2
commit 54cf342d44
No known key found for this signature in database
GPG key ID: 49693DFDB234F6E4
2 changed files with 4 additions and 7 deletions

View file

@ -14,10 +14,10 @@ subjects:
name: {{ include "argo-cd.controller.serviceAccountName" . }}
namespace: {{ include "argo-cd.namespace" . }}
{{- if .Values.configs.params.applicationsetcontroller.namespaces }}
{{- range .Values.configs.params.applicationsetcontroller.namespaces }}
{{- range (split "," .Values.configs.params.applicationsetcontroller.namespaces) }}
- kind: ServiceAccount
name: {{ include "argo-cd.controller.serviceAccountName" $root }}
namespace: {{ . }}
namespace: {{ . | trim }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -279,11 +279,8 @@ configs:
# -- Enables use of the Progressive Syncs capability
applicationsetcontroller.enable.progressive.syncs: false
# When specifying multiple namespaces, specify them in array form
applicationsetcontroller.namespaces: []
# - namespace1
# - namespace2
# - namespace3
# When specifying multiple namespaces, specify them as a comma-separated string
applicationsetcontroller.namespaces: "namespace1, namespace2"
# -- Enables [Applications in any namespace]
## List of additional namespaces where applications may be created in and reconciled from.