{{- if .Values.rbac.create }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole 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 rules: - apiGroups: - autoscaling resources: - horizontalpodautoscalers verbs: - list - watch - apiGroups: - keda.sh resources: - scaledobjects verbs: - list - watch - apiGroups: - apps resources: - deployments - statefulsets verbs: - get - list - watch - apiGroups: - "" resources: - limitranges verbs: - list {{- end -}}