Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for getContainerInfoFromLabels (0.42 sec)

  1. pkg/kubelet/kuberuntime/labels.go

    func getPodSandboxInfoFromAnnotations(annotations map[string]string) *annotatedPodSandboxInfo {
    	return &annotatedPodSandboxInfo{
    		Annotations: annotations,
    	}
    }
    
    // getContainerInfoFromLabels gets labeledContainerInfo from labels.
    func getContainerInfoFromLabels(labels map[string]string) *labeledContainerInfo {
    	return &labeledContainerInfo{
    		PodName:       getStringValueFromLabel(labels, types.KubernetesPodNameLabel),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 02:01:31 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  2. pkg/kubelet/kuberuntime/labels_test.go

    				ContainerName: container.Name,
    			},
    		},
    	}
    
    	// Test whether we can get right information from label
    	for _, test := range tests {
    		labels := newContainerLabels(container, pod)
    		containerInfo := getContainerInfoFromLabels(labels)
    		if !reflect.DeepEqual(containerInfo, test.expected) {
    			t.Errorf("%v: expected %v, got %v", test.description, test.expected, containerInfo)
    		}
    	}
    }
    
    func TestContainerAnnotations(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 22:43:36 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. pkg/kubelet/kuberuntime/kuberuntime_gc.go

    			continue
    		}
    
    		createdAt := time.Unix(0, container.CreatedAt)
    		if newestGCTime.Before(createdAt) {
    			continue
    		}
    
    		labeledInfo := getContainerInfoFromLabels(container.Labels)
    		containerInfo := containerGCInfo{
    			id:         container.Id,
    			name:       container.Metadata.Name,
    			createTime: createdAt,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  4. pkg/kubelet/kuberuntime/kuberuntime_container.go

    }
    
    func toKubeContainerStatus(status *runtimeapi.ContainerStatus, runtimeName string) *kubecontainer.Status {
    	annotatedInfo := getContainerInfoFromAnnotations(status.Annotations)
    	labeledInfo := getContainerInfoFromLabels(status.Labels)
    	var cStatusResources *kubecontainer.ContainerResources
    	if utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 54.7K bytes
    - Viewed (0)
  5. pkg/kubelet/kuberuntime/kuberuntime_manager.go

    	}
    	for i := range containers {
    		c := containers[i]
    		if c.Metadata == nil {
    			klog.V(4).InfoS("Container does not have metadata", "container", c)
    			continue
    		}
    
    		labelledInfo := getContainerInfoFromLabels(c.Labels)
    		pod, found := pods[labelledInfo.PodUID]
    		if !found {
    			pod = &kubecontainer.Pod{
    				ID:        labelledInfo.PodUID,
    				Name:      labelledInfo.PodName,
    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