Merge pull request #6360 from ABWassim/helm-improvement-webhook-configmap

improvement(helm): fixed empty webhook configmap + refactored
This commit is contained in:
jetstack-bot 2023-09-25 20:18:47 +02:00 committed by GitHub
commit 8c0462bc35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,6 @@
{{- if .Values.webhook.config -}}
{{- if not .Values.webhook.config.apiVersion -}}
{{- fail "webhook.config.apiVersion must be set" -}}
{{- end -}}
{{- if not .Values.webhook.config.kind -}}
{{- fail "webhook.config.kind must be set" -}}
{{- end -}}
{{- end -}}
{{- required ".Values.webhook.config.apiVersion must be set !" .Values.webhook.config.apiVersion -}}
{{- required ".Values.webhook.config.kind must be set !" .Values.webhook.config.kind -}}
apiVersion: v1
kind: ConfigMap
metadata:
@ -19,7 +13,6 @@ metadata:
app.kubernetes.io/component: "webhook"
{{- include "labels" . | nindent 4 }}
data:
{{- if .Values.webhook.config }}
config.yaml: |
{{ .Values.webhook.config | toYaml | nindent 4 }}
{{- end }}
{{- .Values.webhook.config | toYaml | nindent 4 }}
{{- end -}}