1 {{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }}
2 apiVersion: rbac.authorization.k8s.io/v1
3 kind: ClusterRoleBinding
5 name: {{ template "prometheus-operator.fullname" . }}-admission
6 namespace: {{ template "prometheus-operator.namespace" . }}
8 "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
9 "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
11 app: {{ template "prometheus-operator.name" $ }}-admission
12 {{- include "prometheus-operator.labels" $ | indent 4 }}
14 apiGroup: rbac.authorization.k8s.io
16 name: {{ template "prometheus-operator.fullname" . }}-admission
18 - kind: ServiceAccount
19 name: {{ template "prometheus-operator.fullname" . }}-admission
20 namespace: {{ template "prometheus-operator.namespace" . }}