Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for WaitForReady (0.31 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/handler_test.go

    	readyFunc = func() bool {
    		return false
    	}
    	startTime := time.Now()
    	handler.SetReadyFunc(readyFunc)
    	if handler.WaitForReady() {
    		t.Errorf("Expect not ready for readyFunc returns not ready immediately.")
    	}
    	if time.Since(startTime) < timeToWaitForReady {
    		t.Errorf("Expect WaitForReady timeout.")
    	}
    }
    
    func newFakeHandler() *Handler {
    	return NewHandler(Create, Update)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 08:47:19 UTC 2017
    - 1.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/handler.go

    func (h *Handler) SetReadyFunc(readyFunc ReadyFunc) {
    	h.readyFunc = readyFunc
    }
    
    // WaitForReady will wait for the readyFunc (if registered) to return ready, and in case of timeout, will return false.
    func (h *Handler) WaitForReady() bool {
    	// there is no ready func configured, so we return immediately
    	if h.readyFunc == nil {
    		return true
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 08:47:19 UTC 2017
    - 2.2K bytes
    - Viewed (0)
  3. plugin/pkg/admission/podnodeselector/admission.go

    func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {
    	if shouldIgnore(a) {
    		return nil
    	}
    	if !p.WaitForReady() {
    		return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request"))
    	}
    
    	resource := a.GetResource().GroupResource()
    	pod := a.GetObject().(*api.Pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  4. plugin/pkg/admission/podtolerationrestriction/admission.go

    func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {
    	if shouldIgnore(a) {
    		return nil
    	}
    
    	if !p.WaitForReady() {
    		return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request"))
    	}
    
    	pod := a.GetObject().(*api.Pod)
    	var extraTolerations []api.Toleration
    	if a.GetOperation() == admission.Create {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 29 20:07:59 UTC 2020
    - 8.3K bytes
    - Viewed (0)
  5. plugin/pkg/admission/namespace/exists/admission.go

    	// its a namespaced resource.
    	if len(a.GetNamespace()) == 0 || a.GetKind().GroupKind() == api.Kind("Namespace") {
    		return nil
    	}
    
    	// we need to wait for our caches to warm
    	if !e.WaitForReady() {
    		return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request"))
    	}
    	_, err := e.namespaceLister.Get(a.GetNamespace())
    	if err == nil {
    		return nil
    	}
    	if !errors.IsNotFound(err) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 08 02:16:47 UTC 2020
    - 3.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/grpc_service.go

    		return nil, err
    	}
    
    	s := &gRPCService{callTimeout: callTimeout}
    	s.connection, err = grpc.Dial(
    		addr,
    		grpc.WithTransportCredentials(insecure.NewCredentials()),
    		grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
    		grpc.WithContextDialer(
    			func(context.Context, string) (net.Conn, error) {
    				// Ignoring addr and timeout arguments:
    				// addr - comes from the closure
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 23:18:16 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  7. plugin/pkg/admission/namespace/autoprovision/admission.go

    	// its a namespaced resource.
    	if len(a.GetNamespace()) == 0 || a.GetKind().GroupKind() == api.Kind("Namespace") {
    		return nil
    	}
    	// we need to wait for our caches to warm
    	if !p.WaitForReady() {
    		return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request"))
    	}
    
    	_, err := p.namespaceLister.Get(a.GetNamespace())
    	if err == nil {
    		return nil
    	}
    
    	if !errors.IsNotFound(err) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 08 17:30:21 UTC 2020
    - 4.1K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go

    	s := &gRPCService{callTimeout: callTimeout}
    	s.connection, err = grpc.Dial(
    		addr,
    		grpc.WithTransportCredentials(insecure.NewCredentials()),
    		grpc.WithUnaryInterceptor(s.interceptor),
    		grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
    		grpc.WithContextDialer(
    			func(context.Context, string) (net.Conn, error) {
    				// Ignoring addr and timeout arguments:
    				// addr - comes from the closure
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 00:47:46 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/plugin.go

    	ctx context.Context,
    	a admission.Attributes,
    	o admission.ObjectInterfaces,
    ) (err error) {
    	if !c.enabled {
    		return nil
    	} else if c.shouldIgnoreResource(a) {
    		return nil
    	} else if !c.WaitForReady() {
    		return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request"))
    	}
    
    	return c.dispatcher.Dispatch(ctx, a, o, c.source.Hooks())
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 05 19:11:10 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go

    	}
    
    	// always allow access review checks.  Returning status about the namespace would be leaking information
    	if isAccessReview(a) {
    		return nil
    	}
    
    	// we need to wait for our caches to warm
    	if !l.WaitForReady() {
    		return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request"))
    	}
    
    	var (
    		exists bool
    		err    error
    	)
    
    	namespace, err := l.namespaceLister.Get(a.GetNamespace())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 15 09:52:18 UTC 2021
    - 8.6K bytes
    - Viewed (0)
Back to top