From b8a4ea3a40b74c1473e6ba766f3131a044f39449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=BClkenberg?= Date: Wed, 27 Jul 2022 14:17:33 +0200 Subject: [PATCH] Create zap config map even when config is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon Hülkenberg --- .../zap-advanced/templates/zap-advanced-scan-type.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scanners/zap-advanced/templates/zap-advanced-scan-type.yaml b/scanners/zap-advanced/templates/zap-advanced-scan-type.yaml index 0e504384e3..d544f6013f 100644 --- a/scanners/zap-advanced/templates/zap-advanced-scan-type.yaml +++ b/scanners/zap-advanced/templates/zap-advanced-scan-type.yaml @@ -3,7 +3,6 @@ # SPDX-License-Identifier: Apache-2.0 --- -{{- if not (empty .Values.zapConfiguration) }} kind: ConfigMap apiVersion: v1 metadata: @@ -12,8 +11,12 @@ metadata: {{- include "zap.labels" . | nindent 4 }} data: 1-zap-advanced-scantype.yaml: | - {{- .Values.zapConfiguration | toYaml | nindent 4 -}} -{{- end }} + {{- if not (empty .Values.zapConfiguration) }} + {{- .Values.zapConfiguration | toYaml | nindent 4 -}} + {{- end }} + {{- if (empty .Values.zapConfiguration) }} + {} + {{- end }} --- apiVersion: "execution.securecodebox.io/v1" kind: ScanType