Adding new location for containers in recent k8s 1.11+

Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
This commit is contained in:
Serguei Bezverkhi 2018-07-18 13:59:28 -04:00 committed by Vish (Ishaya) Abrams
parent be1fbeda19
commit ef6f981729
1 changed files with 2 additions and 0 deletions

View File

@ -190,6 +190,8 @@ func getPidForContainer(id string) (int, error) {
filepath.Join(cgroupRoot, "..", "systemd", "docker", id, "tasks"),
// Kubernetes with docker and CNI is even more different
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