From 4c46424d73b556b3ea4bc5a7cec9e7376dcb2a73 Mon Sep 17 00:00:00 2001 From: Subhransu <47723536+Shubhranshu153@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:31:45 -0700 Subject: [PATCH] Adding file path for nerdctl and finch (#87) > nerdctl uses this package for netns, for finch one of our customer requested it for their systems which uses nerdctl to create a container and have a custom network namespace the container connects to. Signed-off-by: Shubharanshu Mahapatra --- netns_linux.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netns_linux.go b/netns_linux.go index 8c9b177..51c8f4b 100644 --- a/netns_linux.go +++ b/netns_linux.go @@ -248,6 +248,10 @@ func getPidForContainer(id string) (int, error) { filepath.Join(cgroupRoot, "kubepods.slice", "*.slice", "*", "docker-"+id+".scope", pidFile), // Same as above but for Guaranteed QoS filepath.Join(cgroupRoot, "kubepods.slice", "*", "docker-"+id+".scope", pidFile), + // Support for nerdctl + filepath.Join(cgroupRoot, "system.slice", "nerdctl-"+id+".scope", pidFile), + // Support for finch + filepath.Join(cgroupRoot, "..", "systemd", "finch", id, pidFile), } var filename string