@@ -462,6 +462,7 @@ func buildAutoscaler(debuggingSnapshotter debuggingsnapshot.DebuggingSnapshotter
462
462
return nil , err
463
463
}
464
464
deleteOptions := options .NewNodeDeleteOptions (autoscalingOptions )
465
+ drainabilityRules := rules .Default (deleteOptions )
465
466
466
467
opts := core.AutoscalerOptions {
467
468
AutoscalingOptions : autoscalingOptions ,
@@ -472,6 +473,7 @@ func buildAutoscaler(debuggingSnapshotter debuggingsnapshot.DebuggingSnapshotter
472
473
DebuggingSnapshotter : debuggingSnapshotter ,
473
474
PredicateChecker : predicateChecker ,
474
475
DeleteOptions : deleteOptions ,
476
+ DrainabilityRules : drainabilityRules ,
475
477
}
476
478
477
479
opts .Processors = ca_processors .DefaultProcessors (autoscalingOptions )
@@ -481,7 +483,7 @@ func buildAutoscaler(debuggingSnapshotter debuggingsnapshot.DebuggingSnapshotter
481
483
if autoscalingOptions .ParallelDrain {
482
484
sdCandidatesSorting := previouscandidates .NewPreviousCandidates ()
483
485
scaleDownCandidatesComparers = []scaledowncandidates.CandidatesComparer {
484
- emptycandidates .NewEmptySortingProcessor (emptycandidates .NewNodeInfoGetter (opts .ClusterSnapshot ), deleteOptions , rules . Default ( deleteOptions ) ),
486
+ emptycandidates .NewEmptySortingProcessor (emptycandidates .NewNodeInfoGetter (opts .ClusterSnapshot ), deleteOptions , drainabilityRules ),
485
487
sdCandidatesSorting ,
486
488
}
487
489
opts .Processors .ScaleDownCandidatesNotifier .Register (sdCandidatesSorting )
0 commit comments