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

DANM centralized, API driven IP management extended to work for all CNI compliant backends #111

Merged
merged 3 commits into from
Jul 22, 2019

Conversation

Levovar
Copy link
Collaborator

@Levovar Levovar commented Jul 18, 2019

Changing IPAM code in cnidel so centralized API driven IPAM now works for all backends requesting it!
All includes static.

If cidr/net6 is included in the network manifest, and the Pod's connection request includes "ip" / "ip6"; DANM will call ipam.Reserve and overwrite the "ipam" key in the CNI config of the static delegate with its own fakeipam integration.
This will result in CNI compliant static backends too getting their IPs purely based on a centralized network management API.

Also MACVLAN plugin recently was enhanced to tolerate the absence of "ipam" key in the CNI config. As a result "ip":"none" is now enabled for all backends.
The user will be responsible of making sure unsupported IPAM request types are not used for backends not supporting it; and that only CNI standard compliant backends are fed by DANM's IPAM.

… for all backends requesting it.

Also MACVLAN plugin recently was enhanced to tolerate the absence of "ipam" key in the CNI config, so "ip":"none" is now enabled for all dynamic backends.
The user will be responsible of making sure unsupported IPAM request types are not used for backends not supporting it.
@Levovar Levovar force-pushed the ipam_for_everyone branch from af15338 to 9ea2f70 Compare July 19, 2019 20:51
Found a bug: during CNI DEL the IP coming from the DanmEp is in CIDR format, and shall be decoded accordingly.
Error found by introducing reserve checks to cnidel UTs too, and also checking how many times DanmNet Update was called.
The latter check is introduced to ipam UTs as well, which made me realize we can optimize API write both during Reserve and Free.
We only need to push back changes if anything was changed at all.
Write need not be called for pur IPv6, and erroneous cases!
@Levovar Levovar force-pushed the ipam_for_everyone branch from 9ea2f70 to a1e0d0d Compare July 19, 2019 20:55
…extended functionality.

We actually have more generally supported attributes now, than dynamic-only :)
@Levovar Levovar force-pushed the ipam_for_everyone branch from fe92dd3 to fef9008 Compare July 22, 2019 20:53
@Levovar Levovar merged commit b571ad3 into master Jul 22, 2019
@Levovar Levovar deleted the ipam_for_everyone branch July 22, 2019 21:09
@Levovar Levovar changed the title DANM centralized, API driven API management extended to work for all CNI compliant backends DANM centralized, API driven IP management extended to work for all CNI compliant backends Jul 31, 2019
@Levovar Levovar added the major feature Features requiring thorough changes, and multiple PRs label Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major feature Features requiring thorough changes, and multiple PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant