-
Notifications
You must be signed in to change notification settings - Fork 494
fix bug #5686: update node exgateway label to true when it is readyNode for providernetwork.status #5809
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
…network.status Signed-off-by: wppzxc <[email protected]>
Summary of ChangesHello @wppzxc, 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! 此拉取请求旨在解决一个关于 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 修复了当默认 VPC 未启用外部网络时,作为 provider-network 网关节点的 ovn.kubernetes.io/external-gw 标签被错误地设置为 false 的问题。修改的逻辑是在 resyncProviderNetworkStatus 函数中,当一个节点对于 provider-network 是 ready 状态时,主动检查并将其 ovn.kubernetes.io/external-gw 标签更新为 true。
整体逻辑是合理的,但我在代码中发现了一个日志记录问题,可能会在调试时引起混淆。具体请看我的评论。
Pull Request Test Coverage Report for Build 18649962737Details
💛 - Coveralls |
|
provider-network 的逻辑应该和 external-gw 无关,并且现在的改法会导致所有没有label的 node 也被更新为 true。 |
我理解provider network中配置的节点就是external-gw节点,所以就将这些节点都打上label |
|
provider-network 和 external-gw节点 是互相独立的, external gw 是需要出公网的VPC 的公网出口的 LRP 在哪个节点上。 这个就应该用 node label 手动维护。因为除非明确人为打标签,kube-ovn 才知道哪个节点能够作为出口。 而且哪个 vlan subnet 是公网,其实 provider-network 是不相关的。只有管理员才知道 |
那provider network中还选择节点干什么呢,如果是external gw节点统一出公网,provider network就不需要指定节点了吧, |
|
但是实际用起来会发现,external gw label为false的话,provider network也不通了,所有的provider network都通过label指定公网出口节点出去吗 |

update node exgateway label to true when it is readyNode for providernetwork.status
Pull Request
What type of this PR
Examples of user facing changes:
当node在provider-network资源中是ready状态,则讲节点label: ovn.kubernetes.io/external-gw 改为true
通过这个方式修复默认vpc不启用外部网络时,网关节点label: ovn.kubernetes.io/external-gw 改为false的问题。
Which issue(s) this PR fixes
Fixes #5686