Skip to content
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

Feat: improve VPA filtering and checkpoint garbage collection #7716

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

omerap12
Copy link
Member

@omerap12 omerap12 commented Jan 17, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Currently, the recommender's garbage collection for checkpoints iterates through all namespaces in the cluster, ignoring the vpaObjectNamespace and ignoredNamespaces flags. In large-scale clusters, this can lead to performance issues. This PR addresses the problem by ensuring that the garbage collection logic respects the specified flags.

Which issue(s) this PR fixes:

Fixes #7697

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fixes VPA recommender garbage collection to respect `vpaObjectNamespace` and `ignoredNamespaces` flags, improving performance in large-scale clusters by limiting the scope of namespace checks.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

Not sure where should I document this change

@k8s-ci-robot
Copy link
Contributor

@omerap12: The label(s) kind/featrue cannot be applied, because the repository doesn't have them.

In response to this:

What type of PR is this?

/kind featrue

What this PR does / why we need it:

Currently, the recommender's garbage collection for checkpoints iterates through all namespaces in the cluster, ignoring the vpaObjectNamespace and ignoredNamespaces flags. In large-scale clusters, this can lead to performance issues. This PR addresses the problem by ensuring that the garbage collection logic respects the specified flags.

Which issue(s) this PR fixes:

Fixes #7697

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fixes VPA recommender garbage collection to respect `vpaObjectNamespace` and `ignoredNamespaces` flags, improving performance in large-scale clusters by limiting the scope of namespace checks.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

Not sure where should I document this change

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 17, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: omerap12
Once this PR has been reviewed and has the lgtm label, please assign kgolab for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from voelzmo January 17, 2025 12:31
@omerap12
Copy link
Member Author

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 17, 2025
@adrianmoisey
Copy link
Member

Not sure where should I document this change

I'm not sure if this is a good idea, but what about updating the flags:

flag.StringVar(&cf.VpaObjectNamespace, "vpa-object-namespace", apiv1.NamespaceAll, "Namespace to search for VPA objects. Empty means all namespaces will be used.")
flag.StringVar(&cf.IgnoredVpaObjectNamespaces, "ignored-vpa-object-namespaces", "", "Comma separated list of namespaces to ignore when searching for VPA objects. Empty means no namespaces will be ignored.")
?

@omerap12 omerap12 force-pushed the recommender-namespaces branch from 90cb7a6 to 85370c3 Compare January 17, 2025 20:22
@omerap12
Copy link
Member Author

Not sure where should I document this change

I'm not sure if this is a good idea, but what about updating the flags:

flag.StringVar(&cf.VpaObjectNamespace, "vpa-object-namespace", apiv1.NamespaceAll, "Namespace to search for VPA objects. Empty means all namespaces will be used.")
flag.StringVar(&cf.IgnoredVpaObjectNamespaces, "ignored-vpa-object-namespaces", "", "Comma separated list of namespaces to ignore when searching for VPA objects. Empty means no namespaces will be ignored.")

?

sounds good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restricting VPA recommender scans to specific namespaces
3 participants