Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for cacheSizes (0.22 sec)

  1. staging/src/k8s.io/apiserver/pkg/server/options/etcd_test.go

    }
    
    func TestParseWatchCacheSizes(t *testing.T) {
    	testCases := []struct {
    		name                  string
    		cacheSizes            []string
    		expectWatchCacheSizes map[schema.GroupResource]int
    		expectErr             string
    	}{
    		{
    			name:       "test when invalid value of watch cache size",
    			cacheSizes: []string{"deployments.apps#65536", "replicasets.extensions"},
    			expectErr:  "invalid value of watch cache size",
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/server/options/etcd.go

    	var cacheSizes []string
    
    	for resource, size := range watchCacheSizes {
    		if size < 0 {
    			return nil, fmt.Errorf("watch cache size cannot be negative for resource %s", resource)
    		}
    		cacheSizes = append(cacheSizes, fmt.Sprintf("%s#%d", resource.String(), size))
    	}
    	return cacheSizes, nil
    }
    
    var _ serverstorage.StorageFactory = &SimpleStorageFactory{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 15:02:16 UTC 2024
    - 20K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation_encryption_test.go

    						Timeout:    &metav1.Duration{Duration: 3 * time.Second},
    						CacheSize:  &cacheSize,
    						APIVersion: "v1",
    					},
    				}, {
    					KMS: &apiserver.KMSConfiguration{
    						Name:       "foo",
    						Endpoint:   "unix:///tmp/kms-provider-2.socket",
    						Timeout:    &metav1.Duration{Duration: 3 * time.Second},
    						CacheSize:  &cacheSize,
    						APIVersion: "v1",
    					},
    				}},
    			}},
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 20:54:24 UTC 2023
    - 33.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/defaults_test.go

    			want: &KMSConfiguration{Timeout: defaultTimeout, CacheSize: &defaultCacheSize, APIVersion: defaultAPIVersion},
    		},
    		{
    			desc: "cache of zero size supplied",
    			in:   &KMSConfiguration{CacheSize: &zero},
    			want: &KMSConfiguration{Timeout: defaultTimeout, CacheSize: &zero, APIVersion: defaultAPIVersion},
    		},
    		{
    			desc: "positive cache size supplied",
    			in:   &KMSConfiguration{CacheSize: &ten},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 20:54:24 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  5. plugin/pkg/admission/eventratelimit/limitenforcer.go

    			limitType: config.Type,
    			cache: &singleCache{
    				rateLimiter: rateLimiterFactory(),
    			},
    			keyFunc: getServerKey,
    		}, nil
    	}
    
    	cacheSize := int(config.CacheSize)
    	if cacheSize == 0 {
    		cacheSize = defaultCacheSize
    	}
    	underlyingCache := lru.New(cacheSize)
    	cache := &lruCache{
    		rateLimiterFactory: rateLimiterFactory,
    		cache:              underlyingCache,
    	}
    
    	var keyFunc func(admission.Attributes) string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 08 02:31:37 UTC 2021
    - 3.8K bytes
    - Viewed (0)
  6. plugin/pkg/admission/eventratelimit/apis/eventratelimit/validation/validation_test.go

    				Type:      "Namespace",
    				Burst:     10,
    				QPS:       2,
    				CacheSize: 100,
    			}},
    		},
    		expectedResult: true,
    	}, {
    		name: "valid user",
    		config: eventratelimitapi.Configuration{
    			Limits: []eventratelimitapi.Limit{{
    				Type:      "User",
    				Burst:     10,
    				QPS:       2,
    				CacheSize: 100,
    			}},
    		},
    		expectedResult: true,
    	}, {
    		name: "valid source+object",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 07:48:42 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  7. plugin/pkg/admission/eventratelimit/apis/eventratelimit/v1alpha1/types.go

    	// allowance of burst queries.
    	//
    	// The default cache size is 4096.
    	//
    	// If limitType is 'server', then cacheSize is ignored.
    	// +optional
    	CacheSize int32 `json:"cacheSize,omitempty"`
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 01 17:38:03 UTC 2017
    - 3.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/defaults.go

    	if obj.Timeout == nil {
    		obj.Timeout = defaultTimeout
    	}
    
    	if obj.APIVersion == "" {
    		obj.APIVersion = defaultAPIVersion
    	}
    
    	// cacheSize is relevant only for kms v1
    	if obj.CacheSize == nil && obj.APIVersion == "v1" {
    		obj.CacheSize = &defaultCacheSize
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 20:54:24 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope.go

    	var (
    		cache *lru.Cache
    	)
    
    	if cacheSize > 0 {
    		cache = lru.New(cacheSize)
    	}
    	return &envelopeTransformer{
    		envelopeService:     envelopeService,
    		transformers:        cache,
    		baseTransformerFunc: baseTransformerFunc,
    		cacheEnabled:        cacheSize > 0,
    		cacheSize:           cacheSize,
    	}
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 14:23:50 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/options/testdata/encryption-configs/multiple-kms-providers.yaml

    apiVersion: apiserver.config.k8s.io/v1
    resources:
      - resources:
          - secrets
        providers:
          - kms:
              name: kms-provider-1
              cachesize: 1000
              endpoint: unix:///@provider1.sock
          - kms:
              name: kms-provider-2
              cachesize: 1000
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 03 17:03:32 UTC 2019
    - 353 bytes
    - Viewed (0)
Back to top