You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, like when managing external resources, or just having a simple controller that we want to periodically reschedule it would be handy to be able to define that "I want to have maximum delay [X time] between reconciliations".
This would be much better than fixed rate, since that can easily lead to very close executions after each other, what is not the intention in these use cases.
One way that this is already doable is to make sure that the UpdateControl returns with UpdateControl.<MyCustomResource>noUpdate().rescheduleAfter(8, TimeUnit.HOURS);. Where it would return just noUpdate() - (or alternaives like updateStatus() )
But this is not that nice, since basically puts kinda noise in the code.
This could be also a new annoation @PeriodicReconciliation(maxDelay=8, timeUnit=HOURS) on the reconciler
or a property of @ControllerConfuguration(periodicReconiliationMaxDelay=8, periodicReconiliationTimeUnit = HOURS )
please let me know what do you think.
Implementation notes
Implementation wise regarding the execution, it is very simple to do, we just always put a reschedule if there is missing from the UpdateControl.
The text was updated successfully, but these errors were encountered:
That would help for testing. Actually, and especialy true on quarkus side, tests are more integration tests than unit testing the Reconciler. Then, it is not easy to test if a reschedule has been set.
Informers can help detecting change but for time based behaviour, I guess we still need to use either TimedEventSource or reschedule.
csviri
changed the title
Periodic Reconciliation - Able to Set Max Delay Between Reconciliations
Periodic Reconciliation - Able to Set Max Interval Between Reconciliations
Jan 27, 2022
Uh oh!
There was an error while loading. Please reload this page.
In some cases, like when managing external resources, or just having a simple controller that we want to periodically reschedule it would be handy to be able to define that "I want to have maximum delay [X time] between reconciliations".
This would be much better than fixed rate, since that can easily lead to very close executions after each other, what is not the intention in these use cases.
One way that this is already doable is to make sure that the UpdateControl returns with
UpdateControl.<MyCustomResource>noUpdate().rescheduleAfter(8, TimeUnit.HOURS);
. Where it would return justnoUpdate()
- (or alternaives likeupdateStatus()
)But this is not that nice, since basically puts kinda noise in the code.
This could be also a new annoation
@PeriodicReconciliation(maxDelay=8, timeUnit=HOURS)
on the reconcileror a property of
@ControllerConfuguration(periodicReconiliationMaxDelay=8, periodicReconiliationTimeUnit = HOURS )
please let me know what do you think.
Implementation notes
Implementation wise regarding the execution, it is very simple to do, we just always put a reschedule if there is missing from the
UpdateControl
.The text was updated successfully, but these errors were encountered: