-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add NetworkAttachmentDefinition support to NetWatcher #247
Conversation
In an effort to expand the existing netwatcher to be a more generic "Network Management Operator", this commit enhances it to be able to "speak" NAD, besides the 3 DANM APIs. The idea is pretty simple: the Controller components can interpret the CNI config inside NAD.Spec.Config same way as the CNI config in Spec.Options inside any DANM network, then call the existing VLAN, and VxLAN management functionalities regardless which API triggered the Operator. As a result, MACVLAN and IPVLAN type NADs can also enjoy the dynamic VLAN, and VxLAN host interface management functionalities previously exclusive to DANM API users. Netwatcher also takes care of patching the name of the parent interface in Spec.Config, so the upstream CNIs connect the Pods to the right host interface.
Keeping it in WIP still, some polishing left to do - but the concept works! Initial test NAD:
Interface created automatically on node when the network is created:
The correct device name is patched back into the network so the CNI connects child interfaces to the right parent:
Lastly, host interface is cleaned-up together with the network:
|
Also refactored CNI spec patching code to be re-usable from different packages
@dougbtv you might find this add interesting. Let me know if you did! :) |
@Levovar, thanks for the highlight! I do find it interesting and awesome!
Nice one!
…On Wed, Mar 10, 2021, 9:47 AM Levente Kale ***@***.***> wrote:
Merged #247 <#247> into master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#247 (comment)>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJX7PNSNY3ZQY5MWUAEQWLTC6A6ZANCNFSM4YIUVR3Q>
.
|
metadata: mismatch.. |
In an effort to expand the existing netwatcher to be a more generic "Network Management Operator", this commit enhances it to be able to "speak" NAD, in addition to currently existing the 3 DANM APIs.
The idea is pretty simple: the Controller component interprets the CNI config inside NAD.Spec.Config same way as the CNI config in Spec.Options of any DANM network, then call the existing VLAN, and VxLAN management functionalities regardless which API triggered the Operator.
As a result, MACVLAN and IPVLAN type NADs can now also enjoy the dynamic VLAN, and VxLAN host interface management functionalities previously exclusive to DANM API users.
Netwatcher also takes care of patching the name of the parent interface in Spec.Config, so the upstream CNIs connect the Pods to the right/newly created host interface.