Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for admitPod (0.23 sec)

  1. pkg/kubelet/lifecycle/predicate.go

    		return PodAdmitResult{
    			Admit:   false,
    			Reason:  "InvalidNodeInfo",
    			Message: "Kubelet cannot get node info.",
    		}
    	}
    	admitPod := attrs.Pod
    
    	// perform the checks that preemption will not help first to avoid meaningless pod eviction
    	if rejectPodAdmissionBasedOnOSSelector(admitPod, node) {
    		return PodAdmitResult{
    			Admit:   false,
    			Reason:  "PodOSSelectorNodeLabelDoesNotMatch",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 00:47:50 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  2. pkg/kubelet/preemption/preemption.go

    // to allow admission of the pod despite its previous failure.
    func (c *CriticalPodAdmissionHandler) HandleAdmissionFailure(admitPod *v1.Pod, failureReasons []lifecycle.PredicateFailureReason) ([]lifecycle.PredicateFailureReason, error) {
    	if !kubetypes.IsCriticalPod(admitPod) {
    		return failureReasons, nil
    	}
    	// InsufficientResourceError is not a reason to reject a critical pod.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 16:53:19 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  3. plugin/pkg/admission/priority/admission.go

    			return p.validatePriorityClass(a)
    		}
    		return nil
    
    	default:
    		return nil
    	}
    }
    
    // admitPod makes sure a new pod does not set spec.Priority field. It also makes sure that the PriorityClassName exists if it is provided and resolves the pod priority from the PriorityClassName.
    func (p *Plugin) admitPod(a admission.Attributes) error {
    	operation := a.GetOperation()
    	pod, ok := a.GetObject().(*core.Pod)
    	if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 08 10:11:23 UTC 2022
    - 9K bytes
    - Viewed (0)
  4. plugin/pkg/admission/imagepolicy/admission.go

    			Annotations: a.filterAnnotations(pod.Annotations),
    			Namespace:   attributes.GetNamespace(),
    		},
    	}
    	if err := a.admitPod(ctx, pod, attributes, &imageReview); err != nil {
    		return admission.NewForbidden(attributes, err)
    	}
    	return nil
    }
    
    func (a *Plugin) admitPod(ctx context.Context, pod *api.Pod, attributes admission.Attributes, review *v1alpha1.ImageReview) error {
    	cacheKey, err := json.Marshal(review.Spec)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 06:05:06 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  5. plugin/pkg/admission/noderestriction/admission.go

    	case resourceSliceResource:
    		return p.admitResourceSlice(nodeName, a)
    
    	default:
    		return nil
    	}
    }
    
    // admitPod allows creating or deleting a pod if it is assigned to the
    // current node and fulfills related criteria.
    func (p *Plugin) admitPod(nodeName string, a admission.Attributes) error {
    	switch a.GetOperation() {
    	case admission.Create:
    		return p.admitPodCreate(nodeName, a)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  6. pkg/kubelet/runonce.go

    	ch := make(chan RunPodResult)
    	admitted := []*v1.Pod{}
    	for _, pod := range pods {
    		// Check if we can admit the pod.
    		if ok, reason, message := kl.canAdmitPod(admitted, pod); !ok {
    			kl.rejectPod(pod, reason, message)
    			results = append(results, RunPodResult{pod, nil})
    			continue
    		}
    
    		admitted = append(admitted, pod)
    		go func(pod *v1.Pod) {
    			err := kl.runPod(ctx, pod, retryDelay)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 04 06:56:50 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  7. plugin/pkg/admission/namespace/exists/admission_test.go

    		Spec: api.PodSpec{
    			Volumes:    []api.Volume{{Name: "vol"}},
    			Containers: []api.Container{{Name: "ctr", Image: "image"}},
    		},
    	}
    }
    
    // TestAdmissionNamespaceExists verifies pod is admitted only if namespace exists.
    func TestAdmissionNamespaceExists(t *testing.T) {
    	namespace := "test"
    	mockClient := newMockClientForTest([]string{namespace})
    	handler, informerFactory, err := newHandlerForTest(mockClient)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  8. pkg/kubelet/apis/podresources/types.go

    	// GetAllocatableDevices returns information about all the devices known to the manager
    	GetAllocatableDevices() []*podresourcesapi.ContainerDevices
    }
    
    // PodsProvider knows how to provide the pods admitted by the node
    type PodsProvider interface {
    	GetPods() []*v1.Pod
    	GetPodByName(namespace, name string) (*v1.Pod, bool)
    }
    
    // CPUsProvider knows how to provide the cpus used by the given container
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 17:33:04 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timing_ratio_histogram_test.go

    	samplingPeriod := time.Nanosecond
    	steppingPeriod := time.Millisecond
    	tro.Set(1)
    	// `dt` is the admitted cumulative difference in fake time
    	// since the start of the test.  "admitted" means this is
    	// never allowed to decrease, which matches the designed
    	// toleration for negative monotonic clock changes.
    	var dt time.Duration
    	// `t1` is the current fake time
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 13 16:03:06 UTC 2022
    - 8.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission_test.go

    	if err != nil {
    		t.Error(err)
    	}
    }
    
    // TestAdmissionNamespaceDoesNotExist verifies pod is not admitted if namespace does not exist.
    func TestAdmissionNamespaceDoesNotExist(t *testing.T) {
    	namespace := "test"
    	mockClient := newMockClientForTest(map[string]v1.NamespacePhase{})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 14.2K bytes
    - Viewed (0)
Back to top