{{- if .Values.rbac.create }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: {{- with .Values.additionalAnnotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} labels: app.kubernetes.io/name: {{ .Values.operator.name }}-webhook {{- include "keda.labels" . | indent 4 }} name: {{ .Values.operator.name }}-webhook roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: {{ .Values.operator.name }}-webhook subjects: - kind: ServiceAccount name: {{ (.Values.serviceAccount.webhooks).name | default .Values.serviceAccount.name }} namespace: {{ .Release.Namespace }} {{- end }}