Skip to content

Commit 8f3f59e

Browse files
author
Doug Davis
committed
Add text about extensions
Mimic opencontainers/image-spec#164 and they should be kept in-sync Signed-off-by: Doug Davis <dug@us.ibm.com>
1 parent d3c3763 commit 8f3f59e

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

config.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,24 @@ The semantics are the same as `Path`, `Args` and `Env` in [golang Cmd](https://g
324324

325325
**`annotations`** (object, optional) contains arbitrary metadata for the container.
326326
This information MAY be structured or unstructured.
327-
Annotations are key-value maps.
327+
Annotations MUST be key-value maps where both the key and value MUST be strings.
328+
While the value MUST be present, it MAY be an empty string.
329+
Keys MUST be unique, and best practice is to namespace the keys.
330+
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used.
331+
If there are no annotations then this property MAY either be absent or an empty map.
332+
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown annotation key.
328333

329334
```json
330335
"annotations": {
331-
"key1" : "value1",
332-
"key2" : "value2"
336+
"com.example/gpu-cores" : "2"
333337
}
334338
```
335339

340+
## Extensibility
341+
The `annotations` property MAY be used as an extensibility point to include additional information that is not defined as part of this specification.
342+
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unkown property.
343+
Instead they MUST ignore unknown properties.
344+
336345
## Configuration Schema Example
337346

338347
Here is a full example `config.json` for reference.

0 commit comments

Comments
 (0)