-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
False
-
-
False
-
?
-
?
-
?
-
?
-
None
-
-
-
Low
First we changed to re-initialize all our Status.Conditions at the start of each Reconcile() call. Then we realized that it causes that the lastTransitionTime of the condition is updated at each Reconcile call even if the condition did not change during the Reconciliation. So we introduced a logic that saves the old conditions, re-initialize the conditions, run Reconcile, and at the end checks if the new condition status is the same as the saved one and if so copy back that lastTransitionTime from the saved version. This solved the issue of always updating the lastTransitionTime, but it introduced a new edge case:
1. everything is reconciled and Ready
2. something small changes like the a CronJob schedule
3. the change is reconciled in a single Reconcile run and all the conditions goes from True to True state, so the new logic restore the old transition time but actually we should have a new transition time for the CronJobReadyCondition as we updated the CronJob with a new Schedule.