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

Discussion: Allow per-VPA component configuration parameters #7650

Open
omerap12 opened this issue Dec 31, 2024 · 1 comment
Open

Discussion: Allow per-VPA component configuration parameters #7650

omerap12 opened this issue Dec 31, 2024 · 1 comment
Labels
area/vertical-pod-autoscaler kind/feature Categorizes issue or PR as related to a new feature.

Comments

@omerap12
Copy link
Member

omerap12 commented Dec 31, 2024

Background

The VPA components (recommender, updater, admission controller) configuration is controlled through global flags. While this works well for simple deployments, it becomes challenging when different workloads require different configuration strategies.

Consider a Kubernetes cluster running both batch jobs processing large amounts of data and user-facing microservices. Each workload type has different resource optimization needs:

Batch processing may benefit from aggressive OOM handling and frequent adjustments, while web services might need more conservative growth to maintain stability. Currently, this requires running multiple VPA recommender instances:

Batch workload recommender

--oom-bump-up-ratio=1.5
--memory-aggregation-interval=1h
--recommender-name=batch-recommender

Web services recommender

--oom-bump-up-ratio=1.2
--memory-aggregation-interval=3h
--recommender-name=web-recommender

Proposal

Instead of managing multiple instances with different flags, we could allow configuring these parameters in the VPA object itself ( something similar to this or maybe a simpler approach ):

apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: batch-processor-vpa
spec:
  recommenderConfig:
    oomBehavior:
      bumpUpRatio: 1.5
    aggregation:
      memoryAggregationInterval: "1h"
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: web-service-vpa
spec:
  recommenderConfig:
    oomBehavior:
      bumpUpRatio: 1.2
    aggregation:
      memoryAggregationInterval: "3h"

This approach would allow running a single instance of each VPA component while supporting different configuration needs per workload. The same pattern could potentially extend to updater and admission controller parameters.

Key Questions

  1. How should we think about the global vs per-VPA parameter scope? Some parameters might make more sense to remain global.
  2. What's the right balance between flexibility and complexity? While we could make every flag configurable per-VPA, should we?

I'll be happy to open a KEP for it if seems valid.
/kind feature

@omerap12 omerap12 added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 31, 2024
@omerap12
Copy link
Member Author

/area vertical-pod-autoscaler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertical-pod-autoscaler kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants