Merge pull request #6360 from ABWassim/helm-improvement-webhook-configmap
improvement(helm): fixed empty webhook configmap + refactored
This commit is contained in:
commit
8c0462bc35
@ -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 -}}
|
||||
Loading…
Reference in New Issue
Block a user