Skip to content

Commit 5acf19f

Browse files
author
Joseph Chen
committed
Faster eni scaleup
1 parent 3c20f2b commit 5acf19f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/ipamd/ipamd.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ func (c *IPAMContext) nodeInit() error {
529529

530530
// On node init, check if datastore pool needs to be increased. If so, attach CIDRs from existing ENIs and attach new ENIs.
531531
if !c.disableENIProvisioning && c.isDatastorePoolTooLow() {
532-
if err := c.increaseDatastorePool(ctx); err != nil {
532+
err := c.increaseDatastorePool(ctx)
533+
if err != nil {
533534
// Note that the only error currently returned by increaseDatastorePool is an error attaching CIDRs (other than insufficient IPs)
534535
podENIErrInc("nodeInit")
535536
return errors.New("error while trying to increase datastore pool")
@@ -636,6 +637,10 @@ func (c *IPAMContext) updateIPPoolIfRequired(ctx context.Context) {
636637

637638
if c.isDatastorePoolTooLow() {
638639
c.increaseDatastorePool(ctx)
640+
// Speeds up ENI scale up
641+
for c.isDatastorePoolTooLow() {
642+
c.increaseDatastorePool(ctx)
643+
}
639644
} else if c.isDatastorePoolTooHigh() {
640645
c.decreaseDatastorePool(decreaseIPPoolInterval)
641646
}

0 commit comments

Comments
 (0)