Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 123 for waitForCacheSync (0.3 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/borrowing_test.go

    			stopCh := ctx.Done()
    			controllerCompletionCh := make(chan error)
    
    			informerFactory.Start(stopCh)
    
    			status := informerFactory.WaitForCacheSync(ctx.Done())
    			if names := unsynced(status); len(names) > 0 {
    				t.Fatalf("WaitForCacheSync did not successfully complete, resources=%#v", names)
    			}
    
    			go func() {
    				controllerCompletionCh <- controller.Run(stopCh)
    			}()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 9K bytes
    - Viewed (0)
  2. security/pkg/server/ca/node_auth_test.go

    						NodeName:           p.node,
    					},
    				})
    			}
    			c := kube.NewFakeClient(pods...)
    			na := NewClusterNodeAuthorizer(c, tt.trustedAccounts)
    			c.RunAndWait(test.NewStop(t))
    			kube.WaitForCacheSync("test", test.NewStop(t), na.pods.HasSynced)
    
    			err := na.authenticateImpersonation(tt.caller, tt.requestedIdentityString)
    			if tt.wantErr == "" && err != nil {
    				t.Fatalf("wanted no error, got %v", err)
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 16:41:38 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. pkg/kube/watcher/configmapwatcher/configmapwatcher_test.go

    		{deleted: cm1, expectCalled: true},
    		{deleted: cm2},
    	}
    
    	stop := make(chan struct{})
    	c := NewController(client, configMapNamespace, configMapName, callback)
    	go c.Run(stop)
    	kube.WaitForCacheSync("test", stop, c.HasSynced)
    
    	cms := client.Kube().CoreV1().ConfigMaps(configMapNamespace)
    	for i, step := range steps {
    		resetCalled()
    
    		t.Run(fmt.Sprintf("[%v]", i), func(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. pkg/revisions/default_watcher.go

    	p.webhooks.AddEventHandler(controllers.FilteredObjectHandler(p.queue.AddObject, isDefaultTagWebhook))
    
    	return p
    }
    
    func (p *defaultWatcher) Run(stopCh <-chan struct{}) {
    	kube.WaitForCacheSync("default revision", stopCh, p.webhooks.HasSynced)
    	p.queue.Run(stopCh)
    }
    
    // GetDefault returns the current default revision.
    func (p *defaultWatcher) GetDefault() string {
    	p.mu.RLock()
    	defer p.mu.RUnlock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 09 02:22:47 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  5. pkg/revisions/tag_watcher.go

    			if rev == "" {
    				return nil
    			}
    			return []string{rev}
    		}, controllers.ObjectHandler(p.queue.AddObject))
    	return p
    }
    
    func (p *tagWatcher) Run(stopCh <-chan struct{}) {
    	if !kube.WaitForCacheSync("tag watcher", stopCh, p.webhooks.HasSynced) {
    		return
    	}
    	// Notify handlers of initial state
    	p.notifyHandlers()
    	p.queue.Run(stopCh)
    }
    
    // AddHandler registers a new handler for updates to tag changes.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 00:12:28 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  6. cni/pkg/repair/repair_test.go

    			assert.NoError(t, err)
    			t.Cleanup(func() {
    				assert.NoError(t, c.queue.WaitForClose(time.Second))
    			})
    			stop := test.NewStop(t)
    			tt.client.RunAndWait(stop)
    			go c.Run(stop)
    			kube.WaitForCacheSync("test", stop, c.queue.HasSynced)
    
    			assert.EventuallyEqual(t, func() map[string]string {
    				havePods := c.pods.List(metav1.NamespaceAll, klabels.Everything())
    				slices.SortBy(havePods, func(a *corev1.Pod) string {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 24 03:31:28 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  7. pkg/kube/controllers/example_test.go

    	// First, wait for pods to sync. Once this is complete, we know the event handler for Pods will have
    	// ran for each item and enqueued everything.
    	kube.WaitForCacheSync("pod controller", stop, c.pods.HasSynced)
    
    	// Now we can run the queue. This will block until `stop` is closed.
    	c.queue.Run(stop)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 7K bytes
    - Viewed (0)
  8. pilot/pkg/config/kube/crdclient/client_test.go

    			}
    		}
    		clienttest.MakeCRDWithAnnotations(t, fake, s.GroupVersionResource(), annotations)
    	}
    	stop := test.NewStop(t)
    	config := New(fake, Option{})
    	go config.Run(stop)
    	fake.RunAndWait(stop)
    	kube.WaitForCacheSync("test", stop, config.HasSynced)
    	return config, fake
    }
    
    func createResource(t *testing.T, store model.ConfigStoreController, r resource.Schema, configMeta config.Meta) config.Spec {
    	pb, err := r.NewInstance()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 02:58:52 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  9. pkg/kube/inject/watcher_test.go

    		mu.Lock()
    		defer mu.Unlock()
    		newConfig = config
    		newValues = values
    		return nil
    	})
    	stop := test.NewStop(t)
    	go w.Run(stop)
    	controller := w.(*configMapWatcher).c
    	client.RunAndWait(stop)
    	kube.WaitForCacheSync("test", stop, controller.HasSynced)
    
    	cms := client.Kube().CoreV1().ConfigMaps(namespace)
    	steps := []struct {
    		added   *v1.ConfigMap
    		updated *v1.ConfigMap
    		deleted *v1.ConfigMap
    	}{
    		{added: cm},
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 04:22:19 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. pilot/pkg/serviceregistry/kube/controller/fake.go

    	}
    	opts.Client.RunAndWait(c.stop)
    	var fx *xdsfake.Updater
    	if x, ok := xdsUpdater.(*xdsfake.Updater); ok {
    		fx = x
    	}
    
    	if !opts.SkipRun {
    		go c.Run(c.stop)
    		kubelib.WaitForCacheSync("test", c.stop, c.HasSynced)
    	}
    
    	return &FakeController{Controller: c, Endpoints: endpoints}, fx
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top