Skip to content

Commit a878558

Browse files
committed
Add labels to the state
`Labels` is used to store some runtime specified informations, these informations may be meaningless to other runtime, but it's userful for the same runtime to operate this container. Signed-off-by: Gao feng <[email protected]>
1 parent ab4acc0 commit a878558

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

config.go

+2
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,6 @@ type State struct {
6767
Pid int `json:"pid"`
6868
// BundlePath is the path to the container's bundle directory.
6969
BundlePath string `json:"bundlePath"`
70+
// Labels holds runtime-specified information that is not structured by this specification
71+
Labels map[string]interface{} `json:"labels"`
7072
}

runtime.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ This allows the hooks to perform cleanup and teardown logic after the runtime de
2222
* **`pid`**: (int) is the ID of the main process within the container, as seen by the host.
2323
* **`bundlePath`**: (string) is the absolute path to the container's bundle directory.
2424
This is provided so that consumers can find the container's configuration and root filesystem on the host.
25+
* **`Labels`**: (map) Labels holds runtime-specified information that is not structured by this specification
26+
The runtime could store experimental information here before it's standardized in this specification.
2527

2628
*Example*
2729

0 commit comments

Comments
 (0)