kubernetes/pkg/controller
Kubernetes Submit Queue 8188c3cca4 Merge pull request #40796 from wojtek-t/use_node_ttl_in_secret_manager
Automatic merge from submit-queue (batch tested with PRs 40796, 40878, 36033, 40838, 41210)

Implement TTL controller and use the ttl annotation attached to node in secret manager

For every secret attached to a pod as volume, Kubelet is trying to refresh it every sync period. Currently Kubelet has a ttl-cache of secrets of its pods and the ttl is set to 1 minute. That means that in large clusters we are targetting (5k nodes, 30pods/node), given that each pod has a secret associated with ServiceAccount from its namespaces, and with large enough number of namespaces (where on each node (almost) every pod is from a different namespace), that resource in ~30 GETs to refresh all secrets every minute from one node, which gives ~2500QPS for GET secrets to apiserver.

Apiserver cannot keep up with it very easily.

Desired solution would be to watch for secret changes, but because of security we don't want a node watching for all secrets, and it is not possible for now to watch only for secrets attached to pods from my node.

So as a temporary solution, we are introducing an annotation that would be a suggestion for kubelet for the TTL of secrets in the cache and a very simple controller that would be setting this annotation based on the cluster size (the large cluster is, the bigger ttl is). 
That workaround mean that only very local changes are needed in Kubelet, we are creating a well separated very simple controller, and once watching "my secrets" will be possible it will be easy to remove it and switch to that. And it will allow us to reach scalability goals.

@dchen1107 @thockin @liggitt
2017-02-10 00:04:44 -08:00
..
certificates Switch CSR controller to use shared informer 2017-02-08 11:01:34 -05:00
cloud Replace hand-written informers with generated ones 2017-02-06 13:49:27 -05:00
cronjob Update owners file for job and cronjob controller 2017-02-07 11:24:51 +01:00
daemon Merge pull request #40385 from ncdc/shared-informers-02-swap-existing 2017-02-06 16:25:42 -08:00
deployment Merge pull request #41145 from kargakis/cleanup-test-fix 2017-02-09 13:34:24 -08:00
disruption move client/record 2017-01-31 19:14:13 -05:00
endpoint move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
garbagecollector install authorization.k8s.io/v1, add tests 2017-02-06 18:16:51 -05:00
informers make tools/cache authoritative 2017-01-25 08:29:45 -05:00
job Update owners file for job and cronjob controller 2017-02-07 11:24:51 +01:00
namespace Autogenerated bazel changes 2017-02-06 10:50:40 -08:00
node Merge pull request #36592 from andrewsykim/36273-set-all-node-conditions-unknown-when-node-unreachable 2017-02-09 23:10:47 -08:00
podautoscaler move client/record 2017-01-31 19:14:13 -05:00
podgc Replace hand-written informers with generated ones 2017-02-06 13:49:27 -05:00
replicaset Replace hand-written informers with generated ones 2017-02-06 13:49:27 -05:00
replication Replace hand-written informers with generated ones 2017-02-06 13:49:27 -05:00
resourcequota move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
route Merge pull request #40449 from deads2k/client-15-types 2017-01-26 14:23:42 -08:00
service move client/record 2017-01-31 19:14:13 -05:00
serviceaccount Update generated files 2017-02-03 08:15:46 +01:00
statefulset Add StatefulSets checks at Service level 2017-02-01 11:29:40 +01:00
ttl Add integration test for ttlcontroller. 2017-02-09 14:50:24 +01:00
volume Merge pull request #40385 from ncdc/shared-informers-02-swap-existing 2017-02-06 16:25:42 -08:00
.import-restrictions add import restrictions 2016-10-13 16:10:24 -07:00
BUILD Implement ttl controller 2017-02-09 13:53:32 +01:00
client_builder.go move client/record 2017-01-31 19:14:13 -05:00
controller_ref_manager.go Merge pull request #39366 from zdj6373/manager-log 2017-01-31 15:49:43 -08:00
controller_utils.go move client/record 2017-01-31 19:14:13 -05:00
controller_utils_test.go move client/record 2017-01-31 19:14:13 -05:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
lookup_cache.go Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
OWNERS Add janetkuo to approvers for controllers 2017-02-08 14:37:25 -08:00