17 Commits

Author SHA1 Message Date
Tomofumi Hayashi
a069a5f1a3 Support "args" in static and tuning
Support "args" field in JSON config to additional configuration
in static and tuning plugins.
2019-08-09 11:52:06 +09:00
Tomofumi Hayashi
8902d2614a Remove link Down/Up in MAC address change to prevent route flush 2019-08-07 13:54:10 +09:00
Tomofumi Hayashi
660685a8af Support ips capability in static and mac capability in tuning
This change introduces new capability flag to change MAC address
and to specify IP addresses by tuning and static.
2019-06-20 17:11:47 +09:00
Casey Callendrello
72f2a1ffd4 plugins: correctly output build version, cosmetic cleanups
Now that libcni has the ability to print a version message, plumb it
through correctly.

While we're at it,
- fix import paths
- run gofmt
- add some more comments to sample
- add container runtime swappability for release
2019-04-15 16:52:07 +02:00
Michael Cambria
74a2596573 Add check support for: bridge, ipvlan, macvlan, p2p, vlan and host-device main plugins
host-local and static ipam plugins
  tuning, bandwidth and portmap meta plugins

  Utility functions created for common PrevResult checking

  Fix windows build
2019-04-03 13:08:07 -04:00
Tomofumi Hayashi
9425d24c28 Incorporate @jelloneck/@bboreham/@squeed's comments. 2018-08-09 22:28:12 +09:00
Tomofumi Hayashi
635cb22f12 Merge remote-tracking branch 'origin/master' into tuninig-iplink 2018-08-09 21:43:33 +09:00
Tomofumi Hayashi
3a7f254a63 Introduce iplink(MTU MAC and promiscas) feature into tuning
This change adds 'ip link' command related feature into tuning
meta cni plugin. Currently MTU, MAC and promiscas mode are
supported.
2018-07-31 12:54:15 +09:00
Casey Callendrello
68b4efb405 plugins/* stub-out GET functions so plugins build with v0.7 2018-06-15 15:28:53 +02:00
Dan Williams
998a0f6c6a tuning: pass prevResult through 2017-07-26 14:39:01 -05:00
Casey Callendrello
3c436520be move most of cni/pkg to plugins/pkg: delete code staying in cni/pkg
This moves the following packages to this repository:
* ip
* ipam
* ns
* testutils
* utils
2017-05-23 16:12:49 +02:00
Dan Williams
d5acb127b8 spec/plugins: return interface details and multiple IP addresses to runtime
Updates the spec and plugins to return an array of interfaces and IP details
to the runtime including:

- interface names and MAC addresses configured by the plugin
- whether the interfaces are sandboxed (container/VM) or host (bridge, veth, etc)
- multiple IP addresses configured by IPAM and which interface they
have been assigned to

Returning interface details is useful for runtimes, as well as allowing
more flexible chaining of CNI plugins themselves.  For example, some
meta plugins may need to know the host-side interface to be able to
apply firewall or traffic shaping rules to the container.
2017-01-25 11:31:18 -06:00
Dan Williams
befb95977c types: make Result an interface and move existing Result to separate package 2017-01-25 11:31:18 -06:00
Gabe Rosenhouse
536cb5b99b versioning: plugins report a list of supported versions
Further progress on versioning support (Issue #266).
Bump CNI spec version to 0.3.0
2016-09-02 11:26:17 -04:00
Dan Williams
c0d34c692f ns: add interface, use it, and fix thread-related namespace switch issues
Add a namespace object interface for somewhat cleaner code when
creating and switching between network namespaces.  All created
namespaces are now mounted in /var/run/netns to ensure they
have persistent inodes and paths that can be passed around
between plugin components without relying on the current namespace
being correct.

Also remove the thread-locking arguments from the ns package
per https://github.com/appc/cni/issues/183 by doing all the namespace
changes in a separate goroutine that locks/unlocks itself, instead of
the caller having to track OS thread locking.
2016-05-20 17:10:25 -05:00
Stefan Junker
ed5f8dfeb2 *: appc/cni -> containernetworking/cni
The project has been moved so internally we simply rename everything.
Consumers are recommended to update their vendored version of cni.
2016-05-06 16:40:27 +02:00
Alban Crequy
f49145d5ff new plugin: tuning
Allow users to tune net network parameters such as somaxconn.

With this patch, users can add a new network configuration:

> {
>   "name": "mytuning",
>   "type": "tuning",
>   "sysctl": {
>           "net.core.somaxconn": "500"
>   }
> }

The value /proc/sys/net/core/somaxconn will be set to 500 in the network
namespace but will remain unchanged on the host.

Only sysctl parameters that belong to the network subsystem can be
modified.

Related to: https://github.com/coreos/rkt/pull/2140
2016-02-18 15:29:12 +01:00