Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for IsRestartableInitContainer (0.33 sec)

  1. pkg/kubelet/apis/podresources/server_v1.go

    			pRes.Containers = make([]*podresourcesv1.ContainerResources, 0, len(pod.Spec.InitContainers)+len(pod.Spec.Containers))
    
    			for _, container := range pod.Spec.InitContainers {
    				if !types.IsRestartableInitContainer(&container) {
    					continue
    				}
    
    				pRes.Containers = append(pRes.Containers, p.getContainerResources(pod, &container))
    			}
    		}
    
    		for _, container := range pod.Spec.Containers {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 21 13:00:09 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. pkg/kubelet/types/pod_update.go

    func IsNodeCriticalPod(pod *v1.Pod) bool {
    	return IsCriticalPod(pod) && (pod.Spec.PriorityClassName == scheduling.SystemNodeCritical)
    }
    
    // IsRestartableInitContainer returns true if the initContainer has
    // ContainerRestartPolicyAlways.
    func IsRestartableInitContainer(initContainer *v1.Container) bool {
    	if initContainer.RestartPolicy == nil {
    		return false
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 07 22:26:12 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  3. pkg/kubelet/status/generate.go

    			Reason: UnknownContainerStatuses,
    		}
    	}
    	unknownContainers := []string{}
    	unreadyContainers := []string{}
    
    	for _, container := range spec.InitContainers {
    		if !kubetypes.IsRestartableInitContainer(&container) {
    			continue
    		}
    
    		if containerStatus, ok := podutil.GetContainerStatus(containerStatuses, container.Name); ok {
    			if !containerStatus.Ready {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 12 15:18:11 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  4. pkg/kubelet/prober/prober_manager.go

    		return "UNKNOWN"
    	}
    }
    
    func getRestartableInitContainers(pod *v1.Pod) []v1.Container {
    	var restartableInitContainers []v1.Container
    	for _, c := range pod.Spec.InitContainers {
    		if kubetypes.IsRestartableInitContainer(&c) {
    			restartableInitContainers = append(restartableInitContainers, c)
    		}
    	}
    	return restartableInitContainers
    }
    
    func (m *manager) AddPod(pod *v1.Pod) {
    	m.workerLock.Lock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 07 22:26:12 UTC 2023
    - 11K bytes
    - Viewed (0)
  5. pkg/kubelet/kuberuntime/kuberuntime_termination_order.go

    		// get the init containers in reverse order
    		ic := pod.Spec.InitContainers[len(pod.Spec.InitContainers)-i-1]
    
    		to.terminated[ic.Name] = make(chan struct{})
    
    		if types.IsRestartableInitContainer(&ic) {
    			// sidecars need to wait for all main containers to exit
    			to.prereqs[ic.Name] = append(to.prereqs[ic.Name], mainContainerChannels...)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 00:07:21 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  6. pkg/kubelet/kuberuntime/kuberuntime_container.go

    			// Restart it if it is a restartable init container.
    			if isPreviouslyInitialized && types.IsRestartableInitContainer(container) {
    				changes.InitContainersToStart = append(changes.InitContainersToStart, i)
    			}
    			continue
    		}
    
    		if isPreviouslyInitialized && !types.IsRestartableInitContainer(container) {
    			// after initialization, only restartable init containers need to be kept
    			// running
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 54.7K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/memorymanager/policy_static.go

    			}
    
    			// See https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/753-sidecar-containers#resources-calculation-for-scheduling-and-pod-admission
    			// for the detail.
    			if types.IsRestartableInitContainer(&ctr) {
    				reqRsrcsByRestartableInitCtrs[rsrcName] += qty
    			} else if reqRsrcsByRestartableInitCtrs[rsrcName]+qty > reqRsrcsByInitCtrs[rsrcName] {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Nov 12 07:34:55 UTC 2023
    - 34K bytes
    - Viewed (0)
  8. pkg/kubelet/lifecycle/predicate.go

    	// TODO: Remove this after the SidecarContainers feature gate graduates to GA.
    	if !utilfeature.DefaultFeatureGate.Enabled(features.SidecarContainers) {
    		for _, c := range admitPod.Spec.InitContainers {
    			if types.IsRestartableInitContainer(&c) {
    				message := fmt.Sprintf("Init container %q may not have a non-default restartPolicy", c.Name)
    				klog.InfoS("Failed to admit pod", "pod", klog.KObj(admitPod), "message", message)
    				return PodAdmitResult{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 00:47:50 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/cpumanager/policy_static.go

    	// If so, add its cpuset to the cpuset of reusable CPUs for any new allocations.
    	for _, initContainer := range pod.Spec.InitContainers {
    		if container.Name == initContainer.Name {
    			if types.IsRestartableInitContainer(&initContainer) {
    				// If the container is a restartable init container, we should not
    				// reuse its cpuset, as a restartable init container can run with
    				// regular containers.
    				break
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 06 13:16:15 UTC 2023
    - 28.8K bytes
    - Viewed (0)
  10. pkg/kubelet/cm/memorymanager/memory_manager.go

    			break
    		}
    
    		// Since a restartable init container remains running for the full
    		// duration of the pod's lifecycle, we should not remove it from the
    		// memory manager state.
    		if types.IsRestartableInitContainer(&initContainer) {
    			continue
    		}
    
    		m.policyRemoveContainerByRef(string(pod.UID), initContainer.Name)
    	}
    }
    
    // GetMemoryNUMANodes provides NUMA nodes that used to allocate the container memory
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 00:50:45 UTC 2023
    - 17.1K bytes
    - Viewed (0)
Back to top