clusterrolebinding.yaml 736 B

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