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

Integrate MACVLAN CNI to DANM with dynamic integration level + Extend IP route provisioning support to ALL backends #13

Merged
merged 7 commits into from
Jan 28, 2019

Conversation

Levovar
Copy link
Collaborator

@Levovar Levovar commented Nov 10, 2018

This will enable the creation of MACVLAN interfaces based on the dynamic DanmNet API.
The CNI used to create the interfaces is the basic CNI coming from:
https://github.com/containernetworking/plugins/blob/master/plugins/main/macvlan/macvlan.go

Interfaces are created in bridge mode, with 1500 MTU.

Change is not yet tested.

@Levovar Levovar self-assigned this Nov 10, 2018
@Levovar
Copy link
Collaborator Author

Levovar commented Nov 12, 2018

setupHost in net.go should be adjusted to also handle host interface provisioning for macvlan backend

@Levovar
Copy link
Collaborator Author

Levovar commented Nov 12, 2018

Reminder2: vlan/vxlan support for delegated backends should be refactored to be generic, rather than requiring code per-backend
Similarly to how need for DANM IPAM is expressed

@Levovar Levovar changed the title Integrate MACVLAN CNI to DANM with dynamic integration level Integrate MACVLAN CNI to DANM with dynamic integration level + Extend IP route provisioning support to ALL backends Dec 13, 2018
@Levovar
Copy link
Collaborator Author

Levovar commented Dec 13, 2018

The review contains the generalization of how IP route provisioning is handled within DANM.

Previously IP routes were only provisioned into a container's netNS if the NEtworkType of the related DanmNet was "ipvlan".

The related code was refactored to be generic, and is now invoked from cnidel after a delegated CNI created an interface.
As a result, DANM can now provision both generic, and policy-based IP routes for both static, and dynamic-level backends.

Actually there is not much separating the two after this change :)

@Levovar
Copy link
Collaborator Author

Levovar commented Jan 24, 2019

The recent refactoring includes:

  • DanmNet validation regardless of NetworkType
  • DanmEp format is now commonly used throughout the whole project when provisioning, or deleting interfaces; both for delegated, and non-delegated use-cases.
    The common format will enable common enhancements implemented in the future

…r ALL backends!

IP route provisioning code was streamlined as a result, code duplication was deleted.
DanmEp is now used during the whole delegation process to convey information about creating interfaces.
This is now unifies the interfaces between delegated, and non-delegated options, opening up for future, uniform enhancements!
…t IP route, and policy-based IP route provsioning.
@Levovar
Copy link
Collaborator Author

Levovar commented Jan 25, 2019

Change is now functional tested, all newly added functionalities work.
After this review it will be possible to:

  • provision MACVLAN interfaces purely from the DanmNet API
  • all supported options work with MACVLAN too, IPv6, static IP allocation, routes, proutes, vlan, and vxlan included
  • all backends, both dynamic and static can now have default IP routes provisioned based on the DanmNet API
  • all backends, both dynamic and static can now have Pod-level policy-based IP routes provisioned into their routing tables

Only documentation remains, and we are good to go!

@Levovar Levovar merged commit 0ea0698 into master Jan 28, 2019
@Levovar Levovar deleted the macvlan_support branch January 28, 2019 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant