Merge pull request #64 from cyphar/add-pids-cgroup
spec: linux: add support for the PIDs cgroup
This commit is contained in:
commit
527a3eec38
|
@ -128,7 +128,7 @@ Next parameters can be specified:
|
||||||
## Control groups
|
## Control groups
|
||||||
|
|
||||||
Also known as cgroups, they are used to restrict resource usage for a container and handle
|
Also known as cgroups, they are used to restrict resource usage for a container and handle
|
||||||
device access. cgroups provide controls to restrict cpu, memory, IO, and network for
|
device access. cgroups provide controls to restrict cpu, memory, IO, pids and network for
|
||||||
the container. For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt).
|
the container. For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt).
|
||||||
|
|
||||||
## Sysctl
|
## Sysctl
|
||||||
|
|
|
@ -129,6 +129,11 @@ type CPU struct {
|
||||||
Mems string `json:"mems"`
|
Mems string `json:"mems"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Pids struct {
|
||||||
|
// Maximum number of PIDs. A value < 0 implies "no limit".
|
||||||
|
Limit int64 `json:"limit"`
|
||||||
|
}
|
||||||
|
|
||||||
// Network identification and priority configuration
|
// Network identification and priority configuration
|
||||||
type Network struct {
|
type Network struct {
|
||||||
// Set class identifier for container's network packets
|
// Set class identifier for container's network packets
|
||||||
|
@ -145,6 +150,8 @@ type Resources struct {
|
||||||
Memory Memory `json:"memory"`
|
Memory Memory `json:"memory"`
|
||||||
// CPU resource restriction configuration
|
// CPU resource restriction configuration
|
||||||
CPU CPU `json:"cpu"`
|
CPU CPU `json:"cpu"`
|
||||||
|
// Task resource restriction configuration.
|
||||||
|
Pids Pids `json:"pids"`
|
||||||
// BlockIO restriction configuration
|
// BlockIO restriction configuration
|
||||||
BlockIO BlockIO `json:"blockIO"`
|
BlockIO BlockIO `json:"blockIO"`
|
||||||
// Hugetlb limit (in bytes)
|
// Hugetlb limit (in bytes)
|
||||||
|
|
Loading…
Reference in New Issue