Skip to content

Commit 527a3ee

Browse files
committed
Merge pull request #64 from cyphar/add-pids-cgroup
spec: linux: add support for the PIDs cgroup
2 parents 34cd33b + 834fb5d commit 527a3ee

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

runtime-config-linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Next parameters can be specified:
128128
## Control groups
129129

130130
Also known as cgroups, they are used to restrict resource usage for a container and handle
131-
device access. cgroups provide controls to restrict cpu, memory, IO, and network for
131+
device access. cgroups provide controls to restrict cpu, memory, IO, pids and network for
132132
the container. For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt).
133133

134134
## Sysctl

runtime_config_linux.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ type CPU struct {
129129
Mems string `json:"mems"`
130130
}
131131

132+
type Pids struct {
133+
// Maximum number of PIDs. A value < 0 implies "no limit".
134+
Limit int64 `json:"limit"`
135+
}
136+
132137
// Network identification and priority configuration
133138
type Network struct {
134139
// Set class identifier for container's network packets
@@ -145,6 +150,8 @@ type Resources struct {
145150
Memory Memory `json:"memory"`
146151
// CPU resource restriction configuration
147152
CPU CPU `json:"cpu"`
153+
// Task resource restriction configuration.
154+
Pids Pids `json:"pids"`
148155
// BlockIO restriction configuration
149156
BlockIO BlockIO `json:"blockIO"`
150157
// Hugetlb limit (in bytes)

0 commit comments

Comments
 (0)