From: Gabe Rosenhouse Date: Wed, 5 Jul 2017 15:32:19 +0000 (-0700) Subject: Merge pull request #427 from squeed/convention-chaining X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=a2da8f8d7fd8e6dc25f336408a8ac86f050fbd88;p=cni.git Merge pull request #427 from squeed/convention-chaining Conventions: add convention around chaining interfaces --- a2da8f8d7fd8e6dc25f336408a8ac86f050fbd88 diff --cc CONVENTIONS.md index 9222f3e,92a1f47..76a8762 --- a/CONVENTIONS.md +++ b/CONVENTIONS.md @@@ -97,6 -97,12 +97,12 @@@ CNI_ARGS formed part of the original CN The use of `CNI_ARGS` is deprecated and "args" should be used instead. | Field | Purpose| Spec and Example | Runtime implementations | Plugin Implementations | -| ------ | ------ | ------ | ------ | ------ | ------ | +| ------ | ------ | ---------------- | ----------------------- | ---------------------- | | IP | Request a specific IP from IPAM plugins | IP=192.168.10.4 | *rkt* supports passing additional arguments to plugins and the [documentation](https://coreos.com/rkt/docs/latest/networking/overriding-defaults.html) suggests IP can be used. | host-local (since version v0.2.0) supports the field for IPv4 only - [documentation](https://github.com/containernetworking/cni/blob/master/Documentation/host-local.md#supported-arguments).| - + + ## Chained Plugins + If plugins are agnostic about the type of interface created, they SHOULD work in a chained mode and configure existing interfaces. Plugins MAY also create the desired interface when not run in a chain. + + For example, the `bridge` plugin adds the host-side interface to a bridge. So, it should accept any previous result that includes a host-side interface, including `tap` devices. If not called as a chained plugin, it creates a `veth` pair first. + + Plugins that meet this convention are usable by a larger set of runtimes and interfaces, including hypervisors and DPDK providers.