-
Notifications
You must be signed in to change notification settings - Fork 441
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
Enable metadata service to track the events from a subset of namespaces #1368
Conversation
src/vizier/services/metadata/controllers/k8smeta/k8s_metadata_utils.go
Outdated
Show resolved
Hide resolved
This looks mostly ok, but I think #1595 will actually make this easier by allowing us to filter in only one location (i.e. at the SharedIndexInformerFactory creation). Also we should see if it's possible to add some testing coverage to ensure that the namespace restriction works as expected. |
Thanks for the insights, @vihangm! Re the test case, I just added a simple test case for Pod creation only. Please let me know if it sounds right to you and I can add other resource types and events too. |
Test case looks good. Adding a little bit of simple coverage on all resources types would be nice. |
@vihangm added more test cases for other resource types. |
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.
LGTM, discussed with @vihangm who's out at the moment and he said its good to go from his end. So if we can get the merge conflicts fixed we should be good to go. Sorry for the delay
Also can you update the test plan in the PR since this now has unit tests (and also should be tested with a dev deploy of vizier before merging). |
I tested this out on a cluster, both with all namespaces and with a subset of namespaces and both seemed to work as expected. |
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Signed-off-by: Ata Fatahi <afatahibaarzi@linkedin.com> Signed-off-by: Ata Fatahi <immrata@gmail.com>
Vihang's out but he's approved of these changes.
Summary: #1368 added the ability to limit the metadata service to specific namespaces. By default, if no namespaces are mentioned, the flag is supposed to choose all namespaces. However, if the environment variable is not specified, it is actually parsed as an empty list and the default is not properly chosen. Instead, we can assume no users actually want to watch 0 namespaces, and set it to all namespaces when that occurs. Relevant Issues: N/A Type of change: /kind bug Test Plan: Skaffold deploy metadata service Signed-off-by: Michelle Nguyen <michellenguyen@pixielabs.ai>
Summary: Enable metadata service to track the events from a subset of namespaces when desired, instead of tracking the events from the entire cluster.
Relevant Issues: #1364
Type of change: /kind feature
Test Plan: Added unit tests for the new behaviour. @JamesMBartlett tested by skaffolding a dev vizier version to a cluster both with and without
metadata_namespaces
selected, and both behaved as expected.