2020-02-24 19:25:57 +00:00
|
|
|
{{- if and .Values.rbac.create .Values.podSecurityPolicy.enabled .Values.defaultBackend.enabled -}}
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: RoleBinding
|
|
|
|
metadata:
|
|
|
|
labels:
|
2020-02-27 04:27:28 +00:00
|
|
|
{{- include "nginx-ingress.labels" . | nindent 4 }}
|
|
|
|
app.kubernetes.io/component: {{ .Values.defaultBackend.name | quote }}
|
|
|
|
name: {{ include "nginx-ingress.fullname" . }}-backend
|
2020-02-24 19:25:57 +00:00
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: Role
|
2020-02-27 04:27:28 +00:00
|
|
|
name: {{ include "nginx-ingress.fullname" . }}-backend
|
2020-02-24 19:25:57 +00:00
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: {{ template "nginx-ingress.defaultBackend.serviceAccountName" . }}
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
{{- end -}}
|