Closed ChristianLoewel closed 10 months ago
It's the way kubernetes works, the controller will receive the event when a CR changed but maybe we can retain this field as it's helpful when debug issues, how about update the strategy like add the predicate filter or do the time window check(e.g if now()-lastAppliedTime < 5min
) before reconcile?
It's the way kubernetes works, the controller will receive the event when a CR changed but maybe we can retain this field as it's helpful when debug issues, how about update the strategy like add the predicate filter or do the time window check(e.g
if now()-lastAppliedTime < 5min
) before reconcile?
Yeah, I totally agree with that. Will take a look at the options you mentioned.
@chlins I've used the GenerationChangedPredicate event filter to only reconcile when the generation field changed, so all status changes will be excluded.
This pull request removes the
LastApplyTime
status field in the HarborProject CRD.I have noticed that updating the status field asynchronously after returning the Reconcile function seems to trigger an immediate 're-reconciliation'. As
LastApplyTime
gets updated every time, this results in an endless loop instead of reconciling HarborProjects only every 5 minutes as intended.