Move documentation folder to individual READMEs
This commit is contained in:
88
plugins/meta/flannel/README.md
Normal file
88
plugins/meta/flannel/README.md
Normal file
@ -0,0 +1,88 @@
|
||||
# flannel plugin
|
||||
|
||||
## Overview
|
||||
This plugin is designed to work in conjunction with [flannel](https://github.com/coreos/flannel), a network fabric for containers.
|
||||
When flannel daemon is started, it outputs a `/run/flannel/subnet.env` file that looks like this:
|
||||
```
|
||||
FLANNEL_NETWORK=10.1.0.0/16
|
||||
FLANNEL_SUBNET=10.1.17.1/24
|
||||
FLANNEL_MTU=1472
|
||||
FLANNEL_IPMASQ=true
|
||||
```
|
||||
|
||||
This information reflects the attributes of flannel network on the host.
|
||||
The flannel CNI plugin uses this information to configure another CNI plugin, such as bridge plugin.
|
||||
|
||||
## Operation
|
||||
Given the following network configuration file and the contents of `/run/flannel/subnet.env` above,
|
||||
```
|
||||
{
|
||||
"name": "mynet",
|
||||
"type": "flannel"
|
||||
}
|
||||
```
|
||||
the flannel plugin will generate another network configuration file:
|
||||
```
|
||||
{
|
||||
"name": "mynet",
|
||||
"type": "bridge",
|
||||
"mtu": 1472,
|
||||
"ipMasq": false,
|
||||
"isGateway": true,
|
||||
"ipam": {
|
||||
"type": "host-local",
|
||||
"subnet": "10.1.17.0/24"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
It will then invoke the bridge plugin, passing it the generated configuration.
|
||||
|
||||
As can be seen from above, the flannel plugin, by default, will delegate to the bridge plugin.
|
||||
If additional configuration values need to be passed to the bridge plugin, it can be done so via the `delegate` field:
|
||||
```
|
||||
{
|
||||
"name": "mynet",
|
||||
"type": "flannel",
|
||||
"delegate": {
|
||||
"bridge": "mynet0",
|
||||
"mtu": 1400
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This supplies a configuration parameter to the bridge plugin -- the created bridge will now be named `mynet0`.
|
||||
Notice that `mtu` has also been specified and this value will not be overwritten by flannel plugin.
|
||||
|
||||
Additionally, the `delegate` field can be used to select a different kind of plugin altogether.
|
||||
To use `ipvlan` instead of `bridge`, the following configuration can be specified:
|
||||
|
||||
```
|
||||
{
|
||||
"name": "mynet",
|
||||
"type": "flannel",
|
||||
"delegate": {
|
||||
"type": "ipvlan",
|
||||
"master": "eth0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Network configuration reference
|
||||
|
||||
* `name` (string, required): the name of the network
|
||||
* `type` (string, required): "flannel"
|
||||
* `subnetFile` (string, optional): full path to the subnet file written out by flanneld. Defaults to /run/flannel/subnet.env
|
||||
* `dataDir` (string, optional): path to directory where plugin will store generated network configuration files. Defaults to `/var/lib/cni/flannel`
|
||||
* `delegate` (dictionary, optional): specifies configuration options for the delegated plugin.
|
||||
|
||||
flannel plugin will always set the following fields in the delegated plugin configuration:
|
||||
|
||||
* `name`: value of its "name" field.
|
||||
* `ipam`: "host-local" type will be used with "subnet" set to `$FLANNEL_SUBNET`.
|
||||
|
||||
flannel plugin will set the following fields in the delegated plugin configuration if they are not present:
|
||||
* `ipMasq`: the inverse of `$FLANNEL_IPMASQ`
|
||||
* `mtu`: `$FLANNEL_MTU`
|
||||
|
||||
Additionally, for the bridge plugin, `isGateway` will be set to `true`, if not present.
|
34
plugins/meta/tuning/README.md
Normal file
34
plugins/meta/tuning/README.md
Normal file
@ -0,0 +1,34 @@
|
||||
# tuning plugin
|
||||
|
||||
## Overview
|
||||
|
||||
This plugin can change some system controls (sysctls) in the network namespace.
|
||||
It does not create any network interfaces and therefore does not bring connectivity by itself.
|
||||
It is only useful when used in addition to other plugins.
|
||||
|
||||
## Operation
|
||||
The following network configuration file
|
||||
```
|
||||
{
|
||||
"name": "mytuning",
|
||||
"type": "tuning",
|
||||
"sysctl": {
|
||||
"net.core.somaxconn": "500"
|
||||
}
|
||||
}
|
||||
```
|
||||
will set /proc/sys/net/core/somaxconn to 500.
|
||||
Other sysctls can be modified as long as they belong to the network namespace (`/proc/sys/net/*`).
|
||||
|
||||
A successful result would simply be:
|
||||
```
|
||||
{ }
|
||||
```
|
||||
|
||||
## Network sysctls documentation
|
||||
|
||||
Some network sysctls are documented in the Linux sources:
|
||||
|
||||
- [Documentation/sysctl/net.txt](https://www.kernel.org/doc/Documentation/sysctl/net.txt)
|
||||
- [Documentation/networking/ip-sysctl.txt](https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt)
|
||||
- [Documentation/networking/](https://www.kernel.org/doc/Documentation/networking/)
|
Reference in New Issue
Block a user