Skip to content

Commit

Permalink
Fix KEDA crashes when using cert-manager certificates and restricted …
Browse files Browse the repository at this point in the history
…secret access

Allow KEDA operator to get, list and watch secrets in its own namespace
when restricted mode and certmanager are enabled.

Signed-off-by: Guillaume Jacquet <[email protected]>
  • Loading branch information
gjacquet committed Sep 8, 2023
1 parent e08ac77 commit 84a116d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion keda/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kubeVersion: ">=v1.23.0-0"

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.11.2
version: 2.11.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
8 changes: 5 additions & 3 deletions keda/templates/manager/role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.certificates.autoGenerated ( not .Values.certificates.certManager.enabled ) }}
{{- if or .Values.certificates.autoGenerated .Values.certificates.certManager.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
Expand All @@ -17,11 +17,13 @@ rules:
resources:
- secrets
verbs:
{{- if not .Values.certificates.certManager.enabled }}
- create
- delete
- get
- list
- patch
- update
{{- end }}
- watch
- get
- list
{{- end -}}
2 changes: 1 addition & 1 deletion keda/templates/manager/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.certificates.autoGenerated ( not .Values.certificates.certManager.enabled ) }}
{{- if or .Values.certificates.autoGenerated .Values.certificates.certManager.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand Down

0 comments on commit 84a116d

Please sign in to comment.