From faa50615d6f45df104fc3475f106e9bec52816ae Mon Sep 17 00:00:00 2001 From: Paul N Date: Fri, 7 Jul 2023 02:36:42 -0700 Subject: [PATCH] fix: admission controller rbac templating (#7774) Fixes an regression introduced in #7633 where the helm template would render multiple resources on the same line, resulting in invalid yaml. This removes the hyphen in the template to ensure that each resource is rendered on a new line Signed-off-by: Paul Nicholson --- charts/kyverno/Chart.yaml | 2 ++ charts/kyverno/templates/admission-controller/role.yaml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/kyverno/Chart.yaml b/charts/kyverno/Chart.yaml index c027099d4f..9e5f255815 100644 --- a/charts/kyverno/Chart.yaml +++ b/charts/kyverno/Chart.yaml @@ -26,6 +26,8 @@ annotations: url: https://kyverno.io/docs # valid kinds are: added, changed, deprecated, removed, fixed and security artifacthub.io/changes: | + - kind: fixed + description: rbac templating issues - kind: added description: make sigstore volume configurable - kind: changed diff --git a/charts/kyverno/templates/admission-controller/role.yaml b/charts/kyverno/templates/admission-controller/role.yaml index 7f45e196ec..b5d621786c 100644 --- a/charts/kyverno/templates/admission-controller/role.yaml +++ b/charts/kyverno/templates/admission-controller/role.yaml @@ -45,7 +45,7 @@ rules: resources: - deployments {{- if .Values.webhooksCleanup.enabled }} - {{- if not .Values.templating.enabled -}} + {{- if not .Values.templating.enabled }} - deployments/scale {{- end }} {{- end }} @@ -54,7 +54,7 @@ rules: - list - watch {{- if .Values.webhooksCleanup.enabled }} - {{- if not .Values.templating.enabled -}} + {{- if not .Values.templating.enabled }} - patch - update {{- end }}