blob: dbaa516b95df0b93923faf0dc2a178e17664de7e [file] [log] [blame]
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +04001{{- if and .Values.rbac.create .Values.podSecurityPolicy.enabled .Values.defaultBackend.enabled -}}
2apiVersion: rbac.authorization.k8s.io/v1
3kind: RoleBinding
4metadata:
5 labels:
6 {{- include "ingress-nginx.labels" . | nindent 4 }}
7 app.kubernetes.io/component: default-backend
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +04008 {{- with .Values.defaultBackend.labels }}
9 {{- toYaml . | nindent 4 }}
10 {{- end }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040011 name: {{ include "ingress-nginx.fullname" . }}-backend
12 namespace: {{ .Release.Namespace }}
13roleRef:
14 apiGroup: rbac.authorization.k8s.io
15 kind: Role
16 name: {{ include "ingress-nginx.fullname" . }}-backend
17subjects:
18 - kind: ServiceAccount
19 name: {{ template "ingress-nginx.defaultBackend.serviceAccountName" . }}
20 namespace: {{ .Release.Namespace | quote }}
21{{- end }}