Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 487 for podIps (0.27 sec)

  1. cni/pkg/util/podutil.go

    	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)
    		}
    	} else if len(pod.Status.PodIP) != 0 {
    		ip := netip.MustParseAddr(pod.Status.PodIP)
    		podIPs = append(podIPs, ip)
    	}
    	return podIPs
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 17:18:11 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/net_test.go

    	var podStatus corev1.PodStatus
    	if v6IP {
    		podStatus = corev1.PodStatus{
    			PodIP:  "e9ac:1e77:90ca:399f:4d6d:ece2:2f9b:3164",
    			PodIPs: []corev1.PodIP{{IP: "e9ac:1e77:90ca:399f:4d6d:ece2:2f9b:3164"}, {IP: "e9ac:1e77:90ca:399f:4d6d:ece2:2f9b:3165"}},
    		}
    	} else {
    		podStatus = corev1.PodStatus{
    			PodIP:  "2.2.2.2",
    			PodIPs: []corev1.PodIP{{IP: "2.2.2.2"}, {IP: "3.3.3.3"}},
    		}
    	}
    
    	return &corev1.Pod{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 05:10:23 UTC 2024
    - 17.8K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/net.go

    	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 {
    			addedIps, err := addPodToHostNSIpset(pod, podIPs, &s.hostsideProbeIPSet)
    			if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 05:10:23 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  4. cni/pkg/util/podutil_test.go

    		Spec: corev1.PodSpec{
    			NodeName: "derp",
    		},
    		Status: corev1.PodStatus{
    			PodIP:  "2.2.2.2",
    			PodIPs: []corev1.PodIP{{IP: "2.2.2.2"}, {IP: "3.3.3.3"}},
    		},
    	}
    
    	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{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 03 19:29:42 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  5. pkg/apis/core/v1/conversion.go

    		return err
    	}
    
    	// If both fields (v1.PodIPs and v1.PodIP) are provided and differ, then PodIP is authoritative for compatibility with older kubelets
    	if (len(in.PodIP) > 0 && len(in.PodIPs) > 0) && (in.PodIP != in.PodIPs[0].IP) {
    		out.PodIPs = []core.PodIP{
    			{
    				IP: in.PodIP,
    			},
    		}
    	}
    	// at the this point, autoConvert copied v1.PodIPs -> core.PodIPs
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 19 22:30:55 UTC 2024
    - 19K bytes
    - Viewed (0)
  6. pkg/kubelet/kubelet_pods.go

    	podIPs := make([]string, len(podStatus.IPs))
    	copy(podIPs, podStatus.IPs)
    
    	// make podIPs order match node IP family preference #97979
    	podIPs = kl.sortPodIPs(podIPs)
    	for _, ip := range podIPs {
    		apiPodStatus.PodIPs = append(apiPodStatus.PodIPs, v1.PodIP{IP: ip})
    	}
    	if len(apiPodStatus.PodIPs) > 0 {
    		apiPodStatus.PodIP = apiPodStatus.PodIPs[0].IP
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 101.2K bytes
    - Viewed (0)
  7. pkg/kubelet/kubelet_pods_test.go

    			}
    
    			status := kl.generateAPIPodStatus(pod, criStatus, false)
    			if !reflect.DeepEqual(status.PodIPs, tc.podIPs) {
    				t.Fatalf("Expected PodIPs %#v, got %#v", tc.podIPs, status.PodIPs)
    			}
    			if status.PodIP != status.PodIPs[0].IP {
    				t.Fatalf("Expected PodIP %q to equal PodIPs[0].IP %q", status.PodIP, status.PodIPs[0].IP)
    			}
    		})
    	}
    }
    
    func TestSortPodIPs(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 198.8K bytes
    - Viewed (0)
  8. pkg/kubelet/kuberuntime/kuberuntime_sandbox.go

    			return nil
    		}
    		podIPs = append(podIPs, podSandbox.Network.Ip)
    	}
    
    	// pick additional ips, if cri reported them
    	for _, podIP := range podSandbox.Network.AdditionalIps {
    		if nil == netutils.ParseIPSloppy(podIP.Ip) {
    			klog.InfoS("Pod Sandbox reported an unparseable additional IP", "pod", klog.KRef(podNamespace, podName), "IP", podIP.Ip)
    			return nil
    		}
    		podIPs = append(podIPs, podIP.Ip)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/cni-watcher.go

    	var podIps []netip.Addr
    	for _, configuredPodIPs := range addCmd.IPs {
    		// net.ip is implicitly convertible to netip as slice
    		ip, _ := netip.AddrFromSlice(configuredPodIPs.Address.IP)
    		// We ignore the mask of the IPNet - it's fine if the IPNet defines
    		// a block grant of addresses, we just need one for checking routes.
    		podIps = append(podIps, ip)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 21:31:35 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  10. pkg/kubelet/kuberuntime/kuberuntime_manager.go

    	// instead of trying to figure out if we have 0 < len(podIPs)
    	// everytime, we short circuit it here
    	podIP := ""
    	if len(podIPs) != 0 {
    		podIP = podIPs[0]
    	}
    
    	// Get podSandboxConfig for containers to start.
    	configPodSandboxResult := kubecontainer.NewSyncResult(kubecontainer.ConfigPodSandbox, podSandboxID)
    	result.AddSyncResult(configPodSandboxResult)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 02:01:31 UTC 2024
    - 64.7K bytes
    - Viewed (0)
Back to top