You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TotalResourcesRequested is the effective resource requirements for this pod, taking into consideration init containers, sidecars, containers and pod overhead.
906
-
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
The second change is to update the [PodRequestsAndLimitsReuse](https://github.com/kubernetes/kubernetes/blob/dfc9bf0953360201618ad52308ccb34fd8076dff/pkg/api/v1/resource/helpers.go#L64) function to support
912
-
the new calculation and, if possible, re-use this functionality the other places
913
-
that pod resource requests are needed (e.g. kube-scheduler, kubelet). This
914
-
ensures that components within Kubernetes have an identical computation for
915
-
effective resource requirements and will reduce maintenance effort. Currently
916
-
this function is only used for the metrics `kube_pod_resource_request` and
917
-
`kube_pod_resource_limit` that are exposed by `kube-scheduler` which align with the
918
-
values that will also now be reported on the pod status.
919
-
920
-
A correct, exported function is particularly useful for other Kubernetes
921
-
ecosystem components that need to know the resource requirements for pods that
922
-
don’t exist yet. For example, an autoscaler needs to know what the resource
923
-
requirements will be for DaemonSet pods when they are created to incorporate
924
-
them into its calculations if it supports scale to zero.
925
-
926
-
#### Notes for implementation
927
-
928
-
This change could be made in a phased manner:
929
-
- Refactor to use the `PodRequestsAndLimitsReuse` function in all situations where pod resource requests are needed.
930
-
- Add the new `TotalResourcesRequested` field on `PodStatus` and modify
931
-
`kubelet` & `kube-scheduler` to update the field.
932
-
933
-
These two changes are independent of the sidecar and in-place resource update
934
-
KEPs. The first change doesn’t present any user visible change, and if
935
-
implemented, will in a small way reduce the effort for both of those KEPs by
936
-
providing a single place to update the pod resource calculation.
864
+
This KEP will not expose the total resource requests field to end user
865
+
as many decisions on this field need to be made from other KEPs: InPlace pod update
866
+
and Pod Level resources. We do not want to make it harder for those new KEPs
867
+
to be implemented by exposing this field prematurely.
0 commit comments