default-backend-rolebinding.yaml 760 B

123456789101112131415161718192021
  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
  8. {{- with .Values.defaultBackend.labels }}
  9. {{- toYaml . | nindent 4 }}
  10. {{- end }}
  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 }}