1 {{- if and .Values.rbac.create (not .Values.rbac.namespaced) }}
2 kind: ClusterRoleBinding
3 apiVersion: rbac.authorization.k8s.io/v1
5 name: {{ template "grafana.fullname" . }}-clusterrolebinding
7 app: {{ template "grafana.name" . }}
8 chart: {{ template "grafana.chart" . }}
9 release: {{ .Release.Name }}
10 heritage: {{ .Release.Service }}
11 {{- with .Values.annotations }}
13 {{ toYaml . | indent 4 }}
16 - kind: ServiceAccount
17 name: {{ template "grafana.serviceAccountName" . }}
18 namespace: {{ .Release.Namespace }}
21 name: {{ template "grafana.fullname" . }}-clusterrole
22 apiGroup: rbac.authorization.k8s.io