You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A network configuration consists of a JSON object with the following keys:
108
109
109
110
-`cniVersion` (string): [Semantic Version 2.0](https://semver.org) of CNI specification to which this configuration list and all the individual configurations conform. Currently "1.1.0"
111
+
-`cniVersions` (string list): List of all CNI versions which this configuration supports. See [version selection](#version-selection) below.
110
112
-`name` (string): Network name. This should be unique across all network configurations on a host (or other administrative domain). Must start with an alphanumeric character, optionally followed by any combination of one or more alphanumeric characters, underscore, dot (.) or hyphen (-).
111
113
-`disableCheck` (boolean): Either `true` or `false`. If `disableCheck` is `true`, runtimes must not call `CHECK` for this network configuration list. This allows an administrator to prevent `CHECK`ing where a combination of plugins is known to return spurious errors.
112
114
-`plugins` (list): A list of CNI plugins and their configuration, which is a list of plugin configuration objects.
@@ -147,6 +149,7 @@ Plugins may define additional fields that they accept and may generate an error
@@ -185,6 +188,15 @@ Plugins may define additional fields that they accept and may generate an error
185
188
}
186
189
```
187
190
191
+
### Version considerations
192
+
193
+
CNI runtimes, plugins, and network configurations may support multiple CNI specification versions independently. Plugins indicate their set of supported versions through the VERSION command, while network configurations indicate their set of supported versions through the `cniVersion` and `cniVersions` fields.
194
+
195
+
CNI runtimes MUST select the highest supported version from the set of network configuration versions given by the `cniVersion` and `cniVersions` fields. Runtimes MAY consider the set of supported plugin versions as reported by the VERSION command when determining available versions.
196
+
197
+
198
+
The CNI protocol follows Semantic Versioning principles, so the configuration format MUST remain backwards and forwards compatible within major versions.
199
+
188
200
## Section 2: Execution Protocol
189
201
190
202
### Overview
@@ -471,7 +483,7 @@ The network configuration format (which is a list of plugin configurations to ex
471
483
The request configuration for a single plugin invocation is also JSON. It consists of the plugin configuration, primarily unchanged except for the specified additions and removals.
472
484
473
485
The following fields are always to be inserted into the request configuration by the runtime:
474
-
-`cniVersion`: taken from the `cniVersion` field of the network configuration
486
+
-`cniVersion`: the protocol version selected by the runtime - the string "1.1.0"
475
487
-`name`: taken from the `name` field of the network configuration
476
488
477
489
@@ -596,7 +608,7 @@ Example:
596
608
597
609
Plugins should output a JSON object with the following keys if they encounter an error:
598
610
599
-
-`cniVersion`: The same value as provided by the configuration
611
+
-`cniVersion`: The protocol version in use - "1.1.0"
600
612
-`code`: A numeric error code, see below for reserved codes.
601
613
-`msg`: A short message characterizing the error.
602
614
-`details`: A longer message describing the error.
0 commit comments