Skip to content

Commit

Permalink
Update previous state after each reconciliation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckal777 committed May 5, 2022
1 parent 1b60277 commit 5633ee3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,10 @@ func reconcileInternal(params reconcileParameters) error {
// check if a transition happened
if ps.State != next {
data.LastTransition = time.Now().UTC()
data.PreviousStates[ps.Profile.Name] = stateObj.Label()
data.ProfileStates[ps.Profile.Name] = next
}
// track the state of this reconciliation for the next run
data.PreviousStates[ps.Profile.Name] = stateObj.Label()
}

updateMaintenanceStateLabel(params.node, profileStates)
Expand Down

0 comments on commit 5633ee3

Please sign in to comment.