-
Notifications
You must be signed in to change notification settings - Fork 45
支持更灵活的使用方式,也是为了保证所有 ovn eip 的底层基本逻辑代码都一致 #370
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
base: master
Are you sure you want to change the base?
Conversation
zbb88888
commented
Dec 15, 2025
- Make sure you have followed the Document Convention
Signed-off-by: zbb88888 <[email protected]>
Summary of ChangesHello @zbb88888, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在通过更新 EIP 和 SNAT 功能的文档,提升用户配置的灵活性和清晰度。主要改动包括调整文档结构,将高级配置信息提前,并引入一个新的配置项 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
此 PR 主要更新了 eip-snat 的中英文文档,将“高级配置”部分移至文档靠前位置,并增加了关于 external-gw-switch 配置项的说明,以支持更灵活的 OVN EIP 使用方式。整体上,这些改动提高了文档的清晰度和完整性。我发现了一些可以改进的地方,主要涉及文档中的拼写错误和表述清晰度问题,具体请见我的评论。
docs/guide/eip-snat.en.md
Outdated
| > To support this feature, if you need to directly specify a default external subnet name, you may need to set startup arguments for kube-ovn-controller. | ||
| Some args of `kube-ovn-controller` allow for advanced configuration of SNAT and EIP: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两行内容有些冗余,措辞可以更直接清晰。建议将它们合并成一个更简洁的句子,以提高可读性。
| > To support this feature, if you need to directly specify a default external subnet name, you may need to set startup arguments for kube-ovn-controller. | |
| Some args of `kube-ovn-controller` allow for advanced configuration of SNAT and EIP: | |
| > To support advanced configuration of SNAT and EIP, such as specifying a default external subnet, set the following startup arguments for `kube-ovn-controller`: |
docs/guide/eip-snat.en.md
Outdated
| - `external-gw-nic`: The name of the NIC that performs the role of a gateway on the node. | ||
| - `external-gw-addr`: The IP and mask of the physical network gateway. | ||
| - `nic-ip`,`nic-mac`: The IP and Mac assigned to the logical gateway port needs to be an unoccupied IP and Mac for the physical subnet. | ||
| - `external-gw-switch`: Reuse the name of an existing underlay subnet logical switch. If you are using the default external of `--external-gateway-net`, then this value is omitted. But if you want to reuse an existing underlay subnet CR, then you can just configure `external-gw-switch: "your-subnet-name"`, and the others can be left unconfigured, because the network has already been maintained through the underlay subnet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
external-gw-switch 的描述可以更清晰一些。术语 "the others" 含义模糊,明确列出可以省略哪些参数会更有帮助。此外,可以改进句子结构以提高可读性。
| - `external-gw-switch`: Reuse the name of an existing underlay subnet logical switch. If you are using the default external of `--external-gateway-net`, then this value is omitted. But if you want to reuse an existing underlay subnet CR, then you can just configure `external-gw-switch: "your-subnet-name"`, and the others can be left unconfigured, because the network has already been maintained through the underlay subnet. | |
| - `external-gw-switch`: Reuse an existing underlay subnet logical switch. If you are using the default external switch specified by `--external-gateway-net` (default is "external"), you don't need to set this. However, if you want to reuse an existing underlay subnet CR, you can configure `external-gw-switch: "your-subnet-name"`. In this case, other parameters like `external-gw-nodes`, `external-gw-nic`, `external-gw-addr`, `nic-ip`, and `nic-mac` can be omitted, as the network is already managed by the underlay subnet. |
|
|
||
| ## 高级配置 | ||
|
|
||
| > 为了支持该功能,如果你需要直接指定定一个默认的 external subnet 名,你可能需要设置 `kube-ovn-controller` 的启动参数。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/guide/eip-snat.md
Outdated
| - `external-gw-nic`: 节点上承担网关作用的网卡名。 | ||
| - `external-gw-addr`: 物理网络网关的 IP 和掩码。 | ||
| - `nic-ip`,`nic-mac`: 分配给逻辑网关端口的 IP 和 Mac,需为物理段未被占用的 IP 和 Mac。 | ||
| - `external-gw-switch`: 复用已有的 underlay subnet 逻辑交换机名称,如果使用的是`--external-gateway-net`默认的 external,那么该值是缺省的。但如果你想复用已有的 underlay subnet CR, 那么你可以只配置 external-gw-switch: "your-subnet-name",其他的都可以不用配置,因为网络已经通过 underlay subnet 维护好了。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段描述中“其他的”指代不够明确,可能会让用户感到困惑。建议明确指出哪些配置项可以省略,并优化句子结构以提高清晰度。
| - `external-gw-switch`: 复用已有的 underlay subnet 逻辑交换机名称,如果使用的是`--external-gateway-net`默认的 external,那么该值是缺省的。但如果你想复用已有的 underlay subnet CR, 那么你可以只配置 external-gw-switch: "your-subnet-name",其他的都可以不用配置,因为网络已经通过 underlay subnet 维护好了。 | |
| - `external-gw-switch`: 复用一个已有的 underlay subnet 逻辑交换机。如果使用由 `--external-gateway-net` 参数指定的默认外部交换机(默认为 "external"),则无需配置此项。但如果你想复用一个已有的 underlay subnet CR,可以只配置 `external-gw-switch: "your-subnet-name"`,此时 `external-gw-nodes`、`external-gw-nic`、`external-gw-addr`、`nic-ip` 和 `nic-mac` 等参数可以省略,因为网络已由 underlay subnet 维护。 |
Signed-off-by: zbb88888 <[email protected]>