summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
authorCharlie Doern <cdoern@redhat.com>2022-06-28 12:11:29 -0400
committerCharlie Doern <cdoern@redhat.com>2022-07-01 13:44:32 -0400
commitb92149e2a8ce596b2839ec404e2ebd457943848f (patch)
tree1223e8b4594b40413a749c5d0025f5c4a6106f8a /cmd/podman/common
parentb00e65aa9c071428579a55f91a92f3702765ed85 (diff)
downloadpodman-b92149e2a8ce596b2839ec404e2ebd457943848f.tar.gz
podman-b92149e2a8ce596b2839ec404e2ebd457943848f.tar.bz2
podman-b92149e2a8ce596b2839ec404e2ebd457943848f.zip
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>
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/create.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index e25bdd241..f05549a8d 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -863,14 +863,6 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
)
_ = cmd.RegisterFlagCompletionFunc(cpusetMemsFlagName, completion.AutocompleteNone)
- memoryFlagName := "memory"
- createFlags.StringVarP(
- &cf.Memory,
- memoryFlagName, "m", "",
- "Memory limit "+sizeWithUnitFormat,
- )
- _ = cmd.RegisterFlagCompletionFunc(memoryFlagName, completion.AutocompleteNone)
-
memoryReservationFlagName := "memory-reservation"
createFlags.StringVar(
&cf.MemoryReservation,
@@ -912,4 +904,12 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
"CPUs in which to allow execution (0-3, 0,1)",
)
_ = cmd.RegisterFlagCompletionFunc(cpusetCpusFlagName, completion.AutocompleteNone)
+
+ memoryFlagName := "memory"
+ createFlags.StringVarP(
+ &cf.Memory,
+ memoryFlagName, "m", "",
+ "Memory limit "+sizeWithUnitFormat,
+ )
+ _ = cmd.RegisterFlagCompletionFunc(memoryFlagName, completion.AutocompleteNone)
}