Skip to content

Commit

Permalink
Align restore LastTransitionTime with nova-operator
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkisaolamb committed Jul 26, 2024
1 parent 67b6081 commit a9e883c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/placementapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ func (r *PlacementAPIReconciler) 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 @@ -234,6 +233,7 @@ func (r *PlacementAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request
instance.Status.Conditions.Set(
instance.Status.Conditions.Mirror(condition.ReadyCondition))
}
condition.RestoreLastTransitionTimes(&instance.Status.Conditions, savedConditions)
err := h.PatchInstance(ctx, instance)
if err != nil {
_err = err
Expand Down

0 comments on commit a9e883c

Please sign in to comment.