From 02b21f7627ddc44e144daee9b6519e8e5eb7538e Mon Sep 17 00:00:00 2001 From: anders-elastisys Date: Mon, 14 Oct 2024 16:09:44 +0200 Subject: [PATCH] config: fix constraint for hnc user namespaces --- helmfile.d/values/hnc/controller.yaml.gotmpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helmfile.d/values/hnc/controller.yaml.gotmpl b/helmfile.d/values/hnc/controller.yaml.gotmpl index 893eb467c..97f3e6318 100644 --- a/helmfile.d/values/hnc/controller.yaml.gotmpl +++ b/helmfile.d/values/hnc/controller.yaml.gotmpl @@ -18,7 +18,12 @@ managedNamespaceLabels: {{- toYaml .Values.hnc.managedNamespaceLabels | nindent rbac: user: - namespaces: {{- toYaml (without .Values.user.namespaces (keys .Values.user.constraints | join " ")) | nindent 6 }} + namespaces: + {{- range $namespace := .Values.user.namespaces }} + {{- if not (hasKey $.Values.user.constraints $namespace) }} + - {{ $namespace }} + {{- end }} + {{- end }} groups: {{- toYaml .Values.user.adminGroups | nindent 6 }} users: {{- toYaml .Values.user.adminUsers | nindent 6 }}