Commit Graph

164 Commits (7550c146dc283589e7e9f2fd0fec327174a8ba33)

Author SHA1 Message Date
Clayton Coleman 7550c146dc Replace struct initializers for TypeMeta with ObjectMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman 1ccb86c760 Rename methods in api/meta to be cleaner 2014-10-22 22:59:12 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Daniel Smith 91efe51770 Merge pull request #1829 from jhadvig/proxy_flush
Flush data periodically instead of their buffering
2014-10-21 17:01:15 -07:00
Tim Hockin e8686429c4 Merge pull request #1916 from lavalamp/fix
Add read-only, rate limited endpoint
2014-10-20 16:42:46 -07:00
jhadvig 69c7228006 Flush data periodically instead of their buffering 2014-10-21 01:39:01 +02:00
Daniel Smith 9356ed7fe7 Add read-only, rate limited endpoint 2014-10-20 16:32:52 -07:00
derekwaynecarr 51aeb6bcd1 Add unit test for namespace aware proxy 2014-10-20 16:26:51 -04:00
Tim Hockin c5388e9a30 Merge pull request #1884 from lavalamp/fix4
Get rid of old minion proxy code in favor of new, better proxy code
2014-10-20 11:50:52 -07:00
Daniel Smith bf942e859f remove old proxy code. 2014-10-20 11:28:12 -07:00
derekwaynecarr 5e01c804fd Fixup apiserver proxy to be namespace aware 2014-10-20 10:39:16 -04:00
deads2k 2c35c06727 report originating error for GetReference failure 2014-10-17 12:52:41 -04:00
bgrant0607 9edd8a104c Merge pull request #1833 from erictune/authz
Add forbidden error.
2014-10-16 13:39:17 -07:00
derekwaynecarr 085ca40291 Enforce unique constraint at namespace boundary in etcd, make client and server namespace aware 2014-10-16 13:02:52 -04:00
Eric Tune 26a2bab797 Add forbidden error.
Will be used in subsequent PRs that add authorization.
2014-10-16 09:25:54 -07:00
Haney Maxwell c0bf974871 Allow disabling non-necessary kubelet and apiserver endpoints 2014-10-09 16:49:27 -07:00
Clayton Coleman 82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
derekwaynecarr e4ec49ee6b Require namespace on controller, pod, service objects 2014-10-01 10:57:50 -04:00
Tim Hockin e73de49f81 Caps on StatusReason* 2014-09-27 21:38:51 -07:00
Daniel Smith 37e505601e add self linking to apiserver 2014-09-26 15:08:02 -07:00
derekwaynecarr ee19ba186d Update to use api.Context 2014-09-26 11:50:34 -04:00
derekwaynecarr be85ad7a3d Add context object in test cases flows 2014-09-26 11:50:34 -04:00
derekwaynecarr 3e685674e7 Add context object to interfaces 2014-09-26 11:50:34 -04:00
Clayton Coleman 74db9a1b20 Log apiserver errors that are not of an expected type
Currently HttpLog only expected status range - this logs errors
that come back from a REST storage object without being first
converted to something in pkg/api/errors.  This usually indicates
unexpected error conditions that a programmer didn't explicitly
check for - the kinds of problems that may need debugging by
an operator later.  Set to V(1) because they don't impair normal
operation.
2014-09-25 16:21:48 -04:00
Clayton Coleman e3da2ba2c8 Cleanup watch encoding (remove dupe Encoding)
Move standard watch encode / decode streams to use
runtime.RawExtension and embed API decoding based on
a provided codec.
2014-09-22 16:03:07 -04:00
Brendan Burns a4912d7203 Merge pull request #1342 from jwforres/websocket_connection_header
Match any Connection header that contains the Upgrade token for websocke...
2014-09-18 09:47:07 -07:00
Jessica Forrester f2732f18a7 Match any Connection header that contains the Upgrade token for websockets 2014-09-18 09:26:21 -04:00
Daniel Smith 4e9cf2ccb4 Add field selector to List, implement for pods. 2014-09-16 16:17:16 -07:00
Daniel Smith 0b75f7b543 Merge pull request #1275 from smarterclayton/v1beta2
Create v1beta2 and allow multiple Codec encodings to exist
2014-09-16 14:52:04 -07:00
Brendan Burns f8844ce69e Add a validator for validating components in the cluster infrastructure. 2014-09-16 13:37:01 -07:00
Clayton Coleman 61e3ce7ddc Make runtime less global for Codec
* Make Codec separate from Scheme
* Move EncodeOrDie off Scheme to take a Codec
* Make Copy work without a Codec
* Create a "latest" package that imports all versions and
  sets global defaults for "most recent encoding"
  * v1beta1 is the current "latest", v1beta2 exists
  * Kill DefaultCodec, replace it with "latest.Codec"
  * This updates the client and etcd to store the latest known version
* EmbeddedObject is per schema and per package now
* Move runtime.DefaultScheme to api.Scheme
* Split out WatchEvent since it's not an API object today, treat it
like a special object in api
* Kill DefaultResourceVersioner, instead place it on "latest" (as the
  package that understands all packages)
* Move objDiff to runtime.ObjectDiff
2014-09-16 16:26:43 -04:00
Clayton Coleman 154a91cd33 Rename runtime.DefaultScheme to latest.Codec for ease of readability 2014-09-16 16:19:35 -04:00
Clayton Coleman fe614aeda2 Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
Jessica Forrester 0f2b8f4f9f Create passthroughLogger when LogOf is called and request has no logger 2014-09-11 16:48:06 -04:00
Jessica Forrester d82cf7dd48 Rebased and fixed test cases 2014-09-09 17:50:18 -04:00
Jessica Forrester 0cac1c5f79 Switch LogOf from panicking when logger is missing to creating logger with the defaults.
Update CORS tests to a table-based test and cover more 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
Daniel Smith 9345da0bfd Fix build 2014-09-08 13:05:38 -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 fc09f988b4 Make tests pass again 2014-09-07 22:26:42 -07:00
Daniel Smith 0d30a656ef Do interface{} -> runtime.Object rename everywhere 2014-09-07 22:19:24 -07:00
Daniel Smith 1c2b65788d Rename Codec and ResourceVersioner to add Default in front, to allow for types of those names 2014-09-07 22:19:24 -07:00
Daniel Smith 7790961011 Rename Object to EmbeddedObject 2014-09-05 14:43:35 -07:00
Daniel Smith b6f1f84875 Extend proxy test to test all URL rewriting cases. 2014-09-05 13:33:31 -07:00
Daniel Smith 6554ee96f7 Rewrite proxy code for clarity and correctness. 2014-09-05 13:33:30 -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