Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no interface name in annotation to support multiple NIC #2618

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

Icarus9913
Copy link
Collaborator

@Icarus9913 Icarus9913 commented Nov 17, 2023

  1. ⚠️⚠️⚠️ Remove SpiderIPPool.Status.AllocatedIPs property interface, it just display the NIC that's all.

  2. Support multiple annotation ipam.spidernet.io/ippools new usage just like:

ipam.spidernet.io/ippools: |-
[
  {
    "ipv4": ["v4-pool1"],"ipv6": ["v6-pool1"]
  },
  {
    "ipv4": ["v4-pool2"],"ipv6": ["v6-pool2"]
  }
]

Signed-off-by: Icarus9913 [email protected]

What type of PR is this?

new feature

What this PR does / why we need it:
support multiple NIC with no name specified

Which issue(s) this PR fixes:
close #2614

@Icarus9913 Icarus9913 added pr/not-ready not ready for merging kind/feature release/feature-new release note for new feature labels Nov 17, 2023
@Icarus9913 Icarus9913 force-pushed the feat/wk/multiple-nic branch 4 times, most recently from 06d31bc to 3c96d67 Compare November 17, 2023 11:58
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Merging #2618 (2f20915) into main (0b38f89) will increase coverage by 0.18%.
Report is 20 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2618      +/-   ##
==========================================
+ Coverage   80.82%   81.00%   +0.18%     
==========================================
  Files          49       49              
  Lines        5303     5339      +36     
==========================================
+ Hits         4286     4325      +39     
+ Misses        859      856       -3     
  Partials      158      158              
Flag Coverage Δ
unittests 81.00% <100.00%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pkg/ippoolmanager/ippool_manager.go 85.88% <100.00%> (-0.06%) ⬇️
pkg/ippoolmanager/utils.go 93.33% <100.00%> (-0.08%) ⬇️
pkg/workloadendpointmanager/utils.go 100.00% <100.00%> (ø)
...orkloadendpointmanager/workloadendpoint_manager.go 100.00% <100.00%> (+2.80%) ⬆️

@Icarus9913 Icarus9913 force-pushed the feat/wk/multiple-nic branch 2 times, most recently from 38de2e5 to 5e59740 Compare November 20, 2023 03:03
@Icarus9913 Icarus9913 force-pushed the feat/wk/multiple-nic branch 7 times, most recently from dfd7876 to bf325f4 Compare November 21, 2023 03:29
@@ -70,6 +70,22 @@ ipam.spidernet.io/ippool: |-
}
```

在使用注解 `ipam.spidernet.io/ippools` 用于多网卡指定时,你可显式的通过指定 `interface` 字段标明网卡名,也可以通过**数组顺序排列**让第几张卡用哪些 IP 池。另外,字段 `cleangateway` 标明是否需要根据 IP 池中的 `gateway` 字段生成一条默认路由,当 `cleangateway` 为 `true` 标明无需生成默认路由。(默认为false)

> 多网卡场景下,一般无法为路由表 `main` 表生成两条及以上的默认路由。因此,可借助 `cleangateway: true` 来标明不根据 IP 池 gateway 字段生成默认路由。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句有误导,即使不加 cleangateway , coordinator也会调谐好,不存在 问题

@weizhoublue weizhoublue changed the title support multiple NIC with name specified no interface name in annotation to support multiple NIC Nov 21, 2023
@Icarus9913 Icarus9913 linked an issue Nov 22, 2023 that may be closed by this pull request
@Icarus9913 Icarus9913 added pr/ready-review This pull is ready for review and removed pr/not-ready not ready for merging labels Nov 22, 2023
@Icarus9913 Icarus9913 force-pushed the feat/wk/multiple-nic branch 2 times, most recently from 8ceca9b to 643ea09 Compare November 22, 2023 13:23
@Icarus9913 Icarus9913 added pr/not-ready not ready for merging and removed pr/ready-review This pull is ready for review labels Nov 23, 2023
@Icarus9913 Icarus9913 added pr/ready-review This pull is ready for review and removed pr/not-ready not ready for merging labels Nov 23, 2023
@weizhoublue weizhoublue merged commit f7076b0 into spidernet-io:main Nov 24, 2023
41 checks passed
@Icarus9913 Icarus9913 deleted the feat/wk/multiple-nic branch December 14, 2023 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature pr/ready-review This pull is ready for review release/feature-new release note for new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cleangateway not works for multiple NIC support no NIC name specified in multiple NICs mode
2 participants