Merge pull request #2330 from KentaTada/use-linuxnamespace-const

libcontainer: use consts of Namespace from runtime-spec
This commit is contained in:
Kir Kolyshkin 2020-04-23 18:58:29 -07:00 committed by GitHub
commit 440244268b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -139,26 +139,26 @@ func Example() *specs.Spec {
},
Namespaces: []specs.LinuxNamespace{
{
Type: "pid",
Type: specs.PIDNamespace,
},
{
Type: "network",
Type: specs.NetworkNamespace,
},
{
Type: "ipc",
Type: specs.IPCNamespace,
},
{
Type: "uts",
Type: specs.UTSNamespace,
},
{
Type: "mount",
Type: specs.MountNamespace,
},
},
},
}
if cgroups.IsCgroup2UnifiedMode() {
spec.Linux.Namespaces = append(spec.Linux.Namespaces, specs.LinuxNamespace{
Type: "cgroup",
Type: specs.CgroupNamespace,
})
}
return spec