diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-20 10:39:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-20 10:39:15 +0100 |
commit | 846405256b38b11babf05de3a7666ceb81577a72 (patch) | |
tree | 4224e4853f474f78c48a49177faf39b2235fc7d6 /pkg/varlinkapi/pods.go | |
parent | 7e33dc4300f78fe9121c564bc22435514730a0ea (diff) | |
parent | 97323808ed57cf52311a80c55339f8927614b7f0 (diff) | |
download | podman-846405256b38b11babf05de3a7666ceb81577a72.tar.gz podman-846405256b38b11babf05de3a7666ceb81577a72.tar.bz2 podman-846405256b38b11babf05de3a7666ceb81577a72.zip |
Merge pull request #5241 from mheon/pod_network_opts_add
Add network opts to pods
Diffstat (limited to 'pkg/varlinkapi/pods.go')
-rw-r--r-- | pkg/varlinkapi/pods.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/varlinkapi/pods.go b/pkg/varlinkapi/pods.go index 1ebe5d424..2ec45f7a1 100644 --- a/pkg/varlinkapi/pods.go +++ b/pkg/varlinkapi/pods.go @@ -16,6 +16,14 @@ import ( // CreatePod ... func (i *LibpodAPI) CreatePod(call iopodman.VarlinkCall, create iopodman.PodCreate) error { var options []libpod.PodCreateOption + if create.Infra { + options = append(options, libpod.WithInfraContainer()) + nsOptions, err := shared.GetNamespaceOptions(create.Share) + if err != nil { + return err + } + options = append(options, nsOptions...) + } if create.CgroupParent != "" { options = append(options, libpod.WithPodCgroupParent(create.CgroupParent)) } @@ -43,14 +51,6 @@ func (i *LibpodAPI) CreatePod(call iopodman.VarlinkCall, create iopodman.PodCrea options = append(options, libpod.WithInfraContainerPorts(portBindings)) } - if create.Infra { - options = append(options, libpod.WithInfraContainer()) - nsOptions, err := shared.GetNamespaceOptions(create.Share) - if err != nil { - return err - } - options = append(options, nsOptions...) - } options = append(options, libpod.WithPodCgroups()) pod, err := i.Runtime.NewPod(getContext(), options...) |