@@ -25,8 +25,9 @@ import (
25
25
// BinpackingLimiter processes expansion options to stop binpacking early.
26
26
type BinpackingLimiter interface {
27
27
InitBinpacking (context * context.AutoscalingContext , nodeGroups []cloudprovider.NodeGroup )
28
- StopBinpacking (context * context.AutoscalingContext , evaluatedOptions []expander.Option ) bool
29
28
MarkProcessed (context * context.AutoscalingContext , nodegroupId string )
29
+ StopBinpacking (context * context.AutoscalingContext , evaluatedOptions []expander.Option ) bool
30
+ FinalizeBinpacking (context * context.AutoscalingContext , finalOptions []expander.Option )
30
31
}
31
32
32
33
// NoOpBinpackingLimiter returns true without processing expansion options.
@@ -42,11 +43,15 @@ func NewDefaultBinpackingLimiter() BinpackingLimiter {
42
43
func (p * NoOpBinpackingLimiter ) InitBinpacking (context * context.AutoscalingContext , nodeGroups []cloudprovider.NodeGroup ) {
43
44
}
44
45
46
+ // MarkProcessed marks the nodegroup as processed.
47
+ func (p * NoOpBinpackingLimiter ) MarkProcessed (context * context.AutoscalingContext , nodegroupId string ) {
48
+ }
49
+
45
50
// StopBinpacking is used to make decsions on the evaluated expansion options.
46
51
func (p * NoOpBinpackingLimiter ) StopBinpacking (context * context.AutoscalingContext , evaluatedOptions []expander.Option ) bool {
47
52
return false
48
53
}
49
54
50
- // MarkProcessed marks the nodegroup as processed .
51
- func (p * NoOpBinpackingLimiter ) MarkProcessed (context * context.AutoscalingContext , nodegroupId string ) {
55
+ // FinalizeBinpacking is called to finalize the BinpackingLimiter .
56
+ func (p * NoOpBinpackingLimiter ) FinalizeBinpacking (context * context.AutoscalingContext , finalOptions []expander. Option ) {
52
57
}
0 commit comments