Skip to content

Commit 9dbe53c

Browse files
committed
Remove unused containerRuntime field from CDI spec
This change removes the unused containerRuntime field from the CDI spec to simplify the initial integrations with runtimes. This field can be added in an updated spec version if required. Signed-off-by: Evan Lezar <[email protected]>
1 parent a67ba21 commit 9dbe53c

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

SPEC.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ The key words "must", "must not", "required", "shall", "shall not", "should", "s
7070
{
7171
"cdiVersion": "0.1.0",
7272
"kind": "<name>",
73-
"containerRuntime": ["<container-runtime-name>"], (optional)
7473
7574
"devices": [
7675
{
@@ -97,7 +96,7 @@ The key words "must", "must not", "required", "shall", "shall not", "should", "s
9796
"major": <int32> (optional),
9897
"minor": <int32> (optional),
9998
// file mode for the device
100-
"fileMode": <int> (optional),
99+
"fileMode": <int> (optional),
101100
// Cgroups permissions of the device, candidates are one or more of
102101
// * r - allows container to read from the specified device.
103102
// * w - allows container to write to the specified device.
@@ -143,12 +142,6 @@ The key words "must", "must not", "required", "shall", "shall not", "should", "s
143142
* Valid: `vendor.com/foo`, `foo.bar.baz/foo-bar123.B_az`.
144143
* Invalid: `foo`, `vendor.com/foo/`, `vendor.com/foo/bar`.
145144

146-
#### Container Runtime
147-
148-
* `containerRuntime` (array of string, OPTIONAL) indicates that this CDI specification targets only a specific container runtime.
149-
If this field is indicated, the container runtime MUST use the one that matches its name if non exists it should use the one that does not indicate any `containerRuntime` value.
150-
Possible values (not an exhaustive list): docker, podman, gvisor, lxc
151-
152145
#### CDI Devices
153146

154147
The `devices` field describes the set of hardware devices that can be requested by the container runtime user.
@@ -203,8 +196,6 @@ The `containerEdits` field has the following definition:
203196
* `timeout` (int, OPTIONAL) is the number of seconds before aborting the hook. If set, timeout MUST be greater than zero. If not set container runtime will wait for the hook to return.
204197

205198
## Error Handling
206-
* Two or more files with identical `kind` values and identical `containerRuntime` field.
207-
Container runtimes should surface this error when any device with that `kind` is requested.
208199
* Kind requested is not present in any CDI file.
209200
Container runtimes should surface an error when a non existent kind is requested.
210201
* Device (not device node) Requested does not exist.

schema/schema.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
"description": "The kind of the device usually of the form 'vendor.com/device'",
1212
"type": "string"
1313
},
14-
"containerRuntime": {
15-
"description": "A list of container runtimes this spec applies to",
16-
"$ref": "defs.json#/definitions/ArrayOfStrings"
17-
},
1814
"devices": {
1915
"type": "array",
2016
"items": {

specs-go/config.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ const CurrentVersion = "0.2.0"
77

88
// Spec is the base configuration for CDI
99
type Spec struct {
10-
Version string `json:"cdiVersion"`
11-
Kind string `json:"kind"`
12-
ContainerRuntime []string `json:"containerRuntime,omitempty"`
10+
Version string `json:"cdiVersion"`
11+
Kind string `json:"kind"`
1312

1413
Devices []Device `json:"devices"`
1514
ContainerEdits ContainerEdits `json:"containerEdits,omitempty"`

0 commit comments

Comments
 (0)