Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 175 for podutil (0.13 sec)

  1. pkg/registry/core/pod/strategy.go

    		// as a signal to the caller that the request is being considered.
    		podutil.MarkPodProposedForResize(oldPod, newPod)
    	}
    
    	podutil.DropDisabledPodFields(newPod, oldPod)
    }
    
    // Validate validates a new pod.
    func (podStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
    	pod := obj.(*api.Pod)
    	opts := podutil.GetValidationOptionsFromPodSpecAndMeta(&pod.Spec, nil, &pod.ObjectMeta, nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 17:51:48 UTC 2024
    - 29.8K bytes
    - Viewed (0)
  2. pkg/kubelet/container/helpers.go

    // GetContainerSpec gets the container spec by containerName.
    func GetContainerSpec(pod *v1.Pod, containerName string) *v1.Container {
    	var containerSpec *v1.Container
    	podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(c *v1.Container, containerType podutil.ContainerType) bool {
    		if containerName == c.Name {
    			containerSpec = c
    			return false
    		}
    		return true
    	})
    	return containerSpec
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  3. pkg/api/v1/resource/helpers.go

    limitations under the License.
    */
    
    package resource
    
    import (
    	"fmt"
    	"math"
    	"strconv"
    	"strings"
    
    	v1 "k8s.io/api/core/v1"
    	"k8s.io/apimachinery/pkg/api/resource"
    
    	podutil "k8s.io/kubernetes/pkg/api/v1/pod"
    )
    
    // PodResourcesOptions controls the behavior of PodRequests and PodLimits.
    type PodResourcesOptions struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 26 13:58:16 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  4. pkg/kubelet/status/generate.go

    			continue
    		}
    
    		if containerStatus, ok := podutil.GetContainerStatus(containerStatuses, container.Name); ok {
    			if !containerStatus.Ready {
    				unreadyContainers = append(unreadyContainers, container.Name)
    			}
    		} else {
    			unknownContainers = append(unknownContainers, container.Name)
    		}
    	}
    
    	for _, container := range spec.Containers {
    		if containerStatus, ok := podutil.GetContainerStatus(containerStatuses, container.Name); ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 12 15:18:11 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  5. pkg/controller/controller_utils.go

    	}
    	// 3. ready < not ready
    	if podutil.IsPodReady(s[i]) != podutil.IsPodReady(s[j]) {
    		return podutil.IsPodReady(s[i])
    	}
    	// TODO: take availability into account when we push minReadySeconds information from deployment into pods,
    	//       see https://github.com/kubernetes/kubernetes/issues/22065
    	// 4. Been ready for more time < less time < empty time
    	if podutil.IsPodReady(s[i]) && podutil.IsPodReady(s[j]) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 12 15:34:44 UTC 2024
    - 47.6K bytes
    - Viewed (0)
  6. pkg/kubelet/status/status_manager.go

    	// See https://issues.k8s.io/108594 for more details.
    	if podutil.IsPodPhaseTerminal(newPodStatus.Phase) {
    		if podutil.IsPodReadyConditionTrue(newPodStatus) || podutil.IsContainersReadyConditionTrue(newPodStatus) {
    			containersReadyCondition := generateContainersReadyConditionForTerminalPhase(newPodStatus.Phase)
    			podutil.UpdatePodCondition(&newPodStatus, &containersReadyCondition)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 16:27:19 UTC 2024
    - 44.3K bytes
    - Viewed (0)
  7. pkg/volume/util/util.go

    	mounts = sets.New[string]()
    	devices = sets.New[string]()
    	seLinuxContainerContexts = make(map[string][]*v1.SELinuxOptions)
    
    	podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(container *v1.Container, containerType podutil.ContainerType) bool {
    		var seLinuxOptions *v1.SELinuxOptions
    		if utilfeature.DefaultFeatureGate.Enabled(features.SELinuxMountReadWriteOncePod) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 12:32:15 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  8. pkg/controller/daemon/update.go

    			case newPod != nil:
    				// this pod is up to date, check its availability
    				if !podutil.IsPodAvailable(newPod, ds.Spec.MinReadySeconds, metav1.Time{Time: now}) {
    					// an unavailable new pod is counted against maxUnavailable
    					numUnavailable++
    				}
    			default:
    				// this pod is old, it is an update candidate
    				switch {
    				case !podutil.IsPodAvailable(oldPod, ds.Spec.MinReadySeconds, metav1.Time{Time: now}):
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 13 16:53:53 UTC 2024
    - 24.4K bytes
    - Viewed (0)
  9. pkg/kubelet/prober/worker.go

    		klog.V(3).InfoS("Pod is terminated, exiting probe worker",
    			"pod", klog.KObj(w.pod), "phase", status.Phase)
    		return false
    	}
    
    	c, ok := podutil.GetContainerStatus(status.ContainerStatuses, w.container.Name)
    	if !ok || len(c.ContainerID) == 0 {
    		c, ok = podutil.GetContainerStatus(status.InitContainerStatuses, w.container.Name)
    		if !ok || len(c.ContainerID) == 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 27 01:28:06 UTC 2023
    - 10.7K bytes
    - Viewed (0)
  10. pkg/kubelet/cm/helpers_linux.go

    			}
    			out = append(out, pid)
    		}
    	}
    	return out, nil
    }
    
    // GetPodCgroupNameSuffix returns the last element of the pod CgroupName identifier
    func GetPodCgroupNameSuffix(podUID types.UID) string {
    	return podCgroupNamePrefix + string(podUID)
    }
    
    // NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup
    func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver string) string {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 14 11:52:28 UTC 2023
    - 9.8K bytes
    - Viewed (0)
Back to top