Difference between Requeue vs. RequeueAfter? #3299
-
Hey everyone. I'm new to Kubebuilder and had a quick question regarding Requeue. I believe the operator by default, reconciles every 10 hours (aside from reacting to events). If I wanted to requeue a reconciled request, and simply use: {Requeue: true}, does that infer that in 10 hours we're going to try to reconcile again? Or is there a separate time that this runs on? I understand that RequeueAfter lets you specify a specific time, but what time unit is this considering? Milli seconds? Thank you all! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @alex067,
Yes, that is true. It is the default time define in the Manager Options. See:
No, the {Requeue: true} will cause the reconcile loop to start from the beginning immediately. It's useful, for instance, when you've updated a resource and want to re-fetch it to ensure all operations are executed correctly. Remember, it's important to implement idempotent solutions. I'd recommed you check the content of this PR: https://github.com/kubernetes-sigs/kubebuilder/blob/a1c6eb502aa5c626d8ce7d676f07211521cc61d8/docs/book/src/getting-started.md . It will clarify a lot how things work, Closing this one as answered. |
Beta Was this translation helpful? Give feedback.
Hi @alex067,
Yes, that is true. It is the default time define in the Manager Options. See:
No, the {Requeue: true} will cause the reconcile loop to start from the beginning immediately. It's useful, for instance, when you've updated a resource and want to re-fetch it to ensure all operations are executed correc…