podman pod create --memory

using the new resource backend, implement podman pod create --memory which enables
users to modify memory.max inside of the parent cgroup (the pod), implicitly impacting all
children unless overriden

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern
2022-06-28 12:11:29 -04:00
parent b00e65aa9c
commit b92149e2a8
13 changed files with 67 additions and 18 deletions

View File

@ -152,10 +152,10 @@ func resourcesToProps(res *configs.Resources) (map[string]uint64, map[string]str
// Mem
if res.Memory != 0 {
iMap["MemoryMax"] = res.Memory
uMap["MemoryMax"] = uint64(res.Memory)
}
if res.MemorySwap != 0 {
iMap["MemorySwapMax"] = res.MemorySwap
uMap["MemorySwapMax"] = uint64(res.MemorySwap)
}
// Blkio