-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
pass sandbox resource requirements over CRI #104886
Conversation
db170f7
to
f358f8e
Compare
/test pull-kubernetes-verify |
We have handled CPU/memory request and limit, how about storage and ephemeral storage? We hope to assigned an ephemeral storage device for confidential containers, so we need to sum containers' request and pod overhead for ephemeral storage too. |
f358f8e
to
bd1e8f0
Compare
/test pull-kubernetes-e2e-gce-ubuntu-containerd |
@jiangliu -- understand your point re: ephemeral storage. Today this isn't accounted for in terms of resource quota/scheduler, etc, so I'm not sure it'd necessarily make sense to add to this part of the interface. It seems reasonable, but I think it'd make sense as a separate PR. This sound ok? |
cd71c2e
to
fbcb174
Compare
/test pull-kubernetes-verify-govet-levee |
fbcb174
to
24a9cdc
Compare
c42cb43
to
b6d4c67
Compare
Pushed update to:
|
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Currently we only care about the sum of sandbox resources, which includes a pod overhead if defined. We have a need for also calculating *just* the sum of container requests/limits for CPU / Memory, so let's do a refactor and expose this new helper function. Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Seperate the CPU/Memory req/limit -> linux resource conversion into its own function for better reuse. Elsewhere in kuberuntime pkg, we will want to leverage this requests/limits to Linux Resource type conversion. Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Populate Resources and Overhead fields which, are now part of LinuxPodSandboxConfig. Signed-off-by: Eric Ernst <eric_ernst@apple.com>
b6d4c67
to
2c0fad1
Compare
Pushed update to:
|
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bergwolf, egernst, liggitt, mrunalp The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR updates the CRI-api, adding two additional fields to
LinuxPodSandboxConfig
: Resources and Overhead. This API change was approved as part of the pod overhead KEP, but was not yet implemented.Kubelet is also updated to populate these fields when generating the sandbox config with the sum of container resources and pod overhead, respectively.
These fields are important to underlying runtimes, like Kata Containers, to facilitate appropriate sandbox sizing. More specifically to Kata, with this a VM can be created with multi-queue for IO sized to match the expected number of vCPUs. Similarly, the sandbox can be created appropriately without requiring CPU/memory hot plug.
Special notes for your reviewer:
Majority of the code changes are:
This change is based on top of #105772 in order to verify that the refactoring doesn't impact existing functionality (which didn't have great unit tests in the first place).
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: