// Resources contains various cgroups settings to apply
*Resources
}
typeResourcesstruct{
// If this is true allow access to any kind of device within the container. If false, allow access only to devices explicitly listed in the allowed_devices list.
// If this is true allow access to any kind of device within the container. If false, allow access only to devices explicitly listed in the allowed_devices list.
AllowAllDevicesbool`json:"allow_all_devices"`
AllowAllDevicesbool`json:"allow_all_devices"`
...
@@ -29,7 +40,7 @@ type Cgroup struct {
...
@@ -29,7 +40,7 @@ type Cgroup struct {
// Memory reservation or soft_limit (in bytes)
// Memory reservation or soft_limit (in bytes)
MemoryReservationint64`json:"memory_reservation"`
MemoryReservationint64`json:"memory_reservation"`
// Total memory usage (memory + swap); set `-1' to disable swap
// Total memory usage (memory + swap); set `-1` to enable unlimited swap
MemorySwapint64`json:"memory_swap"`
MemorySwapint64`json:"memory_swap"`
// Kernel memory limit (in bytes)
// Kernel memory limit (in bytes)
...
@@ -56,6 +67,9 @@ type Cgroup struct {
...
@@ -56,6 +67,9 @@ type Cgroup struct {
// MEM to use
// MEM to use
CpusetMemsstring`json:"cpuset_mems"`
CpusetMemsstring`json:"cpuset_mems"`
// Process limit; set <= `0' to disable limit.
PidsLimitint64`json:"pids_limit"`
// Specifies per cgroup weight, range is from 10 to 1000.
// Specifies per cgroup weight, range is from 10 to 1000.