aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/pods
diff options
context:
space:
mode:
authorCharlie Doern <cdoern@redhat.com>2022-08-09 09:25:03 -0400
committerCharlie Doern <cdoern@redhat.com>2022-09-01 13:02:01 -0400
commit050f3291b9ef8788510b78c543055638275eb20f (patch)
tree327a081bd2243ffcbdf786a940b1dc82d041bea5 /cmd/podman/pods
parent0085fbb488eec30e71e6cced6a06dbdb134e32a6 (diff)
downloadpodman-050f3291b9ef8788510b78c543055638275eb20f.tar.gz
podman-050f3291b9ef8788510b78c543055638275eb20f.tar.bz2
podman-050f3291b9ef8788510b78c543055638275eb20f.zip
implement podman update
podman update allows users to change the cgroup configuration of an existing container using the already defined resource limits flags from podman create/run. The supported flags in crun are: this command is also now supported in the libpod api via the /libpod/containers/<CID>/update endpoint where the resource limits are passed inthe request body and follow the OCI resource spec format –memory –cpus –cpuset-cpus –cpuset-mems –memory-swap –memory-reservation –cpu-shares –cpu-quota –cpu-period –blkio-weight –cpu-rt-period –cpu-rt-runtime -device-read-bps -device-write-bps -device-read-iops -device-write-iops -memory-swappiness -blkio-weight-device resolves #15067 Signed-off-by: Charlie Doern <cdoern@redhat.com>
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r--cmd/podman/pods/clone.go2
-rw-r--r--cmd/podman/pods/create.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/pods/clone.go b/cmd/podman/pods/clone.go
index 9558c6aed..bf7d10c44 100644
--- a/cmd/podman/pods/clone.go
+++ b/cmd/podman/pods/clone.go
@@ -44,7 +44,7 @@ func cloneFlags(cmd *cobra.Command) {
_ = podCloneCommand.RegisterFlagCompletionFunc(nameFlagName, completion.AutocompleteNone)
common.DefineCreateDefaults(&podClone.InfraOptions)
- common.DefineCreateFlags(cmd, &podClone.InfraOptions, true, false)
+ common.DefineCreateFlags(cmd, &podClone.InfraOptions, entities.InfraMode)
podClone.InfraOptions.MemorySwappiness = -1 // this is not implemented for pods yet, need to set -1 default manually
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go
index 4f1f66ad6..d30f4782a 100644
--- a/cmd/podman/pods/create.go
+++ b/cmd/podman/pods/create.go
@@ -65,7 +65,7 @@ func init() {
flags := createCommand.Flags()
flags.SetInterspersed(false)
common.DefineCreateDefaults(&infraOptions)
- common.DefineCreateFlags(createCommand, &infraOptions, true, false)
+ common.DefineCreateFlags(createCommand, &infraOptions, entities.InfraMode)
common.DefineNetFlags(createCommand)
flags.BoolVar(&createOptions.Infra, "infra", true, "Create an infra container associated with the pod to share namespaces with")