Commit Graph

67 Commits

Author SHA1 Message Date
Daniel Smith
0c2d3ffe68 Single-key matching behavior in generic.Matcher 2015-04-03 13:11:21 -07:00
Daniel Smith
68287713a0 Add a "delta fifo", which queues up object changes
Test coverage for module at 80%.
2015-03-31 10:25:29 -07:00
Daniel Smith
af870b8772 Add proper key error type 2015-03-31 10:25:29 -07:00
Daniel Smith
e8cc126a56 Add ListKeys() to FIFO & test 2015-03-31 10:25:29 -07:00
Daniel Smith
a8184e81bc Update FIFO documentation 2015-03-31 10:25:29 -07:00
nikhiljindal
7e3b7f9673 Updating unit tests so that they pass with v1beta3 api 2015-03-24 12:13:53 -07:00
Salvatore Dario Minonne
31ddefc347 Finalize fields.Selector 2015-03-17 22:55:43 +01:00
Brian Grant
2f9a41b898 Merge pull request #5233 from brendandburns/labels
Make label and field selector query strings versionable.
2015-03-16 16:01:37 -07:00
Daniel Smith
992d78a32e Add a system modeler to scheduler
So it can try to predict the effect its bindings will have.
2015-03-13 17:48:16 -07:00
Brendan Burns
266234f3b9 Make label and field selector query strings versionable. 2015-03-12 12:24:07 -07:00
Wojciech Tyczynski
9f2f10d6db Make scheduler to watch PodSpec.Host instead Status.Host 2015-03-12 13:38:58 +01:00
nikhiljindal
916ca9cc68 Changing v1beta3 field selectors to be camelCased 2015-03-09 18:01:01 -07:00
Eric Tune
c12303eaa3 Merge pull request #4749 from derekwaynecarr/make_quota_more_efficient
Make admission control plug-ins work from indexes
2015-03-06 14:11:12 -08:00
Deyuan Deng
50de1a80c2 kubelet should take a client interface 2015-03-06 15:01:55 -05:00
derekwaynecarr
2ed8eed004 Make admission control plug-ins work from indexes 2015-03-06 09:36:57 -05:00
Salvatore Dario Minonne
75f2efb500 moving ParseSelector to Parse for labels only. 2015-03-05 22:39:36 +01:00
Daniel Smith
554b1c847c add occasional polling to reflector 2015-02-27 16:59:14 -08:00
Daniel Smith
156c505946 clean up poller test to not make infinite log messages 2015-02-27 16:51:03 -08:00
nikhiljindal
48e7945f65 Versioning the field selectors 2015-02-27 16:10:59 -08:00
Dan Mace
45372a90f8 Support AddIfNotPresent function
Add an AddIfNotPresent function to support single producer/consumer
retry scenarios. Provides the consumer with a means to prefer items
already enqueued by the producer at the point of retry.
2015-02-19 17:04:55 -05:00
Clayton Coleman
4859aa7cd8 Merge pull request #4453 from derekwaynecarr/make_quota_more_efficient
Make ListWatch work with a ListFunc and WatchFunc
2015-02-17 14:48:11 -05:00
Clayton Coleman
3e2e4714a2 Always set ?namespace in query if specified
Revise our code to only call Request.Namespace() if a namespace
*should* be present.  For root scoped resources, namespace should
be ignored.  For namespaced resources, it is an error to have
Namespace=="".
2015-02-16 00:23:38 -05:00
derekwaynecarr
c0ce15c588 Make list watch take a ListFunc and WatchFunc, provide default funcs from client 2015-02-15 22:26:05 -05:00
derekwaynecarr
192e186119 If an object has no namespace, do not add a leading slash 2015-02-12 17:14:16 -05:00
derekwaynecarr
53f1efa484 Make sure we remove old object from index before adding new 2015-02-09 16:44:51 -05:00
derekwaynecarr
1cf69bdefc Support multiple index functions, address feedback 2015-02-09 16:44:51 -05:00
derekwaynecarr
7a2d63048d Enable look-up by secondary index in cache 2015-02-09 16:44:51 -05:00
Clayton Coleman
3ca23163ae Add a GetByKey method to Store
Without the ability to retrieve underlying items by key (instead of
the object passed to KeyFunc) it is impossible to build wrappers
around cache.Store that want to make decisions about keys, because
they would need to reconstruct the object passed to Get.

This allows retrieval by key, and makes sure Get(obj) uses it.
2015-02-01 14:55:45 -05: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
Eric Tune
98bdd3f7c4 Test for and fix crash with nil client in kubelet.
Added test that fails before fix.
Fixed use of nil pointer.
2015-01-16 13:39:31 -08:00
davidopp
2675cfa16b Merge pull request #2906 from abhgupta/abhgupta-dev
Enhancements to scheduler priority functions
2015-01-14 21:47:28 -08:00
Daniel Smith
224a8d634b Merge pull request #3384 from derekwaynecarr/list_watch_by_namespace
Add ability to listwatch a resource in an optional namespace
2015-01-13 11:15:27 -08:00
Abhishek Gupta
6fd0b181e3 Rebased onto the latest changes to the scheduler code 2015-01-13 09:41:25 -08:00
Eric Tune
00c05053b7 Rename ListPods methods to List.
For greater similarity to pkg/client.
Does not cover registry's ListPods.
Fix an example in a comment.
2015-01-09 23:46:02 -08:00
derekwaynecarr
7c630fd797 Add ability to listwatch in namespace 2015-01-10 01:04:26 -05:00
Eric Tune
f381579a89 Fix flaky test.
Maps are randomly reordered.
But there is only one order for one thing.
2015-01-09 16:23:53 -08:00
Eric Tune
793bf6a79d Added UndeltaStore.
This will be used to connect Reflector to kubelet update channel.

Added testing.
2015-01-09 12:40:07 -08:00
Eric Tune
83aed75556 Addded a StoreToServiceLister. 2015-01-08 15:29:08 -08:00
Daniel Smith
963000715a Merge pull request #3294 from erictune/public_storetoers
Move Listers to pkg/client/cache.
2015-01-07 15:56:14 -08:00
Eric Tune
ed74197fde Move Listers to pkg/client/cache.
I would like to use these in kubelet and kube-proxy.
This is the minimal change to get them moved.
I will follow up with changes to make interfaces consistent
and add Listers for other resources.
2015-01-07 15:33:17 -08:00
Eric Tune
7d5ac856c5 Make Reflector helpers reusable.
Scheduler uses Reflector from pkg/client/cache.
It defines some helper classes.
I'd like to use those helpers with pkg/client/cache
in kube-proxy and kubelet too.
2015-01-07 13:49:37 -08: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
Paul Morie
80b1e2dde3 Typo fix 2014-11-12 13:05:08 -05:00
Paul Morie
e2be1564a4 Rename client/cache Store.Contains to ContainedIDs 2014-11-11 11:48:15 -05:00
Clayton Coleman
644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04: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