Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 59 for waitForCacheSync (0.3 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. cni/pkg/nodeagent/informers.go

    	// test flakes with the fake kube client in `pkg/kube/client.go` -
    	// because we are using `List()` in the handler, without this requeue,
    	// the fake client will sometimes drop pod events leading to test flakes.
    	//
    	// WaitForCacheSync *helps*, but does not entirely fix this problem
    	s.namespaces = kclient.New[*corev1.Namespace](kubeClient)
    	s.namespaces.AddEventHandler(controllers.FromEventHandler(func(o controllers.Event) {
    		s.queue.Add(o)
    	}))
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 21:31:35 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  6. pkg/controller/volume/attachdetach/attach_detach_controller_test.go

    	logger, tCtx := ktesting.NewTestContext(t)
    	adc := createADC(t, tCtx, fakeKubeClient, informerFactory, controllervolumetesting.CreateTestPlugin())
    
    	// Act
    	informerFactory.Start(tCtx.Done())
    	informerFactory.WaitForCacheSync(tCtx.Done())
    
    	err := adc.populateActualStateOfWorld(logger)
    	if err != nil {
    		t.Fatalf("Run failed with error. Expected: <no error> Actual: <%v>", err)
    	}
    
    	err = adc.populateDesiredStateOfWorld(logger)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 11:00:37 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  7. pilot/pkg/config/kube/gateway/deploymentcontroller_test.go

    				if err != nil {
    					return err
    				}
    				buf.Write(b)
    				buf.WriteString("---\n")
    				return nil
    			}
    			client.RunAndWait(stop)
    			go d.Run(stop)
    			kube.WaitForCacheSync("test", stop, d.queue.HasSynced)
    
    			if tt.ignore {
    				assert.Equal(t, buf.String(), "")
    			} else {
    				resp := timestampRegex.ReplaceAll(buf.Bytes(), []byte("lastTransitionTime: fake"))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 13 21:43:20 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  8. pkg/kube/kclient/client_test.go

    		tracker := assert.NewTracker[string](t)
    		wasm.AddEventHandler(clienttest.TrackerHandler(tracker))
    		go constantlyAccessForRaceDetection(stop, wasm)
    		c.RunAndWait(stop)
    		kube.WaitForCacheSync("test", test.NewStop(t), wasm.HasSynced)
    
    		wt.Create(&istioclient.WasmPlugin{
    			ObjectMeta: metav1.ObjectMeta{Name: "name", Namespace: "default"},
    		})
    		assert.EventuallyEqual(t, func() int {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 11 15:12:54 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go

    			return nil, nil, err
    		}
    	}
    
    	res.Start = func() error {
    		fakeInformerFactory.Start(res.Done())
    		go policyInformer.Run(res.Done())
    		go bindingInformer.Run(res.Done())
    
    		if !cache.WaitForCacheSync(res.Done(), res.Source.HasSynced) {
    			return fmt.Errorf("timed out waiting for initial cache sync")
    		}
    		return nil
    	}
    	return res, testCancel, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 19K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/controller_test.go

    	informerFactory.Start(stopCh)
    
    	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
    	defer cancel()
    	status := informerFactory.WaitForCacheSync(ctx.Done())
    	if names := unsynced(status); len(names) > 0 {
    		t.Fatalf("WaitForCacheSync did not successfully complete, resources=%#v", names)
    	}
    
    	go func() {
    		defer close(controllerCompletedCh)
    		controllerErr = controller.Run(stopCh)
    	}()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 18.4K bytes
    - Viewed (0)
Back to top