Skip to content

Label selectors#768

Merged
inteon merged 5 commits intomasterfrom
feature/label-selector
Feb 4, 2026
Merged

Label selectors#768
inteon merged 5 commits intomasterfrom
feature/label-selector

Conversation

@achuchev
Copy link
Contributor

@achuchev achuchev commented Feb 4, 2026

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.

@achuchev achuchev changed the title Add label selectors Label selectors Feb 4, 2026
@achuchev achuchev requested a review from Copilot February 4, 2026 09:17
@achuchev achuchev added the test-e2e To signal e2e test job to be run label Feb 4, 2026
Copy link
Contributor

Copilot AI left a 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 LabelSelectors configuration field to ConfigDynamic struct
  • 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.

Copy link
Contributor

Copilot AI left a 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.

@jetstack jetstack deleted a comment from Copilot AI Feb 4, 2026
@achuchev achuchev marked this pull request as ready for review February 4, 2026 09:50
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@inteon inteon merged commit 45e0e64 into master Feb 4, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-e2e To signal e2e test job to be run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants