From 77fcb7d2a62d0751a26629278f4ea0c922e02991 Mon Sep 17 00:00:00 2001 From: ABWassim Date: Mon, 25 Sep 2023 12:08:49 +0200 Subject: [PATCH] improvement(helm): fixed empty controller configmap + refactored Signed-off-by: ABWassim --- .../cert-manager/templates/controller-config.yaml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/deploy/charts/cert-manager/templates/controller-config.yaml b/deploy/charts/cert-manager/templates/controller-config.yaml index a1b337572..c2eea5c72 100644 --- a/deploy/charts/cert-manager/templates/controller-config.yaml +++ b/deploy/charts/cert-manager/templates/controller-config.yaml @@ -1,12 +1,6 @@ {{- if .Values.config -}} - {{- if not .Values.config.apiVersion -}} - {{- fail "config.apiVersion must be set" -}} - {{- end -}} - - {{- if not .Values.config.kind -}} - {{- fail "config.kind must be set" -}} - {{- end -}} -{{- end -}} +{{- required ".Values.config.apiVersion must be set !" .Values.config.apiVersion -}} +{{- required ".Values.config.kind must be set !" .Values.config.kind -}} apiVersion: v1 kind: ConfigMap metadata: @@ -19,7 +13,6 @@ metadata: app.kubernetes.io/component: "controller" {{- include "labels" . | nindent 4 }} data: - {{- if .Values.config }} config.yaml: | - {{ .Values.config | toYaml | nindent 4 }} - {{- end }} + {{- .Values.config | toYaml | nindent 4 }} +{{- end -}} \ No newline at end of file