Skip to content

Commit be6ec5f

Browse files
committed
Adding cgroups path to the Spec.
Signed-off-by: Vishnu Kannan <[email protected]>
1 parent 138deee commit be6ec5f

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

runtime-config-linux.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ Next parameters can be specified:
130130
Also known as cgroups, they are used to restrict resource usage for a container and handle
131131
device access. cgroups provide controls to restrict cpu, memory, IO, and network for
132132
the container. For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt).
133+
The path to the cgroups can be specified in the Spec. The path is expected to be relative
134+
to the cgroups mount point. The Spec does not support split hierarchy. The cgroups will be
135+
created if they don't exist.
136+
137+
```json
138+
"cgroupsPath": "/myRuntime/myContainer"
139+
```
133140

134141
## Sysctl
135142

runtime_config_linux.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ type LinuxRuntime struct {
2121
// Resources contain cgroup information for handling resource constraints
2222
// for the container
2323
Resources Resources `json:"resources"`
24+
// CgroupsPath specifies the path to cgroups that are created and/or joined by the container.
25+
// The path is expected to be relative to the cgroups mountpoint.
26+
CgroupsPath string `json:"cgroupsPath"`
2427
// Namespaces contains the namespaces that are created and/or joined by the container
2528
Namespaces []Namespace `json:"namespaces"`
2629
// Devices are a list of device nodes that are created and enabled for the container

0 commit comments

Comments
 (0)