WIP: Add KEP-4680 device health reporting with message field support - #127
WIP: Add KEP-4680 device health reporting with message field support#127harche wants to merge 1 commit into
Conversation
|
Welcome @harche! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: harche 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 |
|
/hold for the implementation PRs to merge, |
|
I will update once 1.36 beta is cut |
/hold cancel |
|
/hold I am adding a feature to trigger the health status update in this example driver. |
e8b7bce to
79e477e
Compare
|
As mentioned before, I don't like that DRA drivers have to interact with the gRPC interface (drahealthv1alpha1 currently, despite the beta graduation of the feature?!). Can we first improve the kubeletplugin support for this feature (abstract from underlying gRPC interface similar to how it's done for the main DRA kubelet interace, better documentation) and only then make the DRA example driver use that improved support? |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: harche 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 |
19c069d to
42a8863
Compare
11a364c to
0413d2c
Compare
Implement the kubeletplugin WatchHealthStatus API with a simulated health source (driven by pod annotations) so that allocated device health surfaces in pod status, covered by an e2e test. Signed-off-by: Harshal Patil <12152047+harche@users.noreply.github.com>
|
I tested both DRAResourceHealth API generations end-to-end on kind by temporarily redirecting the
The |
Summary
Adds KEP-4680 device health reporting to the example driver, serving as the reference implementation for the version-neutral
WatchHealthStatusAPI from thekubeletpluginhelper (kubernetes/kubernetes#139477). No versioned DRAResourceHealth gRPC types appear in driver code; the helper serves v1 and v1alpha1, so allocated device health surfaces inpod.status.containerStatuses[].allocatedResourcesStatuson both new and 1.36-era kubelets.The driver reports all devices healthy and re-sends the report periodically as the heartbeat the kubelet's health lease requires. For demos and e2e tests, annotating the plugin pod with
health.example.com/<device>: Unhealthy|Healthy|Unknownoverrides a device's simulated health (seedemo/examples/health-reporting/).go.modtemporarily pins the k8s.io staging modules to master pseudo-versions untilWatchHealthStatusships in ak8s.io/dynamic-resource-allocationrelease.Verification
The e2e test deploys a pod with a claim, asserts
Healthyin pod status, flips the device toUnhealthyvia annotation, and asserts recovery back toHealthy. Verified on kind against both supported kubelet generations:kindest/node:v1.36.1(pre-v1 kubelet) — e2e passes via the helper's v1alpha1 compatibility serving.v1.37.0-beta.0.446+4b1379a4a44) — e2e passes, and driver logs confirm the kubelet opened/v1.DRAResourceHealth/NodeWatchResources.