Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for podMap (0.13 sec)

  1. cni/pkg/repair/repair_test.go

    }
    
    func makePodLabelMap(pods []*corev1.Pod) (podmap map[string]string) {
    	podmap = map[string]string{}
    	for _, pod := range pods {
    		podmap[pod.Name] = ""
    		for key, value := range pod.Labels {
    			podmap[pod.Name] = strings.Join([]string{podmap[pod.Name], fmt.Sprintf("%s=%s", key, value)}, ",")
    		}
    		podmap[pod.Name] = strings.Trim(podmap[pod.Name], " ,")
    	}
    	return
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 24 03:31:28 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. pkg/controller/volume/attachdetach/cache/desired_state_of_world.go

    					}})
    		}
    	}
    
    	return volumesToAttach
    }
    
    // Construct a list of v1.Pod objects from the given pod map
    func getPodsFromMap(podMap map[types.UniquePodName]pod) []*v1.Pod {
    	pods := make([]*v1.Pod, 0, len(podMap))
    	for _, pod := range podMap {
    		pods = append(pods, pod.podObj)
    	}
    	return pods
    }
    
    func (dsw *desiredStateOfWorld) GetPodToAdd() map[types.UniquePodName]PodToAdd {
    	dsw.RLock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 10:42:15 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  5. pkg/kubelet/volumemanager/cache/actual_state_of_world.go

    		podObj.mounter = mounter
    	}
    
    	asw.attachedVolumes[volumeName].mountedPods[podName] = podObj
    
    	podMap, ok := asw.foundDuringReconstruction[opts.VolumeName]
    	if !ok {
    		podMap = map[volumetypes.UniquePodName]types.UID{}
    	}
    	podMap[opts.PodName] = opts.PodUID
    	asw.foundDuringReconstruction[opts.VolumeName] = podMap
    	return true, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 09 07:34:33 UTC 2024
    - 45.8K bytes
    - Viewed (0)
  6. pkg/kubelet/stats/cri_stats_provider.go

    			Name:      pod.GetMetadata().GetName(),
    			Namespace: pod.GetMetadata().GetNamespace(),
    			// UID is intentionally left empty.
    		}
    		podMap[refID] = append(podMap[refID], pod)
    	}
    
    	result := make([]*runtimeapi.PodSandbox, 0)
    	for _, refs := range podMap {
    		if len(refs) == 1 {
    			result = append(result, refs[0])
    			continue
    		}
    		found := false
    		for i := 0; i < len(refs); i++ {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 18:46:33 UTC 2023
    - 35.1K bytes
    - Viewed (0)
  7. pkg/kubelet/metrics/collectors/resource_metrics_test.go

    				container_cpu_usage_seconds_total{container="container_a",namespace="namespace_a",pod="pod_a"} 10 1624396278302
    				container_cpu_usage_seconds_total{container="container_a",namespace="namespace_b",pod="pod_b"} 10 1624396278302
    				container_cpu_usage_seconds_total{container="container_b",namespace="namespace_a",pod="pod_a"} 10 1624396278302
    				# HELP container_memory_working_set_bytes [STABLE] Current working set of the container in bytes
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 15.3K bytes
    - Viewed (1)
  8. 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)
  9. 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)
  10. 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)
Back to top