| Giorgi Lekveishvili | 725bb39 | 2023-05-05 18:24:27 +0400 | [diff] [blame] | 1 | {{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled -}} |
| 2 | apiVersion: rbac.authorization.k8s.io/v1 |
| 3 | kind: ClusterRoleBinding |
| 4 | metadata: |
| 5 | name: {{ include "ingress-nginx.fullname" . }}-admission |
| 6 | annotations: |
| 7 | "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade |
| 8 | "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded |
| 9 | labels: |
| 10 | {{- include "ingress-nginx.labels" . | nindent 4 }} |
| 11 | app.kubernetes.io/component: admission-webhook |
| 12 | roleRef: |
| 13 | apiGroup: rbac.authorization.k8s.io |
| 14 | kind: ClusterRole |
| 15 | name: {{ include "ingress-nginx.fullname" . }}-admission |
| 16 | subjects: |
| 17 | - kind: ServiceAccount |
| 18 | name: {{ include "ingress-nginx.fullname" . }}-admission |
| 19 | namespace: {{ .Release.Namespace | quote }} |
| 20 | {{- end }} |