summaryrefslogtreecommitdiff
path: root/cmd/podman/pods
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-07-15 17:30:16 -0400
committerGitHub <noreply@github.com>2021-07-15 17:30:16 -0400
commit12b67aaf62b6e99f94db7ea89dad87f16a9fbd86 (patch)
treece0c74860f2ccaeb7e85dceb4bbd370d1b282b93 /cmd/podman/pods
parent9d87dc74084b9b1ae67106a23cf3ed5327ca0681 (diff)
parentf7321681d04d65da3b307d1e5e4ba12c42b5c456 (diff)
downloadpodman-12b67aaf62b6e99f94db7ea89dad87f16a9fbd86.tar.gz
podman-12b67aaf62b6e99f94db7ea89dad87f16a9fbd86.tar.bz2
podman-12b67aaf62b6e99f94db7ea89dad87f16a9fbd86.zip
Merge pull request #10894 from cdoern/pidPod
podman pod create --pid flag
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r--cmd/podman/pods/create.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go
index 03e3ffaa0..0d299bb9c 100644
--- a/cmd/podman/pods/create.go
+++ b/cmd/podman/pods/create.go
@@ -102,6 +102,10 @@ func init() {
flags.StringVarP(&createOptions.Hostname, hostnameFlagName, "", "", "Set a hostname to the pod")
_ = createCommand.RegisterFlagCompletionFunc(hostnameFlagName, completion.AutocompleteNone)
+ pidFlagName := "pid"
+ flags.StringVar(&createOptions.Pid, pidFlagName, "", "PID namespace to use")
+ _ = createCommand.RegisterFlagCompletionFunc(pidFlagName, common.AutocompleteNamespace)
+
podIDFileFlagName := "pod-id-file"
flags.StringVar(&podIDFile, podIDFileFlagName, "", "Write the pod ID to the file")
_ = createCommand.RegisterFlagCompletionFunc(podIDFileFlagName, completion.AutocompleteDefault)
@@ -179,6 +183,8 @@ func create(cmd *cobra.Command, args []string) error {
defer errorhandling.SyncQuiet(podIDFD)
}
+ createOptions.Pid = cmd.Flag("pid").Value.String()
+
createOptions.Net, err = common.NetFlagsToNetOptions(cmd, createOptions.Infra)
if err != nil {
return err