Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for CrdWatcher (0.13 sec)

  1. pkg/kube/kclient/crdwatcher.go

    	// Unfortunate hack needed to avoid circular imports
    	kube.NewCrdWatcher = newCrdWatcher
    }
    
    // newCrdWatcher returns a new CRD watcher controller.
    func newCrdWatcher(client kube.Client) kubetypes.CrdWatcher {
    	c := &crdWatcher{
    		running:   make(chan struct{}),
    		callbacks: map[string][]func(){},
    	}
    
    	c.queue = controllers.NewQueue("crd watcher",
    		controllers.WithReconciler(c.Reconcile))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. pkg/kube/kclient/crdwatcher_test.go

    )
    
    // TestCRDWatcherRace tests for a previous bug where callbacks may be skipped if added during a handler
    func TestCRDWatcherRace(t *testing.T) {
    	stop := test.NewStop(t)
    	c := kube.NewFakeClient()
    	ctl := c.CrdWatcher()
    	vsCalls := atomic.NewInt32(0)
    
    	// Race callback and CRD creation
    	go func() {
    		if ctl.KnownOrCallback(gvr.VirtualService, func(s <-chan struct{}) {
    			assert.Equal(t, s, stop)
    			// Happened async
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  3. pkg/kube/client.go

    	GatewayAPI() gatewayapiclient.Interface
    
    	// Informers returns an informer factory
    	Informers() informerfactory.InformerFactory
    
    	// CrdWatcher returns the CRD watcher for this client
    	CrdWatcher() kubetypes.CrdWatcher
    
    	// ObjectFilter returns an object filter that can be used to filter out unwanted objects based on configuration.
    	// This must be set on a client with SetObjectFilter.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 39K bytes
    - Viewed (0)
  4. pkg/kube/kclient/delayed.go

    		for _, h := range s.handlers {
    			inf.AddEventHandler(h)
    		}
    		s.handlers = nil
    		if s.started != nil {
    			inf.Start(s.started)
    		}
    	}
    }
    
    type delayedFilter struct {
    	Watcher  kubetypes.CrdWatcher
    	Resource schema.GroupVersionResource
    }
    
    func (d *delayedFilter) HasSynced() bool {
    	return d.Watcher.HasSynced()
    }
    
    func (d *delayedFilter) KnownOrCallback(f func(stop <-chan struct{})) bool {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 31 02:32:59 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  5. pkg/kube/kubetypes/types.go

    	// If unset, a default transform is provided to remove ManagedFields (high cost, low value)
    	ObjectTransform func(obj any) (any, error)
    }
    
    // CrdWatcher exposes an interface to watch CRDs
    type CrdWatcher interface {
    	// HasSynced returns true once all existing state has been synced.
    	HasSynced() bool
    	// KnownOrCallback returns `true` immediately if the resource is known.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 16:41:38 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  6. pilot/pkg/bootstrap/configcontroller.go

    	if features.EnableGatewayAPI {
    		if s.statusManager == nil && features.EnableGatewayAPIStatus {
    			s.initStatusManager(args)
    		}
    		gwc := gateway.NewController(s.kubeClient, configController, s.kubeClient.CrdWatcher().WaitForCRD,
    			s.environment.CredentialsController, args.RegistryOptions.KubeOptions)
    		s.environment.GatewayAPIController = gwc
    		s.ConfigStores = append(s.ConfigStores, s.environment.GatewayAPIController)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 16:41:38 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  7. pkg/kube/kclient/client.go

    	c kube.Client,
    	gvr schema.GroupVersionResource,
    	informerType kubetypes.InformerType,
    	filter Filter,
    ) Informer[T] {
    	watcher := c.CrdWatcher()
    	if watcher == nil {
    		log.Fatalf("NewDelayedInformer called without a CrdWatcher enabled")
    	}
    	delay := newDelayedFilter(gvr, watcher)
    	inf := func() informerfactory.StartableInformer {
    		opts := ToOpts(c, gvr, filter)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 17 07:14:28 UTC 2024
    - 13K bytes
    - Viewed (0)
Back to top