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