Skip to content

feat: enhance NewResourceUsageGatherer to support pod label selectors #23

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sanamsarath
Copy link

What type of PR is this?

/kind feature

What this PR does / why we need it:

This pull request introduces changes to the NewResourceUsageGatherer function in the clusterloader2/pkg/measurement/util/gatherers/container_resource_gatherer.go file. The primary focus is to enhance the function by adding support for an optional pod label selector, which allows for more granular pod listing.

Key changes include:

Enhancements to NewResourceUsageGatherer function:

  • Added an optional podLabelSelector parameter to the NewResourceUsageGatherer function signature to allow filtering pods by labels.
  • Modified the pod listing logic to use the podLabelSelector if provided, enabling the selection of pods based on specific labels.
  • Updated the iteration over pods to accommodate the new list structure, ensuring compatibility with the label selector feature.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant