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

make vpc_nat_gateway redo eip fip snat dnat iptables rules after k8s cluster reboot #3267

Merged
merged 5 commits into from
Dec 5, 2023

Conversation

wenwenxiong
Copy link
Contributor

@wenwenxiong wenwenxiong commented Sep 28, 2023

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes:

Fixes #(#3241)

WHAT

🤖 Generated by Copilot at b54535b

This pull request improves the reliability and consistency of the NAT gateway controller and the FIP feature. It adds logic to handle pod restarts and redo iptables rules for EIP, FIP, DNAT, and SNAT objects. It also changes the default value of the pod-default-fip-type flag to "iptables" and adds a function to initialize the VPC NAT gateways.

🤖 Generated by Copilot at b54535b

Sing, O Muse, of the skillful coder who changed the flag
Of pod-default-fip-type to match the docs and logic,
And who added to the controller the function initVpcNatGw
To initialize the gateways of the clouds, like Zeus the thunderer.

HOW

🤖 Generated by Copilot at b54535b

  • Change the default value of the pod-default-fip-type flag to "iptables" to match the documentation and code logic (link)
  • Add a function call to initialize the VPC NAT gateways in the controller's initResourceOnce function (link)
  • Implement the initVpcNatGw function to list and enqueue the VPC NAT gateways for initialization and check their annotations (link)
  • Import the time package to parse and compare timestamps for the EIP, FIP, DNAT, and SNAT configurations (link)
  • Add logic to check the redo time and start time of the EIP, FIP, DNAT, and SNAT configurations in the handleAddIptablesEip, handleAddIptablesFip, handleAddIptablesDnatRule, and handleAddIptablesSnatRule functions, respectively, and reconfigure them if needed (link, link, link, link, link, link, link)

pkg/controller/vpc_nat_gw_nat.go Outdated Show resolved Hide resolved
pkg/controller/vpc_nat_gw_nat.go Outdated Show resolved Hide resolved
@oilbeater
Copy link
Collaborator

@wenwenxiong hi, are you still working on this pr?

@bobz965
Copy link
Collaborator

bobz965 commented Nov 29, 2023

@wenwenxiong hi, are you still working on this pr?

if not, I will go on finish this pr.

@wenwenxiong
Copy link
Contributor Author

i am not to do with this pr now

@bobz965 bobz965 requested a review from oilbeater December 4, 2023 06:05
@bobz965 bobz965 merged commit f7ff76b into kubeovn:master Dec 5, 2023
59 checks passed
pandaoknight pushed a commit to pandaoknight/kube-ovn that referenced this pull request Mar 19, 2024
…cluster reboot (kubeovn#3267)

* make vpc_nat_gateway judge redo snat dnat iptables rules after k8s cluster reboot

Signed-off-by: bobz965 <[email protected]>

---------

Signed-off-by: bobz965 <[email protected]>
Co-authored-by: xiongww <[email protected]>
Co-authored-by: bobz965 <[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