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
newMS: createMS("ms2", "v2", 1, withStatusReplicas(1), withStatusAvailableReplicas(0)), // one machine created on the new NewMS due to maxSurge, but it is not reaching the available state,
471
+
oldMSs: []*clusterv1.MachineSet{
472
+
createMS("ms1", "v1", 2, withStatusReplicas(3), withStatusAvailableReplicas(0)), // OldMS has unavailable replicas
473
+
},
474
+
expectScaleIntent: map[string]int32{
475
+
// no new scale down intent for oldMSs (ms1):
476
+
// 3 available replicas from ms1 - 1 replica already scaling down from ms1 + 3 available replica from ms2 = 5 available replicas == minAvailability, we cannot further scale down
477
+
},
478
+
expectedNotes: map[string][]string{},
479
+
skipMaxUnavailabilityCheck: true, // The test case is simulating all machines not unavailable, so this check will fail
480
+
},
481
+
{
482
+
name: "do not scale down if there are unavailable replicas on the new MachineSet (maxSurge 0, maxUnavailable 1), all machines unavailable",
newMS: createMS("ms2", "v2", 1, withStatusReplicas(1), withStatusAvailableReplicas(0)), // one machine created on the new NewMS after scale down on the old MS, but it is not reaching the available state,
486
+
oldMSs: []*clusterv1.MachineSet{
487
+
createMS("ms1", "v1", 2, withStatusReplicas(2), withStatusAvailableReplicas(0)), // OldMS scaled down due to maxUnavailable 1
488
+
},
489
+
expectScaleIntent: map[string]int32{
490
+
// no new scale down intent for oldMSs (ms1):
491
+
// 3 available replicas from ms1 - 1 replica already scaling down from ms1 + 3 available replica from ms2 = 5 available replicas == minAvailability, we cannot further scale down
492
+
},
493
+
expectedNotes: map[string][]string{},
494
+
skipMaxUnavailabilityCheck: true, // The test case is simulating all machines not unavailable, so this check will fail
495
+
},
466
496
{
467
497
name: "do not scale down if there are more replicas than minAvailable replicas, but scale down from current reconcile already takes the availability buffer (newMS is scaling down)",
0 commit comments