-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
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: oom-test-vpa
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: oom-test
updatePolicy:
updateMode: Auto
resourcePolicy:
containerPolicies:
- containerName: "*"
oomBumpUpRatio: 1.5
oomMinBumpUp: 104857600
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.
/kind feature
In-Progress/Merged:
TODO:
- memory-aggregation-interval
- evict-after-oom-threshold