Skip to content

Commit c41523b

Browse files
committed
policy: Collect established policies in a discoverable location
So we have something to cite to avoid rehashing established decisions. Provide some motivation and links to the backing discussion so folks can re-open these if they have new information that wasn't covered in the original decision. Like the glossary (1873498, glossary: Provide a quick overview of important terms, 2015-08-11, #107), I've used subsection titles for each entry to get link anchors. Signed-off-by: W. Trevor King <[email protected]>
1 parent 2fd5ad6 commit c41523b

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ DOC_FILES := \
44
README.md \
55
code-of-conduct.md \
66
principles.md \
7+
policy.md \
78
ROADMAP.md \
89
implementations.md \
910
bundle.md \

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
Table of Contents
77

88
- [Container Principles](principles.md)
9+
- [Specification Policies](policy.md)
910
- [Filesystem Bundle](bundle.md)
1011
- Configuration
1112
- [Container Configuration](config.md)

policy.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Policies and conventions
2+
3+
## Traditionally hex settings should use JSON integers, not JSON strings
4+
5+
The config JSON isn't enough of a UI to be worth jumping through string ↔ integer hoops to support an 0x… form ([source][integer-over-hex]).
6+
7+
## Constant names should keep redundant prefixes
8+
9+
For example, `CAP_KILL` instead of `KILL` in [**`linux.capabilities`**][capabilities]).
10+
The redundancy reduction from removing the namespacing prefix is not useful enough to be worth trimming the upstream identifier ([source][keep-prefix]).
11+
12+
## Optional settings should have pointer Go types
13+
14+
So we have a consistent way to identify unset values ([source][optional-pointer]).
15+
16+
[capabilities]: config-linux.md#capabilities
17+
[integer-over-hex]: https://github.com/opencontainers/specs/pull/267#discussion_r48360013
18+
[keep-prefix]: https://github.com/opencontainers/specs/pull/159#issuecomment-138728337
19+
[optional-pointer]: https://github.com/opencontainers/specs/pull/233#discussion_r47829711

0 commit comments

Comments
 (0)