Skip to content

Add IPvlan L2 driver for Alibaba Cloud HPN nodes#206

Open
Bowser1704 wants to merge 1 commit into
kubernetes-sigs:mainfrom
Bowser1704:feat/alibaba-ipvlan
Open

Add IPvlan L2 driver for Alibaba Cloud HPN nodes#206
Bowser1704 wants to merge 1 commit into
kubernetes-sigs:mainfrom
Bowser1704:feat/alibaba-ipvlan

Conversation

@Bowser1704
Copy link
Copy Markdown

@Bowser1704 Bowser1704 commented May 19, 2026

What type of PR is this?

/kind feature

Introduce a configurable IPvlan driver that creates IPvlan slave
interfaces in the pod namespace while keeping the parent netdev on
the host. The implementation supports L2/L3/L3S modes, bridge/private/
vepa flags, and three addressing strategies (none, static,
parentIPv6PrefixPodIPv4).

What this PR does / why we need it:

Key changes:

  • Expand IPVlanConfig API with mode, flag, addressing, and route/
    neighbor copy options
  • Add IPvlan validation in the config validation pipeline
  • Implement idempotent attach: detect existing target interface in
    pod netns on retry, tolerate EEXIST on address assignment
  • Use deterministic temp names (parentName_iv) serialized by mutex
  • Support user-configured routes with full Scope/Table/Source fields,
    sorted link-scope-first for gateway reachability
  • Fail-fast on neighbor resolution errors instead of silently
    degrading connectivity
  • Make route/neighbor copy from parent opt-in via config
  • Decouple RDMA discovery from IPvlan config
  • Add Alibaba Cloud provider that auto-detects HPN instances and
    generates the IPvlan preset for bond devices with global IPv6

Which issue(s) this PR is related to:

N/A

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add IPvlan L2 networking mode for Alibaba Cloud HPN nodes, allowing non-hostNetwork pods to use RoCE RDMA with derived IPv6 addresses. Activated automatically on HPN instances when using `--cloud-provider-hint=ALIBABA`.

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label May 19, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for dranet canceled.

Name Link
🔨 Latest commit 48383e4
🔍 Latest deploy log https://app.netlify.com/projects/dranet/deploys/6a0db2817f3e0c00089c7c61

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @Bowser1704!

It looks like this is your first PR to kubernetes-sigs/dranet 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/dranet has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 19, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @Bowser1704. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 19, 2026
@gauravkghildiyal
Copy link
Copy Markdown
Member

Happy to have you contributing @Bowser1704

This is very interesting as we're also working on a somewhat generic approach towards having IPVLAN as part of #63. @ngcxy is working on a POC at the moment and we can align to make sure it covers your use case too (from the looks of it, I think it would).

@gauravkghildiyal
Copy link
Copy Markdown
Member

/assign
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 19, 2026
@Bowser1704 Bowser1704 force-pushed the feat/alibaba-ipvlan branch from f529806 to fbb1e43 Compare May 19, 2026 08:22
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Bowser1704
Once this PR has been reviewed and has the lgtm label, please ask for approval from gauravkghildiyal. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Bowser1704 Bowser1704 force-pushed the feat/alibaba-ipvlan branch 6 times, most recently from bb0eeb9 to e351900 Compare May 20, 2026 07:22
@Bowser1704
Copy link
Copy Markdown
Author

Thanks @gauravkghildiyal!

I've actually implemented a more generic IPvlan driver in this PR — it's not tightly coupled to Alibaba Cloud. The cloud provider hint just signals when to enable it.

Would love to align with @ngcxy's POC from #63 — if we can converge on the IPvlan approach, that would let Alibaba Cloud users onboard to dranet right away. Happy to iterate on the design together.

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 20, 2026
@Bowser1704 Bowser1704 force-pushed the feat/alibaba-ipvlan branch from e351900 to bb28b7f Compare May 20, 2026 10:52
Introduce a configurable IPvlan driver that creates IPvlan slave
interfaces in the pod namespace while keeping the parent netdev on
the host. The implementation supports L2/L3/L3S modes, bridge/private/
vepa flags, and three addressing strategies (none, static,
parentIPv6PrefixPodIPv4).

Key changes:
- Expand IPVlanConfig API with mode, flag, addressing, and route/
  neighbor copy options
- Add IPvlan validation in the config validation pipeline
- Implement idempotent attach: detect existing target interface in
  pod netns on retry, tolerate EEXIST on address assignment
- Use deterministic temp names (parentName_iv) serialized by mutex
- Support user-configured routes with full Scope/Table/Source fields,
  sorted link-scope-first for gateway reachability
- Fail-fast on neighbor resolution errors instead of silently
  degrading connectivity
- Make route/neighbor copy from parent opt-in via config
- Decouple RDMA discovery from IPvlan config
- Add Alibaba Cloud provider that auto-detects HPN instances and
  generates the IPvlan preset for bond devices with global IPv6

Signed-off-by: Hongqi Yu <yuhongqi.yhq@alibaba-inc.com>
@Bowser1704 Bowser1704 force-pushed the feat/alibaba-ipvlan branch from bb28b7f to 48383e4 Compare May 20, 2026 13:09
@gauravkghildiyal
Copy link
Copy Markdown
Member

Thanks for the context.

We'd very much like to get things work with Alibaba Cloud. But the approach that I think we should take with IPVLAN ( or MACVLAN and others) is also having the flexibility to share the parent interface across multiple pods and doing this in a more DRA native way (using things like DRA Consumable Capacity and others)

This is something we are actively working towards and I'd highly encourage and request we wait for the work being done for #63. This is slightly opinionated, but it'd be awesome to get the IPVLAN support right from the get-go -- a modeling that allows for future extension like sharing between multiple pods. We'd appreciate your patience with this and would be happy to collaborate together so that all requirements are met. This PR is already a great demonstration of what exactly are the things we should have a solution for (in addition to things like device sharing).

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants