11 Commits

Author SHA1 Message Date
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
Stefan Junker
abb6ee1dd1 docs/ptp: update example and DNS description 2016-01-29 10:39:28 +01:00
Alban Crequy
2f9ef4adb7 *: add "dns" field to the configuration
appc/cni#76 added a "dns" field in the result JSON. But before this
patch, the plugins had no way of knowing which name server to return.

There could be two ways of knowing which name server to return:
1. add it as an extra argument ("CNI_ARGS")
2. add it in the network configuration as a convenience (received via
   stdin)

I chose the second way because it is easier. In the case of rkt, it
means the user could just add the DNS name servers in
/etc/rkt/net.d/mynetwork.conf.
2016-01-26 18:54:56 +01:00
Eugene Yakubovich
20f1b8694f flannel: doc fix and check for missing subnet.env fields
- Document that flannel outputs FLANNEL_NETWORK b/c we use it
- Check and error out if expecited fields are missing in subnetEnv file

Fixes #72
2015-10-07 15:38:12 -07:00
Stefan Junker
6737bc8207 update ptp docs to reflect changes in plugin 2015-09-24 09:43:55 +02:00
Stefan Junker
1d398af124 host-local: allow ip request via CNI_ARGS
A specific IP can now be requested via the environment variable CNI_ARGS, e.g.
`CNI_ARGS=ip=1.2.3.4`.
The plugin will try to reserve the specified IP.
If this is not successful the execution will fail.
2015-09-04 01:38:22 +02:00
Alex Chan
ac0b5177a4 Fix a few spelling mistakes in the docs 2015-08-20 16:41:25 +01:00
Eugene Yakubovich
8c8753e409 Merge pull request #34 from eyakubovich/document-plugins
Document the plugins
2015-07-22 09:02:39 -07:00
Eugene Yakubovich
64f5cf9e82 Rename veth plugin to ptp and add docs.
ptp (point-to-point) better describes the nature of the plugin
as veth pairs are also used by the bridge plugin.
2015-07-21 17:20:11 -07:00
Eugene Yakubovich
9751c80740 Document the plugins
Adds a .md file to the Documentation/ folder for each plugin.

Fixes #16
2015-07-21 17:19:18 -07:00
Eugene Yakubovich
78daffc479 add flannel plugin
This introduces a notion of a "meta" plugin. A meta plugin
is one that delegates the actual work of setting up the interface
to the main plugin. The meta plugin is used to select and dynamically
configure the main plugin. The sequence of events, is as follows:

Given netconf like:

    {
	"name": "mynet",
	"type": "flannel",
	"delegate": {
	    "type": "bridge"
	}
    }

flannel fills in values like "mtu", "ipam.subnet" and delegates to
"bridge" main plugin. "bridge" plugin will operate as usual, calling
into ipam module for IP assignment.

Delegate dictionary should not contain "name" field as it will be
filled in by the flannel plugin.
2015-06-11 15:37:58 -07:00