Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for IsPodTerminal (0.18 sec)

  1. pkg/api/v1/pod/util.go

    }
    
    // IsPodReady returns true if a pod is ready; false otherwise.
    func IsPodReady(pod *v1.Pod) bool {
    	return IsPodReadyConditionTrue(pod.Status)
    }
    
    // IsPodTerminal returns true if a pod is terminal, all containers are stopped and cannot ever regress.
    func IsPodTerminal(pod *v1.Pod) bool {
    	return IsPodPhaseTerminal(pod.Status.Phase)
    }
    
    // IsPodPhaseTerminal returns true if the pod's phase is terminal.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 24 17:18:04 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  2. pkg/api/v1/pod/util_test.go

    			expected: false,
    		},
    		{
    			expected: false,
    		},
    	}
    
    	for i, test := range tests {
    		pod := newPod(now, true, 0)
    		pod.Status.Phase = test.podPhase
    		isTerminal := IsPodTerminal(pod)
    		if isTerminal != test.expected {
    			t.Errorf("[tc #%d] expected terminal pod: %t, got: %t", i, test.expected, isTerminal)
    		}
    	}
    }
    
    func TestGetContainerStatus(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 11:04:08 UTC 2023
    - 32.1K bytes
    - Viewed (0)
  3. pkg/kubelet/kubelet_pods_test.go

    		currentStatus                              *kubecontainer.PodStatus
    		unreadyContainer                           []string
    		previousStatus                             v1.PodStatus
    		isPodTerminal                              bool
    		enablePodDisruptionConditions              bool
    		expected                                   v1.PodStatus
    		expectedPodDisruptionCondition             v1.PodCondition
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 198.8K bytes
    - Viewed (0)
  4. pkg/controller/resourceclaim/controller.go

    }
    
    func podNeedsClaims(pod *v1.Pod, deleted bool) (bool, string) {
    	if deleted {
    		return false, "pod got removed"
    	}
    	if podutil.IsPodTerminal(pod) {
    		return false, "pod has terminated"
    	}
    	if pod.DeletionTimestamp != nil && pod.Spec.NodeName == "" {
    		return false, "pod got deleted before scheduling"
    	}
    	// Still needs claims.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 03:34:25 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  5. pkg/controller/daemon/daemon_controller.go

    		return nil, err
    	}
    	// Group Pods by Node name.
    	nodeToDaemonPods := make(map[string][]*v1.Pod)
    	logger := klog.FromContext(ctx)
    	for _, pod := range claimedPods {
    		if !includeDeletedTerminal && podutil.IsPodTerminal(pod) && pod.DeletionTimestamp != nil {
    			// This Pod has a finalizer or is already scheduled for deletion from the
    			// store by the kubelet or the Pod GC. The DS controller doesn't have
    			// anything else to do with it.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 51.3K bytes
    - Viewed (0)
  6. pkg/controller/controller_utils.go

    func IsPodActive(p *v1.Pod) bool {
    	return v1.PodSucceeded != p.Status.Phase &&
    		v1.PodFailed != p.Status.Phase &&
    		p.DeletionTimestamp == nil
    }
    
    func IsPodTerminating(p *v1.Pod) bool {
    	return !podutil.IsPodTerminal(p) &&
    		p.DeletionTimestamp != nil
    }
    
    // FilterActiveReplicaSets returns replica sets that have (or at least ought to have) pods.
    func FilterActiveReplicaSets(replicaSets []*apps.ReplicaSet) []*apps.ReplicaSet {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 12 15:34:44 UTC 2024
    - 47.6K bytes
    - Viewed (0)
Back to top