Skip to content

Commit

Permalink
Add annotations and labels to the Spec.
Browse files Browse the repository at this point in the history
Signed-off-by: Vishnu kannan <vishnuk@google.com>
  • Loading branch information
vishh committed Mar 9, 2016
1 parent 0c2892b commit 1c49f4d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ type Spec struct {
Mounts []Mount `json:"mounts"`
// Hooks are the commands run at various lifecycle events of the container.
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.
Expand Down
13 changes: 13 additions & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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

0 comments on commit 1c49f4d

Please sign in to comment.