Add DRA support to ordered-upgrade state machine#1291
Conversation
✅ Deploy Preview for kubernetes-sigs-kmm ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TomerNewman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1291 +/- ##
==========================================
- Coverage 79.09% 73.74% -5.36%
==========================================
Files 51 67 +16
Lines 5109 5054 -55
==========================================
- Hits 4041 3727 -314
- Misses 882 1155 +273
+ Partials 186 172 -14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/assign @ybettan @yevgeny-shnaidman |
| fieldSelector := client.MatchingFields{"spec.nodeName": nodeName} | ||
| labelSelector := client.HasLabels{constants.ModuleNameLabel} | ||
| err := nlmvha.client.List(ctx, &kmmPodsList, labelSelector, fieldSelector) | ||
| return nlmvha.getDaemonSetPods(ctx, nodeName, client.HasLabels{constants.ModuleNameLabel}) |
There was a problem hiding this comment.
i think that we will have a role label in DevicePlugin too
|
Suggestion:
|
c47d3f3 to
7e4fda5
Compare
Extend the NodeLabelModuleVersionReconciler to handle DRA modules through the same ordered-upgrade label action table used by device plugin modules. The reconciler now detects whether a module uses DRA (via spec.dra) and routes label resolution to the version-dra label instead of version-device-plugin, reusing the existing state machine without modification.
7e4fda5 to
f23fc7d
Compare
|
/lgtm |
8302e3f
into
kubernetes-sigs:main
Summary
NodeLabelModuleVersionReconcilerto handle DRA modules through the same ordered-upgrade label action table used by device plugin modules, adding a newversion-dranode label prefixgetLabelAndActionwith a role-specific label function so the existing state machine works for both device plugin and DRA without duplicationversion-drain DaemonSet node selectors, create per-version DaemonSets (to avoid immutable selector errors on upgrade), and garbage collect old-version DaemonSetsChanges
internal/constants/constants.go— newDRAVersionLabelPrefixconstantinternal/utils/kmmlabels.go— newGetDRAVersionLabelName,IsDRAVersionLabel; refactoredGetNodesVersionLabelsto useIsVersionLabelinternal/controllers/node_label_module_version_reconciler.go— addedisDRA/draVersionLabelfields,setModulesDRAStatus(with graceful fallback when Module CR is deleted),getDRAPodsvia sharedgetDaemonSetPodshelper,resolveLabelfor role dispatchinternal/controllers/dra_reconciler.go— version label in DaemonSet labels + node selector,getExistingDRADSFromVersion,handleDRAversion-aware creation,garbageCollectDRADaemonSetsTest plan
go vetandgo build ./...clean