Skip to content

PollingEventSource should trigger reconcile when a secondary resource is missing #885

@scrocquesel

Description

@scrocquesel

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?

  1. Create an operator that will create an external secondary resource with an ObservedGenerationAwareStatus.
  2. Add the primary resource to the cluster and start the operator: External resource is created.
  3. Stop the operator, delete the external resource
  4. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions