Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for podMap (0.31 sec)

  1. pkg/controller/deployment/deployment_controller.go

    		controllerRef := metav1.GetControllerOf(pod)
    		if controllerRef == nil {
    			continue
    		}
    		// Only append if we care about this UID.
    		if _, ok := podMap[controllerRef.UID]; ok {
    			podMap[controllerRef.UID] = append(podMap[controllerRef.UID], pod)
    		}
    	}
    	return podMap, nil
    }
    
    // syncDeployment will sync the deployment with the given key.
    // This function is not meant to be invoked concurrently with the same key.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  2. pkg/controller/deployment/deployment_controller_test.go

    	}
    	if got, want := len(podMap[rs1.UID]), 2; got != want {
    		t.Errorf("len(podMap[rs1]) = %v, want %v", got, want)
    	}
    	expect := map[string]struct{}{"rs1-pod": {}, "pod4": {}}
    	for _, pod := range podMap[rs1.UID] {
    		if _, ok := expect[pod.Name]; !ok {
    			t.Errorf("unexpected pod name for rs1: %s", pod.Name)
    		}
    	}
    	if got, want := len(podMap[rs2.UID]), 1; got != want {
    		t.Errorf("len(podMap[rs2]) = %v, want %v", got, want)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  3. pkg/kube/krt/collection_test.go

    			Labels:    map[string]string{"app": "foo"},
    		},
    		Status: corev1.PodStatus{PodIP: "2.3.4.5"},
    	}
    	pc.CreateOrUpdateStatus(pod)
    	pc.CreateOrUpdateStatus(pod2)
    	assert.EventuallyEqual(t, fetcherSorted(SimpleEndpoints), []SimpleEndpoint{
    		{pod2.Name, svc.Name, pod2.Namespace, pod2.Status.PodIP},
    		{pod.Name, svc.Name, pod.Namespace, pod.Status.PodIP},
    	})
    }
    
    type PodSizeCount struct {
    	Named
    	MatchingSizes int
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 04:22:19 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/informers_test.go

    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "test",
    			Namespace: "test",
    		},
    		Spec: corev1.PodSpec{
    			NodeName: NodeName,
    		},
    		Status: corev1.PodStatus{
    			PodIPs: []corev1.PodIP{},
    			PodIP:  "",
    		},
    	}
    	ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "test"}}
    
    	client := kube.NewFakeClient(ns, pod)
    
    	fs := &fakeServer{}
    
    	server := &meshDataplane{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 05:10:23 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  5. 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)
  6. pkg/kubelet/lifecycle/handlers_test.go

    	f.ID = id
    	return []byte(f.Msg), f.Err
    }
    
    func stubPodStatusProvider(podIP string) podStatusProvider {
    	return podStatusProviderFunc(func(uid types.UID, name, namespace string) (*kubecontainer.PodStatus, error) {
    		return &kubecontainer.PodStatus{
    			ID:        uid,
    			Name:      name,
    			Namespace: namespace,
    			IPs:       []string{podIP},
    		}, nil
    	})
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 24.4K bytes
    - Viewed (0)
  7. pkg/apis/core/v1/conversion.go

    	}
    
    	// 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
    	// if v1.PodIPs was empty but v1.PodIP is not, then set core.PodIPs[0] with v1.PodIP
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 19 22:30:55 UTC 2024
    - 19K bytes
    - Viewed (0)
  8. pilot/pkg/serviceregistry/kube/controller/pod.go

    	changed := labelsChanged || relevantAnnotationsChanged
    	if cur.Status.PodIP != "" && changed {
    		pc.proxyUpdates(cur, true)
    	}
    
    	// always continue calling pc.onEvent
    	return false
    }
    
    // onEvent updates the IP-based index (pc.podsByIP).
    func (pc *PodCache) onEvent(_, pod *v1.Pod, ev model.Event) error {
    	ip := pod.Status.PodIP
    	// PodIP will be empty when pod is just created, but before the IP is assigned
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  9. pilot/pkg/serviceregistry/kube/controller/pod_test.go

    		&v1.Pod{ObjectMeta: pod1, Status: v1.PodStatus{Conditions: notReadyCondition, PodIP: ip, Phase: v1.PodPending}},
    		model.EventUpdate); err != nil {
    		t.Error(err)
    	}
    	if handled != 0 {
    		t.Errorf("notified workload handler %d times, want %d", handled, 0)
    	}
    
    	if err := f(nil, &v1.Pod{ObjectMeta: pod1, Status: v1.PodStatus{Conditions: readyCondition, PodIP: ip, Phase: v1.PodPending}}, model.EventUpdate); err != nil {
    		t.Error(err)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 18:27:40 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  10. pilot/pkg/serviceregistry/kube/controller/ambient/workloads_test.go

    			name:   "simple pod not running and not have podIP",
    			inputs: []any{},
    			pod: &v1.Pod{
    				TypeMeta: metav1.TypeMeta{},
    				ObjectMeta: metav1.ObjectMeta{
    					Name:      "name",
    					Namespace: "ns",
    				},
    				Spec: v1.PodSpec{},
    				Status: v1.PodStatus{
    					Phase: v1.PodPending,
    				},
    			},
    			result: nil,
    		},
    		{
    			name:   "simple pod not running but have podIP",
    			inputs: []any{},
    			pod: &v1.Pod{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 16:51:29 UTC 2024
    - 20.3K bytes
    - Viewed (0)
Back to top