1 {{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create }}
2 apiVersion: rbac.authorization.k8s.io/v1
3 kind: ClusterRoleBinding
5 name: {{ template "prometheus-operator.fullname" . }}-operator
7 app: {{ template "prometheus-operator.name" . }}-operator
8 {{ include "prometheus-operator.labels" . | indent 4 }}
10 apiGroup: rbac.authorization.k8s.io
12 name: {{ template "prometheus-operator.fullname" . }}-operator
14 - kind: ServiceAccount
15 name: {{ template "prometheus-operator.operator.serviceAccountName" . }}
16 namespace: {{ .Release.Namespace }}