Commit Graph

181 Commits

Author SHA1 Message Date
Dr. Stefan Schimanski
80b96b441b Mechanical import fixup: pkg/storage 2017-02-03 07:33:43 +01:00
Dr. Stefan Schimanski
2f9fa55c6f pkg/storage/etcd: cut off pkg/api scheme 2017-02-02 11:16:28 +01:00
Dr. Stefan Schimanski
bbb5fbf3b3 pkg/genericapiserver/registry/rest/resttest: cut off pkg/api dependency 2017-02-02 06:58:30 +01:00
deads2k
aea12038b4 move storage/storagebackend to apiserver 2017-01-27 08:49:55 -05:00
Clayton Coleman
469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Clayton Coleman
a35be4e02e
Update registries to use metainternalversion list options 2017-01-23 17:52:45 -05:00
deads2k
11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
Dr. Stefan Schimanski
3d9449a353 genericapiserver: fix imports 2017-01-19 13:06:47 +01:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Dr. Stefan Schimanski
8fe0958ba0 Update bazel 2017-01-17 09:30:48 +01:00
Dr. Stefan Schimanski
5c88b7d05a Fix imports 2017-01-17 09:30:30 +01:00
deads2k
77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
deads2k
31b6ba4e94 mechanicals 2017-01-13 16:33:09 -05:00
deads2k
f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton
20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Dr. Stefan Schimanski
87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
Daniel Smith
4de1287eb2 Update OWNERS
Remove people probably not interested in this code
2016-12-19 16:22:41 -08:00
Antoine Pelisse
f74183e138 Update OWNERS approvers and reviewers: pkg/registry 2016-12-19 16:22:40 -08:00
Mike Danese
c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Wojciech Tyczynski
3432fea8b2 Pipe GetOptions to storage 2016-12-06 11:48:37 +01:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Dr. Stefan Schimanski
1f5511b131 Move RESTStorageProvider interface into pkg/master 2016-12-03 18:35:15 +01:00
Pontus Leitzler
f3a5057968 Fix SA2003, deferred Lock right after locking 2016-11-14 17:16:38 +00:00
Mike Danese
3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
deads2k
518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
Doug Davis
9d5bac6330 Change minion to node
Contination of #1111

I tried to keep this PR down to just a simple search-n-replace to keep
things simple.  I may have gone too far in some spots but its easy to
roll those back if needed.

I avoided renaming `contrib/mesos/pkg/minion` because there's already
a `contrib/mesos/pkg/node` dir and fixing that will require a bit of work
due to a circular import chain that pops up. So I'm saving that for a
follow-on PR.

I rolled back some of this from a previous commit because it just got
to big/messy. Will follow up with additional PRs

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-09-28 10:53:30 -07:00
Timothy St. Clair
9f3841b452 Revert "Revert "Enable v3 Client as the default on UTs""
This reverts commit 9dcef2e3cd.
2016-09-14 07:27:21 -05:00
Daniel Smith
9dcef2e3cd Revert "Enable v3 Client as the default on UTs" 2016-08-24 13:16:40 -07:00
Timothy St. Clair
49b7ebd791 Switch UT default settings to leverage etcd3.v3client 2016-08-22 22:17:55 -05:00
Hongchao Deng
d0938094d9 move new etcd storage into cacher 2016-08-12 18:40:20 -07:00
Kubernetes Submit Queue
f9cadb290b Merge pull request #22919 from liggitt/http-test-etcd
Automatic merge from submit-queue

Allow starting test etcd with http

There are cases where we'll want to start a test etcd without https (external tools monitoring tests, tests with lots of parallelism, etc). This makes it an option.

Helps with https://github.com/kubernetes/kubernetes/issues/23127

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/22919)
<!-- Reviewable:end -->
2016-08-05 12:06:12 -07:00
Davanum Srinivas
2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
Jordan Liggitt
d4d6a0ee4c
Allow starting test etcd with http 2016-07-10 22:28:01 -04:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Sylwester Brzeczkowski
af0f053cdf #2049 DeepCopy Service instead of shallow copy 2016-05-30 14:54:45 +02:00
Clayton Coleman
c6961d6fd6
Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several
core paths.
2016-05-21 23:55:42 -04:00
Jordan Liggitt
6c323a4f72 Remove name generation from thirdpartyresource 2016-05-09 09:27:54 -04:00
Clayton Coleman
e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
Timothy St. Clair
24b4286960 In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05: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
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
Wojciech Tyczynski
2699be2e7e Switch api.ObjetaMetaFor to meta.Accessor 2016-03-31 17:52:31 +02:00
AdoHe
5fdfc4bde3 fix can not export service bug 2016-03-05 11:23:50 -05:00
mqliang
b0e06c14e5 add a knob to enable quorum read 2016-01-30 20:32:12 +08:00
Wojciech Tyczynski
58336829be Switch to versioned ListOptions in server. 2015-12-21 14:23:37 +01:00
deads2k
9fda7f1812 update StatusDetails to handle Groups 2015-12-17 09:14:12 -05:00
deads2k
f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -05:00
Wojciech Tyczynski
bf13bef955 Use unversioned.ListOptions in API server. 2015-11-24 14:42:21 +01:00
Timothy St. Clair
02851dd1b7 Removal of fakeClient and shift to storage.Interface for
all registry tests.
2015-11-19 10:34:30 -06:00
Wojciech Tyczynski
3df5d1dbc3 Move storage-related dirs under pkg/storage. 2015-11-12 19:49:32 +01:00
k8s-merge-robot
cc53619372 Merge pull request #15791 from abutcher/set-service
Auto commit by PR queue bot
2015-10-30 06:55:16 -07:00
Andrew Butcher
0c4aafaf1e Update master service ports and type via controller. 2015-10-29 10:56:46 -04:00
Wojciech Tyczynski
9c53f301f1 Merge selectors with ListOptions. 2015-10-29 15:42:57 +01:00
Wojciech Tyczynski
aa30e38183 Pass resource version to storage List operation. 2015-10-27 10:03:58 +01:00
Chao Xu
f3caff2a79 testapi.Experimental -> testapi.Extensions 2015-10-09 15:15:35 -07:00
Wojciech Tyczynski
cd1ac360de Rename "minion" to "node" in few places. 2015-09-09 16:18:23 +02:00
Chao Xu
9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Wojciech Tyczynski
97b4a64e2c Refactor registry etcd delete tests 2015-09-03 09:05:17 +02:00
Wojciech Tyczynski
a4baf4c211 Add registrytest support for etcd tests. 2015-09-02 07:54:34 +02:00
Wojciech Tyczynski
6dfe5b4b5a Refactoring of watch etcd tests. 2015-09-01 09:24:16 +02:00
nikhiljindal
25f2b85041 Deleting unused code 2015-08-27 19:52:47 -07:00
Wojciech Tyczynski
61de4fc34d Refactoring of create etcd tests. 2015-08-24 15:11:00 +02:00
Wojciech Tyczynski
5931cc74cc Unification refactoring to pkg/registry 2015-08-20 11:17:23 +02:00
Wojciech Tyczynski
dcc302ab38 Refactoring of list etcd tests. 2015-08-19 13:56:23 +02:00
Wojciech Tyczynski
2ced08358f Remove unused registry infrastructure 2015-08-12 11:23:10 +02:00
Wojciech Tyczynski
79125f460c Services using standard REST storage 2015-08-10 13:27:44 +02:00
Wojciech Tyczynski
d11ab96446 Extract non-storage operations from service etcd 2015-08-10 13:27:44 +02:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
hurf
6203ce9f85 Move pkg/scheduler to plugin/pkg/scheduler
As the TODO in plugin/pkg/scheduler/scheduler.go described:

move everything from pkg/scheduler into this package. Remove
references from registry.
2015-05-13 14:03:25 +08: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
Kris Rousey
594f514843 Changing a few remaining instances of passing pods around by value. I
avoided changing api.PodList.Items to []*api.Pod.
2015-04-20 15:26:45 -07:00
Wojciech Tyczynski
0e5b478b4d ListMinions support for selectors 2015-04-09 14:22:09 +02:00
gmarek
5a11748018 Move Capacity from NodeSpec to NodeStatus 2015-03-26 15:28:48 +01:00
Masahiro Sano
410e11c305 port endpoints to generic etcd 2015-03-25 22:15:19 +09:00
Clayton Coleman
428d2263e5 Graceful deletion of resources
This commit adds support to core resources to enable deferred deletion
of resources.  Clients may optionally specify a time period after which
resources must be deleted via an object sent with their DELETE. That
object may define an optional grace period in seconds, or allow the
default "preferred" value for a resource to be used. Once the object
is marked as pending deletion, the deletionTimestamp field will be set
and an etcd TTL will be in place.

Clients should assume resources that have deletionTimestamp set will
be deleted at some point in the future.  Other changes will come later
to enable graceful deletion on a per resource basis.
2015-03-19 15:33:32 -04:00
Prashanth Balasubramanian
6193608e9b Add an rc strategy, start delta validating updates 2015-03-13 13:09:03 -07:00
Salvatore Dario Minonne
925fa6baf8 Adding fields selector 2015-03-10 22:13:10 +01:00
Brendan Burns
7c654a3d1b Expand test coverage in master, kubectl/cmd/util, pkg/registry/resourcequota, and api/rest. 2015-03-07 15:24:39 -08:00
Brendan Burns
2700871b04 Merge pull request #5013 from smarterclayton/misc_fixup
Small cleanups to a number of client behaviors
2015-03-06 15:41:34 +01:00
Mike Danese
5cbf89c060 plumb through changes on ReplicationController and Service 2015-03-04 10:38:42 -08:00
Clayton Coleman
a52b0f2619 Switch List/Watch to ListPredicate/WatchPredicate 2015-03-04 10:48:05 -05:00
Paul Morie
a131a5e491 Add test for secret RESTStorage 2015-02-18 13:02:22 -05:00
Clayton Coleman
23d199ded9 Make generic etcd more powerful and return operations from etcd
When we complete an operation, etcd usually provides a response
object.  Return that object up instead of querying etcd twice.
2015-02-13 13:11:33 -05:00
Brendan Burns
783e1de5bb Add some locking to prevent go data race logic from tripping. 2015-02-05 17:27:58 -08:00
Clayton Coleman
1588970ec4 Turn 409 into 500 Try Again Later when using generateName
If a client says they want the name to be generated, a 409 is
not appropriate (since they didn't specify a name). Instead, we
should return the next most appropriate error, which is a 5xx
error indicating the request failed but the client *should* try
again.  Since there is no 5xx error that exactly fits this purpose,
use 500 with StatusReasonTryAgainLater set.

This commit does not implement client retry on TryAgainLater, but
clients should retry up to a certain number of times.
2015-02-02 14:46:25 -05:00
Daniel Smith
2bee4ac572 Merge pull request #3381 from a-robinson/events2
Improve client recording of events such that clients are
2015-01-14 15:21:16 -08:00
Paul Morie
fd834ae84d Pods should see services only from their own ns 2015-01-14 17:06:36 -05:00
Alex Robinson
be6b1cf0e2 Push the full channel logic into the implementation of the broadcaster
in watch/mux.go rather than being in the client event recording code.
2015-01-13 02:22:30 +00:00
Clayton Coleman
a0d711816d HealthyRegistry should only decorate minions, not omit them
Fixes #3098
2015-01-07 11:09:41 -05:00
Deyuan Deng
45bfcb451b Enable watch on node changes. 2014-12-16 08:12:31 +08:00
Daniel Smith
272bfc97ed Merge pull request #2788 from smarterclayton/roundtrip_node_nodelist
Rename Minions -> Nodes internally
2014-12-10 11:12:15 -08:00
Clayton Coleman
19379b5a38 Internal rename api.Minion -> api.Node 2014-12-10 12:08:18 -05:00
Deyuan Deng
76552423f9 Move watch filter into storage level 2014-12-04 20:15:27 -05:00
Eric Tune
3f285269cc Rename watch.Mux -> watch.Broadcaster
A few reasons:
- Mux is already widely used in the codebase to refer to a http handler mux.
- Original meaning of Mux was something which sent a chose one of several inputs to
  and output.  This sends one output to all outputs.  Broadcast captures that idea
  better.
- Aligns with similar class config.Broadcaster (see #2747)
2014-12-04 00:30:51 -08:00
Clayton Coleman
156000ef6d Move the internal minion representation to match v1beta3
Moves to 'Spec' and 'Status' internally and removes duplicate
fields.  Moves Capacity into Spec and drops use of NodeResources
2014-11-20 20:53:08 -05:00
Deyuan Deng
cc310e0e71 Support node label update. 2014-11-17 13:42:31 -05:00
Daniel Smith
178d0af795 Fix watch for events; add test for interface implementation so it won't break again. 2014-11-12 15:22:08 -08:00
Tim Hockin
bb5ca0f91b Respect a requested PortalIP if possible 2014-10-27 14:03:52 -07:00