-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add text about extensions #510
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,15 +324,24 @@ The semantics are the same as `Path`, `Args` and `Env` in [golang Cmd](https://g | |
|
||
**`annotations`** (object, optional) contains arbitrary metadata for the container. | ||
This information MAY be structured or unstructured. | ||
Annotations are key-value maps. | ||
Annotations MUST be a key-value map where both the key and value MUST be strings. | ||
While the value MUST be present, it MAY be an empty string. | ||
Keys MUST be unique within this map, and best practice is to namespace the keys. | ||
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`. | ||
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by subsequent specifications. | ||
If there are no annotations then this property MAY either be absent or an empty map. | ||
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown annotation key. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. “MUST NOT generate an error” doesn't say how they should handle unknown entries. I think we should follow HTML's:
In our case, maybe wording like:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And while I abbreviated the “Implementations that are reading/processing this configuration” wording in my suggestion above, I think we should probably just go with “Runtimes”. Do you have other consumers in mind with your more general wording? |
||
|
||
```json | ||
"annotations": { | ||
"key1" : "value1", | ||
"key2" : "value2" | ||
"com.example.gpu-cores" : "2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While touching these lines, we have an opportunity to follow
|
||
} | ||
``` | ||
|
||
## Extensibility | ||
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unkown property. | ||
Instead they MUST ignore unknown properties. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can combine these last two sentences along the same lines as my annotation suggestion. |
||
|
||
## Configuration Schema Example | ||
|
||
Here is a full example `config.json` for reference. | ||
|
@@ -683,8 +692,8 @@ Here is a full example `config.json` for reference. | |
"mountLabel": "system_u:object_r:svirt_sandbox_file_t:s0:c715,c811" | ||
}, | ||
"annotations": { | ||
"key1": "value1", | ||
"key2": "value2" | ||
"com.example.key1": "value1", | ||
"com.example.key2": "value2" | ||
} | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the trailing dot for
org.opencontainers.
.“subsequent specifications” is unclear to me. Can we follow image-spec and use “… are reserved for future versions of the specification.”?