Skip to content

Read containerStatus.resources to calculate container requests and limits when InPlaceVerticalScaling feature is enabled #7971

@laoj2

Description

@laoj2

Which component are you using?:

vertical-pod-autoscaler

/area vertical-pod-autoscaler

Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:

When In-Place Update of Pod Resources feature is enabled (see KEP for details):

  • Pod.Spec.Containers[i].Resources becomes purely a declaration, denoting the desired state of Pod resources.
  • Pod.Status.ContainerStatuses[i].Resources (new field, type v1.ResourceRequirements) shows the actual resources held by the Pod and its Containers for running containers, and the allocated resources for non-running containers. (Same applies to initContainers).

We need to modify VPA's code so that when InPlaceVerticalScaling is enabled in a cluster, the resource requests and limits should be read from the container status field (Pod.Status.ContainerStatuses[i].Resources). Otherwise, we should fallback to the resource requests defined in the pod spec (Pod.Spec.Containers[i].Resources).

Metadata

Metadata

Assignees

Labels

area/vertical-pod-autoscalerkind/featureCategorizes issue or PR as related to a new feature.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions