@@ -244,13 +244,13 @@ func AutoscalerSpec(ctx context.Context, inputGetter func() AutoscalerSpecInput)
244
244
WaitForMachineDeployment : input .E2EConfig .GetIntervals (specName , "wait-controllers" ),
245
245
})
246
246
247
- By ("Deleting the MachineDeployment scale up deployment" )
248
- framework .DeleteScaleUpDeploymentAndWait (ctx , framework.DeleteScaleUpDeploymentAndWaitInput {
249
- ClusterProxy : workloadClusterProxy ,
250
- WaitForDelete : input .E2EConfig .GetIntervals (specName , "wait-autoscaler" ),
251
- })
252
-
253
247
if input .ScaleToAndFromZero {
248
+ By ("Deleting the MachineDeployment scale up deployment" )
249
+ framework .DeleteScaleUpDeploymentAndWait (ctx , framework.DeleteScaleUpDeploymentAndWaitInput {
250
+ ClusterProxy : workloadClusterProxy ,
251
+ WaitForDelete : input .E2EConfig .GetIntervals (specName , "wait-autoscaler" ),
252
+ })
253
+
254
254
By ("Enabling autoscaler for the MachineDeployment to zero" )
255
255
// Enable autoscaler on the MachineDeployment.
256
256
framework .EnableAutoscalerForMachineDeploymentTopologyAndWait (ctx , framework.EnableAutoscalerForMachineDeploymentTopologyAndWaitInput {
@@ -281,12 +281,6 @@ func AutoscalerSpec(ctx context.Context, inputGetter func() AutoscalerSpecInput)
281
281
Replicas : 1 ,
282
282
WaitForMachineDeployment : input .E2EConfig .GetIntervals (specName , "wait-controllers" ),
283
283
})
284
-
285
- By ("Deleting the MachineDeployment scale up deployment" )
286
- framework .DeleteScaleUpDeploymentAndWait (ctx , framework.DeleteScaleUpDeploymentAndWaitInput {
287
- ClusterProxy : workloadClusterProxy ,
288
- WaitForDelete : input .E2EConfig .GetIntervals (specName , "wait-autoscaler" ),
289
- })
290
284
}
291
285
292
286
By ("Disabling the autoscaler for MachineDeployments to test MachinePools" )
@@ -296,6 +290,12 @@ func AutoscalerSpec(ctx context.Context, inputGetter func() AutoscalerSpecInput)
296
290
WaitForAnnotationsToBeDropped : input .E2EConfig .GetIntervals (specName , "wait-controllers" ),
297
291
})
298
292
293
+ By ("Deleting the MachineDeployment scale up deployment" )
294
+ framework .DeleteScaleUpDeploymentAndWait (ctx , framework.DeleteScaleUpDeploymentAndWaitInput {
295
+ ClusterProxy : workloadClusterProxy ,
296
+ WaitForDelete : input .E2EConfig .GetIntervals (specName , "wait-autoscaler" ),
297
+ })
298
+
299
299
if hasMachinePool {
300
300
By ("Enabling autoscaler for the MachinePool" )
301
301
// Enable autoscaler on the MachinePool.
@@ -359,13 +359,13 @@ func AutoscalerSpec(ctx context.Context, inputGetter func() AutoscalerSpecInput)
359
359
WaitForMachinePool : input .E2EConfig .GetIntervals (specName , "wait-controllers" ),
360
360
})
361
361
362
- By ("Deleting the MachinePool scale up deployment" )
363
- framework .DeleteScaleUpDeploymentAndWait (ctx , framework.DeleteScaleUpDeploymentAndWaitInput {
364
- ClusterProxy : workloadClusterProxy ,
365
- WaitForDelete : input .E2EConfig .GetIntervals (specName , "wait-autoscaler" ),
366
- })
367
-
368
362
if input .ScaleToAndFromZero {
363
+ By ("Deleting the MachinePool scale up deployment" )
364
+ framework .DeleteScaleUpDeploymentAndWait (ctx , framework.DeleteScaleUpDeploymentAndWaitInput {
365
+ ClusterProxy : workloadClusterProxy ,
366
+ WaitForDelete : input .E2EConfig .GetIntervals (specName , "wait-autoscaler" ),
367
+ })
368
+
369
369
By ("Enabling autoscaler for the MachinePool to zero" )
370
370
// Enable autoscaler on the MachinePool.
371
371
framework .EnableAutoscalerForMachinePoolTopologyAndWait (ctx , framework.EnableAutoscalerForMachinePoolTopologyAndWaitInput {
@@ -396,12 +396,6 @@ func AutoscalerSpec(ctx context.Context, inputGetter func() AutoscalerSpecInput)
396
396
Replicas : 1 ,
397
397
WaitForMachinePool : input .E2EConfig .GetIntervals (specName , "wait-controllers" ),
398
398
})
399
-
400
- By ("Deleting the MachineDeployment scale up deployment" )
401
- framework .DeleteScaleUpDeploymentAndWait (ctx , framework.DeleteScaleUpDeploymentAndWaitInput {
402
- ClusterProxy : workloadClusterProxy ,
403
- WaitForDelete : input .E2EConfig .GetIntervals (specName , "wait-autoscaler" ),
404
- })
405
399
}
406
400
407
401
By ("Disabling the autoscaler for MachineDeployments to test MachinePools" )
@@ -410,6 +404,12 @@ func AutoscalerSpec(ctx context.Context, inputGetter func() AutoscalerSpecInput)
410
404
Cluster : clusterResources .Cluster ,
411
405
WaitForAnnotationsToBeDropped : input .E2EConfig .GetIntervals (specName , "wait-controllers" ),
412
406
})
407
+
408
+ By ("Deleting the MachineDeployment scale up deployment" )
409
+ framework .DeleteScaleUpDeploymentAndWait (ctx , framework.DeleteScaleUpDeploymentAndWaitInput {
410
+ ClusterProxy : workloadClusterProxy ,
411
+ WaitForDelete : input .E2EConfig .GetIntervals (specName , "wait-autoscaler" ),
412
+ })
413
413
}
414
414
415
415
By ("PASSED!" )
0 commit comments