- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for GetPodIPsIfPresent (0.32 sec)
-
cni/pkg/nodeagent/informers_test.go
// We are expecting at most 1 calls to the mock, wait for them wg, waitForMockCalls := NewWaitForNCalls(t, 1) fs := &fakeServer{testWG: wg} fs.On("AddPodToMesh", ctx, pod, util.GetPodIPsIfPresent(pod), "", ).Return(nil) server := &meshDataplane{ kubeClient: client.Kube(), netServer: fs, } handlers := setupHandlers(ctx, client, server, "istio-system")
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Thu Feb 08 01:03:24 GMT 2024 - 15.8K bytes - Viewed (0) -
cni/pkg/util/podutil_test.go
}, } podIPs := GetPodIPsIfPresent(pod) assert.Equal(t, len(podIPs), 2) } func TestGetPodIPsIfNoPodIPPresent(t *testing.T) { pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, Spec: corev1.PodSpec{ NodeName: "derp", }, Status: corev1.PodStatus{}, } podIPs := GetPodIPsIfPresent(pod) assert.Equal(t, len(podIPs), 0)
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 1.7K bytes - Viewed (0) -
cni/pkg/nodeagent/net.go
return err } return nil } func (s *NetServer) syncHostIPSets(ambientPods []*corev1.Pod) error { var addedIPSnapshot []netip.Addr for _, pod := range ambientPods { podIPs := util.GetPodIPsIfPresent(pod) if len(podIPs) == 0 { log.Warnf("pod %s does not appear to have any assigned IPs, not syncing with ipset", pod.Name) } else { err := addPodToHostNSIpset(pod, podIPs, &s.hostsideProbeIPSet)
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 12.1K bytes - Viewed (1) -
cni/pkg/util/podutil.go
// // Note that very early in the pod's lifecycle (before all the node CNI plugin invocations finish) // K8S may not have received the pod IPs yet, and may not report the pod as having any. func GetPodIPsIfPresent(pod *corev1.Pod) []netip.Addr { var podIPs []netip.Addr if len(pod.Status.PodIPs) != 0 { for _, pip := range pod.Status.PodIPs { ip := netip.MustParseAddr(pip.IP) podIPs = append(podIPs, ip) }
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 3.9K bytes - Viewed (0) -
cni/pkg/nodeagent/cni-watcher_test.go
// We are expecting at most 1 calls to the mock, wait for them wg, waitForMockCalls := NewWaitForNCalls(t, 1) fs := &fakeServer{testWG: wg} fs.On("AddPodToMesh", ctx, pod, util.GetPodIPsIfPresent(pod), valid.Netns, ).Return(nil) dpServer := &meshDataplane{ kubeClient: client.Kube(), netServer: fs, } handlers := setupHandlers(ctx, client, dpServer, "istio-system")
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Feb 02 08:18:40 GMT 2024 - 5.4K bytes - Viewed (0) -
cni/pkg/nodeagent/informers.go
// // If we get to this point and have a pod that really and truly has no IP in either of those, // it's not routable at this point and something is wrong/we should discard this event. podIPs := util.GetPodIPsIfPresent(pod) if len(podIPs) == 0 { log.Warnf("pod %s does not appear to have any assigned IPs, not capturing", pod.Name) return nil } err := s.dataplane.AddPodToMesh(s.ctx, pod, podIPs, "")
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Thu Feb 08 01:03:24 GMT 2024 - 9.9K bytes - Viewed (0)