Merge pull request #331 from vishh/labels-annotations
Add annotations and labels to the Spec.
This commit is contained in:
commit
dae09c6a7d
|
@ -18,6 +18,8 @@ type Spec struct {
|
||||||
Mounts []Mount `json:"mounts"`
|
Mounts []Mount `json:"mounts"`
|
||||||
// Hooks are the commands run at various lifecycle events of the container.
|
// Hooks are the commands run at various lifecycle events of the container.
|
||||||
Hooks Hooks `json:"hooks"`
|
Hooks Hooks `json:"hooks"`
|
||||||
|
// Annotations is an unstructured key value map that may be set by external tools to store and retrieve arbitrary metadata.
|
||||||
|
Annotations map[string]string `json:"annotations,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process contains information to start a specific application inside the container.
|
// Process contains information to start a specific application inside the container.
|
||||||
|
|
13
config.md
13
config.md
|
@ -231,4 +231,17 @@ If a hook returns a non-zero exit code, then an error is logged and the remainin
|
||||||
`args` and `env` are optional.
|
`args` and `env` are optional.
|
||||||
The semantics are the same as `Path`, `Args` and `Env` in [golang Cmd](https://golang.org/pkg/os/exec/#Cmd).
|
The semantics are the same as `Path`, `Args` and `Env` in [golang Cmd](https://golang.org/pkg/os/exec/#Cmd).
|
||||||
|
|
||||||
|
## Annotations
|
||||||
|
|
||||||
|
Annotations are optional arbitrary non-identifying metadata that can be attached to containers.
|
||||||
|
This information may be large, may be structured or unstructured.
|
||||||
|
Annotations are key-value maps.
|
||||||
|
|
||||||
|
```json
|
||||||
|
"annotations": {
|
||||||
|
"key1" : "value1",
|
||||||
|
"key2" : "value2"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
[uts-namespace]: http://man7.org/linux/man-pages/man7/namespaces.7.html
|
[uts-namespace]: http://man7.org/linux/man-pages/man7/namespaces.7.html
|
||||||
|
|
Loading…
Reference in New Issue