everoute / ipam

everoute ipam for everoute cni and ecp cni
1 stars 1 forks source link

feat: support statefulset annotation specify ip and ippool #20

Closed qingwusunny closed 10 months ago

qingwusunny commented 10 months ago

1.如果StatefulSet和Pod template 都指定了ippool或者IP,使用Pod template 指定的IPPool或者IP 2.statefulset 指定了IPPool, 使用指定的IPPool为statefulset 关联的Pod分配IP 3.statefulset 指定 ip-list, 从ip-list中为statefulset关联的Pod分配IP。且Pod重建保持IP不变。 4.删除指定 ip-list的statefulset子资源Pod不回收IP,删除statefulset时才回收IP

codecov[bot] commented 10 months ago

Codecov Report

Merging #20 (b3e0589) into main (e1911ec) will increase coverage by 1.37%. The diff coverage is 83.96%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/everoute/ipam/pull/20/graphs/tree.svg?width=650&height=150&src=pr&token=ol7PVNGwvq&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=everoute)](https://app.codecov.io/gh/everoute/ipam/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=everoute) ```diff @@ Coverage Diff @@ ## main #20 +/- ## ========================================== + Coverage 73.92% 75.29% +1.37% ========================================== Files 7 7 Lines 418 510 +92 ========================================== + Hits 309 384 +75 - Misses 90 103 +13 - Partials 19 23 +4 ``` | [Files](https://app.codecov.io/gh/everoute/ipam/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=everoute) | Coverage Δ | | |---|---|---| | [pkg/cron/pod.go](https://app.codecov.io/gh/everoute/ipam/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=everoute#diff-cGtnL2Nyb24vcG9kLmdv) | `65.11% <100.00%> (ø)` | | | [pkg/ipam/ipam.go](https://app.codecov.io/gh/everoute/ipam/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=everoute#diff-cGtnL2lwYW0vaXBhbS5nbw==) | `75.31% <44.44%> (-1.31%)` | :arrow_down: | | [pkg/ipam/net\_conf.go](https://app.codecov.io/gh/everoute/ipam/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=everoute#diff-cGtnL2lwYW0vbmV0X2NvbmYuZ28=) | `91.04% <87.50%> (-8.96%)` | :arrow_down: |