aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/pod_create.go
diff options
context:
space:
mode:
authorhaircommander <pehunt@redhat.com>2018-08-17 10:36:51 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-23 18:16:28 +0000
commit2a7449362f2884d9ae6a783c0ce38979d882e2cf (patch)
tree6e7b8ab33505d210201e62faba6a50f98c0a4ea7 /cmd/podman/pod_create.go
parent697b46430a8a7c2c7231078911dcec51f0c6fab5 (diff)
downloadpodman-2a7449362f2884d9ae6a783c0ce38979d882e2cf.tar.gz
podman-2a7449362f2884d9ae6a783c0ce38979d882e2cf.tar.bz2
podman-2a7449362f2884d9ae6a783c0ce38979d882e2cf.zip
Change pause container to infra container
Signed-off-by: haircommander <pehunt@redhat.com> Closes: #1187 Approved by: mheon
Diffstat (limited to 'cmd/podman/pod_create.go')
-rw-r--r--cmd/podman/pod_create.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/cmd/podman/pod_create.go b/cmd/podman/pod_create.go
index f5bb29c35..eb07e7d50 100644
--- a/cmd/podman/pod_create.go
+++ b/cmd/podman/pod_create.go
@@ -28,6 +28,18 @@ var podCreateFlags = []cli.Flag{
Name: "cgroup-parent",
Usage: "Set parent cgroup for the pod",
},
+ cli.BoolTFlag{
+ Name: "infra",
+ Usage: "Create an infra container associated with the pod to share namespaces with",
+ },
+ cli.StringFlag{
+ Name: "infra-image",
+ Usage: "The image of the infra container to associate with the pod",
+ },
+ cli.StringFlag{
+ Name: "infra-command",
+ Usage: "The command to run on the infra container when the pod is started",
+ },
cli.StringSliceFlag{
Name: "label-file",
Usage: "Read in a line delimited file of labels (default [])",
@@ -40,18 +52,6 @@ var podCreateFlags = []cli.Flag{
Name: "name, n",
Usage: "Assign a name to the pod",
},
- cli.BoolTFlag{
- Name: "pause",
- Usage: "Create a pause container associated with the pod to share namespaces with",
- },
- cli.StringFlag{
- Name: "pause-image",
- Usage: "The image of the pause container to associate with the pod",
- },
- cli.StringFlag{
- Name: "pause-command",
- Usage: "The command to run on the pause container when the pod is started",
- },
cli.StringFlag{
Name: "pod-id-file",
Usage: "Write the pod ID to the file",
@@ -95,8 +95,8 @@ func podCreateCmd(c *cli.Context) error {
return errors.Wrapf(err, "unable to write pod id file %s", c.String("pod-id-file"))
}
}
- if !c.BoolT("pause") && c.IsSet("share") && c.String("share") != "none" && c.String("share") != "" {
- return errors.Errorf("You cannot share kernel namespaces on the pod level without a pause container")
+ if !c.BoolT("infra") && c.IsSet("share") && c.String("share") != "none" && c.String("share") != "" {
+ return errors.Errorf("You cannot share kernel namespaces on the pod level without an infra container")
}
if c.IsSet("cgroup-parent") {
@@ -115,8 +115,8 @@ func podCreateCmd(c *cli.Context) error {
options = append(options, libpod.WithPodName(c.String("name")))
}
- if c.BoolT("pause") {
- options = append(options, libpod.WithPauseContainer())
+ if c.BoolT("infra") {
+ options = append(options, libpod.WithInfraContainer())
nsOptions, err := shared.GetNamespaceOptions(strings.Split(c.String("share"), ","))
if err != nil {
return err