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

简化 ovn eip 类型 #3107

Merged
merged 7 commits into from
Aug 4, 2023
Merged

简化 ovn eip 类型 #3107

merged 7 commits into from
Aug 4, 2023

Conversation

bobz965
Copy link
Collaborator

@bobz965 bobz965 commented Aug 2, 2023

What type of this PR

修复 bfd 路由无法新增多个
修复 vpc 更新路由未触发

WHAT

🤖 Generated by Copilot at 9cae868

Refactor the code to use new and simplified types for ovn eip and vip scenarios. This improves the readability and consistency of the code and the e2e test, and aligns with the ovn terminology. The main changes are in pkg/controller, pkg/daemon, pkg/apis, pkg/util, and test/e2e.

🤖 Generated by Copilot at 9cae868

We are the masters of the ovn eip
We use the Lrp, Lsp, and Vip
We simplify the types and the names
We crush the bugs and the flames

HOW

🤖 Generated by Copilot at 9cae868

  • Simplify the eip usage types from eip, lrp, and node external gw to lrp, lsp, and nat in the OvnEipSpec type definition (link)
  • Use the new Lrp type instead of the old LrpUsingEip type when creating or updating the ovn eip cr for the logical router port in createDefaultVpcLrpEip and handleAddVpcExternal functions (link, link)
  • Use the new Lsp type instead of the old NodeExtGwUsingEip type when creating, updating, or deleting the bare logical switch port for the eip in handleAddOvnEip, handleUpdateOvnEip, and handleDelOvnEip functions (link, link, link, link)
  • Use the new Lrp type instead of the old LrpUsingEip type when deleting the logical router port for the eip in handleDelOvnEip function (link)
  • Use the new Vip type instead of the old NatUsingVip type when getting the internal vip from the virtual ip lister in handleAddOvnFip, handleUpdateOvnFip, handleAddOvnDnatRule, and handleUpdateOvnDnatRule functions (link, link, link, link)
  • Use the new Lsp type instead of the old NodeExtGwUsingEip type when listing or checking the node external ovn eips in reconcileCustomVpcBfdStaticRoute and checkNodeGwNicInNs functions (link, link, link, link)
  • Define the new eip usage types Vip, Lrp, and Lsp instead of the old types NatUsingVip, LrpUsingEip, and NodeExtGwUsingEip in the util package (link)
  • Use the new Vip type instead of the old NatUsingVip type when creating the ovn fip and dnat with the share eip vip in the e2e test (link, link)
  • Use the new Lsp type instead of the old NodeExtGwUsingEip type when creating the ovn node-ext-gw type eip on each node in the e2e test (link)
  • Use the new Vip type instead of the old NatUsingVip type when creating the ovn fip with the fip eip vip in the e2e test (link)

pkg/util/const.go Outdated Show resolved Hide resolved
pkg/util/const.go Outdated Show resolved Hide resolved
pkg/controller/ovn_fip.go Outdated Show resolved Hide resolved
pkg/controller/vpc.go Outdated Show resolved Hide resolved
pkg/controller/vpc.go Outdated Show resolved Hide resolved
@hongzhen-ma
Copy link
Collaborator

确认 CI 都通过之后再合入

@oilbeater
Copy link
Collaborator

cleanup 大量失败,需要检查一下相关逻辑

@bobz965
Copy link
Collaborator Author

bobz965 commented Aug 4, 2023

cleanup 大量失败,需要检查一下相关逻辑

ok 我再检查下

@bobz965 bobz965 merged commit 6ba997d into kubeovn:master Aug 4, 2023
58 checks passed
@bobz965 bobz965 deleted the oeip branch August 4, 2023 04:18
zhangzujian added a commit to zhangzujian/kube-ovn that referenced this pull request Aug 4, 2023
zhangzujian added a commit to zhangzujian/kube-ovn that referenced this pull request Aug 4, 2023
* 简化 ovn eip 类型
* support nat reuse lrp ip
* fix const value
* fix ecmp bfd static route
* fix cleanup
sirkrypt0 added a commit to sirkrypt0/kube-ovn that referenced this pull request Oct 15, 2023
We change the check to not enqueue a VPC update when the DeletionTimestamp
is zero. Previously, the VPC update would basically always be enqueued, as
the DeletionTimestamp would be zero until it was scheduled for deletion. This
lead to a huge amount of enqueued VPC updates and therefore a lot of Kubernetes
API requests and load on the API.

The logical not was removed in kubeovn#3107 which therefore introduced this bug.

Signed-off-by: Tobias Kantusch <[email protected]>
sirkrypt0 added a commit to sirkrypt0/kube-ovn that referenced this pull request Oct 15, 2023
We change the check to not enqueue a VPC update when the DeletionTimestamp
is zero. Previously, the VPC update would basically always be enqueued, as
the DeletionTimestamp would be zero until it was scheduled for deletion. This
lead to a huge amount of enqueued VPC updates and therefore a lot of Kubernetes
API requests and load on the API.

The logical not was removed in kubeovn#3107 which therefore introduced this bug.

Signed-off-by: Tobias Kantusch <[email protected]>
oilbeater pushed a commit that referenced this pull request Oct 16, 2023
We change the check to not enqueue a VPC update when the DeletionTimestamp
is zero. Previously, the VPC update would basically always be enqueued, as
the DeletionTimestamp would be zero until it was scheduled for deletion. This
lead to a huge amount of enqueued VPC updates and therefore a lot of Kubernetes
API requests and load on the API.

The logical not was removed in #3107 which therefore introduced this bug.

Signed-off-by: Tobias Kantusch <[email protected]>
oilbeater pushed a commit that referenced this pull request Oct 16, 2023
We change the check to not enqueue a VPC update when the DeletionTimestamp
is zero. Previously, the VPC update would basically always be enqueued, as
the DeletionTimestamp would be zero until it was scheduled for deletion. This
lead to a huge amount of enqueued VPC updates and therefore a lot of Kubernetes
API requests and load on the API.

The logical not was removed in #3107 which therefore introduced this bug.

Signed-off-by: Tobias Kantusch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants