| Giorgi Lekveishvili | 725bb39 | 2023-05-05 18:24:27 +0400 | [diff] [blame] | 1 | {{- if and .Values.rbac.create .Values.podSecurityPolicy.enabled .Values.defaultBackend.enabled -}} |
| 2 | apiVersion: rbac.authorization.k8s.io/v1 |
| 3 | kind: RoleBinding |
| 4 | metadata: |
| 5 | labels: |
| 6 | {{- include "ingress-nginx.labels" . | nindent 4 }} |
| 7 | app.kubernetes.io/component: default-backend |
| Giorgi Lekveishvili | cccf72f | 2023-05-19 16:13:22 +0400 | [diff] [blame^] | 8 | {{- with .Values.defaultBackend.labels }} |
| 9 | {{- toYaml . | nindent 4 }} |
| 10 | {{- end }} |
| Giorgi Lekveishvili | 725bb39 | 2023-05-05 18:24:27 +0400 | [diff] [blame] | 11 | name: {{ include "ingress-nginx.fullname" . }}-backend |
| 12 | namespace: {{ .Release.Namespace }} |
| 13 | roleRef: |
| 14 | apiGroup: rbac.authorization.k8s.io |
| 15 | kind: Role |
| 16 | name: {{ include "ingress-nginx.fullname" . }}-backend |
| 17 | subjects: |
| 18 | - kind: ServiceAccount |
| 19 | name: {{ template "ingress-nginx.defaultBackend.serviceAccountName" . }} |
| 20 | namespace: {{ .Release.Namespace | quote }} |
| 21 | {{- end }} |