Skip to content

Fix non-sidecar init container device requests#134882

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
yliaog:initcon
Nov 6, 2025
Merged

Fix non-sidecar init container device requests#134882
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
yliaog:initcon

Conversation

@yliaog
Copy link
Copy Markdown
Contributor

@yliaog yliaog commented Oct 25, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

non-sidecar init containers are run serially, sidecar init containers are running forever, hence we need to allow multiple device requests per container per resource, instead of, one device requet per container per DRA extended resource, to implement the formula given in https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/753-sidecar-containers#resources-calculation-for-scheduling-and-pod-admission

Which issue(s) this PR is related to:

#134880

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Extended resources requested by initContainers which are allocated using an automatic ResourceClaim now match the behavior of legacy device plugins, reusing the same resources requested by later sidecar initContainers or regular containers when possible, to minimize the total number of devices requested by the pod.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 25, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

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.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 25, 2025
@k8s-ci-robot k8s-ci-robot added area/test sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. wg/device-management Categorizes an issue or PR as relevant to WG Device Management. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 25, 2025
@k8s-ci-robot k8s-ci-robot added area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. labels Oct 25, 2025
@github-project-automation github-project-automation Bot moved this to Needs Triage in SIG CLI Oct 25, 2025
@yliaog yliaog force-pushed the initcon branch 2 times, most recently from cca8147 to 92af2e2 Compare October 25, 2025 16:58
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 3, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 3, 2025
@macsko macsko moved this from Needs Review to In Progress in SIG Scheduling Nov 4, 2025
@yliaog
Copy link
Copy Markdown
Contributor Author

yliaog commented Nov 5, 2025

/assign @SergeyKanzhelev

could you help take at a minor change in the kubelet ?

@yliaog
Copy link
Copy Markdown
Contributor Author

yliaog commented Nov 5, 2025

/retest

Comment thread pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go Outdated
@liggitt
Copy link
Copy Markdown
Member

liggitt commented Nov 5, 2025

one small comment, one test compile error to fix, then lgtm

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 5, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 5, 2025
@yliaog
Copy link
Copy Markdown
Contributor Author

yliaog commented Nov 5, 2025

/retest

@yliaog
Copy link
Copy Markdown
Contributor Author

yliaog commented Nov 5, 2025

@liggitt squash the commits, PTAL

@yliaog
Copy link
Copy Markdown
Contributor Author

yliaog commented Nov 6, 2025

/retest

Copy link
Copy Markdown
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

node changes and tests looks good. Scheduler changes seems ok

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 6, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: c6e1bf420530b716dc169a9aabf8b1fe6044933d

@liggitt
Copy link
Copy Markdown
Member

liggitt commented Nov 6, 2025

/lgtm
/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, SergeyKanzhelev, yliaog

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 6, 2025
@liggitt liggitt added this to the v1.35 milestone Nov 6, 2025
@k8s-ci-robot k8s-ci-robot merged commit 7537d52 into kubernetes:master Nov 6, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubectl area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. wg/device-management Categorizes an issue or PR as relevant to WG Device Management.

Projects

Status: ✅ Done
Archived in project
Archived in project
Archived in project
Archived in project

Development

Successfully merging this pull request may close these issues.