forked from containernetworking/plugins
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add features: host netns + route source interface (#5)
* add more features to ptp plugin * add option "host_netns" in configuration to move the host veth interface in a specific netns * add options "route_source_interface_ipv4/ipv6" to change source IP used in routes configured by the IPAM plugin * add option "sysctl", taking as input the same format of configuration than the "tuning" plugin to configure sysctl parameters in the container netns * fix: close destNetns fd * fix: ensure to convert configuration passed to tuning plugin * result needs to be converted to the right CNI version before passing it to another plugin * fix: remove link-local ipv6 address from the address list * when using route_source_interface, we expect to have a single IP configured on the interface, however in IPv6, there is always a link local address configured in addition to the one provided by the IPAM plugin * getIntfIP function was returning an error as we were seeing 2 addresses instead of 1, now we filter this link-local address to fix it * tests: add tests for new options on ptp plugin * fix: handle default route IPv4/IPv6 when replacing src IP * default route in IPv4 and IPv6 is equivalent to a Dst = nil in a route filter * cover new features introduced in ptp in cmdCheck * we must check that all the new config parameters have been correctly set on the host/container netns * tests: add routes to the test case config * fix: defer netns closure after checking error * tests, lint: fix ineffassign errors raised by linter * lint: remove extra line * remove mentions to Criteo * feat: remove sysctl * the sysctl feature might be unnecessary as we could configure sysctl parameters on the host itself, or via the mesos isolator * we'll repropose that feature again if this is needed
- Loading branch information
Showing
2 changed files
with
359 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.