1 {{- if .Values.rbac.create -}}
2 apiVersion: rbac.authorization.k8s.io/v1beta1
5 name: {{ template "grafana.fullname" . }}
7 app: {{ template "grafana.name" . }}
8 chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9 heritage: {{ .Release.Service }}
10 release: {{ .Release.Name }}
11 {{- with .Values.annotations }}
13 {{ toYaml . | indent 4 }}
16 apiGroup: rbac.authorization.k8s.io
18 name: {{ template "grafana.fullname" . }}
20 - kind: ServiceAccount
21 name: {{ template "grafana.serviceAccountName" . }}
22 namespace: {{ .Release.Namespace }}
23 {{- if .Values.rbac.namespaced }}
26 name: {{ template "grafana.fullname" . }}
27 apiGroup: rbac.authorization.k8s.io