Skip to content
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 annotations to the state json #484

Merged
merged 1 commit into from
Jun 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ The value MAY be one of:
* **`pid`**: (int) is the ID of the main process within the container, as seen by the host.
* **`bundlePath`**: (string) is the absolute path to the container's bundle directory.
This is provided so that consumers can find the container's configuration and root filesystem on the host.
* **`annotations`**: (map) contains the list of annotations associated with the container.
If no annotations were provided then this property MAY either be absent or an empty map.

When serialized in JSON, the format MUST adhere to the following pattern:

Expand All @@ -32,7 +34,10 @@ When serialized in JSON, the format MUST adhere to the following pattern:
"id": "oci-container1",
"status": "running",
"pid": 4422,
"bundlePath": "/containers/redis"
"bundlePath": "/containers/redis",
"annotations": {
"myKey": "myValue"
}
}
```

Expand Down
2 changes: 2 additions & 0 deletions specs-go/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ type State struct {
Pid int `json:"pid"`
// BundlePath is the path to the container's bundle directory.
BundlePath string `json:"bundlePath"`
// Annotations are the annotations associated with the container.
Annotations map[string]string `json:"annotations"`
}