Skip to content

Commit 34901c1

Browse files
author
Mrunal Patel
committed
Merge pull request #484 from duglin/ShowAnnot
Add annotations to the state json
2 parents fddb3e5 + 9cb0c7f commit 34901c1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

runtime.md

Lines changed: 6 additions & 1 deletion
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

@@ -32,7 +34,10 @@ When serialized in JSON, the format MUST adhere to the following pattern:
3234
"id": "oci-container1",
3335
"status": "running",
3436
"pid": 4422,
35-
"bundlePath": "/containers/redis"
37+
"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)