Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for watchCache (0.17 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go

    	klog.V(3).Infof("Replaced watchCache (rev: %v) ", resourceVersion)
    	return nil
    }
    
    func (w *watchCache) SetOnReplace(onReplace func()) {
    	w.Lock()
    	defer w.Unlock()
    	w.onReplace = onReplace
    }
    
    func (w *watchCache) Resync() error {
    	// Nothing to do
    	return nil
    }
    
    func (w *watchCache) getListResourceVersion() uint64 {
    	w.RLock()
    	defer w.RUnlock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 10:20:57 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval_test.go

    	}{
    		{
    			name:                    "watchCache empty, eventsAddedToWatchcache = 0",
    			eventsAddedToWatchcache: 0,
    			intervalStartIndex:      0,
    		},
    		{
    			name:                    "watchCache partially propagated, eventsAddedToWatchcache < capacity",
    			eventsAddedToWatchcache: bufferSize,
    			intervalStartIndex:      0,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/test/integration/defaulting_test.go

    }
    
    func TestCustomResourceDefaultingWithoutWatchCache(t *testing.T) {
    	testDefaulting(t, false)
    }
    
    func testDefaulting(t *testing.T, watchCache bool) {
    	tearDownFn, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t, fmt.Sprintf("--watch-cache=%v", watchCache))
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer tearDownFn()
    
    	crd := defaultingFixture.DeepCopy()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 06 05:32:34 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/features/kube_features.go

    	CustomResourceValidationExpressions featuregate.Feature = "CustomResourceValidationExpressions"
    
    	// alpha: v1.20
    	// beta: v1.21
    	// GA: v1.24
    	//
    	// Allows for updating watchcache resource version with progress notify events.
    	EfficientWatchResumption featuregate.Feature = "EfficientWatchResumption"
    
    	// owner: @aramase
    	// kep: https://kep.k8s.io/3299
    	// deprecated: v1.28
    	//
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 08:36:46 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_test.go

    		// The tests assume that Get/GetList/Watch calls shouldn't fail.
    		// However, 429 error can now be returned if watchcache is under initialization.
    		// To avoid rewriting all tests, we wait for watchcache to initialize.
    		if err := cacher.Wait(ctx); err != nil {
    			t.Fatal(err)
    		}
    	}
    
    	return ctx, cacher, server, terminate
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 17K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go

    	return &storeElement{
    		Key:    "prefix/ns/" + pod.Name,
    		Object: pod,
    		Labels: labels.Set(pod.Labels),
    		Fields: fields.Set{"spec.nodeName": pod.Spec.NodeName},
    	}
    }
    
    type testWatchCache struct {
    	*watchCache
    
    	bookmarkRevision chan int64
    	stopCh           chan struct{}
    }
    
    func (w *testWatchCache) getAllEventsSince(resourceVersion uint64, opts storage.ListOptions) ([]*watchCacheEvent, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/server/options/etcd.go

    		if err != nil {
    			return generic.RESTOptions{}, err
    		}
    		size, ok := sizes[resource]
    		if ok && size > 0 {
    			klog.Warningf("Dropping watch-cache-size for %v - watchCache size is now dynamic", resource)
    		}
    		if ok && size <= 0 {
    			klog.V(3).InfoS("Not using watch cache", "resource", resource)
    			ret.Decorator = generic.UndecoratedStorage
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 15:02:16 UTC 2024
    - 20K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go

    	go wc.run(isInitialEventsEndBookmarkRequired(opts), areInitialEventsRequired(rev, opts))
    
    	// For etcd watch we don't have an easy way to answer whether the watch
    	// has already caught up. So in the initial version (given that watchcache
    	// is by default enabled for all resources but Events), we just deliver
    	// the initialization signal immediately. Improving this will be explored
    	// in the future.
    	utilflowcontrol.WatchInitialized(ctx)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 10:26:38 UTC 2023
    - 18.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher.go

    			// events.
    			//
    			// Initially we considered sending an "out-of-history"
    			// Error event in this case, but because historically
    			// such events weren't sent out of the watchCache, we
    			// decided not to. This is still ok, because on watch
    			// closure, the watcher will try to re-instantiate the
    			// watch and then will get an explicit "out-of-history"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 12:22:41 UTC 2023
    - 18.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiextensions-apiserver/test/integration/conversion/conversion_test.go

    	testWebhookConverter(t, true)
    }
    func TestWebhookConverterWithoutWatchCache(t *testing.T) {
    	testWebhookConverter(t, false)
    }
    
    func testWebhookConverter(t *testing.T, watchCache bool) {
    	tests := []struct {
    		group          string
    		handler        http.Handler
    		reviewVersions []string
    		checks         []Checker
    	}{
    		{
    			group:          "noop-converter-v1",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 06 05:32:34 UTC 2023
    - 47.1K bytes
    - Viewed (0)
Back to top