Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for NewSharedInformerFactory (0.41 sec)

  1. plugin/pkg/admission/serviceaccount/admission_test.go

    	}
    }
    
    func TestAssignsDefaultServiceAccountAndBoundTokenWithNoSecretTokens(t *testing.T) {
    	ns := "myns"
    
    	admit := NewServiceAccount()
    	informerFactory := informers.NewSharedInformerFactory(nil, controller.NoResyncPeriodFunc())
    	admit.SetExternalKubeInformerFactory(informerFactory)
    	admit.MountServiceAccountToken = true
    
    	// Add the default service account for the ns into the cache
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 17:49:30 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  2. pkg/proxy/config/config_test.go

    	fakeWatch := watch.NewFake()
    	client.PrependWatchReactor("services", ktesting.DefaultWatchReactor(fakeWatch, nil))
    
    	stopCh := make(chan struct{})
    	defer close(stopCh)
    
    	sharedInformers := informers.NewSharedInformerFactory(client, time.Minute)
    
    	config := NewServiceConfig(ctx, sharedInformers.Core().V1().Services(), time.Minute)
    	handler := NewServiceHandlerMock()
    	config.RegisterEventHandler(handler)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  3. pkg/controller/volume/attachdetach/attach_detach_controller_test.go

    	fakeKubeClient := controllervolumetesting.CreateTestClient()
    	informerFactory := informers.NewSharedInformerFactory(fakeKubeClient, time.Second*1)
    	//informerFactory := informers.NewSharedInformerFactory(fakeKubeClient, time.Second*1)
    	plugins := controllervolumetesting.CreateTestPlugin()
    	var prober volume.DynamicPluginProber = nil // TODO (#51147) inject mock
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 11:00:37 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  4. pkg/scheduler/scheduler_test.go

    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			client := fake.NewSimpleClientset()
    			informerFactory := informers.NewSharedInformerFactory(client, 0)
    
    			eventBroadcaster := events.NewBroadcaster(&events.EventSinkImpl{Interface: client.EventsV1()})
    
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 42K bytes
    - Viewed (0)
  5. pkg/volume/testing/volume_host.go

    		t.Fatalf("Failed to init plugins while creating fake volume host: %v", err)
    	}
    	host.subpather = &subpath.FakeSubpath{}
    	host.informerFactory = informers.NewSharedInformerFactory(kubeClient, time.Minute)
    	// Wait until the InitPlugins setup is finished before returning from this setup func
    	if err := host.WaitForKubeletErrNil(); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 09:02:45 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  6. plugin/pkg/admission/security/podsecurity/admission_test.go

    		warnBaselineNamespace,
    		warnRestrictedNamespace,
    		enforceWarnAuditBaseline,
    		warnBaselineAuditRestrictedNamespace,
    	)
    	p.SetExternalKubeClientSet(c)
    
    	informerFactory := informers.NewSharedInformerFactory(c, 0)
    	p.SetExternalKubeInformerFactory(informerFactory)
    	stopCh := make(chan struct{})
    	defer close(stopCh)
    	informerFactory.Start(stopCh)
    	informerFactory.WaitForCacheSync(stopCh)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 15 01:29:47 UTC 2022
    - 10.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/server/config_test.go

    		return fmt.Errorf("delegate failed healthcheck")
    	}))
    
    	sharedInformers := informers.NewSharedInformerFactory(clientset, delegateConfig.LoopbackClientConfig.Timeout)
    	delegateServer, err := delegateConfig.Complete(sharedInformers).New("test", NewEmptyDelegate())
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/preemption/preemption_test.go

    			for _, p := range append(tt.testPods, tt.initPods...) {
    				objs = append(objs, p)
    			}
    			for _, n := range tt.nodes {
    				objs = append(objs, n)
    			}
    			informerFactory := informers.NewSharedInformerFactory(clientsetfake.NewSimpleClientset(objs...), 0)
    			parallelism := parallelize.DefaultParallelism
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/controller_test.go

    		rng := rand.New(rand.NewSource(int64(rngOuter.Uint64())))
    		t.Run(fmt.Sprintf("trial%d:", i), func(t *testing.T) {
    			clientset := clientsetfake.NewSimpleClientset()
    			informerFactory := informers.NewSharedInformerFactory(clientset, 0)
    			flowcontrolClient := clientset.FlowcontrolV1()
    			cts := &ctlrTestState{t: t,
    				fcIfc:           flowcontrolClient,
    				existingFSs:     map[string]*flowcontrol.FlowSchema{},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  10. pkg/controller/volume/attachdetach/util/util_test.go

    	csiTranslator := csitrans.New()
    	intreeToCSITranslator := csimigration.NewPluginManager(csiTranslator, utilfeature.DefaultFeatureGate)
    	kubeClient := fake.NewSimpleClientset()
    
    	factory := informers.NewSharedInformerFactory(kubeClient, time.Minute)
    	csiDriverInformer := factory.Storage().V1().CSIDrivers()
    	csiDriverLister := csiDriverInformer.Lister()
    	volumeAttachmentInformer := factory.Storage().V1().VolumeAttachments()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 12 05:42:38 UTC 2023
    - 10.4K bytes
    - Viewed (0)
Back to top