Set netns to default to private like other namespaces

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2021-11-18 10:42:47 -05:00
parent a382484ea2
commit 4249000f56
3 changed files with 3 additions and 1 deletions

View File

@ -341,7 +341,7 @@ var _ = Describe("Config Local", func() {
// Given
config, err := NewConfig("")
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(config.Containers.NetNS).To(gomega.Equal(""))
gomega.Expect(config.Containers.NetNS).To(gomega.Equal("private"))
// When
config2, err := NewConfig("testdata/containers_default.conf")
// Then

View File

@ -29,6 +29,7 @@ var _ = Describe("Config", func() {
gomega.Expect(defaultConfig.Containers.ApparmorProfile).To(gomega.Equal(apparmor.Profile))
gomega.Expect(defaultConfig.Containers.PidsLimit).To(gomega.BeEquivalentTo(2048))
gomega.Expect(defaultConfig.Engine.ServiceTimeout).To(gomega.BeEquivalentTo(5))
gomega.Expect(defaultConfig.NetNS()).To(gomega.BeEquivalentTo("private"))
path, err := defaultConfig.ImageCopyTmpDir()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(path).To(gomega.BeEquivalentTo("/var/tmp"))

View File

@ -190,6 +190,7 @@ func DefaultConfig() (*Config, error) {
IPCNS: "private",
LogDriver: defaultLogDriver(),
LogSizeMax: DefaultLogSizeMax,
NetNS: "private",
NoHosts: false,
PidsLimit: DefaultPidsLimit,
PidNS: "private",