diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-06-02 21:28:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-02 21:28:26 -0400 |
commit | 6edbf3baaa10ff3738519417fbb1b2f9885e8adb (patch) | |
tree | 22a242354a2889b3b6c0134b537303492d6ad3df /pkg/specgen/generate/namespaces.go | |
parent | 232f2c9eb82d9971d9993af9c3a83849a57722f8 (diff) | |
parent | 831d6534fb7b04e092710dfa5d233fe5cb9db9f8 (diff) | |
download | podman-6edbf3baaa10ff3738519417fbb1b2f9885e8adb.tar.gz podman-6edbf3baaa10ff3738519417fbb1b2f9885e8adb.tar.bz2 podman-6edbf3baaa10ff3738519417fbb1b2f9885e8adb.zip |
Merge pull request #14461 from cdoern/infra
fix pod network handling with a host network
Diffstat (limited to 'pkg/specgen/generate/namespaces.go')
-rw-r--r-- | pkg/specgen/generate/namespaces.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/specgen/generate/namespaces.go b/pkg/specgen/generate/namespaces.go index 4dd6b3eaf..4735111c8 100644 --- a/pkg/specgen/generate/namespaces.go +++ b/pkg/specgen/generate/namespaces.go @@ -42,6 +42,9 @@ func GetDefaultNamespaceMode(nsType string, cfg *config.Config, pod *libpod.Pod) podMode = true case nsType == "net" && pod.SharesNet(): podMode = true + case nsType == "net" && pod.NetworkMode() == "host": + toReturn.NSMode = specgen.Host + return toReturn, nil case nsType == "cgroup" && pod.SharesCgroup(): podMode = true } |