Add memory limit set
Don't know why we missed that. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
parent
5ec11a2918
commit
2539d53896
1
spec.go
1
spec.go
|
@ -242,6 +242,7 @@ func createCgroupConfig(spec *specs.LinuxSpec, devices []*configs.Device) (*conf
|
|||
AllowedDevices: append(devices, allowedDevices...),
|
||||
}
|
||||
r := spec.Linux.Resources
|
||||
c.Memory = r.Memory.Limit
|
||||
c.MemoryReservation = r.Memory.Reservation
|
||||
c.MemorySwap = r.Memory.Swap
|
||||
c.KernelMemory = r.Memory.Kernel
|
||||
|
|
Loading…
Reference in New Issue