summaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/visualization/charts/grafana/templates/rolebinding.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/visualization/charts/grafana/templates/rolebinding.yaml')
-rwxr-xr-xvnfs/DAaaS/visualization/charts/grafana/templates/rolebinding.yaml29
1 files changed, 29 insertions, 0 deletions
diff --git a/vnfs/DAaaS/visualization/charts/grafana/templates/rolebinding.yaml b/vnfs/DAaaS/visualization/charts/grafana/templates/rolebinding.yaml
new file mode 100755
index 00000000..8b6671b8
--- /dev/null
+++ b/vnfs/DAaaS/visualization/charts/grafana/templates/rolebinding.yaml
@@ -0,0 +1,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 -}}