Commit Graph

744 Commits

Author SHA1 Message Date
Wojciech Tyczynski
3175d18b14 Support Close() in streaming decoder 2016-04-28 09:46:33 +02:00
jianhuiz
fdfe42ea44 move install of version handler to genericapiserver 2016-04-27 10:21:08 -07:00
deads2k
622932422d enable resource name and service account cases for impersonation 2016-04-26 09:31:43 -04:00
deads2k
0061479890 fully qualify admission resources and kinds 2016-04-26 07:55:33 -04:00
zhouhaibing089
bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
Wojciech Tyczynski
c0020aff59 Merge pull request #24539 from smarterclayton/unify_stream_and_serial
Unify Streaming and normal Serializers
2016-04-25 11:25:16 +02:00
k8s-merge-robot
0d4b039d87 Merge pull request #24474 from deads2k/fix-version-registration
Automatic merge from submit-queue

stop changing the root path of the root webservice

We shouldn't mutate the root path of the root webservice (see usage).  Just write the path we want.
2016-04-23 17:51:56 -07: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
Clayton Coleman
58afaaafb1 Check for protobuf mimetype in apiserver 2016-04-20 12:13:10 -04:00
deads2k
a79cb3c44e stop changing the root path of the root webservice 2016-04-19 13:08:46 -04:00
Clayton Coleman
0f95b91f96 Move /resetMetrics to DELETE /metrics
Reduces the surface area of the API server slightly and allows
downstream components to have deleteable metrics. After this change
genericapiserver will *not* have metrics unless the caller defines it
(allows different apiserver implementations to make that choice on their
own).
2016-04-15 11:44:17 -04:00
deads2k
ac4c545b91 add act-as powers 2016-04-14 12:49:10 -04:00
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
Jeff Lowdermilk
2fb745f01d Merge pull request #23661 from spxtr/oidc
Remove retries from most oidc tests.
2016-04-08 14:33:34 -07:00
Joe Finney
ae79677fd0
Remove global var for OIDC retry/backoff, and remove retries from unit tests. 2016-04-07 14:18:29 -07:00
deads2k
02578a7ea7 add missing attributes to authorization interface 2016-03-29 08:46:21 -04:00
Chao Xu
31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00
k8s-merge-robot
4e4ad61260 Merge pull request #23366 from goltermann/vet
Auto commit by PR queue bot
2016-03-24 21:50:56 -07:00
goltermann
34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
zhouhaibing089
83248a9783 move keystone package to password since it is a password authenticator 2016-03-22 23:27:28 +08:00
k8s-merge-robot
76acfd4b7d Merge pull request #22916 from liggitt/namespace-subresources
Auto commit by PR queue bot
2016-03-22 01:25:58 -07:00
harry
b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
Harry Zhang
a4d04095d0 Refactor crlf & crypto 2016-03-21 20:20:05 +08:00
k8s-merge-robot
62399077d8 Merge pull request #23145 from liggitt/patch-internal-version
Auto commit by PR queue bot
2016-03-18 15:30:44 -07:00
k8s-merge-robot
782ba437f1 Merge pull request #23003 from deads2k/no-proxy-cidr
Auto commit by PR queue bot
2016-03-17 14:16:11 -07:00
Jordan Liggitt
ea8669661a Use versioned object when computing patch 2016-03-17 16:19:05 -04:00
k8s-merge-robot
a7f1466556 Merge pull request #19577 from caesarxuchao/expose-swagger-for-discovery-types
Auto commit by PR queue bot
2016-03-17 12:50:17 -07:00
nikhiljindal
96044b7f43 Fixing the check to determine if the resource is namespaced 2016-03-16 17:46:05 -07:00
deads2k
ab03317d96 support CIDRs in NO_PROXY 2016-03-16 16:22:54 -04:00
k8s-merge-robot
22e3e79c53 Merge pull request #22930 from AdoHe/change_global_timeout
Auto commit by PR queue bot
2016-03-16 01:44:02 -07:00
Chao Xu
ed78b9adbe let the apiserver's swaggerapi endpoint reports discovery types 2016-03-15 16:32:20 -07:00
AdoHe
28e1d1af65 reduce component status probe timeout to 20s for quickly timeout 2016-03-14 22:18:55 -04:00
Jordan Liggitt
ad20045c8d Correctly identify namespace subresources in GetRequestInfo 2016-03-14 13:03:33 -04:00
Wojciech Tyczynski
0e73783c68 Fix resthandler_test in Go 1.6 2016-03-10 13:03:02 +01:00
feihujiang
892e3a349a Mark generic top level prefix proxy deprecated 2016-03-04 17:39:08 +08:00
k8s-merge-robot
d81d823ca5 Merge pull request #22393 from eparis/blunderbuss
Auto commit by PR queue bot
2016-03-02 18:51:56 -08:00
Eric Paris
5e5a823294 Move blunderbuss assignees into tree 2016-03-02 20:46:32 -05: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
k8s-merge-robot
7c801f217c Merge pull request #21497 from deads2k/fix-max-in-flight
Auto commit by PR queue bot
2016-02-27 07:59:26 -08:00
k8s-merge-robot
00d99ac261 Merge pull request #20347 from ericchiang/authz_grpc
Auto commit by PR queue bot
2016-02-26 22:00:42 -08:00
deads2k
357aebc89c update long running to handle recommend watch mechanism 2016-02-24 10:20:25 -05:00
Chao Xu
78fc311f1f adding a apiserver log message when patch fails because a meaningful conflict 2016-02-22 17:10:53 -08:00
Eric Chiang
3116346161 *: add webhook implementation of authorizer.Authorizer plugin 2016-02-22 11:39:07 -08:00
Chao Xu
39838745e5 Strip version when encoding discovery API objects at endpoints that exist since release 1.1 2016-02-19 15:05:20 -08:00
nikhiljindal
20ce4aed0e Adding hostname to groups discovery information 2016-02-18 11:58:11 -08:00
laushinka
7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
k8s-merge-robot
bc04759560 Merge pull request #20974 from wojtek-t/cleanup_metrics
Auto commit by PR queue bot
2016-02-15 12:22:01 -08:00
k8s-merge-robot
38e827011b Merge pull request #21005 from liggitt/delete-all
Auto commit by PR queue bot
2016-02-14 07:15:09 -08:00
k8s-merge-robot
43fb544a4a Merge pull request #21001 from ericchiang/oidc_groups
Auto commit by PR queue bot
2016-02-14 05:24:43 -08:00
Jordan Liggitt
dd5d98d80a regen codecs 2016-02-13 09:15:39 -05:00
Eric Chiang
92d37d5cc5 plugin/pkg/auth/authenticator/token/oidc: get groups from custom claim 2016-02-12 09:58:18 -08:00
Jordan Liggitt
3038eec2aa Use a different verb for delete collection 2016-02-10 18:08:46 -05:00
Wojciech Tyczynski
bb79ed6f8e Small cleanup in metrics 2016-02-10 16:05:52 +01:00
k8s-merge-robot
b98d9a21a1 Merge pull request #20818 from deads2k/remove-mixed-case
Auto commit by PR queue bot
2016-02-09 05:06:45 -08:00
k8s-merge-robot
3b150b5e43 Merge pull request #19559 from jimmidyson/instrument-apiserver-handlers
Auto commit by PR queue bot
2016-02-08 23:14:20 -08:00
Jordan Liggitt
545f6be573 Regenerate types.go 2016-02-08 17:19:15 -05:00
deads2k
6d71421ae1 eliminate mixed case from RESTMapper 2016-02-08 15:33:31 -05:00
Jan Chaloupka
4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
k8s-merge-robot
30c1263b81 Merge pull request #20376 from smarterclayton/rest_error
Auto commit by PR queue bot
2016-02-06 02:15:45 -08:00
Rudi Chiarito
a2d1bb7acf Add httpHeaders to httpGet liveness probe
Also update existing documentation and try to steer users away from 'host'.
Add validation.
2016-02-05 11:20:04 -05:00
Jimmi Dyson
1b204d85a6 Ensure all API server responses are properly instrumented 2016-02-04 12:35:03 +00:00
Wojciech Tyczynski
f23034d5da Reset more metrics before scalability tests 2016-02-04 11:47:13 +01:00
k8s-merge-robot
5914deeac8 Merge pull request #19380 from brendandburns/apiresource
Auto commit by PR queue bot
2016-02-03 00:49:47 -08:00
harry
1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
Clayton Coleman
6e0ad75a6e Change the signature of resthandler.err for upcoming watch changes
Watch will need to be able to invoke scope.err, and it will not
have access to the go-restful req/res. Change to use the raw http
type now.
2016-01-30 18:00:43 -05: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
33085c0cf2 Update tests to handle codec changes 2016-01-22 13:27:26 -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
nikhiljindal
2ad642d370 Merge registered and latest and move to apimachinery 2016-01-21 14:42:21 -08:00
Alex Mohr
21a5d57c75 Merge pull request #19481 from deads2k/fix-patch-admission
make patch call update admission chain after applying the patch
2016-01-21 14:23:19 -08:00
deads2k
e90c2bd7dc make patch call update admission chain after applying the patch 2016-01-20 16:21:27 -05:00
Harry Zhang
936a11e775 Use networking to hold network related pkgs
Change names of unclear methods

Use net as pkg name for short
2016-01-15 13:46:16 +08:00
k8s-merge-robot
0df7e695d4 Merge pull request #19458 from davidopp/notsclose
Auto commit by PR queue bot
2016-01-12 13:53:13 -08:00
k8s-merge-robot
9b106c6e6d Merge pull request #18058 from mqliang/httpProbe
Auto commit by PR queue bot
2016-01-11 23:21:01 -08: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
Brendan Burns
79533385cf Add kind to APIResource 2016-01-07 22:27:34 -08:00
k8s-merge-robot
9c5ede63fc Merge pull request #19274 from krousey/apiserver_flake
Auto commit by PR queue bot
2016-01-04 16:08:29 -08:00
Kris
552e998b1e Fix a premature server shutdown error
Sometimes the test server would close down the TCP socket before all
requests could finish.
2016-01-04 15:31:01 -08:00
Nikhil Jindal
af9834ea75 Merge pull request #19040 from nikhiljindal/serverLibrary
api server library: moving API registration logic to generic api server
2016-01-04 14:31:33 -08:00
nikhiljindal
87ce093c77 Moving API registration logic to generic api server 2015-12-30 14:22:14 -08:00
Clayton Coleman
9dad7e624c Split the serviceaccount package into two parts
Public utility methods and JWT parsing, and controller specific logic.
Also remove the coupling between ServiceAccountTokenGetter and the
authenticator class.
2015-12-26 21:28:12 -05:00
Clayton Coleman
3d5ed379b0 authn.go doesn't belong in pkg/apiserver
apiserver does not need to know about specific authentication
mechanisms, and does not need to take dependencies on all the
authentication packages.
2015-12-26 21:22:22 -05:00
Wojciech Tyczynski
58336829be Switch to versioned ListOptions in server. 2015-12-21 14:23:37 +01:00
k8s-merge-robot
44fc4d3f34 Merge pull request #18484 from brendandburns/3rdparty5
Auto commit by PR queue bot
2015-12-19 10:12:35 -08:00
Brendan Burns
e594407ab5 Add dynamic APIs to the list of discoverable APIs 2015-12-18 14:03:43 -08:00
Eric Tune
1965fe1824 Rerun hack/update-codecgen.sh 2015-12-17 13:51:33 -08:00
Eric Tune
1752cf22d4 Merge pull request #17940 from soltysh/job_deadline
Added ActiveDeadlineSeconds to jobs
2015-12-17 13:11:13 -08:00
Maciej Szulik
327c104460 Added ActiveDeadlineSeconds to jobs, allowing failing a job after
exceeding allowed time.
2015-12-17 15:26:42 +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
4dc17d8eeb Merge pull request #18522 from liggitt/close_websocket
Auto commit by PR queue bot
2015-12-16 12:06: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
deads2k
d0aaf13920 use constants for group names 2015-12-14 10:04:10 -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
k8s-merge-robot
47d2f41680 Merge pull request #18370 from deads2k/gv-interfacesfor
Auto commit by PR queue bot
2015-12-13 10:27:17 -08:00
Jeff Lowdermilk
f6686ba3a4 Merge pull request #18290 from wojtek-t/fast_namespace_deletion
Support collection deletion in apiserver.
2015-12-11 13:34:56 -08:00