Skip to content

Commit 9987e84

Browse files
author
Doug Davis
committed
Add annotations to the state json
Signed-off-by: Doug Davis <[email protected]>
1 parent 91c8ddc commit 9987e84

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

runtime.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ The value MAY be one of:
2323
* **`pid`**: (int) is the ID of the main process within the container, as seen by the host.
2424
* **`bundlePath`**: (string) is the absolute path to the container's bundle directory.
2525
This is provided so that consumers can find the container's configuration and root filesystem on the host.
26+
* **`annotations`**: (map) contains the list of annotations associated with the container.
27+
If no annotations were provided then this property MAY either be absent or an empty map.
2628

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

@@ -33,6 +35,9 @@ When serialized in JSON, the format MUST adhere to the following pattern:
3335
"status": "running",
3436
"pid": 4422,
3537
"bundlePath": "/containers/redis"
38+
"annotations": {
39+
"myKey": "myValue"
40+
}
3641
}
3742
```
3843

specs-go/state.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ type State struct {
1010
Pid int `json:"pid"`
1111
// BundlePath is the path to the container's bundle directory.
1212
BundlePath string `json:"bundlePath"`
13+
// Annotations are the annotations associated with the container.
14+
Annotations map[string]string `json:"annotations"`
1315
}

0 commit comments

Comments
 (0)