diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-27 15:37:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 15:37:58 +0200 |
commit | 529824ec1e02e9b7ea893bbab35179ef16d4661d (patch) | |
tree | 6c2e14c482b3f67013569b66616119f8d8cc2031 /pkg/specgen/generate/pod_create.go | |
parent | 7cb46450fd9cc2a9fc545004431c1d416970e0ed (diff) | |
parent | 2fc54facf2f816047e2243547eb26fa9a897d7be (diff) | |
download | podman-529824ec1e02e9b7ea893bbab35179ef16d4661d.tar.gz podman-529824ec1e02e9b7ea893bbab35179ef16d4661d.tar.bz2 podman-529824ec1e02e9b7ea893bbab35179ef16d4661d.zip |
Merge pull request #5997 from giuseppe/fix-pod-create
v2, podman: fix a bunch of "podman pod *" tests
Diffstat (limited to 'pkg/specgen/generate/pod_create.go')
-rw-r--r-- | pkg/specgen/generate/pod_create.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go index 292f9b155..babfba9bc 100644 --- a/pkg/specgen/generate/pod_create.go +++ b/pkg/specgen/generate/pod_create.go @@ -46,6 +46,13 @@ func createPodOptions(p *specgen.PodSpecGenerator) ([]libpod.PodCreateOption, er if len(p.HostAdd) > 0 { options = append(options, libpod.WithPodHosts(p.HostAdd)) } + if len(p.DNSServer) > 0 { + var dnsServers []string + for _, d := range p.DNSServer { + dnsServers = append(dnsServers, d.String()) + } + options = append(options, libpod.WithPodDNS(dnsServers)) + } if len(p.DNSOption) > 0 { options = append(options, libpod.WithPodDNSOption(p.DNSOption)) } |