Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for isPodTerminated (0.22 sec)

  1. pkg/controller/podgc/gc_controller.go

    	}
    	if gcc.terminatedPodThreshold > 0 {
    		gcc.gcTerminated(ctx, pods)
    	}
    	gcc.gcTerminating(ctx, pods)
    	gcc.gcOrphaned(ctx, pods, nodes)
    	gcc.gcUnscheduledTerminating(ctx, pods)
    }
    
    func isPodTerminated(pod *v1.Pod) bool {
    	if phase := pod.Status.Phase; phase != v1.PodPending && phase != v1.PodRunning && phase != v1.PodUnknown {
    		return true
    	}
    	return false
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. pkg/controller/volume/attachdetach/populator/desired_state_of_world_populator.go

    	if err != nil {
    		logger.Error(err, "PodLister List failed")
    		return
    	}
    	dswp.timeOfLastListPods = time.Now()
    
    	for _, pod := range pods {
    		if volutil.IsPodTerminated(pod, pod.Status) {
    			// Do not add volumes for terminated pods
    			continue
    		}
    		util.ProcessPodVolumes(logger, pod, true,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 00:37:30 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  3. pkg/controller/volume/attachdetach/util/util.go

    func DetermineVolumeAction(pod *v1.Pod, desiredStateOfWorld cache.DesiredStateOfWorld, defaultAction bool) bool {
    	if pod == nil || len(pod.Spec.Volumes) <= 0 {
    		return defaultAction
    	}
    
    	if util.IsPodTerminated(pod, pod.Status) {
    		return false
    	}
    	return defaultAction
    }
    
    // ProcessPodVolumes processes the volumes in the given pod and adds them to the
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 10:42:15 UTC 2024
    - 12K bytes
    - Viewed (0)
  4. pkg/volume/util/util.go

    			volumeSpec.Name(),
    			err)
    	}
    
    	return GetUniqueVolumeName(
    			volumePlugin.GetPluginName(),
    			volumeName),
    		nil
    }
    
    // IsPodTerminated checks if pod is terminated
    func IsPodTerminated(pod *v1.Pod, podStatus v1.PodStatus) bool {
    	// TODO: the guarantees provided by kubelet status are not sufficient to guarantee it's safe to ignore a deleted pod,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 12:32:15 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  5. pkg/controller/volume/pvcprotection/pvc_protection_controller.go

    		}
    	}
    	return pod
    }
    
    func (c *Controller) enqueuePVCs(logger klog.Logger, pod *v1.Pod, deleted bool) {
    	// Filter out pods that can't help us to remove a finalizer on PVC
    	if !deleted && !volumeutil.IsPodTerminated(pod, pod.Status) && pod.Spec.NodeName != "" {
    		return
    	}
    
    	logger.V(4).Info("Enqueuing PVCs for Pod", "pod", klog.KObj(pod), "podUID", pod.UID)
    
    	// Enqueue all PVCs that the pod uses
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 14K bytes
    - Viewed (0)
  6. pkg/controller/volume/attachdetach/attach_detach_controller.go

    	}
    	for _, obj := range objs {
    		pod, ok := obj.(*v1.Pod)
    		if !ok {
    			continue
    		}
    		// we are only interested in active pods with nodeName set
    		if len(pod.Spec.NodeName) == 0 || volumeutil.IsPodTerminated(pod, pod.Status) {
    			continue
    		}
    		volumeActionFlag := util.DetermineVolumeAction(
    			pod,
    			adc.desiredStateOfWorld,
    			true /* default volume action */)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 32.6K bytes
    - Viewed (0)
  7. pkg/controller/volume/persistentvolume/pv_controller.go

    	pods, err := ctrl.findPodsByPVCKey(pvcKey)
    	if err != nil {
    		return nil, false, fmt.Errorf("error finding pods by pvc %q: %s", pvcKey, err)
    	}
    	for _, pod := range pods {
    		if util.IsPodTerminated(pod, pod.Status) {
    			continue
    		}
    		podNames.Insert(pod.Namespace + "/" + pod.Name)
    	}
    	return podNames.List(), podNames.Len() != 0, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 08:42:31 UTC 2024
    - 89.2K bytes
    - Viewed (0)
Back to top