From 9cb0c7fa6cda22302efb4501365df9d4a5327f52 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Thu, 2 Jun 2016 13:21:18 -0700 Subject: [PATCH] Add annotations to the state json Signed-off-by: Doug Davis --- runtime.md | 7 ++++++- specs-go/state.go | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/runtime.md b/runtime.md index 386a042a8..392a43c35 100644 --- a/runtime.md +++ b/runtime.md @@ -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: @@ -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" + } } ``` diff --git a/specs-go/state.go b/specs-go/state.go index d3ad79d9c..91a87f8e6 100644 --- a/specs-go/state.go +++ b/specs-go/state.go @@ -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"` }