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
Adding the logic to set default pod-level request as following:
1. If pod-level limit is set, pod-level request is unset and container-level request is set: derive pod-level request from container-level requests
2. If pod-level limit is set, pod-level request is unset and container-level request is unset: set pod-level request equal to pod-level limit
// defaultPodRequests applies default values for pod-level requests, only when
451
+
// pod-level limits are set, in following scenarios:
452
+
// 1. When at least one container (regular, init or sidecar) has requests set:
453
+
// The pod-level requests become equal to the effective requests of all containers
454
+
// in the pod.
455
+
// 2. When no containers have requests set: The pod-level requests become equal to
456
+
// pod-level limits.
457
+
// This defaulting behavior ensures consistent resource accounting at the pod-level
458
+
// while maintaining compatibility with the container-level specifications, as detailed
459
+
// in KEP-2837: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/2837-pod-level-resource-spec/README.md#proposed-validation--defaulting-rules
460
+
funcdefaultPodRequests(obj*v1.Pod) {
461
+
// We only populate defaults when the pod-level resources are partly specified already.
0 commit comments