From c11db518369e28bf01391dc5568baca063a1e7ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?=
 <charles.edouard@nirmata.com>
Date: Tue, 6 Jun 2023 15:04:36 +0200
Subject: [PATCH] fix: helm template for cleanup jobs image (#7430)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---
 .../kyverno/templates/cleanup/cleanup-admission-reports.yaml  | 2 +-
 .../templates/cleanup/cleanup-cluster-admission-reports.yaml  | 2 +-
 config/install-latest-testing.yaml                            | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/charts/kyverno/templates/cleanup/cleanup-admission-reports.yaml b/charts/kyverno/templates/cleanup/cleanup-admission-reports.yaml
index dbb40687f4..e648c0beea 100644
--- a/charts/kyverno/templates/cleanup/cleanup-admission-reports.yaml
+++ b/charts/kyverno/templates/cleanup/cleanup-admission-reports.yaml
@@ -27,7 +27,7 @@ spec:
           {{- end }}
           containers:
           - name: cleanup
-            image: {{ template "kyverno.image" .Values.cleanupJobs.admissionReports }}
+            image: {{ (include "kyverno.image" .Values.cleanupJobs.admissionReports) | quote }}
             imagePullPolicy: {{ .Values.cleanupJobs.admissionReports.image.pullPolicy }}
             command:
             - /bin/sh
diff --git a/charts/kyverno/templates/cleanup/cleanup-cluster-admission-reports.yaml b/charts/kyverno/templates/cleanup/cleanup-cluster-admission-reports.yaml
index 2ffa379a85..bdd0697512 100644
--- a/charts/kyverno/templates/cleanup/cleanup-cluster-admission-reports.yaml
+++ b/charts/kyverno/templates/cleanup/cleanup-cluster-admission-reports.yaml
@@ -27,7 +27,7 @@ spec:
           {{- end }}
           containers:
           - name: cleanup
-            image: {{ template "kyverno.image" .Values.cleanupJobs.clusterAdmissionReports }}
+            image: {{ (include "kyverno.image" .Values.cleanupJobs.clusterAdmissionReports) | quote }}
             imagePullPolicy: {{ .Values.cleanupJobs.clusterAdmissionReports.image.pullPolicy }}
             command:
             - /bin/sh
diff --git a/config/install-latest-testing.yaml b/config/install-latest-testing.yaml
index ffe92c6e46..527171b52b 100644
--- a/config/install-latest-testing.yaml
+++ b/config/install-latest-testing.yaml
@@ -37717,7 +37717,7 @@ spec:
           serviceAccountName: kyverno-cleanup-jobs
           containers:
           - name: cleanup
-            image: bitnami/kubectl:1.26.4
+            image: "bitnami/kubectl:1.26.4"
             imagePullPolicy: 
             command:
             - /bin/sh
@@ -37764,7 +37764,7 @@ spec:
           serviceAccountName: kyverno-cleanup-jobs
           containers:
           - name: cleanup
-            image: bitnami/kubectl:1.26.4
+            image: "bitnami/kubectl:1.26.4"
             imagePullPolicy: 
             command:
             - /bin/sh