docs: minor improvements to spec-upgrades

This commit is contained in:
Gabe Rosenhouse
2017-02-27 07:11:04 -08:00
parent 1061ef1eb9
commit 2aa863dab7

View File

@ -86,11 +86,11 @@ interface implemented by concrete struct types in the `types/current` and
`types/020` subpackages. `types/020` subpackages.
Internally, plugins should use the `types/current` structs, and convert Internally, plugins should use the `types/current` structs, and convert
to or from specific versions when required. In most plugins, the only to or from specific versions when required. A typical plugin will only need
conversion required will at completion time, when it prints the result as to do a single conversion. That is when it is about to complete and needs to
JSON to stdout. At that point, the result should be printed in the format print the result JSON in the correct format to stdout. The library
requested by the `cniVersion` field present in the network configuration. function `types.PrintResult()` simplifies this by converting and printing in
Use the library function `types.PrintResult()` for that. a single call.
Additionally, the plugin should advertise which CNI Spec versions it supports Additionally, the plugin should advertise which CNI Spec versions it supports
via the 3rd argument to `skel.PluginMain()`. via the 3rd argument to `skel.PluginMain()`.
@ -151,7 +151,7 @@ Other examples of spec v0.3.0-compatible plugins are the
This section provides guidance for upgrading container runtimes to support This section provides guidance for upgrading container runtimes to support
CNI Spec Version 0.3.0. CNI Spec Version 0.3.0.
### General guidance for all runtimes ### General guidance for all runtimes (language agnostic)
#### Support multiple CNI spec versions #### Support multiple CNI spec versions
To provide the smoothest upgrade path and support the broadest range of CNI To provide the smoothest upgrade path and support the broadest range of CNI