- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 123 for waitForCacheSync (0.35 sec)
-
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) -
pilot/pkg/serviceregistry/kube/controller/namespacecontroller.go
return false } return true })) return c } // Run starts the NamespaceController until a value is sent to stopCh. func (nc *NamespaceController) Run(stopCh <-chan struct{}) { if !kube.WaitForCacheSync("namespace controller", stopCh, nc.namespaces.HasSynced, nc.configmaps.HasSynced) { return } go nc.startCaBundleWatcher(stopCh) nc.queue.Run(stopCh) controllers.ShutdownAll(nc.configmaps, nc.namespaces)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Feb 28 16:41:38 UTC 2024 - 5.4K bytes - Viewed (0) -
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) -
pilot/pkg/config/kube/gateway/controller_test.go
s.ConfigUpdate(&model.PushRequest{ Full: true, Reason: model.NewReasonStats(model.NamespaceUpdate), }) }) stop := test.NewStop(t) c.Run(stop) kube.WaitForCacheSync("test", stop, c.HasSynced) c.state.ReferencedNamespaceKeys = sets.String{"allowed": struct{}{}} ns1 := &v1.Namespace{ObjectMeta: metav1.ObjectMeta{ Name: "ns1", Labels: map[string]string{
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 02 16:47:06 UTC 2024 - 5.6K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/autoserviceexportcontroller.go
c.services.AddEventHandler(controllers.EventHandler[controllers.Object]{AddFunc: c.queue.AddObject}) return c } func (c *autoServiceExportController) Run(stopCh <-chan struct{}) { kube.WaitForCacheSync("auto service export", stopCh, c.services.HasSynced) c.queue.Run(stopCh) c.services.ShutdownHandlers() } func (c *autoServiceExportController) logPrefix() string {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Feb 28 16:41:38 UTC 2024 - 5.7K bytes - Viewed (0) -
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) -
pilot/pkg/controllers/untaint/nodeuntainter_test.go
t.Cleanup(func() { close(stop) }) client := kubelib.NewFakeClient() nodeUntainter := NewNodeUntainter(stop, client, systemNS, systemNS) go nodeUntainter.Run(stop) client.RunAndWait(stop) kubelib.WaitForCacheSync("test", stop, nodeUntainter.HasSynced) pc := clienttest.Wrap(t, nodeUntainter.podsClient) nc := clienttest.Wrap(t, nodeUntainter.nodesClient) return &nodeTainterTestServer{ client: client, t: t,
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Apr 13 00:50:31 UTC 2024 - 6.1K bytes - Viewed (0) -
pkg/kube/krt/join_test.go
AllPods := krt.JoinCollection([]krt.Collection[SimplePod]{SimplePods, ExtraSimplePods.AsCollection()}) assert.Equal(t, AllPods.Synced().WaitUntilSynced(stop), true) // Assert Equal -- not EventuallyEqual -- to ensure our WaitForCacheSync is proper assert.Equal(t, fetcherSorted(AllPods)(), []SimplePod{ {Named{"namespace", "name"}, NewLabeled(map[string]string{"app": "foo"}), "1.2.3.4"},
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 09 19:55:53 UTC 2024 - 6.1K bytes - Viewed (0) -
pkg/webhooks/webhookpatch.go
} // Run runs the WebhookCertPatcher func (w *WebhookCertPatcher) Run(stopChan <-chan struct{}) { go w.startCaBundleWatcher(stopChan) w.webhooks.Start(stopChan) kubelib.WaitForCacheSync("webhook patcher", stopChan, w.webhooks.HasSynced) w.queue.Run(stopChan) } func (w *WebhookCertPatcher) HasSynced() bool { return w.queue.HasSynced() }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Sep 28 00:36:38 UTC 2023 - 6.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_source_test.go
makeTestDispatcher, nil, nil, ) require.NoError(t, err) defer testCancel() require.NoError(t, testContext.Start()) // Should be able to wait for cache sync require.True(t, cache.WaitForCacheSync(testContext.Done(), testContext.Source.HasSynced), "cache should sync after informer running") } func TestPolicySourceHasSyncedInitialList(t *testing.T) { // Create a list of fake policies
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 6.2K bytes - Viewed (0)