Skip to content

Commit

Permalink
fix: honor rbac.create on operator scoped roles
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Turrado <[email protected]>
  • Loading branch information
JorTurFer committed Sep 28, 2023
1 parent 274c330 commit 7fbf76d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions keda/templates/manager/role.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -27,3 +28,4 @@ rules:
- get
- list
{{- end -}}
{{- end -}}
2 changes: 2 additions & 0 deletions keda/templates/manager/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,3 +21,4 @@ subjects:
name: {{ .Values.serviceAccount.name }}
namespace: {{ .Release.Namespace }}
{{- end -}}
{{- end -}}

0 comments on commit 7fbf76d

Please sign in to comment.