Commit Graph

46 Commits (8c73e2bcbeabfefdedf2309c351b25f90c1b2bab)

Author SHA1 Message Date
Hongchao Deng a607a69f4a pkg/storage: cleanup Codec() from interface 2016-08-15 20:46:13 -07:00
Jordan Liggitt 4fcd999c25
Fix watch cache filtering 2016-07-14 13:13:17 -04:00
Wojciech Tyczynski 1d9bc58328 Extend Filter interface with Trigger() and use it for pods and nodes 2016-07-13 08:45:18 +02:00
Wojciech Tyczynski 7f7ef0879f Change filter to interface in storage.Interface 2016-07-13 08:44:22 +02:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Clayton Coleman e5fbf86157
Allow StatusErrors to be modified after creation 2016-05-19 09:08:53 -04:00
Jordan Liggitt f80b59ba87 Return 'too old' errors from watch cache via watch stream 2016-05-10 10:59:53 -04:00
k8s-merge-robot a275a045d1 Merge pull request #23914 from sky-uk/make-etcd-cache-size-configurable
Automatic merge from submit-queue

Make etcd cache size configurable

Instead of the prior 50K limit, allow users to specify a more sensible size for their cluster.

I'm not sure what a sensible default is here. I'm still experimenting on my own clusters. 50 gives me a 270MB max footprint. 50K caused my apiserver to run out of memory as it exceeded >2GB. I believe that number is far too large for most people's use cases.

There are some other fundamental issues that I'm not addressing here:
- Old etcd items are cached and potentially never removed (it stores using modifiedIndex, and doesn't remove the old object when it gets updated)
- Cache isn't LRU, so there's no guarantee the cache remains hot. This makes its performance difficult to predict. More of an issue with a smaller cache size.
- 1.2 etcd entries seem to have a larger memory footprint (I never had an issue in 1.1, even though this cache existed there). I suspect that's due to image lists on the node status.

This is provided as a fix for #23323
2016-04-17 00:06:31 -07:00
Andy Goldstein 049e63d253 Honor starting resourceVersion in watch cache
Compare the requested resourceVersion to each event's resourceVersion to ensure events that occurred
in the past are not sent to the client.
2016-04-14 09:37:22 -04:00
Daniel Smith 4c539bf082 Merge pull request #23490 from wojtek-t/remove_set_from_storage_interface
Remove Set() from storage.Interface.
2016-04-13 14:22:05 -07:00
Jordan Liggitt ada60236f7 Make watch cache behave like uncached watch 2016-04-12 10:14:07 -04:00
James Ravn 5bb0595260 Make deserialization cache size configurable
Instead of the default 50K entries, allow users to specify more sensible
sizes for their cluster.
2016-04-12 13:42:27 +01:00
Wojciech Tyczynski 53f433f019 Remove Set() from storage.Interface. 2016-04-04 17:54:18 +02:00
Chao Xu 31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00
Daniel Smith 3fb020b28d Fix a locking bug in the cacher. 2016-02-19 17:45:02 -08:00
Wojciech Tyczynski 20d704aa06 Fix cacher_test unit test 2016-02-18 10:25:04 +01:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
mqliang b0e06c14e5 add a knob to enable quorum read 2016-01-30 20:32:12 +08:00
Wojciech Tyczynski 60fc2bc09e Fix cacher_test flake 2015-12-31 07:53:41 +01:00
Wojciech Tyczynski 65696989b2 Extend logging for debugging 18928 2015-12-30 20:09:05 +01:00
Wojciech Tyczynski 05b60a30cf Fix flakes in cacher_test 2015-12-28 15:28:07 +01:00
Wojciech Tyczynski ec70eb16f3 Graceul termination in Cacher 2015-12-28 10:54:21 +01:00
Timothy St. Clair c505a5d49d Updating kubernetes proper to use latest etcd client library 2015-12-16 15:56:35 -06:00
Clayton Coleman 8f203a28f1 Change runtime.Object signature 2015-12-15 13:36:25 -05:00
Wojciech Tyczynski 0cefb43707 Enable listing from memory 2015-12-09 16:24:14 +01:00
Wojciech Tyczynski 793da62c7f Change resourceVersion to string in storage.Interface 2015-12-07 09:22:59 +01:00
Wojciech Tyczynski 3df5d1dbc3 Move storage-related dirs under pkg/storage. 2015-11-12 19:49:32 +01:00
Wojciech Tyczynski b6a775ca50 Terminate watcher if it is full 2015-11-06 13:40:21 +01:00
Timothy St. Clair dbdd1614e6 Fix for linkage issue with new testing utilities 2015-11-03 22:16:47 -06:00
Wojciech Tyczynski 6246201eec Remove fakeClient from cacher_test. 2015-11-03 10:58:43 +01:00
Wojciech Tyczynski 8f385c563f Refactor code for creating Cacher. 2015-11-02 20:56:46 +01:00
Wojciech Tyczynski 652fb090eb Initial support for listing from in-memory cache. 2015-10-30 20:58:13 +01:00
Timothy St. Clair 2a2a2d79ff New etcd client modifications part 1 (context support)
This commit plumbs contexts which are needed for the new client.
2015-10-12 08:45:49 -05:00
Paul Morie 227dd82119 Add PodSecurityContext and backward compatibility tests 2015-10-05 21:05:27 -04:00
Wojciech Tyczynski 907f2e9f89 Extend timeouts in cacher test 2015-09-30 08:26:58 +02:00
Daniel Martí 586cb9126a Move pkg/util.Time to pkg/api/unversioned.Time
Along with our time.Duration wrapper, as suggested by @lavalamp.
2015-09-17 17:51:27 -07:00
Wojciech Tyczynski 12eaf67acc Fix resourcVersion=0 in cacher 2015-09-15 16:17:27 +02:00
tummychow 78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Jerzy Szczepkowski 46ca41c8e3 Merge pull request #12975 from wojtek-t/switch_cacher_for_pods
Switch on Cacher for pods, endpoints and nodes.
2015-08-21 10:28:38 +02:00
Wojciech Tyczynski ec6556987e Switch on Cacher for pods, endpoints and nodes. 2015-08-21 09:24:49 +02:00
Clayton Coleman 02dbb95447 Add TerminationGracePeriodSeconds to API
Set defaulting for pod spec
2015-08-20 11:03:38 -04:00
Robert Bailey 08e6a43c1d Revert "Merge pull request #9165 from smarterclayton/graceful"
This reverts commit 4f856b595d, reversing
changes made to d78525a83b.

Conflicts:
	pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Clayton Coleman 5ddcef24a6 Fix failing test 2015-08-18 09:08:46 -04:00
Wojciech Tyczynski 3a71eb1bcc Store previous value in WatchCache for filtering 2015-08-18 09:33:34 +02:00
Wojciech Tyczynski e424da7d0d Implement Cacher for watch in apiserver 2015-08-14 09:44:42 +02:00