Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for GetPodFullName (0.24 sec)

  1. pkg/kubelet/pod/pod_manager.go

    	pm.lock.RLock()
    	defer pm.lock.RUnlock()
    	mirrorPod, ok := pm.mirrorPodByFullName[kubecontainer.GetPodFullName(pod)]
    	return mirrorPod, ok
    }
    
    func (pm *basicManager) GetPodByMirrorPod(mirrorPod *v1.Pod) (*v1.Pod, bool) {
    	pm.lock.RLock()
    	defer pm.lock.RUnlock()
    	pod, ok := pm.podByFullName[kubecontainer.GetPodFullName(mirrorPod)]
    	return pod, ok
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:00 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  2. pkg/scheduler/util/utils.go

    	"k8s.io/klog/v2"
    	extenderv1 "k8s.io/kube-scheduler/extender/v1"
    	v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
    )
    
    // GetPodFullName returns a name that uniquely identifies a pod.
    func GetPodFullName(pod *v1.Pod) string {
    	// Use underscore as the delimiter because it is not allowed in pod name
    	// (DNS subdomain format).
    	return pod.Name + "_" + pod.Namespace
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 21 01:40:44 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  3. pkg/kubelet/pod/testing/fake_mirror_client.go

    	m.deleteCounts = make(map[string]int)
    	return &m
    }
    
    func (fmc *FakeMirrorClient) CreateMirrorPod(pod *v1.Pod) error {
    	fmc.mirrorPodLock.Lock()
    	defer fmc.mirrorPodLock.Unlock()
    	podFullName := kubecontainer.GetPodFullName(pod)
    	fmc.mirrorPods.Insert(podFullName)
    	fmc.createCounts[podFullName]++
    	return nil
    }
    
    // TODO (Robert Krawitz): Implement UID checking
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  4. pkg/scheduler/internal/queue/scheduling_queue_test.go

    				util.GetPodFullName(pods[0]): {PodInfo: mustNewTestPodInfo(t, pods[0]), UnschedulablePlugins: sets.New[string]()},
    				util.GetPodFullName(pods[1]): {PodInfo: mustNewTestPodInfo(t, pods[1]), UnschedulablePlugins: sets.New[string]()},
    				util.GetPodFullName(pods[2]): {PodInfo: mustNewTestPodInfo(t, pods[2]), UnschedulablePlugins: sets.New[string]()},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 146.9K bytes
    - Viewed (0)
  5. pkg/kubelet/server/server.go

    		return
    	}
    	fw := flushwriter.Wrap(response.ResponseWriter)
    	response.Header().Set("Transfer-Encoding", "chunked")
    	if err := s.host.GetKubeletContainerLogs(ctx, kubecontainer.GetPodFullName(pod), containerName, logOptions, fw, fw); err != nil {
    		response.WriteError(http.StatusBadRequest, err)
    		return
    	}
    }
    
    // encodePods creates an v1.PodList object from pods and returns the encoded
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 40.1K bytes
    - Viewed (0)
  6. pkg/scheduler/util/utils_test.go

    	extenderv1 "k8s.io/kube-scheduler/extender/v1"
    )
    
    func TestGetPodFullName(t *testing.T) {
    	pod := &v1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Namespace: "test",
    			Name:      "pod",
    		},
    	}
    	got := GetPodFullName(pod)
    	expected := fmt.Sprintf("%s_%s", pod.Name, pod.Namespace)
    	if got != expected {
    		t.Errorf("Got wrong full name, got: %s, expected: %s", got, expected)
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 21 01:40:44 UTC 2023
    - 14.5K bytes
    - Viewed (0)
  7. pkg/kubelet/container/runtime.go

    	}
    	return &pod
    }
    
    // IsEmpty returns true if the pod is empty.
    func (p *Pod) IsEmpty() bool {
    	return reflect.DeepEqual(p, &Pod{})
    }
    
    // GetPodFullName returns a name that uniquely identifies a pod.
    func GetPodFullName(pod *v1.Pod) string {
    	// Use underscore as the delimiter because it is not allowed in pod name
    	// (DNS subdomain format), while allowed in the container name format.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  8. pkg/kubelet/config/config.go

    	for i, pod := range pods {
    		// Pods from each source are assumed to have passed validation individually.
    		// This function only checks if there is any naming conflict.
    		name := kubecontainer.GetPodFullName(pod)
    		if names.Has(name) {
    			klog.InfoS("Pod failed validation due to duplicate pod name, ignoring", "index", i, "pod", klog.KObj(pod), "source", source)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  9. pkg/kubelet/kubelet_test.go

    	kl.podWorkers.(*fakePodWorkers).terminatingStaticPods = map[string]bool{
    		kubecontainer.GetPodFullName(orphanPods[2]): true,
    	}
    
    	// Sync with an empty pod list to delete all mirror pods.
    	kl.HandlePodCleanups(ctx)
    	assert.Len(t, manager.GetPods(), 0, "Expected 0 mirror pods")
    	for i, pod := range orphanPods {
    		name := kubecontainer.GetPodFullName(pod)
    		creates, deletes := manager.GetCounts(name)
    		switch i {
    		case 2:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 106.9K bytes
    - Viewed (0)
  10. pkg/kubelet/kubelet_pods_test.go

    	fakeRuntime.PodList = []*containertest.FakePod{}
    
    	podName := "podFoo"
    	podNamespace := "nsFoo"
    	containerName := "containerFoo"
    	output, err := kubelet.RunInContainer(
    		ctx,
    		kubecontainer.GetPodFullName(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: podName, Namespace: podNamespace}}),
    		"",
    		containerName,
    		[]string{"ls"})
    	assert.Error(t, err)
    	assert.Nil(t, output, "output should be nil")
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 198.8K bytes
    - Viewed (0)
Back to top