Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for newContainerLabels (0.2 sec)

  1. pkg/kubelet/kuberuntime/labels.go

    	return labels
    }
    
    // newPodAnnotations creates pod annotations from v1.Pod.
    func newPodAnnotations(pod *v1.Pod) map[string]string {
    	return pod.Annotations
    }
    
    // newContainerLabels creates container labels from v1.Container and v1.Pod.
    func newContainerLabels(container *v1.Container, pod *v1.Pod) map[string]string {
    	labels := map[string]string{}
    	labels[types.KubernetesPodNameLabel] = pod.Name
    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

    				PodUID:        pod.UID,
    				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)
    		}
    	}
    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_container_linux_test.go

    		},
    		Image:       &runtimeapi.ImageSpec{Image: container.Image, UserSpecifiedImage: container.Image},
    		Command:     container.Command,
    		Args:        []string(nil),
    		WorkingDir:  container.WorkingDir,
    		Labels:      newContainerLabels(container, pod),
    		Annotations: newContainerAnnotations(container, pod, restartCount, opts),
    		Devices:     makeDevices(opts),
    		Mounts:      m.makeMounts(opts, container),
    		LogPath:     containerLogsPath,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 41K bytes
    - Viewed (0)
  4. pkg/kubelet/kuberuntime/kuberuntime_container.go

    		},
    		Image:       &runtimeapi.ImageSpec{Image: imageRef, UserSpecifiedImage: container.Image},
    		Command:     command,
    		Args:        args,
    		WorkingDir:  container.WorkingDir,
    		Labels:      newContainerLabels(container, pod),
    		Annotations: newContainerAnnotations(container, pod, restartCount, opts),
    		Devices:     makeDevices(opts),
    		CDIDevices:  makeCDIDevices(opts),
    		Mounts:      m.makeMounts(opts, container),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 54.7K bytes
    - Viewed (0)
Back to top