increase LRU cache size 8x for authorization webhook

1024 seems absurdly small for any normal deployment. At our 10000 byte
entry size limit, this will consume max ~80 MB of memory. More realistic
entry sizes are going to be less than a kB.

Kubernetes-commit: fb33b2f42a9621e65883c92a3cb49a278d14c6cc
This commit is contained in:
Mike Danese 2019-12-05 08:48:15 -08:00 committed by Kubernetes Publisher
parent 0e7fa4e989
commit 05faa1edc6
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ func New(kubeConfigFile string, version string, authorizedTTL, unauthorizedTTL t
func newWithBackoff(subjectAccessReview subjectAccessReviewer, authorizedTTL, unauthorizedTTL, initialBackoff time.Duration) (*WebhookAuthorizer, error) {
return &WebhookAuthorizer{
subjectAccessReview: subjectAccessReview,
responseCache: cache.NewLRUExpireCache(1024),
responseCache: cache.NewLRUExpireCache(8192),
authorizedTTL: authorizedTTL,
unauthorizedTTL: unauthorizedTTL,
initialBackoff: initialBackoff,