cybozu-go / coil

CNI plugin for Kubernetes designed for scalability and extensibility
Apache License 2.0
165 stars 20 forks source link

Fix IPAM logic not to reuse the same addresses immediately #234

Closed terassyi closed 1 year ago

terassyi commented 1 year ago

This PR contains the change based on https://github.com/cybozu-go/coil/pull/233.

I added a lastAllocIdx field in allocator to record the last used index. And when coil-controller allocates addresses, it picks next to lastAllocIdx.

And I added some tests for this change.

Signed-off-by: terasihma tomoya-terashima@cybozu.co.jp