Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ToAPIPod (0.12 sec)

  1. pkg/kubelet/container/runtime.go

    	for _, c := range p.Sandboxes {
    		if c.ID == id {
    			return c
    		}
    	}
    	return nil
    }
    
    // ToAPIPod converts Pod to v1.Pod. Note that if a field in v1.Pod has no
    // corresponding field in Pod, the field would not be populated.
    func (p *Pod) ToAPIPod() *v1.Pod {
    	var pod v1.Pod
    	pod.UID = p.ID
    	pod.Name = p.Name
    	pod.Namespace = p.Namespace
    
    	for _, c := range p.Containers {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  2. pkg/kubelet/kubelet_getters.go

    	pods, err := kl.runtimeCache.GetPods(ctx)
    	if err != nil {
    		return nil, err
    	}
    
    	apiPods := make([]*v1.Pod, 0, len(pods))
    	for _, pod := range pods {
    		apiPods = append(apiPods, pod.ToAPIPod())
    	}
    	return apiPods, nil
    }
    
    // GetPodByFullName gets the pod with the given 'full' name, which
    // incorporates the namespace as well as whether the pod was found.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 00:48:07 UTC 2024
    - 17.9K bytes
    - Viewed (0)
Back to top