Increase cache size for endpointslices.

It should match what we have for endpoints as endpointslices is
replacing them and # updates of endpointslices should be roughly the
same as # updates of endpoints.

Otherwise, kube-proxy may start loosing watches for endpointslices (we believe this is
what currently happens in scale tests, will create an issue for that
soon).
This commit is contained in:
Matt Matejczyk 2019-11-15 11:16:53 +01:00
parent e4bde524d9
commit 44452995d6

View File

@ -36,6 +36,7 @@ func NewHeuristicWatchCacheSizes(expectedRAMCapacityMB int) map[schema.GroupReso
watchCacheSizes := make(map[schema.GroupResource]int)
watchCacheSizes[schema.GroupResource{Resource: "replicationcontrollers"}] = maxInt(5*clusterSize, 100)
watchCacheSizes[schema.GroupResource{Resource: "endpoints"}] = maxInt(10*clusterSize, 1000)
watchCacheSizes[schema.GroupResource{Resource: "endpointslices", Group: "discovery.k8s.io"}] = maxInt(10*clusterSize, 1000)
watchCacheSizes[schema.GroupResource{Resource: "nodes"}] = maxInt(5*clusterSize, 1000)
watchCacheSizes[schema.GroupResource{Resource: "pods"}] = maxInt(50*clusterSize, 1000)
watchCacheSizes[schema.GroupResource{Resource: "services"}] = maxInt(5*clusterSize, 1000)