Skip to content

Commit 8a6822d

Browse files
committed
Deprecate NoOpBinpackingLimiter
1 parent 0728d15 commit 8a6822d

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

cluster-autoscaler/core/test/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func NewTestProcessors(context *context.AutoscalingContext) *processors.Autoscal
178178
return &processors.AutoscalingProcessors{
179179
PodListProcessor: podlistprocessor.NewDefaultPodListProcessor(context.PredicateChecker),
180180
NodeGroupListProcessor: &nodegroups.NoOpNodeGroupListProcessor{},
181-
BinpackingLimiter: binpacking.NewDefaultBinpackingLimiter(),
181+
BinpackingLimiter: binpacking.NewTimeLimiter(context.MaxNodeGroupBinpackingDuration),
182182
NodeGroupSetProcessor: nodegroupset.NewDefaultNodeGroupSetProcessor([]string{}, config.NodeGroupDifferenceRatios{}),
183183
ScaleDownSetProcessor: nodes.NewCompositeScaleDownSetProcessor([]nodes.ScaleDownSetProcessor{
184184
nodes.NewMaxNodesProcessor(),

cluster-autoscaler/processors/binpacking/binpacking_limiter.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,3 @@ type BinpackingLimiter interface {
2929
StopBinpacking(context *context.AutoscalingContext, evaluatedOptions []expander.Option) bool
3030
FinalizeBinpacking(context *context.AutoscalingContext, finalOptions []expander.Option)
3131
}
32-
33-
// NoOpBinpackingLimiter returns true without processing expansion options.
34-
type NoOpBinpackingLimiter struct {
35-
}
36-
37-
// NewDefaultBinpackingLimiter creates an instance of NoOpBinpackingLimiter.
38-
func NewDefaultBinpackingLimiter() BinpackingLimiter {
39-
return &NoOpBinpackingLimiter{}
40-
}
41-
42-
// InitBinpacking initialises the BinpackingLimiter.
43-
func (p *NoOpBinpackingLimiter) InitBinpacking(context *context.AutoscalingContext, nodeGroups []cloudprovider.NodeGroup) {
44-
}
45-
46-
// MarkProcessed marks the nodegroup as processed.
47-
func (p *NoOpBinpackingLimiter) MarkProcessed(context *context.AutoscalingContext, nodegroupId string) {
48-
}
49-
50-
// StopBinpacking is used to make decsions on the evaluated expansion options.
51-
func (p *NoOpBinpackingLimiter) StopBinpacking(context *context.AutoscalingContext, evaluatedOptions []expander.Option) bool {
52-
return false
53-
}
54-
55-
// FinalizeBinpacking is called to finalize the BinpackingLimiter.
56-
func (p *NoOpBinpackingLimiter) FinalizeBinpacking(context *context.AutoscalingContext, finalOptions []expander.Option) {
57-
}

0 commit comments

Comments
 (0)