Skip to content

Commit 5dfea3c

Browse files
authored
Merge pull request kubernetes-sigs#2444 from alvaroaleman/clarify-recon
📖 Clarify that the reconcile.Result is ignored on non-nil error
2 parents 964a416 + 06fb2e9 commit 5dfea3c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pkg/reconcile/reconcile.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,16 @@ instead the reconcile function observes this when reading the cluster state and
8989
*/
9090
type Reconciler interface {
9191
// Reconcile performs a full reconciliation for the object referred to by the Request.
92-
// The Controller will requeue the Request to be processed again if an error is non-nil or
93-
// Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
92+
//
93+
// If the returned error is non-nil, the Result is ignored and the request will be
94+
// requeued using exponential backoff. The only exception is if the error is a
95+
// TerminalError in which case no requeuing happens.
96+
//
97+
// If the error is nil and the returned Result has a non-zero result.RequeueAfter, the request
98+
// will be requeued after the specified duration.
99+
//
100+
// If the error is nil and result.RequeueAfter is zero and result.Reque is true, the request
101+
// will be requeued using exponential backoff.
94102
Reconcile(context.Context, Request) (Result, error)
95103
}
96104

0 commit comments

Comments
 (0)