You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The rollout controller is still in the processing of updating the condition
131
+
klog.V(2).InfoS("Requeue the resource binding until the rollout controller finishes updating the status", "resourceBinding", bindingRef, "generation", resourceBinding.Generation, "rolloutStartedCondition", rolloutStartedCondition)
klog.ErrorS(err, "Failed to update the resourceBinding status, will retry", "resourceBinding", klog.KObj(resourceBinding), "resourceBindingStatus", resourceBinding.Status)
245
+
klog.ErrorS(err, "Failed to update the resourceBinding status, will retry", "resourceBinding", bindingRef, "resourceBindingStatus", resourceBinding.Status)
returncontroller.NewUnexpectedBehaviorError(fmt.Errorf("found a resourceBinding %v without RolloutStarted condition", klog.KObj(resourceBinding)))
248
-
}
260
+
} else {
261
+
// At least the RolloutStarted condition for the old generation should be set.
262
+
// RolloutStarted condition won't be removed by the rollout controller.
263
+
klog.ErrorS(controller.NewUnexpectedBehaviorError(fmt.Errorf("found an invalid resourceBinding")), "RolloutStarted condition is not set", "resourceBinding", bindingRef)
klog.V(2).InfoS("The work applied or available condition stayed as true, no need to reconcile", "oldWork", klog.KObj(oldWork), "newWork", klog.KObj(newWork))
// There is an edge case that, the work spec is the same but from different resourceSnapshots.
962
+
// WorkGenerator will update the work because of the label changes, but the generation is the same.
963
+
// When the normal update happens, the controller will set the applied condition as false and wait
964
+
// until the work condition has been changed.
965
+
// In this edge case, we need to requeue the binding to update the binding status.
966
+
ifoldResourceSnapshot==newResourceSnapshot {
967
+
klog.V(2).InfoS("The work applied or available condition stayed as true, no need to reconcile", "oldWork", klog.KObj(oldWork), "newWork", klog.KObj(newWork))
968
+
return
969
+
}
940
970
}
941
971
}
942
972
// We need to update the binding status in this case
0 commit comments