From 5633ee3c1a93ff832f8a18614591bb099adc57b0 Mon Sep 17 00:00:00 2001 From: D074096 Date: Thu, 5 May 2022 13:44:39 +0200 Subject: [PATCH] Update previous state after each reconciliation --- controllers/node_controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/node_controller.go b/controllers/node_controller.go index 68e70dd..25e38f0 100644 --- a/controllers/node_controller.go +++ b/controllers/node_controller.go @@ -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)