-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support csv-format for WATCH_NAMESPACE env var #5631
Support csv-format for WATCH_NAMESPACE env var #5631
Conversation
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
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, we should probably apply this also to webhook: https://github.com/kedacore/keda/blob/main/cmd/webhooks/main.go
Not a good idea actually. Let's not do that at the moment. |
👍 for the record: having If we changed the logic of the webhook is a way that it would be even blocking creation of those CRs in namespaces that are not watched (w/ some sensible message) that would complicate the possible scenario of having multiple KEDAs (with various configuration) installed in the same k8s cluster watching different namespaces. Thanks, @zroubalik |
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.
@jkremser please update changelog
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
Signed-off-by: Jirka Kremser <535866+jkremser@users.noreply.github.com>
@zroubalik should be there now |
…om namespaces that are not in WATCH_NAMESPACE Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
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.
Could you please open a doc PR to document this setting? Probably a new section on this page:
https://keda.sh/docs/2.14/operate/cluster/
docs: kedacore/keda-docs#1357 |
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
49f9049
to
93e6055
Compare
/run-e2e internal |
the current implementation gives a false impression that multiple namespaces are supported (method called
GetWatchNamespaces
+ plular used here). However, it's not the case. No matter what's in theWATCH_NAMESPACE
env var, it just passes its content to the cache options when callingNewManager
in operator'smain.go
.Let's change that :)
This couple of lines actually make it work so that user can specify
WATCH_NAMESPACE=ns1,default,foo
or just a singe ns and keda will watch for events in thosewhiteallowlisted namespaces. If left empty, it still watches for all.I tested this locally by:
Fix #5670