-
Notifications
You must be signed in to change notification settings - Fork 25
Label selectors #768
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
Label selectors #768
Conversation
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.
Pull request overview
This pull request adds support for label selectors to the Kubernetes dynamic data gatherer, allowing users to filter resources based on their labels in addition to existing field selector functionality. This helps reduce unnecessary data collection by focusing on important resources.
Changes:
- Added
LabelSelectorsconfiguration field toConfigDynamicstruct - Implemented label selector validation in the
validate()function - Integrated label selector filtering in both dynamic and native Kubernetes informers
- Added comprehensive test coverage for label selector validation and functionality
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/datagatherer/k8sdynamic/dynamic.go | Added label selector configuration field, validation logic, and integration with Kubernetes informers |
| pkg/datagatherer/k8sdynamic/dynamic_test.go | Added tests for label selector validation, unmarshaling, and integration with data gatherers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Apply label selectors to any Kubernetes resource type, such as Pods, Deployments, Secrets, or ConfigMaps. This helps focus on important resources and exclude non-essential ones, reducing unnecessary data collection.