Commit Graph

296 Commits (00aae980e889e8a5731ad4639154b6524ee8749a)

Author SHA1 Message Date
Vincent Behar efe7775578 fix typo 2016-04-04 14:40:01 +02:00
Clayton Coleman 206308ea14 Provide better log output and name for reflectors
Reflectors started from goroutines are broken because Go doesn't allow
runtime.Callers to see the spawning goroutine. Do a best effort parse of
the call stack for now.

Add logging so that we can easily see which reflectors processes launch,
and measure in logs the frequency of sync intervals.
2016-03-24 17:37:31 -04:00
Joshua Piccari f5f83b076a Improve go report card by fixing typos in comments 2016-03-04 18:30:59 -08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Prashanth Balasubramanian 45eb835833 Lock across item expiration in the ttl store. 2016-02-24 14:06:18 -08:00
Janet Kuo cf2bbc0d6d Fix a bug when getting deployments for RS 2016-02-19 11:42:17 -08:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
Madhusudan.C.S 525d7a7732 Fix the label selector to selector conversion error string.
The message as it is framed right now does not make any sense for the
end users of our system. It might even lead to confusion. So this is
attempt to make the error message less confusing.
2016-02-10 09:43:30 -08:00
Madhusudan.C.S ed7ad6dcf3 Make deployments work. 2016-02-08 21:27:49 -08:00
Madhusudan.C.S 518f08aa7c Move Deployments to ReplicaSets and switch the Deployment selector to the new LabelSelector.
Update the Deployments' API types, defaulting code, conversions, helpers
and validation to use ReplicaSets instead of ReplicationControllers and
LabelSelector instead of map[string]string for selectors.

Also update the Deployment controller, registry, kubectl subcommands,
client listers package and e2e tests to use ReplicaSets and
LabelSelector for Deployments.
2016-02-08 21:27:38 -08:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
Daniel Smith 9b68e8ec2b Merge pull request #20269 from mqliang/sync-delta-fifo
add a HasSynced() for DeltaFIFO and FIFO, method, which is very helpful for Informer
2016-02-05 15:51:50 -08:00
Eric Tune 6133cb1f21 Move extensions.LabelSelector to unversioned.
Move type LabelSelector and type LabelSelectorRequirement from pkg/apis/extensions
This avoids an import loop when Job (and later DaemonSet, Deployment, ReplicaSet)
are moved out of extensions to new api groups.

Also Move LabelSelectorAsSelector utility from pkg/apis/extensions/ to pkg/api/unversioned/
Also its test.
Also LabelSelectorOp* constants.
Also the pkg/apis/extensions/validation functions ValidateLabelSelectorRequirement and
ValidateLabelSelector move to pkg/api/unversioned

The related type in pkg/apis/extensions/v1beta1/ is staying there.  I might move
it in another PR if neccessary.
2016-02-04 13:46:34 -08:00
mqliang 8e615df000 fix the HasSynced() bug for Informer 2016-02-03 11:40:11 +08:00
Jeff Lowdermilk caa9433234 Merge pull request #20433 from lavalamp/fix-bad-rv
Add timeout, fix potential startup hang
2016-02-02 17:27:23 -08:00
Daniel Smith 4a7d70aef1 extend fake clock 2016-02-01 15:36:15 -08:00
harry 1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
k8s-merge-robot 4ed43968e0 Merge pull request #19581 from janetkuo/deployment-version
Auto commit by PR queue bot
2016-01-30 13:34:59 -08:00
Janet Kuo 42f712467e Use ListOptions when listing RCs in deployment 2016-01-30 12:04:35 -08:00
Clayton Coleman 8692d260f8 Use Parameter codec in request.VersionedParams() 2016-01-30 14:14:20 -05:00
k8s-merge-robot 783d1d00d7 Merge pull request #20139 from janetkuo/rcList-namespace
Auto commit by PR queue bot
2016-01-30 09:42:35 -08:00
Madhusudan.C.S c25a0ce00d Implement ReplicaSets client. 2016-01-28 22:36:22 -08:00
Clayton Coleman 38c7eded99 Prepare for content-type negotiation
Combine the fields that will be used for content transformation
(content-type, codec, and group version) into a single struct in client,
and then pass that struct into the rest client and request. Set the
content-type when sending requests to the server, and accept the content
type as primary.

Will form the foundation for content-negotiation via the client.
2016-01-26 17:44:30 -05:00
Janet Kuo 14f4f1b065 Make listing deployment rcStore namespaced 2016-01-25 19:13:17 -08:00
k8s-merge-robot 4010c214e4 Merge pull request #19752 from hongchaodeng/listandwatch
Auto commit by PR queue bot
2016-01-15 23:01:37 -08:00
Hongchao Deng 9a10e95f6e docs: Reflector ListAndWatch 2016-01-15 18:19:19 -08:00
harry 98222b4d8b Replace to tag
Use a testing pkg to replace testing util codes
2016-01-15 15:07:21 +08:00
He Simei 7dacd3fe61 use param indices 2016-01-13 19:23:58 +08:00
David Oppenheimer 8ac484793d Comment out calls to httptest.Server.Close() to work around
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-01-11 23:02:11 -08:00
Justin Santa Barbara f9a6ac077e Ubernetes Lite: Volumes can dictate zone scheduling
For AWS EBS, a volume can only be attached to a node in the same AZ.
The scheduler must therefore detect if a volume is being attached to a
pod, and ensure that the pod is scheduled on a node in the same AZ as
the volume.

So that the scheduler need not query the cloud provider every time, and
to support decoupled operation (e.g. bare metal) we tag the volume with
our placement labels.  This is done automatically by means of an
admission controller on AWS when a PersistentVolume is created backed by
an EBS volume.

Support for tagging GCE PVs will follow.

Pods that specify a volume directly (i.e. without using a
PersistentVolumeClaim) will not currently be scheduled correctly (i.e.
they will be scheduled without zone-awareness).
2015-12-31 12:27:01 -05:00
Janet Kuo 32d153093e Fix deployment tests failures; change ResyncPeriod 2015-12-17 19:29:54 -08:00
Sam Ghods b838d8ce18 Add informers to deployment controller 2015-12-17 19:29:54 -08:00
Clayton Coleman 8f203a28f1 Change runtime.Object signature 2015-12-15 13:36:25 -05:00
k8s-merge-robot 06df5c97e7 Merge pull request #18499 from wojtek-t/fix_reflector_race
Auto commit by PR queue bot
2015-12-15 01:19:06 -08:00
Wojciech Tyczynski 960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
Wojciech Tyczynski 6a7e8861c2 Fix data-race in reflector test in Go 1.5.1 2015-12-14 09:47:45 +01:00
Wojciech Tyczynski 0cefb43707 Enable listing from memory 2015-12-09 16:24:14 +01:00
Wojciech Tyczynski a915b8b29a Merge pull request #18080 from wojtek-t/list_options_in_listwatch
Pass ListOptions to List in ListWatch.
2015-12-09 14:27:51 +01:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
Wojciech Tyczynski b0fcb5adef Pass ListOptions to List in ListWatch. 2015-12-07 11:53:53 +01:00
k8s-merge-robot db11f1b6c6 Merge pull request #17133 from derekwaynecarr/quota_controller_improvements
Auto commit by PR queue bot
2015-12-06 12:24:00 -08:00
Salvatore Dario Minonne 80575c3093 renaming PodSelector to LabelSelector 2015-12-04 09:49:08 +01:00
derekwaynecarr 55d4f70f8e Resource quota observes deletes faster 2015-12-03 17:35:05 -05:00
Wojciech Tyczynski cdded4f011 Use VersionedParams in "extensions" client. 2015-12-01 10:18:55 +01:00
jiangyaoguo f4c5d00b0c Implement a cachedNodeInfo in predicates 2015-11-27 21:49:14 +08:00
Wojciech Tyczynski b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
k8s-merge-robot 4fd6b6df06 Merge pull request #17316 from deads2k/gv-ClientForVersion
Auto commit by PR queue bot
2015-11-24 06:24:28 -08:00
deads2k a87d927588 update client.Config to use GroupVersion 2015-11-21 08:29:26 -05:00
feihujiang ad79fa6e84 Move list functions from runtime to meta package 2015-11-20 09:20:55 +08:00
Abhi Shah 3b014c71dd Merge pull request #17274 from mqliang/podController
fix errror message
2015-11-18 14:17:31 -08:00
mqliang d7acd3d58f fix errror message 2015-11-15 09:49:35 +08:00
Mike Danese 7a7f31ead1 move daemonset to generalized label selector 2015-11-13 10:31:50 -08:00
Paul Morie 2377bada68 Add implements assertion for cache 2015-11-11 16:20:56 -05:00
Mike Danese c91dac3270 up the log level on a super spammy statement 2015-11-09 11:26:30 -08:00
k8s-merge-robot f4b2d8358f Merge pull request #16179 from madhusudancs/master-out-of-disk
Auto commit by PR queue bot
2015-10-29 11:57:25 -07:00
k8s-merge-robot 1ecda94f0a Merge pull request #15305 from mqliang/deamonSetList
Auto commit by PR queue bot
2015-10-29 11:25:52 -07:00
Madhusudan.C.S ce257b5a0e Use node out of disk condition in the scheduler while scheduling pods.
Set the out of disk node condition to unknown in the node controller if
the kubelet does not report its node condition in a long time. Update
node controller unit tests.

Implement a node condition predicate function that checks if a given
node satisfies the conditions defined by the predicate and if it
does, use that node for scheduling pods. The predicate function takes
both NodeReady and NodeOutOfDisk into consideration to determine if a
node is fit for scheduling pods.

The predicate is then passed to the node lister in the scheduler factory
so that the node lister can run the predicate function on the nodes when
schedling pods thereby omitting nodes that does not satisfy the
predicate.

Also update listers test.
2015-10-28 14:29:46 -07:00
Daniel Smith 8524d392bf Merge pull request #16178 from madhusudancs/kubelet-out-of-disk-no-master
Report node out of disk condition in the kubelet.
2015-10-27 14:28:03 -07:00
Madhusudan.C.S 9c4424f0bd Report out of disk as a node condition when node goes out of disk.
Define a new out of disk node condition and use it to report when node
goes out of disk.

Make a copy of loop range clause variable in node listers so that it
is available outside the for loop.

Also update/implement unit tests.
2015-10-26 15:01:20 -07:00
Wojciech Tyczynski d47e21f19f Reuse TCP connections in Reflector between resync periods. 2015-10-26 19:35:25 +01:00
k8s-merge-robot a094a6e3de Merge pull request #15815 from mqliang/lister_test
Auto commit by PR queue bot
2015-10-26 11:30:44 -07:00
Mike Danese 933daef3f8 fix cache.Get error handling on bad key 2015-10-21 11:43:30 -07:00
k8s-merge-robot 36e1b80e4a Merge pull request #14881 from lavalamp/fix-14617
Auto commit by PR queue bot
2015-10-20 14:14:18 -07:00
mqliang 62846b8b3c solve conflict after rebase 2015-10-19 21:56:24 +08:00
mqliang b9f9944351 add unit test for StoreToJobLister 2015-10-19 21:56:24 +08:00
mqliang 1ce85d8ffd replace Fatalf to Errorf 2015-10-17 19:44:32 +08:00
k8s-merge-robot d94e4d64f2 Merge pull request #15694 from mqliang/jobList
Auto commit by PR queue bot
2015-10-16 21:22:12 -07:00
Mike Danese a7a54cac74 move job to generalized label selector 2015-10-15 07:42:58 -07:00
mqliang 5122f34206 StoreToJobLister.List() should return extensions.JobList, instead of []extension.Job 2015-10-15 15:23:52 +08:00
mqliang 45269bef8f return api.DaemonSetList, instead of an array 2015-10-15 14:49:52 +08:00
Daniel Smith 57c6dd93ea Switch type; add comments & disclaimer 2015-10-14 16:18:56 -07:00
Daniel Smith 4bdb1259a7 fix delta fifo & various fakes for go1.5.1 2015-10-14 16:07:46 -07:00
Chao Xu cbb3deb182 run goimports 2015-10-12 13:31:45 -07:00
Chao Xu 50a2c4c643 grep-sed 2015-10-12 13:31:45 -07:00
Chao Xu 7c9f4cc42f experimental. -> extensions. 2015-10-09 15:49:10 -07:00
Chao Xu 67f316dd19 apis/experimental->apis/extensions 2015-10-09 15:04:41 -07:00
Brendan Burns 77fd388485 Increase a bunch of timeouts to reduce flakes 2015-09-23 11:09:03 -07: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
Kris f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
Maciej Szulik 8cefa2ee55 Job controller logic 2015-09-17 10:05:33 +02:00
k8s-merge-robot 22f698f5b0 Merge pull request #13953 from liguangbo/change_iff_to_if_and_only_if
Auto commit by PR queue bot
2015-09-16 08:35:20 -07:00
liguangbo 4df68f03a3 change iff to if and only if to improve annotation readability 2015-09-16 08:29:36 +00:00
Wojciech Tyczynski 53ae56f205 Replace "minion" with "node" in bunch of places. 2015-09-14 11:07:11 +02:00
Daniel Smith 4c2adabf42 move; sed replace 2015-09-11 16:03:22 -07: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 3a71eb1bcc Store previous value in WatchCache for filtering 2015-08-18 09:33:34 +02:00
Maciej Szulik 686f764fc7 Allow other client's implementation to reuse NewListWatchFromClient by passing in the Getter interface, responsible for accessing RESTClient's Get method. 2015-08-17 15:25:03 +02:00
Wojciech Tyczynski e424da7d0d Implement Cacher for watch in apiserver 2015-08-14 09:44:42 +02:00
Kris Rousey 565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Veres Lajos 9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Wojciech Tyczynski 52e3af4e93 Implement watchCache structure. 2015-08-07 08:29:17 +02:00
Dawn Chen c1c03bb4ca Merge pull request #12139 from kargakis/avoid-reallocs-in-index
cache: Avoid reallocs in Index
2015-08-06 13:00:02 -07: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
kargakis 95a27394cc cache: Avoid reallocs in Index 2015-08-05 16:59:08 +02:00
Prashanth Balasubramanian 81d91b1f05 Bare metal loadblancers 2015-08-03 21:35:24 -07:00
Mike Danese aca1eb6184 Merge pull request #11983 from caesarxuchao/11854
downgrade errors returned by watchHandler in reflector.go to warnnings
2015-07-30 08:20:05 -07:00
Chao Xu 3b11705a99 downgrade errors returned by watchHandler in reflector.go to warnnings 2015-07-29 10:32:48 -07:00
deads2k 9386db8c99 support multiple index values for a single object 2015-07-29 07:54:09 -04:00
Mike Danese d167fa27e0 rename StoreToControllerLister -> StoreToReplicationControllerLister to make room for more controllers 2015-07-27 16:13:47 -07:00
Mike Danese 5c6f4f5906 Merge pull request #10024 from deads2k/name-reflectors
add originator to reflector logging
2015-07-24 10:23:34 -07:00
markturansky e5a4b75421 Added ability to get generated values of an index func 2015-07-23 10:00:04 -04:00
deads2k f203b16cd9 add originator to reflector logging 2015-07-10 11:34:49 -04:00
Chao Xu 1be9789795 remove references to v1beta1/2 in listwatch_test.go 2015-06-17 17:23:33 -07:00
Filip Grzadkowski 7cdfb2ac7f Reduce number of list requests in watch-based cache 2015-06-03 00:55:49 +02:00
Prashanth B 6c209ec193 Revert "Revert "Wake up rcs when pods get DeletionFinalStateUnknown tombstones"" 2015-05-29 09:24:39 -07:00
Tim Hockin b69fad211e Revert "Wake up rcs when pods get DeletionFinalStateUnknown tombstones" 2015-05-28 10:23:55 -07:00
Prashanth Balasubramanian 8fa66bd962 Delta fifo includes objects in DeleteFinalStateUnknow, rcs stop faster 2015-05-27 16:45:51 -07:00
Jordan Liggitt 49ceb82179 Wait until stores are filled before processing service account token events 2015-05-20 22:19:42 -04:00
Prashanth Balasubramanian 4b0607cf0b Scheduler ignored nodes with unknown condition status 2015-05-06 18:32:52 -07: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 a8fdf3d78b Update expiration timeout based on observed latencies 2015-05-01 08:53:51 -07:00
Prashanth Balasubramanian 7592dabeba RcManager uses informers 2015-04-28 13:45:15 -07:00
Daniel Smith a2953fdc7e Make endpoint controller use framework 2015-04-17 15:21:51 -07:00
Daniel Smith da5111891c Fix selector handling in listers.go. 2015-04-17 15:21:37 -07:00
Kris Rousey 81497f3ed2 Changing the scheduler package to use *api.Pod instead of api.Pod to
avoid unnecessary shallow copies. The change rippled through a lot of
code.
2015-04-17 13:34:31 -07:00
Daniel Smith 5f7715f0e9 Make scheduler not miss deletion events even in the case of a resync. 2015-04-10 14:05:08 -07:00
Daniel Smith 880f922bb6 Add easy setup for simple controller
Also add tests; coverage up to 86.7%
2015-04-10 14:05:07 -07:00
Prashanth Balasubramanian 5234c2dc82 Fix RunUntil and stop leaking watch channel on etcd error 2015-04-09 11:03:30 -07:00
markturansky e5f280b79e fixed typos 2015-04-08 21:00:48 -04:00
Prashanth Balasubramanian a7864aa230 Scheduler uses TTLStore for assumed pods 2015-04-08 15:01:04 -07:00
derekwaynecarr 9df41301f0 Expose last sync resource version 2015-04-08 17:09:06 -04:00
Derek Carr 6eb54e73e0 Merge pull request #5270 from lavalamp/fix7
Controller framework
2015-04-07 16:58:09 -04:00
markturansky 8f24fbc40c fixed typo 2015-04-07 12:38:09 -04:00
Daniel Smith 44bc29631e compute query parameter names in the client. 2015-04-06 16:54:26 -07:00
Daniel Smith 0c2d3ffe68 Single-key matching behavior in generic.Matcher 2015-04-03 13:11:21 -07:00
Daniel Smith cc5ef8c5ad make undelta store use go's implementatio inheritance mechanism 2015-04-02 15:31:19 -07:00
Daniel Smith 8ee9ee9920 add ListKeys method to Store 2015-04-02 15:26:39 -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