diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-16 16:40:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 16:40:44 -0400 |
commit | 8d7e7954546efb344d677e0c3c86d9d045a3de4f (patch) | |
tree | 387d9f86b2507ab4ec9b5c0f4e77fca39940aa8b /pkg/specgen/generate/pod_create.go | |
parent | acf86ef5ab9c5307fe0bdc93bf534decaafe38ae (diff) | |
parent | b3d6383f25e71748793535733a767c60ccfcbd82 (diff) | |
download | podman-8d7e7954546efb344d677e0c3c86d9d045a3de4f.tar.gz podman-8d7e7954546efb344d677e0c3c86d9d045a3de4f.tar.bz2 podman-8d7e7954546efb344d677e0c3c86d9d045a3de4f.zip |
Merge pull request #7621 from rhatdan/pods
Fix podman pod create --infra-command and --infra-image
Diffstat (limited to 'pkg/specgen/generate/pod_create.go')
-rw-r--r-- | pkg/specgen/generate/pod_create.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go index 0bd39d5a4..101201252 100644 --- a/pkg/specgen/generate/pod_create.go +++ b/pkg/specgen/generate/pod_create.go @@ -84,6 +84,15 @@ func createPodOptions(p *specgen.PodSpecGenerator, rt *libpod.Runtime) ([]libpod if len(p.CNINetworks) > 0 { options = append(options, libpod.WithPodNetworks(p.CNINetworks)) } + + if len(p.InfraImage) > 0 { + options = append(options, libpod.WithInfraImage(p.InfraImage)) + } + + if len(p.InfraCommand) > 0 { + options = append(options, libpod.WithInfraCommand(p.InfraCommand)) + } + switch p.NetNS.NSMode { case specgen.Bridge, specgen.Default, "": logrus.Debugf("Pod using default network mode") |