-
Notifications
You must be signed in to change notification settings - Fork 224
Description
Bug Report
I'm was using PerResourcePollingEventSource
but when having a lot of primary resources, it can lead to a lot of presure on the external system.
I refactor around a PollingEventSource
to batch external resources get but the difference of behavior make it is not a drop in replacement.
What did you do?
- Create an operator that will create an external secondary resource with an
ObservedGenerationAwareStatus
. - Add the primary resource to the cluster and start the operator: External resource is created.
- Stop the operator, delete the external resource
- Start the operator. Reconcile is never called. The external resource can't be recreated.
If I create manually the secondary resource and wait for the polling period to grab the new secondary resource, reconcile is triggered, and if the secondary resource is then manually deleted, it will also trigger the reconcile on next polling.
What did you expect to see?
At startup, reconcile should be called for each primary resource not in the map returned by the PollingEventSource supplier.
Ideally, PollingEventSource
and PerResourcePollingEventSource
should be an implementation details and should not change the way the reconciler works.