Skip to content

Commit 4c46424

Browse files
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 <[email protected]>
1 parent d37cca3 commit 4c46424

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

netns_linux.go

+4
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ func getPidForContainer(id string) (int, error) {
248248
filepath.Join(cgroupRoot, "kubepods.slice", "*.slice", "*", "docker-"+id+".scope", pidFile),
249249
// Same as above but for Guaranteed QoS
250250
filepath.Join(cgroupRoot, "kubepods.slice", "*", "docker-"+id+".scope", pidFile),
251+
// Support for nerdctl
252+
filepath.Join(cgroupRoot, "system.slice", "nerdctl-"+id+".scope", pidFile),
253+
// Support for finch
254+
filepath.Join(cgroupRoot, "..", "systemd", "finch", id, pidFile),
251255
}
252256

253257
var filename string

0 commit comments

Comments
 (0)