Register DRA reconciler with manager#1287
Conversation
|
Skipping CI for Draft Pull Request. |
✅ 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 #1287 +/- ##
==========================================
- Coverage 79.09% 73.46% -5.64%
==========================================
Files 51 67 +16
Lines 5109 4993 -116
==========================================
- Hits 4041 3668 -373
- Misses 882 1156 +274
+ Partials 186 169 -17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
beac291 to
7851a25
Compare
|
/uncc @mresvanis |
| cmd.FatalError(setupLogger, err, "unable to create controller", "name", controllers.DevicePluginPodReconcilerName) | ||
| } | ||
|
|
||
| drac := controllers.NewDRAReconciler(client, nodeAPI, scheme) |
There was a problem hiding this comment.
nit: lets do it the same way we do with NewDevicePluginPodReconciler, NewWorkerPodManager, etc'
| - list | ||
| - patch | ||
| - update | ||
| - watch |
There was a problem hiding this comment.
do we need watch?
| numModulesWithBuild := 0 | ||
| numModulesWithSign := 0 | ||
| numModulesWithDevicePlugin := 0 | ||
| numModulesWithDRA := 0 |
There was a problem hiding this comment.
lets not mix apples and oranges: i think that metrics changes should be done in a different PR
7851a25 to
1eac8a5
Compare
|
Addressed all review comments @yevgeny-shnaidman :
|
1eac8a5 to
2af8954
Compare
|
@TomerNewman this note is probably not for this PR, but since DRAReconciler is creating the DeviceClass, it should also probably watch them and respond to their events |
its in here |
2af8954 to
9d682e6
Compare
|
/hold |
Wire the DRA reconciler into the operator manager: - Add resourcev1.AddToScheme to register the DRA resource API - Construct and register DRAReconciler via SetupWithManager - Add RBAC annotation for resource.k8s.io/deviceclasses - Add DRA module count to the existing metrics sweep - Regenerate RBAC manifests and metrics mock
|
/unhold |
|
/lgtm |
|
/hold |
9d682e6 to
61d35cd
Compare
|
/unhold |
|
/lgtm |
Register DRA reconciler with manager
Summary
Wire the existing DRA reconciler into the operator manager so that DRA Modules
are actively reconciled when the manager runs in a cluster. This adds the scheme
registration, RBAC permissions, reconciler construction, and DRA module count
metric to the existing metrics sweep.
Changes
resourcev1.AddToScheme(scheme)for the DRA resource APIDRAReconcilerviaSetupWithManager//+kubebuilder:rbacannotation forresource.k8s.io/deviceclassesSetKMMDRANummethod andkmm_dra_numgaugespec.drain the existing metrics sweepresource.k8s.io/deviceclassesrule (all CRUD verbs)Testing
setKMMOMetricsDescribeTable with adrabool parameter and a new "dra" entry. All 12 entries (including "altogether") pass.setKMMOMetricsfunction at 100% coverage;internal/controllerspackage at 89.9%Acceptance Criteria
resourcev1.AddToScheme(scheme)is called incmd/manager/main.goDRAReconcileris constructed and registered viaSetupWithManager(mgr)incmd/manager/main.goresource.k8s.io/deviceclassesverbs (get, list, watch, create, update, patch, delete)