diff options
author | cdoern <cdoern@redhat.com> | 2022-01-10 20:25:08 -0500 |
---|---|---|
committer | cdoern <cdoern@redhat.com> | 2022-01-12 20:49:04 -0500 |
commit | f257d983943d6ec2253d50a245cd4810cab45e4b (patch) | |
tree | 0033ace566bfd2a4e977d85b11f87d6e43b43c65 /cmd | |
parent | 7a839f7a745ed5171e2a469f6ebec34b5084c3d8 (diff) | |
download | podman-f257d983943d6ec2253d50a245cd4810cab45e4b.tar.gz podman-f257d983943d6ec2253d50a245cd4810cab45e4b.tar.bz2 podman-f257d983943d6ec2253d50a245cd4810cab45e4b.zip |
Podman Pod Create --sysctl support
added support for pod wide sysctls. The sysctls supported are the same as the continer run controls.
These controls are only valid if the proper namespaces are shared within the pod, otherwise only the infra ctr gets the sysctl
resolves #12747
Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/common/create.go | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index b60169990..e95e447e1 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -563,15 +563,6 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, ) _ = cmd.RegisterFlagCompletionFunc(stopTimeoutFlagName, completion.AutocompleteNone) - sysctlFlagName := "sysctl" - createFlags.StringSliceVar( - &cf.Sysctl, - sysctlFlagName, []string{}, - "Sysctl options", - ) - //TODO: Add function for sysctl completion. - _ = cmd.RegisterFlagCompletionFunc(sysctlFlagName, completion.AutocompleteNone) - systemdFlagName := "systemd" createFlags.StringVar( &cf.Systemd, @@ -712,6 +703,16 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, `If a container with the same name exists, replace it`, ) } + + sysctlFlagName := "sysctl" + createFlags.StringSliceVar( + &cf.Sysctl, + sysctlFlagName, []string{}, + "Sysctl options", + ) + //TODO: Add function for sysctl completion. + _ = cmd.RegisterFlagCompletionFunc(sysctlFlagName, completion.AutocompleteNone) + securityOptFlagName := "security-opt" createFlags.StringArrayVar( &cf.SecurityOpt, |