Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ToAPIPod (0.1 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)
  3. pkg/kubelet/pod_workers.go

    			pod = status.activeUpdate.Pod
    			options.Pod = pod
    			options.RunningPod = nil
    		default:
    			// we will continue to use RunningPod.ToAPIPod() as pod here, but
    			// options.Pod will be nil and other methods must handle that appropriately.
    			pod = options.RunningPod.ToAPIPod()
    		}
    	}
    
    	// When we see a create update on an already terminating pod, that implies two pods with the same UID were created in
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 02 13:22:37 UTC 2024
    - 74.8K bytes
    - Viewed (0)
  4. pkg/kubelet/kubelet.go

    	// TODO(#113606): connect this with the incoming context parameter, which comes from the pod worker.
    	// Currently, using that context causes test failures.
    	ctx := context.Background()
    	pod := runningPod.ToAPIPod()
    	klog.V(4).InfoS("SyncTerminatingRuntimePod enter", "pod", klog.KObj(pod), "podUID", pod.UID)
    	defer klog.V(4).InfoS("SyncTerminatingRuntimePod exit", "pod", klog.KObj(pod), "podUID", pod.UID)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 126.1K bytes
    - Viewed (0)
Back to top