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
feat: support for multiple external network #2725
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
1 task
shane965
force-pushed
the
feat-multi-external-network
branch
from
April 27, 2023 01:37
0b62674
to
c699ffc
Compare
|
in order to keep compatibility with the original code, we must to use the same function to get the external network, just like the following code: externalNetwork := util.GetExternalNetwork(newEip.Spec.ExternalSubnet) if you use the field this is not a great solution, but it works. if you have a better solution, please let me know. |
bobz965
approved these changes
Apr 27, 2023
hongzhen-ma
reviewed
Apr 28, 2023
hongzhen-ma
approved these changes
Apr 28, 2023
shane965
force-pushed
the
feat-multi-external-network
branch
from
April 28, 2023 02:47
c699ffc
to
8096fc1
Compare
|
hongzhen-ma
approved these changes
Apr 28, 2023
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of this PR
Examples of user facing changes:
Which issue(s) this PR fixes:
Fixes #2679
WHAT
🤖 Generated by Copilot at 0b62674
This pull request adds support for configurable external networks for NAT gateways and EIPs in the kube-ovn project. It updates the CRD definitions, the Go structs, and the controller logic to handle the new fields
externalSubnets
andexternalSubnet
forVpcNatGateway
andIptablesEIP
respectively. It also removes the dependency on the default external network name and improves the subnet status and EIP allocation calculations.🤖 Generated by Copilot at 0b62674
HOW
🤖 Generated by Copilot at 0b62674
externalSubnets
field toVpcNatSpec
andexternalSubnet
field toIptablesEipSpec
in CRDs and types (link, link, link, link, link, link)DeepCopyInto
method forVpcNatSpec
to copyexternalSubnets
field (link)VpcExternalNet
constant fromconst.go
and add it tonet.go
(link, link)GetExternalNetwork
andGetNatGwExternalNetwork
tonet.go
to get external network name from user input or default value (link)checkVpcExternalNet
method fromvpc_nat_gateway.go
as it is no longer needed (link, link)vpc_nat_gateway.go
to useGetNatGwExternalNetwork
function andexternalSubnets
field to get external network name, gateway, CIDR, and pod annotation for NAT gateway (link, link)MACVLAN_NAD_PROVIDER
constant fromvpc_nat_gw_eip.go
as it is no longer needed (link)vpc_nat_gw_eip.go
to useGetExternalNetwork
function andexternalSubnet
field to get external network name, EIP CIDR, gateway, static address, and label for EIP (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)subnet.go
to check if subnet is OVN subnet and list EIPs by label selector based on external network name (link, link)init.go
to get static address for EIP from IPAM based onexternalSubnet
field (link)pod_iptables_eip.go
to get EIP object from lister and passexternalNetwork
parameter tocreateOrUpdateCrdEip
method (link, link)