mirror of https://github.com/vishvananda/netns
Adding new location for containers in recent k8s 1.11+
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
This commit is contained in:
parent
be1fbeda19
commit
ef6f981729
|
@ -190,6 +190,8 @@ func getPidForContainer(id string) (int, error) {
|
||||||
filepath.Join(cgroupRoot, "..", "systemd", "docker", id, "tasks"),
|
filepath.Join(cgroupRoot, "..", "systemd", "docker", id, "tasks"),
|
||||||
// Kubernetes with docker and CNI is even more different
|
// Kubernetes with docker and CNI is even more different
|
||||||
filepath.Join(cgroupRoot, "..", "systemd", "kubepods", "*", "pod*", id, "tasks"),
|
filepath.Join(cgroupRoot, "..", "systemd", "kubepods", "*", "pod*", id, "tasks"),
|
||||||
|
// Another flavor of containers location in recent kubernetes 1.11+
|
||||||
|
filepath.Join(cgroupRoot, cgroupThis, "kubepods.slice", "kubepods-besteffort.slice", "*", "docker-"+id+".scope", "tasks"),
|
||||||
}
|
}
|
||||||
|
|
||||||
var filename string
|
var filename string
|
||||||
|
|
Loading…
Reference in New Issue