Skip to content

Commit

Permalink
Don't requeue MachinePool controller when nodes don't have Provider I…
Browse files Browse the repository at this point in the history
…Ds yet
  • Loading branch information
CecileRobertMichon committed Apr 4, 2023
1 parent f88d849 commit c0ac856
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exp/internal/controllers/machinepool_controller_noderef.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func (r *MachinePoolReconciler) reconcileNodeRefs(ctx context.Context, cluster *
if err != nil {
if err == errNoAvailableNodes {
log.Info("Cannot assign NodeRefs to MachinePool, no matching Nodes")
return ctrl.Result{RequeueAfter: 10 * time.Second}, nil
// No need to requeue here. Nodes emit an event that triggers reconciliation.
return ctrl.Result{}, nil
}
r.recorder.Event(mp, corev1.EventTypeWarning, "FailedSetNodeRef", err.Error())
return ctrl.Result{}, errors.Wrapf(err, "failed to get node references")
Expand Down

0 comments on commit c0ac856

Please sign in to comment.