Skip to content

Commit

Permalink
Merge pull request #452 from rabi/transition_time
Browse files Browse the repository at this point in the history
Restore LastTransitionTime after setting Ready Condition
  • Loading branch information
openshift-merge-bot[bot] committed Jul 29, 2024
2 parents af370f7 + 4df9ce8 commit 474d32f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/keystoneapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ func (r *KeystoneAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request)

// Always patch the instance status when exiting this function so we can persist any changes.
defer func() {
condition.RestoreLastTransitionTimes(&instance.Status.Conditions, savedConditions)
// update the Ready condition based on the sub conditions
if instance.Status.Conditions.AllSubConditionIsTrue() {
instance.Status.Conditions.MarkTrue(
Expand All @@ -174,6 +173,7 @@ func (r *KeystoneAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request)
instance.Status.Conditions.Set(
instance.Status.Conditions.Mirror(condition.ReadyCondition))
}
condition.RestoreLastTransitionTimes(&instance.Status.Conditions, savedConditions)
err := helper.PatchInstance(ctx, instance)
if err != nil {
_err = err
Expand Down

0 comments on commit 474d32f

Please sign in to comment.