Deprecate NoOpBinpackingLimiter
This commit is contained in:
parent
0728d157c2
commit
8a6822de2a
|
@ -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(),
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue