Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 81 for waitForCacheSync (0.32 sec)

  1. pkg/kube/krt/sync.go

    	return waitForCacheSync(c.name, stop, c.synced)
    }
    
    func (c channelSyncer) HasSynced() bool {
    	select {
    	case <-c.synced:
    		return true
    	default:
    		return false
    	}
    }
    
    type pollSyncer struct {
    	name string
    	f    func() bool
    }
    
    func (c pollSyncer) WaitUntilSynced(stop <-chan struct{}) bool {
    	return kube.WaitForCacheSync(c.name, stop, c.f)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 03 14:25:07 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin_test.go

    			wh.SetServiceResolver(webhooktesting.NewServiceResolver(*serverURL))
    			wh.SetExternalKubeClientSet(client)
    			wh.SetExternalKubeInformerFactory(informer)
    
    			informer.Start(stopCh)
    			informer.WaitForCacheSync(stopCh)
    
    			if err = wh.ValidateInitialization(); err != nil {
    				b.Errorf("%s: failed to validate initialization: %v", tt.Name, err)
    				return
    			}
    
    			attr := webhooktesting.NewAttribute(ns, nil, tt.IsDryRun)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:52 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  3. pkg/kube/client.go

    		}
    		if !sleep.Until(stop, delay) {
    			return false
    		}
    	}
    }
    
    // WaitForCacheSync is a specialized version of the general WaitForCacheSync function which also
    // handles fake client syncing.
    // This is only required in cases where fake clients are used without RunAndWait.
    func (c *client) WaitForCacheSync(name string, stop <-chan struct{}, cacheSyncs ...cache.InformerSynced) bool {
    	if c.informerWatchesPending == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 39K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin_test.go

    			wh.SetServiceResolver(webhooktesting.NewServiceResolver(*serverURL))
    			wh.SetExternalKubeClientSet(client)
    			wh.SetExternalKubeInformerFactory(informer)
    
    			informer.Start(stopCh)
    			informer.WaitForCacheSync(stopCh)
    
    			if err = wh.ValidateInitialization(); err != nil {
    				b.Errorf("failed to validate initialization: %v", err)
    				return
    			}
    
    			var attr admission.Attributes
    			if tt.IsCRD {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:52 UTC 2024
    - 11K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/internal/generic/controller_test.go

    	require.False(t, myController.HasSynced())
    
    	// Wait for all enqueued reconciliations
    	require.NoError(t, waitForReconcile(initialObject))
    
    	// Now it is safe to wait for it to Sync
    	require.True(t, cache.WaitForCacheSync(testContext.Done(), myController.HasSynced))
    
    	// Updated object
    	updatedObject := &unstructured.Unstructured{}
    	updatedObject.SetUnstructuredContent(map[string]interface{}{
    		"metadata": map[string]interface{}{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 12 18:58:24 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  6. pkg/config/mesh/kubemesh/watcher.go

    			log.Errorf("failed to read mesh config from ConfigMap: %v", err)
    			return
    		}
    		w.HandleMeshConfig(meshConfig)
    	})
    
    	go c.Run(stop)
    
    	// Ensure the ConfigMap is initially loaded if present.
    	if !client.WaitForCacheSync("configmap watcher", stop, c.HasSynced) {
    		log.Error("failed to wait for cache sync")
    	}
    	return w
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jan 25 20:54:46 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. pkg/kubelet/volume_host.go

    	return kvh.csiDriverLister
    }
    
    func (kvh *kubeletVolumeHost) CSIDriversSynced() cache.InformerSynced {
    	return kvh.csiDriversSynced
    }
    
    // WaitForCacheSync is a helper function that waits for cache sync for CSIDriverLister
    func (kvh *kubeletVolumeHost) WaitForCacheSync() error {
    	if kvh.csiDriversSynced == nil {
    		klog.ErrorS(nil, "CsiDriversSynced not found on KubeletVolumeHost")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 11:00:37 UTC 2024
    - 10K bytes
    - Viewed (0)
  8. pilot/pkg/serviceregistry/kube/controller/multicluster_test.go

    		MeshServiceController: mockserviceController,
    	}, nil, nil, nil, "default", false, nil, s, mcc)
    	assert.NoError(t, mcc.Run(stop))
    	go mockserviceController.Run(stop)
    	clientset.RunAndWait(stop)
    	kube.WaitForCacheSync("test", stop, mcc.HasSynced)
    	_ = s.Start(stop)
    
    	verifyControllers(t, mc, 1, "create local controller")
    
    	// Create the multicluster secret. Sleep to allow created remote
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 16:44:32 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  9. pkg/kube/krt/informer.go

    		eventHandlers:  &handlers[I]{},
    		augmentation:   o.augmentation,
    		synced:         make(chan struct{}),
    	}
    
    	go func() {
    		// First, wait for the informer to populate
    		if !kube.WaitForCacheSync(o.name, o.stop, c.HasSynced) {
    			return
    		}
    		// Now, take all our handlers we have built up and register them...
    		handlers := h.eventHandlers.MarkInitialized()
    		for _, h := range handlers {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 10 11:01:46 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  10. pkg/controller/volume/ephemeral/controller_test.go

    			}
    			ec, _ := c.(*ephemeralController)
    
    			// Ensure informers are up-to-date.
    			go informerFactory.Start(ctx.Done())
    			informerFactory.WaitForCacheSync(ctx.Done())
    			cache.WaitForCacheSync(ctx.Done(), podInformer.Informer().HasSynced, pvcInformer.Informer().HasSynced)
    
    			err = ec.syncHandler(context.TODO(), tc.podKey)
    			if err != nil && !tc.expectedError {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 06:51:56 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top