-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix KEDA crashes when using cert-manager certificates and restricted secret access #518
Fix KEDA crashes when using cert-manager certificates and restricted secret access #518
Conversation
…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]>
c48465c
to
84a116d
Compare
Signed-off-by: Guillaume Jacquet <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
I think that we be more fine to not deploy the Role if it's needed (it's not a pain, but if we don't deploy not required Roles is always better). WDYT?
@@ -1,4 +1,4 @@ | |||
{{- if and .Values.certificates.autoGenerated ( not .Values.certificates.certManager.enabled ) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should check if the restrict access is set instead of adding the role always. I mean, if this manifest has to be deployed if we are using self generated certs without cert manager OR if we set restricted access. But if I set cert manager and I don't set restricted access, this role isn't required as it's covered by the ClusterRole
keda/templates/manager/role.yaml
Outdated
@@ -17,11 +17,13 @@ rules: | |||
resources: | |||
- secrets | |||
verbs: | |||
{{- if not .Values.certificates.certManager.enabled }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that with my previous comment, the condition here should be if self generated AND NOT cert manager
@@ -1,4 +1,4 @@ | |||
{{- if and .Values.certificates.autoGenerated ( not .Values.certificates.certManager.enabled ) }} | |||
{{- if or .Values.certificates.autoGenerated .Values.certificates.certManager.enabled }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as the other file comment for the condition
Hi @gjacquet |
Signed-off-by: Guillaume Jacquet <[email protected]>
Signed-off-by: Guillaume Jacquet <[email protected]>
Signed-off-by: Guillaume Jacquet <[email protected]>
@JorTurFer this should be good now. |
Signed-off-by: Guillaume Jacquet <[email protected]>
Co-authored-by: Jorge Turrado Ferrero <[email protected]> Signed-off-by: Guillaume Jacquet <[email protected]>
Co-authored-by: Jorge Turrado Ferrero <[email protected]> Signed-off-by: Guillaume Jacquet <[email protected]>
Signed-off-by: Guillaume Jacquet <[email protected]>
applied suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Allow KEDA operator to get, list and watch secrets in its own namespace when restricted mode and certmanager are enabled.
Checklist
Fixes #505