-
Notifications
You must be signed in to change notification settings - Fork 601
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
Extend APIServerSource to watch multiple namespaces #6644
Comments
I don't have concerns for the feature itself, one question below
What all selected namespaces would mean? at the creation time? or are we planning to watch namespaces as they are created or deleted to dynamically watch resources in selected namespaces? |
I think this problem would exist even when a selector is used. The namespaces targeted can change dynamically. I was thinking about the |
Fixes #6644 ## Proposed Changes <!-- Please categorize your changes: - 🎁 Add new feature - 🐛 Fix bug - 🧹 Update or clean up current behavior - 🗑️ Remove feature or internal logic --> - 🎁 ApiServerSource can specify a selector to target one or more namespaces. If the selector is missing, it will default to targeting the namespace in which the source resides API changes (additive): - `spec.namespaceSelector`: A label selector to identify namespaces to track - `status.namespaces`: A list of namespaces currently being tracked by the source ### Pre-review Checklist <!-- If these boxes are not checked, you will be asked to complete these requirements or explain why they do not apply to your PR. --> - [ ] **At least 80% unit test coverage** - [ ] **E2E tests** for any new behavior - [ ] **Docs PR** for any user-facing impact - [ ] **Spec PR** for any new API feature - [ ] **Conformance test** for any change to the spec **Release Note** <!-- 📄 If this change has user-visible impact, write a release note in the block below. Include the string "action required" if additional action is required of users switching to the new release, for example in case of a breaking change. Write as if you are speaking to users, not other Knative contributors. If this change has no user-visible impact, no release note is needed. --> ```release-note 📄 ApiServerSource can specify a selector to target one or more namespaces. If the selector is missing, it will default to targeting the namespace in which the source resides ``` **Docs** Docs to follow once the behaviour is finalized and approved.
Problem
There's a bit of overhead if a user wishes to watch multiple namespaces for api server events. They currently need to create an APIServerSource for each of the namespaces they wish to watch.
This issue is to explore a solution where multiple namespaces can be watched with a single APIServerSource. There was an issue about watching a different namespace but this issue extends that a step further.
One possible solution would be to introduce a label selector to the api. If it's not set, it could default to just watching the namespace the source resides in to maintain backwards compatibility. An empty selector can mean all namespaces. This would be similar to how the sugar controller configuration is done.
Persona:
Which persona is this feature for?
System integrator
Additional context (optional)
The permissions checker and the receiver adapter will need to iterate over all namespaces
The text was updated successfully, but these errors were encountered: