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

adapt dualstack for vpc-nat-gw #3161

Closed
wants to merge 1 commit into from
Closed

adapt dualstack for vpc-nat-gw #3161

wants to merge 1 commit into from

Conversation

hongzhen-ma
Copy link
Collaborator

@hongzhen-ma hongzhen-ma commented Aug 24, 2023

What type of this PR

  • Features

Which issue(s) this PR fixes:

Fixes #(issue-number)

WHAT

🤖 Generated by Copilot at 626fb16

This pull request adds IPv6 support and fixes some bugs for the VPC NAT gateway feature. It modifies several files in pkg/controller and pkg/ipam to handle dual-stack EIP and internal IPs and CIDRs, subnet masks, and data sources. It also updates the unit test in test/unittest/ipam/ipam.go to reflect the changes.

🤖 Generated by Copilot at 626fb16

VPC NAT gateway
Dual-stack subnets and EIPs
Autumn of changes

HOW

🤖 Generated by Copilot at 626fb16

  • Modify the handleInitVpcNatGw function to support multiple service cluster IP ranges and gateway IPs for IPv4 and IPv6 (link)
  • Modify the handleUpdateNatGwSubnetRoute function to use the subnetsLister instead of the ipam to get the subnet information, and to support IPv6 external and internal subnets and dual-stack subnets (link, link, link, link, link, link)
  • Modify the handleAddIptablesEip, handleUpdateIptablesEip, createEipInPod, and deleteEipInPod functions to support IPv6 EIP for the VPC NAT gateway feature (link, link, link, link, link, link, link, link, link, link)
  • Modify the handleAddIptablesFip, handleUpdateIptablesFip, createFipInPod, and deleteFipInPod functions to support IPv6 EIP and dual-stack internal IPs for the VPC NAT gateway feature (link, link, link, link, link, link)
  • Modify the handleAddIptablesDnatRule, handleUpdateIptablesDnatRule, createDnatInPod, and deleteDnatInPod functions to support IPv6 EIP and dual-stack internal IPs for the VPC NAT gateway feature (link, link, link, link, link, link)
  • Modify the handleAddIptablesSnatRule, handleUpdateIptablesSnatRule, createSnatInPod, and deleteSnatInPod functions to support IPv6 EIP and dual-stack internal CIDRs for the VPC NAT gateway feature (link, link, link, link, link, link, link, link, link)
  • Modify the patchFipLabel, patchDnatLabel, and patchSnatLabel functions to use the correct label key and value for the FIP, DNAT, and SNAT objects, and to avoid conflicts with other DNAT rules that use the same EIP (link, link, link)
  • Modify the patchSnatStatus function to support dual-stack internal CIDRs for the VPC NAT gateway feature (link)
  • Modify the GetSubnetV4Mask function to rename it to GetSubnetMask and return both the IPv4 and IPv6 masks of the subnet (link)
  • Modify the unit test for the AddOrUpdateSubnet function to use the GetSubnetMask function instead of the GetSubnetV4Mask function to get the subnet mask (link)
  • Modify the log messages in the handleUpdateVpcFloatingIp, handleUpdateVpcEip, handleUpdateVpcSnat, handleUpdateVpcDnat, handleUpdateIptablesEip, handleUpdateIptablesFip, and handleUpdateIptablesDnatRule functions to use consistent and clear terms (link, link, link, link, link, link, link, link)
  • Add the strings package to the imports of the pkg/controller/vpc_nat_gw_nat.go file (link)
  • Remove some empty lines in the pkg/controller/vpc_nat_gw_nat.go file to improve the code formatting and readability (link, link, link, link, link, link, link, link, link)

Copy link
Contributor

github-actions bot commented Nov 1, 2023

PRs go stale after 60d of inactivity. Please comment or re-open the PR if you are still working on this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant