Skip to content

Commit

Permalink
Merge branch 'master' into feat/helm_chart_pod_annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
prysmakou authored Jan 11, 2024
2 parents 7d89202 + f91d492 commit cd858ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/ipamd/ipamd.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,11 @@ func (c *IPAMContext) updateIPPoolIfRequired(ctx context.Context) {
log.Debugf("IP stats - total IPs: %d, assigned IPs: %d, cooldown IPs: %d", stats.TotalIPs, stats.AssignedIPs, stats.CooldownIPs)

if datastorePoolTooLow {
c.increaseDatastorePool(ctx)
// Allow for rapid scale up to decrease time it takes for pod to retrieve an ip
// but conservative scale down to account for pod churn
for datastorePoolStillTooLow := datastorePoolTooLow; datastorePoolStillTooLow; datastorePoolStillTooLow, _ = c.isDatastorePoolTooLow() {
c.increaseDatastorePool(ctx)
}
} else if c.isDatastorePoolTooHigh(stats) {
c.decreaseDatastorePool(decreaseIPPoolInterval)
}
Expand Down

0 comments on commit cd858ba

Please sign in to comment.