Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ContainerStateRunning (0.25 sec)

  1. pkg/kubelet/runonce.go

    func (kl *Kubelet) isPodRunning(pod *v1.Pod, status *kubecontainer.PodStatus) bool {
    	for _, c := range pod.Spec.Containers {
    		cs := status.FindContainerStatusByName(c.Name)
    		if cs == nil || cs.State != kubecontainer.ContainerStateRunning {
    			klog.InfoS("Container not running", "pod", klog.KObj(pod), "containerName", c.Name)
    			return false
    		}
    	}
    	return true
    }
    
    // getFailedContainer returns failed container name for pod.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 04 06:56:50 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  2. pkg/kubelet/runonce_test.go

    	// TODO(random-liu) Fix the test, make it meaningful.
    	fakeRuntime.PodStatus = kubecontainer.PodStatus{
    		ContainerStatuses: []*kubecontainer.Status{
    			{
    				Name:  "bar",
    				State: kubecontainer.ContainerStateRunning,
    			},
    		},
    	}
    	results, err := kb.runOnce(ctx, pods, time.Millisecond)
    	if err != nil {
    		t.Errorf("unexpected error: %v", err)
    	}
    	if results[0].Err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 06:59:54 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. pkg/kubelet/prober/scale_test.go

    						Name:        fmt.Sprintf("container%d", j),
    						ContainerID: fmt.Sprintf("pod%d://container%d", i, j),
    						State: v1.ContainerState{
    							Running: &v1.ContainerStateRunning{
    								StartedAt: metav1.Now(),
    							},
    						},
    						Started: utilpointer.Bool(true),
    					})
    				}
    				podManager.AddPod(&pod)
    				m.statusManager.SetPodStatus(&pod, pod.Status)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 16 16:33:01 UTC 2023
    - 8.2K bytes
    - Viewed (0)
Back to top