1 {{- if and .Values.rbac.create (not .Values.rbac.namespaced) }}
3 apiVersion: rbac.authorization.k8s.io/v1
6 app: {{ template "grafana.name" . }}
7 chart: {{ template "grafana.chart" . }}
8 release: {{ .Release.Name }}
9 heritage: {{ .Release.Service }}
10 {{- with .Values.annotations }}
12 {{ toYaml . | indent 4 }}
14 name: {{ template "grafana.fullname" . }}-clusterrole
15 {{- if or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled }}
17 - apiGroups: [""] # "" indicates the core API group
18 resources: ["configmaps"]
19 verbs: ["get", "watch", "list"]