diff --git a/v2/pkg/nodenet/pod.go b/v2/pkg/nodenet/pod.go index 31cd60f9..527b2931 100644 --- a/v2/pkg/nodenet/pod.go +++ b/v2/pkg/nodenet/pod.go @@ -464,6 +464,10 @@ func (pn *podNetwork) Update(podIPv4, podIPv6 net.IP, hook SetupHook, pod *corev } } } else { + // We need to bind PodNetConf with Pod. When Coil is a primary CNI IP address can be used for that. + // However different CNIs manage IP addresses diferently, therefore, in egress-only mode instead of + // storing container's ID in ContainerId, we store pod's UID there to be able to identify pod that was + // used to create particular PodNetConf. if c.ContainerId == string(pod.UID) { netNsPath, err = getNetNsPath(c.HostVethName) if err != nil {