Craig Condit created YUNIKORN-2366:
--------------------------------------
Summary: Update GetPodResources() to properly handle in-place pod
resource updates
Key: YUNIKORN-2366
URL: https://issues.apache.org/jira/browse/YUNIKORN-2366
Project: Apache YuniKorn
Issue Type: Sub-task
Components: shim - kubernetes
Reporter: Craig Condit
Assignee: Craig Condit
The *GetPodResources()* function in the shim is used to convert a Pod's
requested resources to a list of si.Resource objects. However, this is no
longer sufficient once the *InPlacePodVerticalScaling* feature flag is enabled
(or it becomes default in a future Kubernetes release).
This function needs to also take into account the allocated resources in the
{{Pod.Status.ContainerStatuses[].AllocatedResources}} collection in combination
with {{Pod.Status.Resize}} to determine what the real resource utilization is.
According to the
[spec|https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/1287-in-place-update-pod-resources/README.md],
{{AllocatedResources}} should be used instead of
{{Pod.Spec.Containers[].Resources.Requests}} unless it is not present. A
special case also exists where Pod.Status.Resize is set to {{InProgress}} – in
this case the larger of each resource should be used to avoid over-allocating
resources on a node.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]