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

Update nat discovery to support IP family #3311

Merged
merged 3 commits into from
Feb 26, 2025
Merged

Conversation

yboaron
Copy link
Contributor

@yboaron yboaron commented Feb 19, 2025

Current code assumes 1:1 mapping between endpoint to nat-discovery and
endpoint to submariner inter-cluster tunnel.

Since we decided that we continue using a single endpoint for each cluster
also for dual-stack, it is necessary to support mapping endpoint up to 2
nat-discovery and inter-cluster tunnels.

Additionally, nat-discovery and submariner-tunnel also need
to support IP family parameter, as both IPv4 and IPv6 should be supported.

This change update nat-discovery to support IP family, to make it clear,
only IPV4 nat-discovery is supported even after this change.

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr3311/yboaron/natd_v6
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

@yboaron yboaron added the ready-to-test When a PR is ready for full E2E testing label Feb 20, 2025
@yboaron yboaron force-pushed the natd_v6 branch 2 times, most recently from 2037527 to ed5f380 Compare February 20, 2025 14:42
delete(i.natDiscoveryPending, rnat.Endpoint.Spec.CableName)
i.natDiscoveryPending[familyCableName]--
if i.natDiscoveryPending[familyCableName] == 0 {
delete(i.natDiscoveryPending, familyCableName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think installedCables below will have to index by familyCableName as well but we can address that when cable drivers handle the family.

Current code assumes 1:1 mapping between endpoint to nat-discovery and
endpoint to submariner inter-cluster tunnel.
Since we decided that we continue using a single endpoint for each cluster
also for dual-stack, it is necessary to support mapping endpoint up to 2
nat-discovery and inter-cluster tunnels.

Additionally, nat-discovery and submariner-tunnel also need
to support IP family parameter, as both IPv4 and IPv6 should be supported.

This change update nat-discovery to support IP family,to make it clear,
only IPV4 nat-discovery is supported even after this change.

Signed-off-by: Yossi Boaron <[email protected]>
Also modified signature to return a slice instead of a fixes-sized array.

Signed-off-by: Tom Pantelis <[email protected]>
@vthapar
Copy link
Contributor

vthapar commented Feb 26, 2025

@yboaron Does this need backport to 0.20?

@yboaron
Copy link
Contributor Author

yboaron commented Feb 26, 2025

@yboaron Does this need backport to 0.20?

I don't think so, only refactoring the code to support IP family which is relevant for IPV6,dual-stack use case (planned for 0.21)

@yboaron yboaron merged commit 0d3888b into submariner-io:devel Feb 26, 2025
39 checks passed
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr3311/yboaron/natd_v6]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-test When a PR is ready for full E2E testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants