rolebinding.yaml 716 B

12345678910111213141516171819202122232425
  1. {{- if .Values.rbac.create -}}
  2. apiVersion: {{ template "grafana.rbac.apiVersion" . }}
  3. kind: RoleBinding
  4. metadata:
  5. name: {{ template "grafana.fullname" . }}
  6. namespace: {{ template "grafana.namespace" . }}
  7. labels:
  8. {{- include "grafana.labels" . | nindent 4 }}
  9. {{- with .Values.annotations }}
  10. annotations:
  11. {{ toYaml . | indent 4 }}
  12. {{- end }}
  13. roleRef:
  14. apiGroup: rbac.authorization.k8s.io
  15. kind: Role
  16. {{- if (not .Values.rbac.useExistingRole) }}
  17. name: {{ template "grafana.fullname" . }}
  18. {{- else }}
  19. name: {{ .Values.rbac.useExistingRole }}
  20. {{- end }}
  21. subjects:
  22. - kind: ServiceAccount
  23. name: {{ template "grafana.serviceAccountName" . }}
  24. namespace: {{ template "grafana.namespace" . }}
  25. {{- end -}}