diff --git a/keda/templates/manager/role.yaml b/keda/templates/manager/role.yaml index b3b8a284..e2cd4eca 100644 --- a/keda/templates/manager/role.yaml +++ b/keda/templates/manager/role.yaml @@ -1,3 +1,4 @@ +{{- if .Values.rbac.create }} {{- if or (and .Values.certificates.autoGenerated (not .Values.certificates.certManager.enabled)) (.Values.permissions.operator.restrict.secret) }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role @@ -27,3 +28,4 @@ rules: - get - list {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/keda/templates/manager/rolebinding.yaml b/keda/templates/manager/rolebinding.yaml index b7f78259..0d1381ab 100644 --- a/keda/templates/manager/rolebinding.yaml +++ b/keda/templates/manager/rolebinding.yaml @@ -1,3 +1,4 @@ +{{- if .Values.rbac.create }} {{- if or (and .Values.certificates.autoGenerated (not .Values.certificates.certManager.enabled)) (.Values.permissions.operator.restrict.secret) }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -20,3 +21,4 @@ subjects: name: {{ .Values.serviceAccount.name }} namespace: {{ .Release.Namespace }} {{- end -}} +{{- end -}}