- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for getPodNetNs (0.24 sec)
-
cni/pkg/repair/netns.go
return nil, err } if len(routes) == 0 { return nil, fmt.Errorf("no routes found for %s", ip) } linkIndex := routes[0].LinkIndex return netlink.LinkByIndex(linkIndex) } // getPodNetNs finds the network namespace for a given pod. There is not a great way to do this. Network namespaces live // under the procfs, /proc/<pid>/ns/net. In majority of cases, this is not used directly, but is rather bind mounted to
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Dec 20 22:14:13 GMT 2023 - 4.8K bytes - Viewed (0) -
cni/pkg/repair/repaircontroller.go
// As such, we need to be in the host namespace: the CNI pod namespace has no relation to the users pod namespace. netns, err := runInHost(func() (string, error) { return getPodNetNs(pod) }) if err != nil { m.With(resultLabel.Value(resultFail)).Increment() return fmt.Errorf("get netns: %v", err) } log = log.WithLabels("netns", netns)
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Sat Feb 10 00:31:55 GMT 2024 - 10.4K bytes - Viewed (0)