diff options
| author | Brian Grant <briangrant@google.com> | 2015-08-27 21:12:06 +0000 |
|---|---|---|
| committer | Brian Grant <briangrant@google.com> | 2015-09-01 20:33:59 +0000 |
| commit | ca9f771cf90bd88378a3e6b0cee9f1dcfeea58c7 (patch) | |
| tree | 63da8ae2a17bb88bdb80260eead2ca129c6e334d /api-conventions.md | |
| parent | cda298a5a0c75419481754b80077d77fbf23b7e8 (diff) | |
Start on expanding code expectations (aka "The bar")
Diffstat (limited to 'api-conventions.md')
| -rw-r--r-- | api-conventions.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/api-conventions.md b/api-conventions.md index f00dde1e..746d56cb 100644 --- a/api-conventions.md +++ b/api-conventions.md @@ -713,6 +713,13 @@ Annotations have very different intended usage from labels. We expect them to be In fact, experimental API fields, including to represent fields of newer alpha/beta API versions in the older, stable storage version, may be represented as annotations with the prefix `experimental.kubernetes.io/`. +Other advice regarding use of labels, annotations, and other generic map keys by Kubernetes components and tools: + - Key names should be all lowercase, with words separated by dashes, such as `desired-replicas` + - Prefix the key with `kubernetes.io/` or `foo.kubernetes.io/`, preferably the latter if the label/annotation is specific to `foo` + - For instance, prefer `service-account.kubernetes.io/name` over `kubernetes.io/service-account.name` + - Use annotations to store API extensions that the controller responsible for the resource doesn't need to know about, experimental fields that aren't intended to be generally used API fields, etc. Beware that annotations aren't automatically handled by the API conversion machinery. + + <!-- BEGIN MUNGE: GENERATED_ANALYTICS --> []() |
