Description
What would you like to be added?
With k8s 1.34, PodLevelResources
will allow users to specify resources on Pod level instead of on Container level. More info on how this works in the KEP
This is a placeholder/umbrella issue, similar to VPA's kubernetes/autoscaler#7571
Why is this needed?
HPA needs to be able to correctly calculate the resources requested by a pod, when it's defined at pod or container level. Today, it calculates the pod requests by aggregating the requests of all containers within a pod:
kubernetes/pkg/controller/podautoscaler/replica_calculator.go
Lines 452 to 475 in 988cf21
We could use https://github.com/kubernetes/kubernetes/blob/988cf21f0975cf95444a619481c13d2503d8ec6a/staging/src/k8s.io/component-helpers/resource/helpers.go, to calculate the pod requests in HPA.