improvement(helm): fixed empty controller configmap + refactored

Signed-off-by: ABWassim <wassim.belkacem99@gmail.com>
This commit is contained in:
ABWassim 2023-09-25 12:08:49 +02:00
parent 666e073040
commit 77fcb7d2a6

View File

@ -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 -}}