-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Expected Behavior
When the operator start, all reconciled resources should be considered "new" and the onAddFilter
should be applied before entering the reconcile()
function.
This was the cas with the kubernetes sdk implementation but not the openapi implementation.
Actual Behaviour
The reconcile()
method is never called on initial resources because we have a onUpdateFilter
that check for generation changes to allow updates.
With a lot of debugging, I think I can explain the behaviour.
InformerWatcher
call thelist
api andreplaceObjectsAndStartWatcher()
ControllerResourceEventHandler::onAdd()
is called on all resources but do nothing since it's disabled.- The operator win the leader election and the controller is enabled
DefaultSharedIndexInformer
resync the listeners but since the objects already exists in theIndexer
, theDeltaConsumer
triger anUpdateNotification
event instead ofAddNotification
.
Steps To Reproduce
Start an operator with pre-existing custom resources
Environment Information
No response
Example Application
No response
Version
4.9.2
Metadata
Metadata
Assignees
Labels
No labels