Skip to content

Commit

Permalink
Disable the watch cache for most resources by default
Browse files Browse the repository at this point in the history
Any resource named by the heuristics gets a watch cache by default.
Admins can restore the previous behavior by setting
`--default-watch-cache-size` to a positive integer. This reduces the
amount of total memory allocated on large cluster significantly at minor
cost in CPU on the etcd process and an increase in network bandwidth to
etcd.
  • Loading branch information
smarterclayton committed Sep 17, 2017
1 parent 44530e9 commit 38ea496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/server/kubernetes/master/master_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func BuildKubeAPIserverOptions(masterConfig configapi.MasterConfig) (*kapiserver
server.Etcd.StorageConfig.KeyFile = masterConfig.EtcdClientInfo.ClientCert.KeyFile
server.Etcd.StorageConfig.CertFile = masterConfig.EtcdClientInfo.ClientCert.CertFile
server.Etcd.StorageConfig.CAFile = masterConfig.EtcdClientInfo.CA
server.Etcd.DefaultWatchCacheSize = DefaultWatchCacheSize
server.Etcd.DefaultWatchCacheSize = 0

server.GenericServerRunOptions.CorsAllowedOriginList = masterConfig.CORSAllowedOrigins
server.GenericServerRunOptions.MaxRequestsInFlight = masterConfig.ServingInfo.MaxRequestsInFlight
Expand Down

0 comments on commit 38ea496

Please sign in to comment.