Skip to content

Commit

Permalink
Adding file path for nerdctl and finch (#87)
Browse files Browse the repository at this point in the history
> 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]>
  • Loading branch information
Shubhranshu153 authored Aug 13, 2024
1 parent d37cca3 commit 4c46424
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions netns_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c46424

Please sign in to comment.