Commit Graph

179 Commits (d1c5ae65d800134b6cd03a9946f9a50eea419457)

Author SHA1 Message Date
Clayton Coleman 3474911736 Implement a streaming serializer for watch
Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).
2016-04-11 11:22:05 -04:00
harry b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
Madhusudan.C.S 8b7e56d242 Allow cross-group subresource registrations in the APIInstaller.
This allows subresources which belong to different API groups than
their parents to be registered in the APIInstaller and REST handlers
installed for them. The specific changes that makes this possible
are:

1. Allow subresource overrides to be specified while registering an
   API group.
2. Use those overrides in the APIInstaller while validating the
   resource/subresource group version to allow subresources which
   belong to a different group to be registered if they have an
   override specified.
3. Use the RESTMapper supplied in the override to map the REST paths
   to the correct subresource storage object, i.e. correct group
   version kinds.
2016-03-02 10:57:30 -08:00
deads2k 6d71421ae1 eliminate mixed case from RESTMapper 2016-02-08 15:33:31 -05:00
Wojciech Tyczynski f23034d5da Reset more metrics before scalability tests 2016-02-04 11:47:13 +01:00
Clayton Coleman 443cafab90 Add benchmarks for watch over websocket and http
... and a quick doc on how to run them

```
$ godep go test ./pkg/apiserver -benchmem -run=XXX -bench=BenchmarkWatch
PASS
BenchmarkWatchHTTP-8        20000     95669 ns/op   15053 B/op    196 allocs/op
BenchmarkWatchWebsocket-8   10000    102871 ns/op   18430 B/op    204 allocs/op
```
2016-01-28 21:34:51 -05:00
Clayton Coleman c1d932e44a Switch API objects to not register per version codecs
Remove Codec from versionInterfaces in meta (RESTMapper is now agnostic
to codec and serialization). Register api/latest.Codecs as the codec
factory and use latest.Codecs.LegacyCodec(version) as an equvialent to
the previous codec.
2016-01-22 01:10:21 -05:00
Clayton Coleman 125ef6fbc8 Support content-type negotiation in the API server
A NegotiatedSerializer is passed into the API installer (and
ParameterCodec, which abstracts conversion of query params) that can be
used to negotiate client/server request/response serialization. All
error paths are now negotiation aware, and are at least minimally
version aware.

Watch is specially coded to only allow application/json - a follow up
change will convert it to use negotiation.

Ensure the swagger scheme will include supported serializations - this
now includes application/yaml as a negotiated option.
2016-01-22 00:12:50 -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 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
Brendan Burns 2efcccf981 Add a server side export facility 2015-12-16 15:01:13 -08:00
k8s-merge-robot e309583ff1 Merge pull request #18473 from smarterclayton/change_runtime_object
Auto commit by PR queue bot
2015-12-16 04:24:22 -08:00
Clayton Coleman 8f203a28f1 Change runtime.Object signature 2015-12-15 13:36:25 -05:00
deads2k 6e33403abf update CodecFor for GroupVersion 2015-12-15 10:56:00 -05:00
k8s-merge-robot 266ab4a796 Merge pull request #18487 from smarterclayton/guard_encode_decode
Auto commit by PR queue bot
2015-12-13 23:08:18 -08:00
k8s-merge-robot c458cd7bb7 Merge pull request #18379 from deads2k/gv-newobject
Auto commit by PR queue bot
2015-12-13 13:33:16 -08:00
deads2k ec87d74ecb update InterfacesFor to use GroupVersion 2015-12-11 13:45:41 -05:00
Clayton Coleman 1e21054134 Hide common codec methods under helpers
The pending codec -> conversion split changes the signature of
Encode and Decode to be more complicated. Create a stub helper
with the exact semantics of today and do the simple mechanical
refactor here to reduce the cost of that change.
2015-12-09 21:15:02 -05:00
deads2k 519b4e80d1 update NewObject for groupversionkind 2015-12-09 08:13:15 -05:00
Daniel Martí 5ec087fa30 Properly close http connection on TestList
If not, using `go test -count=n` would make them pile up and ultimately
get to the limit of open files:

	apiserver_test.go:984: 17: unexpected error: Get http://127.0.0.1:44131/apis/test.group/version/simple: dial tcp 127.0.0.1:44131: socket: too many open files

Steps to reproduce (no longer fails):

	godep go test -short -run '^$' -o test .
	./test -test.run '^TestList$' -test.count 100

Note that this might not fail if your `ulimit -n` is not low enough.
2015-12-05 13:29:03 +01:00
deads2k ed95a6d77f update scheme to use GroupVersion 2015-11-25 12:15:48 -05:00
deads2k 68b0572974 internal versions 2015-11-25 12:14:06 -05:00
k8s-merge-robot 3e56ce6490 Merge pull request #17327 from deads2k/gv-restmapper
Auto commit by PR queue bot
2015-11-24 19:08:49 -08:00
deads2k c40dd0335a make DefaultRESTMapper methods type correct 2015-11-24 14:17:37 -05:00
Wojciech Tyczynski bf13bef955 Use unversioned.ListOptions in API server. 2015-11-24 14:42:21 +01:00
deads2k 303bcad398 use groupversion in RESTMapping 2015-11-16 09:22:11 -05:00
Jordan Liggitt b675a77213 Add groupless API server tests 2015-11-16 07:42:00 -05:00
deads2k bf983e942c use GroupVersion in APIGroupVersion for api installer 2015-11-16 07:42:00 -05:00
David Eads 486103d887 Revert "use GroupVersion in APIGroupVersion for api installer" 2015-11-13 12:55:08 -05:00
deads2k 3c725f17ea use GroupVersion in APIGroupVersion for api installer 2015-11-13 09:00:04 -05: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
Wojciech Tyczynski f4d75e0a0a Support timeout in watch requests 2015-10-24 13:12:49 +02:00
deads2k 6fbb3f4b6e add nonResourceURL detection 2015-10-20 16:23:30 -04:00
Clayton Coleman d4cdabf2fc Connect should be passed a Responder interface
For connect handlers that need to respond with a structured error or
structured object, pass an interface that hides the details of writing
an object to the response (error or runtime.Object).

Example use case:

Connect handler that accepts a body input stream, which it streams to a
pod, and then returns a structured object with info about the pod it
just created.
2015-10-13 15:05:14 -04:00
Wojciech Tyczynski 3d88a63b5d Refactor test objects to a separate package 2015-10-13 10:15:11 +02:00
k8s-merge-robot 1b653ce1b8 Merge pull request #14889 from liggitt/honor-skip-validate
Auto commit by PR queue bot
2015-10-02 14:29:55 -07:00
k8s-merge-robot a413fd278f Merge pull request #14874 from derekparker/fix-json-patch-content-type
Auto commit by PR queue bot
2015-10-02 07:08:58 -07:00
Jordan Liggitt 36a721e8b7 Honor InsecureSkipVerify flag 2015-10-02 02:26:04 -04:00
Derek Parker 4745cc9d9a apiserver: Fix handling patch requests with charset
Fixes #14872
2015-09-30 14:03:27 -07:00
deads2k df870cf36a remove Kind from APIRequestInfo 2015-09-30 09:46:22 -04:00
Brendan Burns 8998219686 Add a method for encoding directly to a io.Writer and use it for HTTPx 2015-09-24 15:52:09 -07:00
Kris f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
Jeff Lowdermilk 9a8ce4867e Merge pull request #13952 from zhengguoyong/fix-apiserver
fix the optim of apiserver
2015-09-15 17:43:36 -07:00
eulerzgy e401870b62 fix the optim of apiserver 2015-09-15 16:59:07 +08:00
Paul Weil 3c90d3a5ef allow installing rest to existing web service 2015-09-14 16:34:11 -04:00
Alex Robinson 4b47cb93f3 Reduce the default apiserver timeout back down to 30 seconds.
It was originally raised due to slow load balancer creation (#5180), but
that was fixed months ago.
2015-09-03 17:50:23 +00:00
Anastasis Andronidis ff2fcd43f7 Added SwaggerDoc() in api-server 2015-08-22 02:26:04 +02:00
Muhammed Uluyol fab367230f Add experimental API support to kubectl 2015-08-11 16:49:55 -07:00