Skip to content

docs: clarify extended resource claim status integration#202

Open
AutuSnow wants to merge 3 commits into
kubernetes-sigs:mainfrom
AutuSnow:docs/extended-resource-claim-status
Open

docs: clarify extended resource claim status integration#202
AutuSnow wants to merge 3 commits into
kubernetes-sigs:mainfrom
AutuSnow:docs/extended-resource-claim-status

Conversation

@AutuSnow

Copy link
Copy Markdown
Contributor

Document the extendedResourceClaimStatus integration requirements for CDI injection.

Issue #197 showed that NodePrepareResources can succeed and the CDI spec can be written, but kubelet will not inject the CDI device unless the extended-resource request and request mappings match correctly.

@kubernetes-prow kubernetes-prow Bot requested review from klueska and pohly June 25, 2026 04:27
@kubernetes-prow kubernetes-prow Bot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 25, 2026
@AutuSnow

Copy link
Copy Markdown
Contributor Author

/cc @ffromani

@kubernetes-prow kubernetes-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 25, 2026
@kubernetes-prow kubernetes-prow Bot requested a review from ffromani June 25, 2026 04:27
Comment thread README.md Outdated
Comment on lines +309 to +315
When integrating through Kubernetes `status.extendedResourceClaimStatus`, be aware that kubelet does not attach CDI devices to a container merely because the pod status names a generated `ResourceClaim`. That status path is for DRA-backed extended resources, not for native resources like `cpu` or `memory`.

For CDI injection to reach the runtime, the container must have a non-zero request for the DRA-backed extended resource, `status.extendedResourceClaimStatus.requestMappings[].resourceName` must match that exact container resource name, and `requestMappings[].requestName` must match the corresponding `spec.devices.requests[].name` in the generated `ResourceClaim`.

If these fields do not line up, `NodePrepareResources` can still succeed and the driver can still write a valid CDI spec, but kubelet will not add the CDI device ID to the CRI container config. In that case the container will not receive the `DRA_CPUSET_*` environment variable and the NRI plugin will treat it as a shared-CPU container.

For integrations that model native `cpu`, use the Kubernetes node-allocatable DRA status path when available instead of `extendedResourceClaimStatus`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks @AutuSnow for distilling the great investigation done in #197 . If we can add a couple examples (working/not working) from the issue, that would be great and complete the docs.

cc @pravk03 for awareness

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated!

@pravk03

pravk03 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Thanks @AutuSnow. Just catching up on #197. Great investigation.

Extended resources by definition (IsExtendedResourceName) excludes standard resources like cpu/memory. So, maybe adding a note like -extendedResourceName in DeviceClass or extendedResourceClaimStatus Pod Status is not expected to work with cpu dra driver - should be sufficient (without getting into why it wont work) ?

@kubernetes-prow kubernetes-prow Bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 25, 2026
@AutuSnow

Copy link
Copy Markdown
Contributor Author

Thanks @AutuSnow. Just catching up on #197. Great investigation.

Extended resources by definition (IsExtendedResourceName) excludes standard resources like cpu/memory. So, maybe adding a note like -extendedResourceName in DeviceClass or extendedResourceClaimStatus Pod Status is not expected to work with cpu dra driver - should be sufficient (without getting into why it wont work) ?

Updated !

The README now keeps this as a short note: extendedResourceName / extendedResourceClaimStatus is for DRA-backed extended resources and is not expected to work with this CPU DRA driver when the container only requests native cpu. I also added a brief working/not-working comparison from #197.

@pravk03 pravk03 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks again.

/lgtm

Comment thread README.md Outdated
@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 25, 2026
@kubernetes-prow kubernetes-prow Bot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 25, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AutuSnow
Once this PR has been reviewed and has the lgtm label, please ask for approval from pravk03. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants