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