Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align restore LastTransitionTime with nova-operator #233

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading