From 965baaed33314925eecffa945b1a9cb190cb302e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Guilherme=20Vanz?= Date: Fri, 21 Jul 2023 11:49:42 -0300 Subject: [PATCH 1/2] Rename audit scanner file name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renames the cronjob.yaml into audit-scanner.yaml. The new name makes easier to identify where the audit scanner component is defined. Signed-off-by: José Guilherme Vanz --- .../templates/{cronjob.yaml => audit-scanner.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename charts/kubewarden-controller/templates/{cronjob.yaml => audit-scanner.yaml} (100%) diff --git a/charts/kubewarden-controller/templates/cronjob.yaml b/charts/kubewarden-controller/templates/audit-scanner.yaml similarity index 100% rename from charts/kubewarden-controller/templates/cronjob.yaml rename to charts/kubewarden-controller/templates/audit-scanner.yaml From 3343e793b973ffade3e10c9a786eee5c54a66642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Guilherme=20Vanz?= Date: Fri, 21 Jul 2023 12:12:30 -0300 Subject: [PATCH 2/2] fix: audit scanner not skipping namespaces. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due a bug in the audit scanner command generation, the namespace ignore list was not being properly translated into command line flags for the audit scanner command. This commit fixes that by splitting the line used to add the `-i` flag into two. Therefore the cronjob definition define the command line flags like: ``` [...] - -i - skip-namespace [...] ``` Instead of: ``` [...] - -i skip-namespace [...] ``` Signed-off-by: José Guilherme Vanz --- charts/kubewarden-controller/templates/_helpers.tpl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/kubewarden-controller/templates/_helpers.tpl b/charts/kubewarden-controller/templates/_helpers.tpl index 2a2d267f..bee60358 100644 --- a/charts/kubewarden-controller/templates/_helpers.tpl +++ b/charts/kubewarden-controller/templates/_helpers.tpl @@ -102,9 +102,11 @@ Create the name of the service account to use for kubewarden-controller - --loglevel - info {{- range .Values.global.skipNamespaces }} -- {{ printf "-i %s" . }} +- {{ printf "-i" }} +- {{ printf "%s" . }} {{- end -}} {{- range .Values.auditScanner.skipAdditionalNamespaces }} -- {{ printf "-i %s" . }} +- {{ printf "-i" }} +- {{ printf "%s" . }} {{- end -}} {{- end -}}