@@ -387,12 +387,13 @@ func TestStaticAutoscalerRunOnce(t *testing.T) {
387387 ScaleDownUtilizationThreshold : 0.5 ,
388388 MaxNodeProvisionTime : 10 * time .Second ,
389389 },
390- EstimatorName : estimator .BinpackingEstimatorName ,
391- EnforceNodeGroupMinSize : true ,
392- ScaleDownEnabled : true ,
393- MaxNodesTotal : 1 ,
394- MaxCoresTotal : 10 ,
395- MaxMemoryTotal : 100000 ,
390+ EstimatorName : estimator .BinpackingEstimatorName ,
391+ EnforceNodeGroupMinSize : true ,
392+ ScaleDownEnabled : true ,
393+ MaxNodesTotal : 1 ,
394+ MaxCoresTotal : 10 ,
395+ MaxMemoryTotal : 100000 ,
396+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
396397 }
397398 processorCallbacks := newStaticAutoscalerProcessorCallbacks ()
398399
@@ -642,16 +643,17 @@ func TestStaticAutoscalerRunOnceWithScaleDownDelayPerNG(t *testing.T) {
642643 ScaleDownUtilizationThreshold : 0.5 ,
643644 MaxNodeProvisionTime : 10 * time .Second ,
644645 },
645- EstimatorName : estimator .BinpackingEstimatorName ,
646- EnforceNodeGroupMinSize : true ,
647- ScaleDownEnabled : true ,
648- MaxNodesTotal : 1 ,
649- MaxCoresTotal : 10 ,
650- MaxMemoryTotal : 100000 ,
651- ScaleDownDelayTypeLocal : true ,
652- ScaleDownDelayAfterAdd : 5 * time .Minute ,
653- ScaleDownDelayAfterDelete : 5 * time .Minute ,
654- ScaleDownDelayAfterFailure : 5 * time .Minute ,
646+ EstimatorName : estimator .BinpackingEstimatorName ,
647+ EnforceNodeGroupMinSize : true ,
648+ ScaleDownEnabled : true ,
649+ MaxNodesTotal : 1 ,
650+ MaxCoresTotal : 10 ,
651+ MaxMemoryTotal : 100000 ,
652+ ScaleDownDelayTypeLocal : true ,
653+ ScaleDownDelayAfterAdd : 5 * time .Minute ,
654+ ScaleDownDelayAfterDelete : 5 * time .Minute ,
655+ ScaleDownDelayAfterFailure : 5 * time .Minute ,
656+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
655657 }
656658 processorCallbacks := newStaticAutoscalerProcessorCallbacks ()
657659
@@ -795,11 +797,12 @@ func TestStaticAutoscalerRunOnceWithAutoprovisionedEnabled(t *testing.T) {
795797 ScaleDownUtilizationThreshold : 0.5 ,
796798 MaxNodeProvisionTime : 10 * time .Second ,
797799 },
798- EstimatorName : estimator .BinpackingEstimatorName ,
799- ScaleDownEnabled : true ,
800- MaxNodesTotal : 100 ,
801- MaxCoresTotal : 100 ,
802- MaxMemoryTotal : 100000 ,
800+ EstimatorName : estimator .BinpackingEstimatorName ,
801+ ScaleDownEnabled : true ,
802+ MaxNodesTotal : 100 ,
803+ MaxCoresTotal : 100 ,
804+ MaxMemoryTotal : 100000 ,
805+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
803806 }
804807 processorCallbacks := newStaticAutoscalerProcessorCallbacks ()
805808
@@ -947,6 +950,7 @@ func TestStaticAutoscalerRunOnceWithALongUnregisteredNode(t *testing.T) {
947950 MaxCoresTotal : 10 ,
948951 MaxMemoryTotal : 100000 ,
949952 ForceDeleteLongUnregisteredNodes : forceDeleteLongUnregisteredNodes ,
953+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
950954 }
951955 processorCallbacks := newStaticAutoscalerProcessorCallbacks ()
952956
@@ -1104,13 +1108,14 @@ func TestStaticAutoscalerRunOncePodsWithPriorities(t *testing.T) {
11041108 ScaleDownUnreadyTime : time .Minute ,
11051109 MaxNodeProvisionTime : 10 * time .Second ,
11061110 },
1107- EstimatorName : estimator .BinpackingEstimatorName ,
1108- ScaleDownEnabled : true ,
1109- MaxNodesTotal : 10 ,
1110- MaxCoresTotal : 10 ,
1111- MaxMemoryTotal : 100000 ,
1112- ExpendablePodsPriorityCutoff : 10 ,
1113- NodeDeletionBatcherInterval : 0 * time .Second ,
1111+ EstimatorName : estimator .BinpackingEstimatorName ,
1112+ ScaleDownEnabled : true ,
1113+ MaxNodesTotal : 10 ,
1114+ MaxCoresTotal : 10 ,
1115+ MaxMemoryTotal : 100000 ,
1116+ ExpendablePodsPriorityCutoff : 10 ,
1117+ NodeDeletionBatcherInterval : 0 * time .Second ,
1118+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
11141119 }
11151120 processorCallbacks := newStaticAutoscalerProcessorCallbacks ()
11161121
@@ -1236,12 +1241,13 @@ func TestStaticAutoscalerRunOnceWithFilteringOnBinPackingEstimator(t *testing.T)
12361241 ScaleDownUtilizationThreshold : 0.5 ,
12371242 MaxNodeProvisionTime : 10 * time .Second ,
12381243 },
1239- EstimatorName : estimator .BinpackingEstimatorName ,
1240- ScaleDownEnabled : false ,
1241- MaxNodesTotal : 10 ,
1242- MaxCoresTotal : 10 ,
1243- MaxMemoryTotal : 100000 ,
1244- ExpendablePodsPriorityCutoff : 10 ,
1244+ EstimatorName : estimator .BinpackingEstimatorName ,
1245+ ScaleDownEnabled : false ,
1246+ MaxNodesTotal : 10 ,
1247+ MaxCoresTotal : 10 ,
1248+ MaxMemoryTotal : 100000 ,
1249+ ExpendablePodsPriorityCutoff : 10 ,
1250+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
12451251 }
12461252 processorCallbacks := newStaticAutoscalerProcessorCallbacks ()
12471253
@@ -1334,12 +1340,13 @@ func TestStaticAutoscalerRunOnceWithFilteringOnUpcomingNodesEnabledNoScaleUp(t *
13341340 ScaleDownUtilizationThreshold : 0.5 ,
13351341 MaxNodeProvisionTime : 10 * time .Second ,
13361342 },
1337- EstimatorName : estimator .BinpackingEstimatorName ,
1338- ScaleDownEnabled : false ,
1339- MaxNodesTotal : 10 ,
1340- MaxCoresTotal : 10 ,
1341- MaxMemoryTotal : 100000 ,
1342- ExpendablePodsPriorityCutoff : 10 ,
1343+ EstimatorName : estimator .BinpackingEstimatorName ,
1344+ ScaleDownEnabled : false ,
1345+ MaxNodesTotal : 10 ,
1346+ MaxCoresTotal : 10 ,
1347+ MaxMemoryTotal : 100000 ,
1348+ ExpendablePodsPriorityCutoff : 10 ,
1349+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
13431350 }
13441351 processorCallbacks := newStaticAutoscalerProcessorCallbacks ()
13451352
@@ -1470,6 +1477,7 @@ func TestStaticAutoscalerRunOnceWithBypassedSchedulers(t *testing.T) {
14701477 apiv1 .DefaultSchedulerName ,
14711478 bypassedScheduler ,
14721479 }),
1480+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
14731481 }
14741482 now := time .Now ()
14751483
@@ -1670,13 +1678,14 @@ func TestStaticAutoscalerRunOnceWithExistingDeletionCandidateNodes(t *testing.T)
16701678 ScaleDownUtilizationThreshold : 0.5 ,
16711679 MaxNodeProvisionTime : 10 * time .Second ,
16721680 },
1673- EstimatorName : estimator .BinpackingEstimatorName ,
1674- EnforceNodeGroupMinSize : true ,
1675- ScaleDownEnabled : true ,
1676- MaxNodesTotal : 100 ,
1677- MaxCoresTotal : 100 ,
1678- MaxMemoryTotal : 100000 ,
1679- NodeDeletionCandidateTTL : tc .deletionCandidateStalenessTTL ,
1681+ EstimatorName : estimator .BinpackingEstimatorName ,
1682+ EnforceNodeGroupMinSize : true ,
1683+ ScaleDownEnabled : true ,
1684+ MaxNodesTotal : 100 ,
1685+ MaxCoresTotal : 100 ,
1686+ MaxMemoryTotal : 100000 ,
1687+ NodeDeletionCandidateTTL : tc .deletionCandidateStalenessTTL ,
1688+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
16801689 }
16811690
16821691 processorCallbacks := newStaticAutoscalerProcessorCallbacks ()
@@ -1790,13 +1799,14 @@ func TestStaticAutoscalerInstanceCreationErrors(t *testing.T) {
17901799 ScaleDownUtilizationThreshold : 0.5 ,
17911800 MaxNodeProvisionTime : 10 * time .Second ,
17921801 },
1793- EstimatorName : estimator .BinpackingEstimatorName ,
1794- ScaleDownEnabled : true ,
1795- MaxNodesTotal : 10 ,
1796- MaxCoresTotal : 10 ,
1797- MaxMemoryTotal : 100000 ,
1798- ExpendablePodsPriorityCutoff : 10 ,
1799- ForceDeleteFailedNodes : tc .forceDeleteEnabled ,
1802+ EstimatorName : estimator .BinpackingEstimatorName ,
1803+ ScaleDownEnabled : true ,
1804+ MaxNodesTotal : 10 ,
1805+ MaxCoresTotal : 10 ,
1806+ MaxMemoryTotal : 100000 ,
1807+ ExpendablePodsPriorityCutoff : 10 ,
1808+ ForceDeleteFailedNodes : tc .forceDeleteEnabled ,
1809+ MaxNodeGroupBinpackingDuration : 1 * time .Second ,
18001810 }
18011811 processorCallbacks := newStaticAutoscalerProcessorCallbacks ()
18021812 var deleteMethod string
0 commit comments