This patch follows the same pattern applied to the other operators, where we re-init the condition at each reconcile loop. Conditions are re-evaluated and updated, keeping the LastTransitionTime for those that haven't changed (it avoids the transition from True to Unknown to True again).
In addition, the observedGeneration field is introduced, and it is used by the openstack-operator to check the IsReady() function for a particular CR in case a minor update is triggered. All the conditions are evaluated during the main Reconcile loop ( or the reconcileNormal function in some circumstances), hence the main ReadyCondition is updated within the same flow. The defer function still updates the Resource and Mirror(s) the condition to the top-level CR.
Needs approval from an approver in each of these files:
- ~~[OWNERS](https://github.com/openstack-k8s-operators/barbican-operator/blob/main/OWNERS)~~ [abays]
Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
This patch follows the same pattern applied to the other operators, where we re-init the condition at each reconcile loop.
Condition
s are re-evaluated and updated, keeping theLastTransitionTime
for those that haven't changed (it avoids the transition fromTrue
toUnknown
toTrue
again). In addition, theobservedGeneration
field is introduced, and it is used by theopenstack-operator
to check theIsReady()
function for a particularCR
in case a minor update is triggered. All the conditions are evaluated during the mainReconcile
loop ( or thereconcileNormal
function in some circumstances), hence the mainReadyCondition
is updated within the same flow. Thedefer
function still updates theResource
andMirror(s)
the condition to the top-levelCR
.Jira: OSPRH-5919 Jira: OSPRH-5698