Skip to content

Commit

Permalink
fix compilation errors after importing controller-runtime v0.19.0
Browse files Browse the repository at this point in the history
Signed-off-by: Tariq Ibrahim <[email protected]>
  • Loading branch information
tariq1890 committed Aug 26, 2024
1 parent 61c20b6 commit e876b8b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion controllers/clusterpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ func addWatchNewGPUNode(r *ClusterPolicyReconciler, c controller.Controller, mgr
// SetupWithManager sets up the controller with the Manager.
func (r *ClusterPolicyReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error {
// Create a new controller
c, err := controller.New("clusterpolicy-controller", mgr, controller.Options{Reconciler: r, MaxConcurrentReconciles: 1, RateLimiter: workqueue.NewItemExponentialFailureRateLimiter(minDelayCR, maxDelayCR)})
c, err := controller.New("clusterpolicy-controller", mgr, controller.Options{Reconciler: r, MaxConcurrentReconciles: 1,
RateLimiter: workqueue.NewTypedItemExponentialFailureRateLimiter[reconcile.Request](minDelayCR, maxDelayCR)})
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/nvidiadriver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func (r *NVIDIADriverReconciler) SetupWithManager(ctx context.Context, mgr ctrl.
c, err := controller.New("nvidia-driver-controller", mgr, controller.Options{
Reconciler: r,
MaxConcurrentReconciles: 1,
RateLimiter: workqueue.NewItemExponentialFailureRateLimiter(minDelayCR, maxDelayCR),
RateLimiter: workqueue.NewTypedItemExponentialFailureRateLimiter[reconcile.Request](minDelayCR, maxDelayCR),
})
if err != nil {
return err
Expand Down
3 changes: 2 additions & 1 deletion controllers/upgrade_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ func (r *UpgradeReconciler) removeNodeUpgradeStateLabels(ctx context.Context) er
//nolint:dupl
func (r *UpgradeReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error {
// Create a new controller
c, err := controller.New("upgrade-controller", mgr, controller.Options{Reconciler: r, MaxConcurrentReconciles: 1, RateLimiter: workqueue.NewItemExponentialFailureRateLimiter(minDelayCR, maxDelayCR)})
c, err := controller.New("upgrade-controller", mgr, controller.Options{Reconciler: r, MaxConcurrentReconciles: 1,
RateLimiter: workqueue.NewTypedItemExponentialFailureRateLimiter[reconcile.Request](minDelayCR, maxDelayCR)})
if err != nil {
return err
}
Expand Down

0 comments on commit e876b8b

Please sign in to comment.