Skip to content

Commit fd698a8

Browse files
committed
minor documentation improvements
1 parent 1e67527 commit fd698a8

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ We welcome contributions. In addition to signing your work as described in
55
the section below we ask that the following guidelines be considered when
66
opening, reviewing, and merging pull requests.
77

8-
* No one should merge their own code or code from their own organzation
8+
* No one should merge their own code or code from their own organization
99
* Reviewers should included people from an organization that is not your own
1010
* If no changes have been requested by other reviewers the (last) reviewer
1111
merges the pull request on approval

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
## What is CDI?
66

7-
CDI (Container Device Interface), is a [specification](SPEC.md), for container-
8-
runtimes, to support third-party devices.
7+
CDI (Container Device Interface), is a [specification](SPEC.md), for container-runtimes, to support third-party devices.
98

109
It introduces an abstract notion of a device as a resource. Such devices are
1110
uniquely specified by a fully-qualified name that is constructed from a vendor
@@ -24,7 +23,7 @@ handled by the orchestrator). Because of this focus, the CDI specification is
2423
simple to implement and allows great flexibility for runtimes and orchestrators.
2524

2625
Note: The CDI model is based on the Container Networking Interface (CNI) model
27-
and specification.
26+
and [specification](https://github.com/containernetworking/cni/blob/main/SPEC.md).
2827

2928
## Why is CDI needed?
3029

@@ -35,8 +34,8 @@ more complex, vendors want to perform more operations, such as:
3534
- Exposing a device to a container can require exposing more than one device
3635
node, mounting files from the runtime namespace, or hiding procfs entries.
3736
- Performing compatibility checks between the container and the device (e.g: Can
38-
this container run on this device).
39-
- Performing runtime-specific operations (e.g: VM vs Linux containers-based
37+
this container run on this device?).
38+
- Performing runtime-specific operations (e.g: VM vs Linux container-based
4039
runtimes).
4140
- Performing device-specific operations (e.g: scrubbing the memory of a GPU or
4241
reconfiguring an FPGA).
@@ -46,7 +45,7 @@ write and maintain multiple plugins for different runtimes or even directly
4645
contribute vendor-specific code in the runtime. Additionally, runtimes don't
4746
uniformly expose a plugin system (or even expose a plugin system at all) leading
4847
to duplication of the functionality in higher-level abstractions (such as
49-
Kubernetes device plugins).
48+
[Kubernetes device plugins](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/)).
5049

5150
## How does CDI work?
5251

@@ -66,7 +65,7 @@ For CDI to work the following needs to be done:
6665
### CRI-O configuration
6766

6867
In CRI-O CDI support is enabled by default. It is configured with the default
69-
`/etc/cdi, /var/run/cdi` CDI directory locations. Therefore you can start using
68+
`/etc/cdi, /var/run/cdi` CDI directory locations. Therefore, you can start using
7069
CDI simply by dropping CDI configuration files in either of those directories,
7170
static configuration into `/etc/cdi` and dynamically updated one into
7271
`/var/run/cdi`. If you are unsure of the configured directories you can run this

SPEC.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
- [Version](#version)
44
- [Overview](#overview)
55
- [General considerations](#general-considerations)
6-
- [CDI JSON Specification](#well-known-error-codes)
7-
- [CDI CLI Specification](#well-known-error-codes)
6+
- [CDI JSON Specification](#cdi-json-specification)
7+
- [Error Handling](#error-handling)
88

99
## Version
1010

@@ -72,7 +72,7 @@ For the purposes of this proposal, we define the following terms:
7272
- _container runtime_ which refers to the higher level component users tend to interact with for managing containers. It may also include lower level components that implement management of containers and pods (sets of containers). e.g: docker, podman, ...
7373
- _container runtime interface integration_ which refers to a server that implements the Container Runtime Interface (CRI) services, e.g: containerd+cri, cri-o, ...
7474

75-
The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may" and "optional" are used as specified in [RFC 2119][rfc-2119].
75+
The keywords "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may" and "optional" are used as specified in [RFC 2119][rfc-2119].
7676

7777
[rfc-2119]: https://www.ietf.org/rfc/rfc2119.txt
7878

@@ -186,11 +186,11 @@ Note: For a CDI file to be valid, at least one entry must be specified in this a
186186

187187
#### OCI Edits
188188

189-
The `containerEdits` field describes edits to be made to the OCI specification. Currently the following kinds of edits can be made to the OCI specification: `env`, `devices`, `mounts` and `hooks`.
189+
The `containerEdits` field describes edits to be made to the OCI specification. Currently, the following kinds of edits can be made to the OCI specification: `env`, `devices`, `mounts` and `hooks`.
190190

191191
The `containerEdits` field is referenced in two places in the specification:
192192
* At the device level, where the edits MUST only be made if the matching device is requested by the container runtime user.
193-
* At the container level, where the edits MUST be made if any of the of the device defined in the `devices` field are requested.
193+
* At the container level, where the edits MUST be made if any of the device defined in the `devices` field are requested.
194194

195195

196196
The `containerEdits` field has the following definition:
@@ -223,11 +223,11 @@ The `containerEdits` field has the following definition:
223223

224224
## Error Handling
225225
* Kind requested is not present in any CDI file.
226-
Container runtimes should surface an error when a non existent kind is requested.
226+
Container runtimes should surface an error when a non-existent kind is requested.
227227
* Device (not device node) Requested does not exist.
228228
Container runtimes should surface this error when a non existent device is requested.
229229
* "Resource" does not exist (e.g: Mount, Hook, ...).
230-
Container runtimes should surface this error when a non existent "resource" is requested (e.g: at "run" time).
231-
This is because a resource does not need to exist when the spec is written but it needs to exist when the container is created.
230+
Container runtimes should surface this error when a non-existent "resource" is requested (e.g: at "run" time).
231+
This is because a resource does not need to exist when the spec is written, but it needs to exist when the container is created.
232232
* Hook fails to execute.
233233
Container runtimes should surface an error when hooks fails to execute.

0 commit comments

Comments
 (0)