apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: {{ .Release.Name }}-role-binding
roleRef:
  kind: Role
  apiGroup: rbac.authorization.k8s.io
  name: {{ .Release.Name }}
subjects:
- kind: ServiceAccount
  apiGroup: ""
  name: {{ .Release.Name }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: {{ .Release.Name }}-cluster-role-binding
roleRef:
  kind: ClusterRole
  apiGroup: rbac.authorization.k8s.io
  name: view
subjects:
- kind: ServiceAccount
  apiGroup: ""
  name: {{ .Release.Name }} 