diff --git a/internal/controller/nodemaintenancescheduler_controller.go b/internal/controller/nodemaintenancescheduler_controller.go index 5be775a..91b878e 100644 --- a/internal/controller/nodemaintenancescheduler_controller.go +++ b/internal/controller/nodemaintenancescheduler_controller.go @@ -158,8 +158,8 @@ func (r *NodeMaintenanceSchedulerReconciler) Reconcile(ctx context.Context, req return ctrl.Result{}, err } - if schedCtx.AvailableSlots == 0 { - r.Log.Info("no slots available for maintenance scheduling") + if len(schedCtx.CandidateMaintenance) == 0 { + r.Log.Info("no candidate NodeMaintenance requests") return schedulerResyncResult, nil } @@ -168,8 +168,8 @@ func (r *NodeMaintenanceSchedulerReconciler) Reconcile(ctx context.Context, req return schedulerResyncResult, nil } - if len(schedCtx.CandidateMaintenance) == 0 { - r.Log.Info("no candidate NodeMaintenance requests") + if schedCtx.AvailableSlots == 0 { + r.Log.Info("no slots available for maintenance scheduling") return schedulerResyncResult, nil }