Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 123 for waitForCacheSync (0.24 sec)

  1. plugin/pkg/admission/security/podsecurity/admission_test.go

    	informerFactory := informers.NewSharedInformerFactory(c, 0)
    	p.SetExternalKubeInformerFactory(informerFactory)
    	stopCh := make(chan struct{})
    	defer close(stopCh)
    	informerFactory.Start(stopCh)
    	informerFactory.WaitForCacheSync(stopCh)
    
    	if err := p.ValidateInitialization(); err != nil {
    		b.Fatal(err)
    	}
    
    	corePod := &core.Pod{}
    	v1Pod := &corev1.Pod{}
    	data, err := ioutil.ReadFile("testdata/pod_restricted.yaml")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 15 01:29:47 UTC 2022
    - 10.7K bytes
    - Viewed (0)
  2. pkg/kube/krt/helpers.go

    // "name" if "namespace" is empty
    func keyFunc(name, namespace string) string {
    	if len(namespace) == 0 {
    		return name
    	}
    	return namespace + "/" + name
    }
    
    func waitForCacheSync(name string, stop <-chan struct{}, collections ...<-chan struct{}) (r bool) {
    	t := time.NewTicker(time.Second * 5)
    	defer t.Stop()
    	t0 := time.Now()
    	defer func() {
    		if r {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go

    	defer utilruntime.HandleCrash()
    	defer ec.queue.ShutDown()
    
    	klog.Info("Starting EstablishingController")
    	defer klog.Info("Shutting down EstablishingController")
    
    	if !cache.WaitForCacheSync(stopCh, ec.crdSynced) {
    		return
    	}
    
    	// only start one worker thread since its a slow moving API
    	go wait.Until(ec.runWorker, time.Second, stopCh)
    
    	<-stopCh
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  4. pkg/test/csrctrl/controllers/csr_controller.go

    			return fmt.Errorf("patch: %v", err)
    		}
    		log.Infof("CSR %q has been signed", csr.Spec.SignerName)
    	}
    	return nil
    }
    
    func (s *Signer) Run(stop <-chan struct{}) {
    	kube.WaitForCacheSync("csr", stop, s.csrs.HasSynced)
    	s.queue.Run(stop)
    }
    
    func (s *Signer) HasSynced() bool {
    	return s.queue.HasSynced()
    }
    
    // isCertificateRequestApproved returns true if a certificate request has the
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 17:36:41 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go

    	})
    
    	lastVerified := l.lastVerified.Load().(time.Time)
    	if time.Since(lastVerified) < (2 * time.Minute) {
    		return nil
    	}
    	return fmt.Errorf("logging blocked")
    }
    
    type cacheSyncWaiter interface {
    	WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
    }
    
    type informerSync struct {
    	cacheSyncWaiter cacheSyncWaiter
    }
    
    var _ HealthChecker = &informerSync{}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  6. pkg/controlplane/controller/apiserverleasegc/gc_controller.go

    	klog.Infof("Starting apiserver lease garbage collector")
    
    	// we have a personal informer that is narrowly scoped, start it.
    	go c.leaseInformer.Run(stopCh)
    
    	if !cache.WaitForCacheSync(stopCh, c.leasesSynced) {
    		utilruntime.HandleError(fmt.Errorf("timed out waiting for caches to sync"))
    		return
    	}
    
    	go wait.Until(c.gc, c.gcCheckPeriod, stopCh)
    
    	<-stopCh
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Apr 25 03:27:44 UTC 2021
    - 4.6K bytes
    - Viewed (0)
  7. pkg/kube/multicluster/cluster.go

    			syncers = append(syncers, h.clusterUpdated(c))
    		}
    	}
    	if !c.Client.RunAndWait(c.stop) {
    		log.Warnf("remote cluster %s failed to sync", c.ID)
    		return
    	}
    	for _, h := range syncers {
    		if !kube.WaitForCacheSync("cluster"+string(c.ID), c.stop, h.HasSynced) {
    			log.Warnf("remote cluster %s failed to sync handler", c.ID)
    			return
    		}
    	}
    
    	c.initialSync.Store(true)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 06 02:13:10 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  8. pkg/kubemark/controller.go

    		UpdateFunc: controller.kubemarkCluster.removeUnneededNodes,
    	})
    
    	return controller, nil
    }
    
    // WaitForCacheSync waits until all caches in the controller are populated.
    func (kubemarkController *KubemarkController) WaitForCacheSync(stopCh chan struct{}) bool {
    	return cache.WaitForNamedCacheSync("kubemark", stopCh,
    		kubemarkController.externalCluster.rcSynced,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 17 23:02:17 UTC 2020
    - 14.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/healthz/healthz_test.go

    		}
    	})
    }
    
    type cacheSyncWaiterStub struct {
    	startedByInformerType map[reflect.Type]bool
    }
    
    // WaitForCacheSync is a stub implementation of the corresponding func
    // that simply returns the value passed during stub initialization.
    func (s cacheSyncWaiterStub) WaitForCacheSync(_ <-chan struct{}) map[reflect.Type]bool {
    	return s.startedByInformerType
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 15 20:43:16 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  10. cmd/kube-scheduler/app/server.go

    			cc.DynInformerFactory.Start(ctx.Done())
    		}
    
    		// Wait for all caches to sync before scheduling.
    		cc.InformerFactory.WaitForCacheSync(ctx.Done())
    		// DynInformerFactory can be nil in tests.
    		if cc.DynInformerFactory != nil {
    			cc.DynInformerFactory.WaitForCacheSync(ctx.Done())
    		}
    
    		// Wait for all handlers to sync (all items in the initial list delivered) before scheduling.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 14.3K bytes
    - Viewed (0)
Back to top