Commit Graph

92 Commits

Author SHA1 Message Date
Clayton Coleman
22c99c98e2 Split RESTStorage into separate interfaces
Omit unimplemented interfaces from Swagger
2015-01-12 12:19:45 -05:00
nikhiljindal
7e909ed743 Changes to improve swagger ui.
- Separating out index, version and api handlers into independent web
  services. Moved the index handler to /welcome, version handler to
  /version and the api handler to /api,
2015-01-09 10:56:24 -08:00
derekwaynecarr
a56087cdf8 Remove client from attributes, remove admission control interface, fix-up error codes 2015-01-07 14:42:31 -05:00
derekwaynecarr
520ae3ef27 Implement basic admission control framework 2015-01-07 14:42:31 -05:00
Brendan Burns
5c14fc610b Merge pull request #3045 from nikhiljindal/setApiVersion
Setting apiVersion in restful.WebService
2014-12-19 10:11:15 -08:00
nikhiljindal
cfee8f1355 done 2014-12-18 15:38:09 -08:00
derekwaynecarr
6694a45542 Add doc for {namespace} path param, fixup and verify proxy paths 2014-12-16 15:55:48 -05:00
derekwaynecarr
7cf664439f Move namespace from query param to path part 2014-12-16 15:55:47 -05:00
Clayton Coleman
b1b255f90a Prevent infinite loop in apiserver errorJSON 2014-12-12 18:23:17 -05:00
Brendan Burns
59b5546b28 Turn on node level validation, and make the validation set dynamic. 2014-12-10 22:02:45 -08:00
Brian Grant
e18dcb87c4 Format JSON by default. Fixes #2243. 2014-11-25 23:11:43 +00:00
Tim Hockin
ea960711ff Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
2014-11-21 09:45:26 +08:00
Brian Grant
7583e1a643 Automatic API generation by adopting go-restful 2014-11-14 16:49:19 +00:00
Clayton Coleman
21a6e96418 Merge pull request #2126 from brendandburns/validatez
Add etcd to the list of services to validate.
2014-11-10 14:53:41 -05:00
Brendan Burns
d7dc20fd6a Add etcd to the list of services to validate.
Also add minions.
2014-11-05 21:22:01 -08:00
Daniel Smith
4196780eda Add self links to objects sent down the watch channel. 2014-11-05 17:22:18 -08:00
Eric Tune
1668c6f107 Authorization based on namespace, kind, readonly.
Also, pass Authorizer into master.Config.
2014-11-03 17:45:15 -08:00
Daniel Smith
dca7363459 Serve API version list, test with an integration test. 2014-10-28 17:35:56 -07:00
Eric Tune
40a5ca034d Integration test on master, not just apiserver.
Moved code from cmd/apiserver to pkg/master.

test/integration/client_test made to use a master object,
instead of an apiserver.Handle.

Subsequent PRs will move more handler-installation into
pkg/master, with the goal that every http.Handler of a
standalone apiserver process can also be tested
in a "testing"-style go test.

In particular, a subsequent PR will test
authorization.
2014-10-27 09:14:58 -07:00
Daniel Smith
bf942e859f remove old proxy code. 2014-10-20 11:28:12 -07:00
Haney Maxwell
c0bf974871 Allow disabling non-necessary kubelet and apiserver endpoints 2014-10-09 16:49:27 -07:00
Daniel Smith
37e505601e add self linking to apiserver 2014-09-26 15:08:02 -07:00
Brendan Burns
f8844ce69e Add a validator for validating components in the cluster infrastructure. 2014-09-16 13:37:01 -07:00
Jessica Forrester
d82cf7dd48 Rebased and fixed test cases 2014-09-09 17:50:18 -04:00
Jessica Forrester
becf6ca4e7 Move RecoverPanics to be the top level wrapped handler. Add new method to be sure a logger has been generated instead of assuming one has. Move regexp list compilation into a utility and pass regexp list into CORS. 2014-09-09 17:50:18 -04:00
Jessica Forrester
8b4ca9c2a7 Move CORS handler wrapping into cmd/apiserver and switch config flag to a list of allowed origins 2014-09-09 17:50:18 -04:00
Jessica Forrester
8723eece49 Add option to enable a simple CORS implementation for the api server 2014-09-09 17:50:18 -04:00
Brendan Burns
69b359b689 Don't stack trace on 301s 2014-09-09 14:10:46 -07:00
brendandburns
753b80c9b8 Merge pull request #1105 from lavalamp/proxy
Add a generic proxier
2014-09-08 12:51:24 -07:00
Daniel Smith
0d30a656ef Do interface{} -> runtime.Object rename everywhere 2014-09-07 22:19:24 -07:00
Daniel Smith
e2b645ec15 Add a generic proxier
To proxy traffic to anything that implements ResourceLocation.
Currently, this is only services. This is easily extensible to minions
(would supercede existing mechanism) and pods.
2014-09-05 13:33:30 -07:00
Vojtech Vitek (V-Teq)
59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Daniel Smith
4de254444e Add simple service redirection 2014-08-27 20:51:41 -07:00
Tim Hockin
0f97a73c1b Rename a bunch of "Make" functions to "New"
Also rename some to other names that make better reading.  There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things.  It seemed that "make" there seemed fine.  "New"
is for "constructors".
2014-08-20 21:27:19 -07:00
Clayton Coleman
bbf3b55e76 Extract RESTHandler and allow API groupings
Prepare for running multiple API versions on the same HTTP server
by decoupling some of the mechanics of apiserver.  Define a new
APIGroup object which represents a version of the API.
2014-08-13 10:53:34 -04:00
Clayton Coleman
0083fae453 Provide helpers and tests for common error types
Unify error handling in apiserver into a single path - RESTStorage
objects must provide appropriate errors individually.  Ensure ALL
errors which can be traced to logical faults with RESTStorage are
returned as api.Status objects.
2014-08-08 19:44:47 -04:00
Clayton Coleman
a74fac7d70 Centralize path magic in apiserver into the New method
Make OperationHandler and WatchHandler properly encapsulate their
concerns and make them not depend on the global path
2014-08-08 16:33:44 -04:00
Clayton Coleman
c9fc0bcf3d Decouple apiserver from codec implementation
The apiserver on initialization must be provided with a codec
for encoding and decoding all handled objects including api.Status
and api.ServerOp.  In addition, the RESTStorage Extract() method
has been changed to New(), which returns a pointer object that the
codec must decode into (the internal object).  Switched registry
methods to use pointers for Create/Update instead of values.
2014-08-07 13:35:35 -04:00
Clayton Coleman
836d2b9808 Fix proxy error condition and simplify method
Add new minion proxy test case.
2014-08-06 01:03:17 -04:00
Clayton Coleman
325f9ef005 Make create atomic on etcd for Services/ReplControllers 2014-08-05 01:12:27 -04:00
Clayton Coleman
1bdeb058e1 Slightly pause on requests to allow most to finish
Currently, every write will result in a 202 (etcd adding a few
ms of latency to each request).  This forces clients to go into
a poll loop and pick a reasonable server poll frequency, which
results in 1 + N queries to the server for the single operation
and adds unavoidable latency to each request which affects their
perception of the service.

Add a very slight (25ms by default) delay to wait for requests
to finish.  For clients doing normal writes this reduces the
requests made against the server to 1.  For clients on long requests
this has no effect.  The downside is that http connections are held
on to for a longer period in high write loads.  The decrease in
perceived latency from the kubecfg is significant.
2014-07-30 17:49:47 -04:00
Clayton Coleman
e64a393e1a Move handle* methods to their respective locations
Fix names
2014-07-30 17:15:09 -04:00
Clayton Coleman
fe7f611d88 Split operations code and add comments 2014-07-30 17:15:09 -04:00
Clayton Coleman
9069696514 Rename write -> writeJSON 2014-07-30 17:15:09 -04:00
Clayton Coleman
b84c9f7a1c Rename methods and move parseTimeout 2014-07-30 17:15:09 -04:00
Clayton Coleman
82b78912fc Move prefix methods 2014-07-30 17:15:09 -04:00
Clayton Coleman
a2c86e4c97 Simplify helpers 2014-07-30 17:15:09 -04:00
Clayton Coleman
c7d311896e Shorten variable name 2014-07-30 17:15:09 -04:00
Clayton Coleman
8b511832ff Split minion 2014-07-30 17:15:09 -04:00
Clayton Coleman
a46f6313bc Split interfaces 2014-07-30 17:15:09 -04:00