Skip to content

Commit 7db3c79

Browse files
committed
EvictionController: Trigger retry in impossible branch too
r.addCondition should aways be true when we don't have the status condition. Still, let's return here a requeue to make sure we do not end up in a dead-end by accident.
1 parent 06e5a9a commit 7db3c79

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

internal/controller/eviction_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ func (r *EvictionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
9494
log.Info("running")
9595
return ctrl.Result{}, nil
9696
}
97+
// We just checked if the condition is there, so this should never
98+
// be reached, but let's cover our bass
99+
return ctrl.Result{RequeueAfter: 1 * time.Second}, nil
97100
} else if statusCondition.Status == metav1.ConditionTrue {
98101
// We are running, so we need to evict the next instance
99102
return r.handleRunning(ctx, eviction)

0 commit comments

Comments
 (0)