# grafana_charts_webhook-clusterrole-binding.yaml
{{- if .Values.webhooks.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: {{ include "rollout-operator.fullname" . }}-webhook-clusterrolebinding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: {{ include "rollout-operator.fullname" . }}-webhook-clusterrole
subjects:
  - kind: ServiceAccount
    name: {{ include "rollout-operator.serviceAccountName" . }}
    namespace: {{ .Release.Namespace | quote }}
{{- end -}}