-
Notifications
You must be signed in to change notification settings - Fork 39.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PodLevelResources] Pod Level Resources Feature Alpha #128407
Conversation
Skipping CI for Draft Pull Request. |
69592f0
to
7125ffa
Compare
/test all |
7125ffa
to
c4fcf81
Compare
Addressing the default test failures |
/test pull-kubernetes-node-kubelet-serial-podresources |
1. Add Resources struct to PodSpec struct in both external and internal API packages 2. Adding feature gate and logic for dropping disabled fields for Pod Level Resources KEP: enhancements/keps/sig-node/2837-pod-level-resource-spec
/lgtm |
LGTM label has been added. Git tree hash: c2e9c9f2c0ca6fa70f05d4791e9aa2ef752a3bf1
|
1. Add support for pod level resources in kubectl 2. Reuse the existing method to describe container resources and generalize it to describe both pod and container level resources
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
1. The effective container requests cannot be greater than pod-level requests 2. Inidividual container limits cannot be greater than pod-level limits 3. Only CPU & Memory are supported at pod-level 4. Inplace container resources updates are not supported if pod-level resources are set Note: effective container requests cannot be greater than pod-level limits is supported by transitivity. Effective container requests <= pod-level requests && pod-level requests <= pod-level limits; Therefore effective container requests <= pod-level limits Signed-off-by: ndixita <[email protected]>
1. Use pod-level resource when feature is enabled and resources are set at pod-level 2. Edge case handling: When a pod defines only CPU or memory limits at pod-level (but not both), and container-level requests/limits are unset, the pod-level requests stay empty for the resource without a pod-limit. The container's request for that resource is then set to the default request value from schedutil.
1. Pod cgrooup configured to use resources from pod spec if feature is enabled and resources are set at pod-level 2. Container cgroup limits defaulted to pod-level limits is container limits are not set
…urces into account Signed-off-by: ndixita <[email protected]>
Signed-off-by: ndixita <[email protected]>
…rces are not set Signed-off-by: ndixita <[email protected]>
8025618
to
b30e6c8
Compare
/lgtm |
LGTM label has been added. Git tree hash: fc17af58370a99e0823cef19139b071bb4be00e7
|
/test pull-kubernetes-node-kubelet-serial-podresources |
@ndixita: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
/test pull-kubernetes-e2e-gce-cos-alpha-features |
What type of PR is this?
What this PR does / why we need it:
This PR implements Pod Level Resources that require following changes:
Which issue(s) this PR fixes:
Fixes #
xref: kubernetes/enhancements#2837
Special notes for your reviewer:
API changes: 62c5355
Scheduler changes: cb4f2ea
Kubelet changes: inside pkg/kubelet
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: