Add DRA support to ordered-upgrade state machine#1291
Conversation
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.
✅ 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% 74.01% -5.08%
==========================================
Files 51 67 +16
Lines 5109 5069 -40
==========================================
- Hits 4041 3752 -289
- Misses 882 1147 +265
+ Partials 186 170 -16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/assign @ybettan @yevgeny-shnaidman |
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