Collectd operator utilties
[demo.git] / vnfs / DAaaS / deploy / visualization / charts / grafana / templates / rolebinding.yaml
1 {{- if .Values.rbac.create -}}
2 apiVersion: rbac.authorization.k8s.io/v1beta1
3 kind: RoleBinding
4 metadata:
5   name: {{ template "grafana.fullname" . }}
6   labels:
7     app: {{ template "grafana.name" . }}
8     chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9     heritage: {{ .Release.Service }}
10     release: {{ .Release.Name }}
11 {{- with .Values.annotations }}
12   annotations:
13 {{ toYaml . | indent 4 }}
14 {{- end }}
15 roleRef:
16   apiGroup: rbac.authorization.k8s.io
17   kind: Role
18   name: {{ template "grafana.fullname" . }}
19 subjects:
20 - kind: ServiceAccount
21   name: {{ template "grafana.serviceAccountName" . }}
22   namespace: {{ .Release.Namespace }}
23 {{- if .Values.rbac.namespaced }}
24 roleRef:
25   kind: Role
26   name: {{ template "grafana.fullname" . }}
27   apiGroup: rbac.authorization.k8s.io
28 {{- end }}
29 {{- end -}}