Add mutating webhook definition

Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
James Munnelly 2019-08-18 12:02:13 +01:00
parent b8834aa0b3
commit ec8df6d6df

View File

@ -0,0 +1,39 @@
{{- if .Values.webhook.enabled -}}
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: {{ include "webhook.fullname" . }}
labels:
app: {{ include "webhook.name" . }}
app.kubernetes.io/name: {{ include "webhook.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "webhook.chart" . }}
annotations:
{{- if .Values.webhook.injectAPIServerCA }}
certmanager.k8s.io/inject-apiserver-ca: "true"
{{- end }}
webhooks:
- name: webhook.certmanager.k8s.io
rules:
- apiGroups:
- "certmanager.k8s.io"
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- certificates
- issuers
- clusterissuers
- orders
- challenges
- certificaterequests
failurePolicy: Fail
clientConfig:
service:
name: kubernetes
namespace: default
path: /apis/webhook.certmanager.k8s.io/v1beta1/mutations
{{- end -}}