Commit Graph

108 Commits

Author SHA1 Message Date
Wojciech Tyczynski
4fa3aba0c2 Get rid of DeleteAllEtcdKeys 2016-07-05 22:10:47 +02:00
Wojciech Tyczynski
122f97d29b Migrate remaining integration tests 2016-07-05 13:34:27 +02:00
Wojciech Tyczynski
925ba42507 Avoid annoying logs in integration tests 2016-07-04 16:52:55 +02:00
Wojciech Tyczynski
bee29b59d2 Cleanup integration RunAMaster 2016-07-04 15:53:56 +02:00
Wojciech Tyczynski
ac270b66b7 Move first few integration tests to use dedicated namespaces 2016-07-04 13:21:26 +02:00
Wojciech Tyczynski
08f17fef27 Unify DeleteAllEtcdKeys in integration tests. 2016-07-04 12:01:09 +02:00
Hongchao Deng
e270ccf543 integration: cleanup unused API 2016-07-01 16:26:17 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
George Tankersley
56a2cf40e6 tests: add certificates to existing test infrastructure 2016-06-28 12:05:40 -07:00
Jan Safranek
a114df7d59 integration tests: add env. variable for etcd URL.
Many integration tests delete all keys in etcd as part of their cleanup.
To run these tests in parallel we must run several etcd daemons, each on
different port and pass etcd url to the test suite.
2016-06-20 10:40:49 +02:00
k8s-merge-robot
6fbf99b11a Merge pull request #26753 from ericchiang/rbac-authorizer-tests
Automatic merge from submit-queue

add unit and integration tests for rbac authorizer

This PR adds lots of tests for the RBAC authorizer. 

The plan over the next couple days is to add a lot more test cases.

Updates #23396

cc @erictune
2016-06-19 19:19:08 -07:00
Daniel Smith
8af08f90b5 remove unused prefix code, fix comment 2016-06-16 14:29:40 -07:00
Eric Chiang
d13e351028 add unit and integration tests for rbac authorizer 2016-06-14 11:07:48 -07:00
Daniel Smith
6e6ae452e5 Make each integration test use different prefix 2016-06-12 13:33:31 -07:00
Chao Xu
d03fe34114 enable watchCache in test/integration/ tests 2016-05-28 15:46:12 -07:00
k8s-merge-robot
e543bd6452 Merge pull request #26007 from smarterclayton/watch_opt
Automatic merge from submit-queue

Additional optimizations to the encode/decode paths

Builds on top of #25983 with a number of other optimizations.
2016-05-28 06:27:00 -07:00
Eric Chiang
323e804f39 add rbac for tests and kubectl 2016-05-25 14:25:56 -07: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
Matt Liggett
f5e8d41431 Finish implementing policy API.
Registry implementation and addition to the master.
2016-05-13 17:27:58 -07: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
Clayton Coleman
fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
k8s-merge-robot
11298d02e0 Merge pull request #24455 from hongchaodeng/fl
Automatic merge from submit-queue

Provide flags to use etcd3 backed storage

ref: #24405

What's in this PR?
- Add a new flag "storage-backend" to choose "etcd2" or "etcd3". By default (i.e. empty), it's "etcd2".
- Take out etcd config code into a standalone package and let it create etcd2 or etcd3 storage backend given user input.
2016-04-29 08:49:04 -07:00
Hongchao Deng
c0071a1595 add flags to enable etcd3 2016-04-28 09:48:16 +08:00
zhouhaibing089
bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
Clayton Coleman
3111985564 Handle streaming serializers more consistently
Add tests to watch behavior in both protocols (http and websocket)
against all 3 media types. Adopt the
`application/vnd.kubernetes.protobuf;stream=watch` media type for the
content that comes back from a watch call so that it can be
distinguished from a Status result.
2016-04-22 11:07:24 -04:00
deads2k
6670b73b18 make storage enablement, serialization, and location orthogonal 2016-04-21 08:18:55 -04:00
deads2k
3be4b690ea create a negotiating serializer that wraps a single serializer 2016-04-21 07:51:59 -04:00
Prashanth Balasubramanian
0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
deads2k
f0c33d65b6 start sharing the pod cache and list/watch 2016-04-18 08:51:55 -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
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
deads2k
e8fb35d4d8 refactor resource overrides as positive logic interface 2016-03-28 09:24:49 -04:00
Hongchao Deng
29b46a2395 integration/framework: remove unused NewEtcdStorage()
In integration/, framework.NewEtcdStorage() isn't used by any function.
2016-03-23 16:34:28 -07:00
Kris
e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
mqliang
e44e71ca87 make cache size configurable 2016-02-24 22:37:02 +08:00
Eric Tune
d5f303d3d7 Fixed and added tests 2016-02-19 09:20:56 -08:00
Piotr Szczesniak
d9705940d6 Fixed and added tests 2016-02-15 21:39:00 +01:00
Chao Xu
184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
Nikhil Jindal
59820827d4 Merge pull request #20513 from nikhiljindal/apiserverExampleTest
Adding test for apiserver example
2016-02-04 11:28:58 -08:00
nikhiljindal
c7beb9078c Updating methods to return error rather than using glog.Fatalf 2016-02-03 16:00:45 -08:00
Chao Xu
f9f5736b01 grep sed 2016-02-03 13:06:07 -08:00
k8s-merge-robot
c5260c8c71 Merge pull request #20145 from mqliang/quorum-read
Auto commit by PR queue bot
2016-02-02 05:50:41 -08:00
Chao Xu
c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
mqliang
b0e06c14e5 add a knob to enable quorum read 2016-01-30 20:32:12 +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
Clayton Coleman
4d127dc969 Initialize API servers with negotiated serializers
Pass down into the server initialization the necessary interface for
handling client/server content type negotiation. Add integration tests
for the negotiation.
2016-01-22 01:10:22 -05: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
Wojciech Tyczynski
d1e039b646 Merge pull request #18635 from timothysc/etcd_client_post_cleanup
Update to use latest etcd client library
2015-12-18 14:14:21 +01:00
Timothy St. Clair
c505a5d49d Updating kubernetes proper to use latest etcd client library 2015-12-16 15:56:35 -06:00
nikhiljindal
2d952aaa87 Extracting APIServer machinery code into a library 2015-12-16 13:54:23 -08:00