| Giorgi Lekveishvili | d1234c1 | 2023-06-19 10:37:06 +0400 | [diff] [blame^] | 1 | {{- if .Values.webhook.config -}} |
| 2 | {{- if not .Values.webhook.config.apiVersion -}} |
| 3 | {{- fail "webhook.config.apiVersion must be set" -}} |
| 4 | {{- end -}} |
| 5 | |
| 6 | {{- if not .Values.webhook.config.kind -}} |
| 7 | {{- fail "webhook.config.kind must be set" -}} |
| 8 | {{- end -}} |
| 9 | {{- end -}} |
| 10 | apiVersion: v1 |
| 11 | kind: ConfigMap |
| 12 | metadata: |
| 13 | name: {{ include "webhook.fullname" . }} |
| 14 | namespace: {{ include "cert-manager.namespace" . }} |
| 15 | labels: |
| 16 | app: {{ include "webhook.name" . }} |
| 17 | app.kubernetes.io/name: {{ include "webhook.name" . }} |
| 18 | app.kubernetes.io/instance: {{ .Release.Name }} |
| 19 | app.kubernetes.io/component: "webhook" |
| 20 | {{- include "labels" . | nindent 4 }} |
| 21 | data: |
| 22 | {{- if .Values.webhook.config }} |
| 23 | config.yaml: | |
| 24 | {{ .Values.webhook.config | toYaml | nindent 4 }} |
| 25 | {{- end }} |