Files
kubernetes/pkg
John-Paul Sassine 1e8fc543cc Fix report health for templated and renamed DRA claims
The Kubelet's DRA manager was failing to report device health status in a pod's status for certain types of resource claims. The logic incorrectly assumed that the claim name used within the container's spec (`container.resources.claims[*].name`) was the same as the metadata name of the actual ResourceClaim object.

This assumption is false in two key scenarios:
1.  When a claim is generated from a `ResourceClaimTemplate`, Kubernetes creates a `ResourceClaim` object with a randomized suffix in its name.
2.  When a user defines a pre-existing claim in `pod.spec.resourceClaims`, they can provide a local name that differs from the actual `ResourceClaim` object's name.

In both cases, the code would fail to find the claim's information in its internal cache, resulting in the health status not being populated, as reported in issue #134482.

This fix corrects the logic by using `pod.Status.ResourceClaimStatuses` as the authoritative map to look up the actual, generated name of the `ResourceClaim` object. This ensures that both templated and renamed claims are resolved correctly before their health status is retrieved from the cache.

Additionally, this change introduces a new node e2e test that specifically covers templated and renamed claims to prevent future regressions.
2025-11-03 22:56:32 +00:00
..
2025-10-24 20:04:20 +02:00
2025-10-20 18:52:54 +00:00
2025-10-10 23:51:05 +08:00