Skip to content

feat: Support IPv6 for delegated IPAM#38249

Merged
gandro merged 1 commit intocilium:mainfrom
kadevu:ipam-uplink-v6
Apr 2, 2025
Merged

feat: Support IPv6 for delegated IPAM#38249
gandro merged 1 commit intocilium:mainfrom
kadevu:ipam-uplink-v6

Conversation

@kadevu
Copy link
Copy Markdown

@kadevu kadevu commented Mar 18, 2025

For the scenario where there are multiple interfaces on a Node and delegated IPAM is used to determine the IP and the uplink interface of a Pod. The "interfaces" field can be used by IPAM plugin to pass uplink interface info to Cilium. And then Cilium can setup host routes for the Pod according to the uplink interface info.

The "interfaces" field is allowed to specify the related host interface according to the CNI spec and is already widely used by existing plugins, such as bridge and ptp plugin. It's actually not used by any IPAM plugin for now, but it's reasonable and conforms to the original definition of the field.

Motivations/Benefits of the PR for the native routing mode:

More cloud(public or private) envs with multiple uplink can be easily ingregrated with Cilium without involving any cloud specific logic. A common way is provided for the case: "uplink interface" support.
Cilium keeps full control of the Pod traffic. Cilium choose the implement of the "routing" for egress traffic, through Linux routes or eBPF forwarding rules or any other methods.

The IPv4 support for this was done as part of this PR #34779

This PR is for IPv6 support

These changes were initially authored by @caorui-io as part of this PR #36656 but had been inactive for a couple of months.

Support IPv6 for delegated IPAM

@kadevu kadevu requested review from a team as code owners March 18, 2025 02:47
@kadevu kadevu requested review from joamaki and marseel March 18, 2025 02:47
@maintainer-s-little-helper
Copy link
Copy Markdown

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Mar 18, 2025
@kadevu kadevu requested a review from pippolo84 March 18, 2025 02:47
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 18, 2025
@kadevu kadevu requested a review from gandro March 18, 2025 02:47
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Mar 18, 2025
@maintainer-s-little-helper
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I think the change high-level makes sense to me, I'll review it a bit more in detail later. A few things that stood out to me from a high-level review perspective:

Thanks!

@kadevu kadevu changed the title Ipam uplink v6 Support IPv6 for delegated IPAM Mar 18, 2025
@kadevu
Copy link
Copy Markdown
Author

kadevu commented Mar 18, 2025

Thanks for the PR! I think the change high-level makes sense to me, I'll review it a bit more in detail later. A few things that stood out to me from a high-level review perspective:

Thanks!

Thanks @gandro for your comments. I will update the PRs with the info that you have asked for.

@kadevu
Copy link
Copy Markdown
Author

kadevu commented Mar 19, 2025

Thanks for the PR! I think the change high-level makes sense to me, I'll review it a bit more in detail later. A few things that stood out to me from a high-level review perspective:

Thanks!

Thanks @gandro for your comments. I will update the PRs with the info that you have asked for.

I will wait for your review and make the fixes in a commit

@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Mar 20, 2025
@kadevu kadevu force-pushed the ipam-uplink-v6 branch 2 times, most recently from be17226 to 49036b6 Compare March 20, 2025 20:58
@kadevu kadevu changed the title Support IPv6 for delegated IPAM feat: Support IPv6 for delegated IPAM Mar 21, 2025
Copy link
Copy Markdown
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! High-level, they look good to me now. A few minor issues with the implementation that need to be addressed

@kadevu kadevu requested review from a team as code owners March 24, 2025 15:16
@gandro gandro removed request for a team March 25, 2025 08:35
Copy link
Copy Markdown
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

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

Awesome work! One last thing that I noticed, then I think this is good to go.

Copy link
Copy Markdown
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

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

Thanks!

@gandro
Copy link
Copy Markdown
Member

gandro commented Mar 25, 2025

/test

1 similar comment
@kadevu
Copy link
Copy Markdown
Author

kadevu commented Mar 25, 2025

/test

@gandro
Copy link
Copy Markdown
Member

gandro commented Mar 26, 2025

Please note that pushing to the branch invalidates CI results, therefore I recommend only updating the branch if necessary. I'll retrigger CI (and will take a look at failing tests, we currently have some flakes which are likely unrelated to the PR) Only organization members can trigger CI.

@gandro
Copy link
Copy Markdown
Member

gandro commented Mar 26, 2025

/test

@kadevu
Copy link
Copy Markdown
Author

kadevu commented Mar 26, 2025

Please note that pushing to the branch invalidates CI results, therefore I recommend only updating the branch if necessary. I'll retrigger CI (and will take a look at failing tests, we currently have some flakes which are likely unrelated to the PR) Only organization members can trigger CI.

Sure @gandro. There were a couple of tests failing in pkg/datapath/linux/routing/routing_test.go so I fixed them and pushed the changes.

@gandro
Copy link
Copy Markdown
Member

gandro commented Mar 31, 2025

/test

@joamaki
Copy link
Copy Markdown
Contributor

joamaki commented Apr 1, 2025

/test

@gandro
Copy link
Copy Markdown
Member

gandro commented Apr 2, 2025

I think the multi-pool CI check is failing because the branch is outdated: https://github.com/cilium/cilium/actions/runs/14197243933/job/39775304335

I'll rebase the branch and re-run CI

Signed-off-by: Rui Cao <[email protected]>

Removed reference to v6 in RoutingInfo and AllocationResult

Signed-off-by: Kaushik Vuligonda <[email protected]>
@gandro
Copy link
Copy Markdown
Member

gandro commented Apr 2, 2025

/test

Copy link
Copy Markdown
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

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

Thanks!

@gandro
Copy link
Copy Markdown
Member

gandro commented Apr 2, 2025

/test

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

Labels

area/ipam IP address management, including cloud IPAM kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/major This PR introduces major new functionality to Cilium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants