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
// This should not happen as we already checked in setPlacementStatus.
1080
-
err:=controller.NewUnexpectedBehaviorError(fmt.Errorf("selected cluster list is empty for placement %s when checking per-cluster rollout state", crp.Name))
1081
-
klog.ErrorS(err, "Should not happen: selected cluster list is empty in determineRolloutStateForCRPWithExternalRolloutStrategy()")
1081
+
err:=controller.NewUnexpectedBehaviorError(fmt.Errorf("selected cluster list is empty for placement %s when checking per-cluster rollout state", placementObj.GetName()))
1082
+
klog.ErrorS(err, "Should not happen: selected cluster list is empty in determineRolloutStateForPlacementWithExternalRolloutStrategy()")
// If clusters observe different resource snapshot versions, we set RolloutStarted condition to Unknown.
1096
1097
// ObservedResourceIndex and selectedResources are reset, too.
1097
-
klog.V(2).InfoS("Placement has External rollout strategy and different resource snapshot versions are observed across clusters, set RolloutStarted condition to Unknown", "clusterResourcePlacement", klog.KObj(crp))
klog.V(2).InfoS("Placement has External rollout strategy and different resource snapshot versions are observed across clusters, set RolloutStarted condition to Unknown", "placement", klog.KObj(placementObj))
// all bindings have the same observed resource snapshot.
1115
1116
ifobservedResourceIndex=="" {
1116
1117
// All bindings have empty resource snapshot name, we set the rollout condition to Unknown.
1117
1118
// ObservedResourceIndex and selectedResources are reset, too.
1118
-
klog.V(2).InfoS("Placement has External rollout strategy and no resource snapshot name is observed across clusters, set RolloutStarted condition to Unknown", "clusterResourcePlacement", klog.KObj(crp))
klog.V(2).InfoS("Placement has External rollout strategy and no resource snapshot name is observed across clusters, set RolloutStarted condition to Unknown", "placement", klog.KObj(placementObj))
Message: "Rollout is controlled by an external controller and no resource snapshot name is observed across clusters, probably rollout has not started yet",
1126
-
ObservedGeneration: crp.Generation,
1128
+
ObservedGeneration: placementObj.GetGeneration(),
1127
1129
})
1128
-
// As CRP status will refresh even if the spec has not changed, we reset any unused conditions
1129
-
// to avoid confusion.
1130
+
// As placement status will refresh even if the spec has not changed, we reset any unused conditions to avoid confusion.
klog.V(2).InfoS("Placement has External rollout strategy and some cluster is in RolloutStarted Unknown state, set RolloutStarted condition to Unknown",
t.Errorf("determineRolloutStateForCRPWithExternalRolloutStrategy() got RolloutUnknown set to %v, want %v", gotRolloutUnknown, tc.wantRolloutUnknown)
4439
+
t.Errorf("determineRolloutStateForPlacementWithExternalRolloutStrategy() got RolloutUnknown set to %v, want %v", gotRolloutUnknown, tc.wantRolloutUnknown)
t.Errorf("determineRolloutStateForCRPWithExternalRolloutStrategy() got crp.Status.ObservedResourceIndex set to %v, want %v", crp.Status.ObservedResourceIndex, tc.wantObservedResourceIndex)
4442
+
t.Errorf("determineRolloutStateForPlacementWithExternalRolloutStrategy() got crp.Status.ObservedResourceIndex set to %v, want %v", crp.Status.ObservedResourceIndex, tc.wantObservedResourceIndex)
0 commit comments