Skip to content

Commit

Permalink
Driver Controller: remove unused reutrn value to solve a lint issue
Browse files Browse the repository at this point in the history
Signed-off-by: nb-ohad <mitrani.ohad@gmail.com>
  • Loading branch information
nb-ohad committed Jul 21, 2024
1 parent 5459d0c commit 902f360
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/controller/driver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,19 +203,19 @@ func (r *DriverReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
reconcileHandler.driver.Name = req.Name
reconcileHandler.driver.Namespace = req.Namespace

result, err := reconcileHandler.reconcile()
err := reconcileHandler.reconcile()
if err != nil {
log.Error(err, "CSI Driver reconciliation failed")
} else {
log.Info("CSI Driver reconciliation completed successfully")
}
return result, err
return ctrl.Result{}, err
}

func (r *driverReconcile) reconcile() (ctrl.Result, error) {
func (r *driverReconcile) reconcile() error {
// Load the driver desired state based on driver resource, operator config resource and default values.
if err := r.LoadAndValidateDesiredState(); err != nil {
return ctrl.Result{}, err
return err
}

// Concurrently reconcile different aspects of the clusters actual state to meet
Expand All @@ -231,10 +231,10 @@ func (r *driverReconcile) reconcile() (ctrl.Result, error) {
// of the reconciliation steps.
errList := utils.ChannelToSlice(errChan)
if err := errors.Join(errList...); err != nil {
return ctrl.Result{}, err
return err
}

return ctrl.Result{}, nil
return nil
}

func (r *driverReconcile) LoadAndValidateDesiredState() error {
Expand Down

0 comments on commit 902f360

Please sign in to comment.