Deprecate NoOpBinpackingLimiter

This commit is contained in:
Damika Gamlath 2024-06-17 13:26:00 +00:00
parent 0728d157c2
commit 8a6822de2a
2 changed files with 1 additions and 27 deletions

View File

@ -178,7 +178,7 @@ func NewTestProcessors(context *context.AutoscalingContext) *processors.Autoscal
return &processors.AutoscalingProcessors{
PodListProcessor: podlistprocessor.NewDefaultPodListProcessor(context.PredicateChecker),
NodeGroupListProcessor: &nodegroups.NoOpNodeGroupListProcessor{},
BinpackingLimiter: binpacking.NewDefaultBinpackingLimiter(),
BinpackingLimiter: binpacking.NewTimeLimiter(context.MaxNodeGroupBinpackingDuration),
NodeGroupSetProcessor: nodegroupset.NewDefaultNodeGroupSetProcessor([]string{}, config.NodeGroupDifferenceRatios{}),
ScaleDownSetProcessor: nodes.NewCompositeScaleDownSetProcessor([]nodes.ScaleDownSetProcessor{
nodes.NewMaxNodesProcessor(),

View File

@ -29,29 +29,3 @@ type BinpackingLimiter interface {
StopBinpacking(context *context.AutoscalingContext, evaluatedOptions []expander.Option) bool
FinalizeBinpacking(context *context.AutoscalingContext, finalOptions []expander.Option)
}
// NoOpBinpackingLimiter returns true without processing expansion options.
type NoOpBinpackingLimiter struct {
}
// NewDefaultBinpackingLimiter creates an instance of NoOpBinpackingLimiter.
func NewDefaultBinpackingLimiter() BinpackingLimiter {
return &NoOpBinpackingLimiter{}
}
// InitBinpacking initialises the BinpackingLimiter.
func (p *NoOpBinpackingLimiter) InitBinpacking(context *context.AutoscalingContext, nodeGroups []cloudprovider.NodeGroup) {
}
// MarkProcessed marks the nodegroup as processed.
func (p *NoOpBinpackingLimiter) MarkProcessed(context *context.AutoscalingContext, nodegroupId string) {
}
// StopBinpacking is used to make decsions on the evaluated expansion options.
func (p *NoOpBinpackingLimiter) StopBinpacking(context *context.AutoscalingContext, evaluatedOptions []expander.Option) bool {
return false
}
// FinalizeBinpacking is called to finalize the BinpackingLimiter.
func (p *NoOpBinpackingLimiter) FinalizeBinpacking(context *context.AutoscalingContext, finalOptions []expander.Option) {
}