Commit Graph

38 Commits (439019cbbb1aa02ebe83ffb1a76121b3fb654c7e)

Author SHA1 Message Date
Wojciech Tyczynski b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
feihujiang ad79fa6e84 Move list functions from runtime to meta package 2015-11-20 09:20:55 +08:00
Wojciech Tyczynski d47e21f19f Reuse TCP connections in Reflector between resync periods. 2015-10-26 19:35:25 +01:00
Daniel Smith 15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
Kris Rousey 7ba5b058cc Moving client libs to unversioned dir 2015-08-18 10:03:19 -07:00
Wojciech Tyczynski e424da7d0d Implement Cacher for watch in apiserver 2015-08-14 09:44:42 +02:00
Wojciech Tyczynski 52e3af4e93 Implement watchCache structure. 2015-08-07 08:29:17 +02:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Chao Xu 3b11705a99 downgrade errors returned by watchHandler in reflector.go to warnnings 2015-07-29 10:32:48 -07:00
deads2k f203b16cd9 add originator to reflector logging 2015-07-10 11:34:49 -04:00
Filip Grzadkowski 7cdfb2ac7f Reduce number of list requests in watch-based cache 2015-06-03 00:55:49 +02:00
Jordan Liggitt 49ceb82179 Wait until stores are filled before processing service account token events 2015-05-20 22:19:42 -04:00
Daniel Smith 16a6fb8ef7 Replace calls to time.After with time.NewTimer for explicit stopping 2015-05-04 14:29:33 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Prashanth Balasubramanian 5234c2dc82 Fix RunUntil and stop leaking watch channel on etcd error 2015-04-09 11:03:30 -07:00
derekwaynecarr 9df41301f0 Expose last sync resource version 2015-04-08 17:09:06 -04:00
derekwaynecarr 2ed8eed004 Make admission control plug-ins work from indexes 2015-03-06 09:36:57 -05:00
Daniel Smith 554b1c847c add occasional polling to reflector 2015-02-27 16:59:14 -08:00
Dan Mace 5ee943d683 Support namespacing in cache.Store implementations
Support namespacing in cache.Store by framing the interface functions
around interface{} and providing a key function to each Store implementation.

Implementation of a fix for #2294.
2015-01-29 17:39:49 -05:00
Clayton Coleman f2d966859d Add RunUntil to the Reflector and Poller to allow early termination
This is useful for test suites where you want to kill your workers
without having to run one test env per execution.
2015-01-21 18:25:54 -05:00
Clayton Coleman b2434de777 When connections are broken on Watch, write fewer errors to logs
Watch depends on long running connections, which intervening proxies
may break without the control of the remote server. Specific errors
handled are io.EOF, io.EOF wrapped by *url.Error, http connection
reset errors (caused by race conditions in golang http code), and
connection reset by peer (simply tolerated).
2014-12-18 16:15:51 -05:00
Dan Mace 0ad8342a55 Log ErrUnexpectedEOF from watches as warnings
Watches are often established via long-running HTTP GET requests which
will inevitably time out during the normal course of operations. When
the watches time out, an io.EOF or an io.ErrUnexpectedEOF will bubble
up to client components such as StreamWatcher and Reflector. Treat EOF
as a clean watch termination. Treat ErrUnexpectedEOF as a less-clean
but non-fatal watch termination and log the event at the warning level.

This greatly reduces the amount of log noise generated during what is
ultimately normal operation, and adds the flexibility for the operator
to make a distinction between the EOF conditions if so desired (by
adjusting the logging level).
2014-12-05 15:03:07 -05:00
Clayton Coleman 3df1c2f29d Use meta.Interface and meta.Accessor 2014-10-23 18:01:25 -04:00
Clayton Coleman 1ccb86c760 Rename methods in api/meta to be cleaner 2014-10-22 22:59:12 -04:00
Clayton Coleman 64d98cba73 Move typemeta.go to api/meta/meta.go
Prepares for the meta object to front multiple underlying types
when TypeMeta and ObjectMeta is split in internal and v1beta3, but
combined in v1beta1 and v1beta2
2014-10-22 22:28:06 -04:00
Clayton Coleman 82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Clayton Coleman 4e56dafecc Introduce some default log verbosity control
Move a lot of common error logging into better buckets:

glog.Errorf() - Always an error
glog.Warningf() - Something unexpected, but probably not an error
glog.V(0) - Generally useful for this to ALWAYS be visible
            to an operator
            * Programmer errors
            * Logging extra info about a panic
            * CLI argument handling
glog.V(1) - A reasonable default log level if you don't want
            verbosity
            * Information about config (listening on X, watching Y)
            * Errors that repeat frequently that relate to conditions
              that can be corrected (pod detected as unhealthy)
glog.V(2) - Useful steady state information about the service
            * Logging HTTP requests and their exit code
            * System state changing (killing pod)
            * Controller state change events (starting pods)
            * Scheduler log messages
glog.V(3) - Extended information about changes
            * More info about system state changes
glog.V(4) - Debug level verbosity (for now)
            * Logging in particularly thorny parts of code where
              you may want to come back later and check it
2014-09-25 16:30:14 -04:00
Daniel Smith f211e46f20 handle watch errors everywhere 2014-09-22 17:37:12 -07:00
Daniel Smith 4d7c6e2657 Treat super short watches with no items received the same as watches that error immediately 2014-09-19 18:09:40 -07:00
Daniel Smith b1169ed91e Fix cache to use the "List then Watch" pattern. 2014-09-16 16:17:15 -07:00
Daniel Smith a63966e73c Combine pkg/apitools and pkg/api/common and call the result pkg/runtime 2014-09-02 11:15:44 -07:00
Daniel Smith 099c8fd36f Propagate rename; tests pass again. 2014-09-02 10:42:06 -07:00
Vojtech Vitek (V-Teq) 59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Daniel Smith 4c4ca59050 Add poller to cache. 2014-08-20 15:32:49 -07:00
Daniel Smith 4c3f509d94 Make cache.Reflector more injectable. Add test for resource version state keeping. 2014-08-20 15:32:49 -07:00
Daniel Smith 041d56f3d0 finish testing client/cache 2014-08-04 14:50:01 -07:00