2020-03-02 14:49:26 +00:00
|
|
|
{{- if .Values.controller.admissionWebhooks.enabled -}}
|
2020-06-24 14:01:02 +00:00
|
|
|
# before changing this value, check the required kubernetes version
|
|
|
|
# https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#prerequisites
|
2020-09-15 13:21:36 +00:00
|
|
|
apiVersion: admissionregistration.k8s.io/v1
|
2020-02-24 19:25:57 +00:00
|
|
|
kind: ValidatingWebhookConfiguration
|
|
|
|
metadata:
|
2020-10-01 21:07:42 +00:00
|
|
|
{{- if .Values.controller.admissionWebhooks.annotations }}
|
|
|
|
annotations: {{ toYaml .Values.controller.admissionWebhooks.annotations | nindent 4 }}
|
|
|
|
{{- end }}
|
2020-02-24 19:25:57 +00:00
|
|
|
labels:
|
2020-02-28 14:53:24 +00:00
|
|
|
{{- include "ingress-nginx.labels" . | nindent 4 }}
|
2020-02-27 04:27:28 +00:00
|
|
|
app.kubernetes.io/component: admission-webhook
|
2020-03-04 02:53:23 +00:00
|
|
|
name: {{ include "ingress-nginx.fullname" . }}-admission
|
2020-02-24 19:25:57 +00:00
|
|
|
webhooks:
|
|
|
|
- name: validate.nginx.ingress.kubernetes.io
|
2020-10-23 15:58:10 +00:00
|
|
|
matchPolicy: Equivalent
|
2020-02-24 19:25:57 +00:00
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- networking.k8s.io
|
|
|
|
apiVersions:
|
|
|
|
- v1beta1
|
|
|
|
operations:
|
|
|
|
- CREATE
|
|
|
|
- UPDATE
|
|
|
|
resources:
|
|
|
|
- ingresses
|
|
|
|
failurePolicy: Fail
|
2020-06-21 07:48:43 +00:00
|
|
|
sideEffects: None
|
|
|
|
admissionReviewVersions:
|
2020-09-25 21:45:13 +00:00
|
|
|
- v1
|
2020-10-02 18:14:56 +00:00
|
|
|
- v1beta1
|
2020-02-24 19:25:57 +00:00
|
|
|
clientConfig:
|
|
|
|
service:
|
|
|
|
namespace: {{ .Release.Namespace }}
|
2020-03-04 02:53:23 +00:00
|
|
|
name: {{ include "ingress-nginx.controller.fullname" . }}-admission
|
2020-09-15 13:21:36 +00:00
|
|
|
path: /networking/v1beta1/ingresses
|
2020-10-01 21:07:42 +00:00
|
|
|
{{- if .Values.controller.admissionWebhooks.timeoutSeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.controller.admissionWebhooks.timeoutSeconds }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.controller.admissionWebhooks.namespaceSelector }}
|
|
|
|
namespaceSelector: {{ toYaml .Values.controller.admissionWebhooks.namespaceSelector | nindent 6 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.controller.admissionWebhooks.objectSelector }}
|
|
|
|
objectSelector: {{ toYaml .Values.controller.admissionWebhooks.objectSelector | nindent 6 }}
|
|
|
|
{{- end }}
|
2020-02-24 19:25:57 +00:00
|
|
|
{{- end }}
|