docs: clarify extended resource claim status integration#202
Conversation
|
/cc @ffromani |
| 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`. |
|
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 - |
Updated ! |
|
New changes are detected. LGTM label has been removed. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: AutuSnow The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Document the
extendedResourceClaimStatusintegration requirements for CDI injection.
Issue #197 showed that
NodePrepareResourcescan 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.