summaryrefslogtreecommitdiff
path: root/libpod/network/create.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-01 12:51:31 +0200
committerGitHub <noreply@github.com>2021-05-01 12:51:31 +0200
commit277042fd16a862e13718c597366d41f46ffb80a5 (patch)
treed4e4cef44d422f877354f9892873fcfef486f2cd /libpod/network/create.go
parentd6ec38f2eec6c9ac9e11db5cbf949a357fa13f28 (diff)
parentd21c1aafe28cf59143655c7646f6eec7f9496686 (diff)
downloadpodman-277042fd16a862e13718c597366d41f46ffb80a5.tar.gz
podman-277042fd16a862e13718c597366d41f46ffb80a5.tar.bz2
podman-277042fd16a862e13718c597366d41f46ffb80a5.zip
Merge pull request #10182 from baude/machineCNI
Detect if in podman machine virtual vm
Diffstat (limited to 'libpod/network/create.go')
-rw-r--r--libpod/network/create.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/network/create.go b/libpod/network/create.go
index 4fe9b445f..aca8150b5 100644
--- a/libpod/network/create.go
+++ b/libpod/network/create.go
@@ -231,6 +231,10 @@ func createBridge(name string, options entities.NetworkCreateOptions, runtimeCon
plugins = append(plugins, NewDNSNamePlugin(DefaultPodmanDomainName))
}
}
+ // Add the podman-machine CNI plugin if we are in a machine
+ if runtimeConfig.MachineEnabled() { // check if we are in a machine vm
+ plugins = append(plugins, NewPodmanMachinePlugin())
+ }
ncList["plugins"] = plugins
b, err := json.MarshalIndent(ncList, "", " ")
if err != nil {