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

View File

@ -221,6 +221,9 @@ func DefaultProfile() *Seccomp {
"ipc",
"keyctl",
"kill",
"landlock_add_rule",
"landlock_create_ruleset",
"landlock_restrict_self",
"lchown",
"lchown32",
"lgetxattr",

View File

@ -228,6 +228,9 @@
"ipc",
"keyctl",
"kill",
"landlock_add_rule",
"landlock_create_ruleset",
"landlock_restrict_self",
"lchown",
"lchown32",
"lgetxattr",