Commit Graph

1055 Commits (56dc8f9a6ab09debeddf5349ee26730d3e9107f8)

Author SHA1 Message Date
Timothy St. Clair fbc5323dad Refactor registry to use store vs. etcd 2017-01-12 09:23:38 -06:00
deads2k 9a8bf348a6 move tunneler out of generic 2017-01-12 08:21:58 -05:00
pweil- 1471abb912 enable psp by default 2017-01-11 12:22:56 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue 3f2a02cf98 Merge pull request #39383 from liggitt/bind-check
Automatic merge from submit-queue (batch tested with PRs 39694, 39383, 39651, 39691, 39497)

Allow rolebinding/clusterrolebinding with explicit bind permission check

Fixes https://github.com/kubernetes/kubernetes/issues/39176
Fixes https://github.com/kubernetes/kubernetes/issues/39258

Allows creating/updating a rolebinding/clusterrolebinding if the user has explicitly been granted permission to perform the "bind" verb against the referenced role/clusterrole (previously, they could only bind if they already had all the permissions in the referenced role via an RBAC role themselves)

```release-note
To create or update an RBAC RoleBinding or ClusterRoleBinding object, a user must:
1. Be authorized to make the create or update API request
2. Be allowed to bind the referenced role, either by already having all of the permissions contained in the referenced role, or by having the "bind" permission on the referenced role.
```
2017-01-10 21:25:13 -08:00
Kubernetes Submit Queue ca50f630d0 Merge pull request #39415 from sttts/sttts-thirdparty-verbs
Automatic merge from submit-queue (batch tested with PRs 39648, 38167, 39591, 39415, 39612)

Add verbs to thirdparty resources in discovery

The namespace controller ignores thirdparty resources right now because verbs are not set. This PR sets a static list of verbs.

Moreover, integration tests are added for the discovery info of thirdparty resources.

/cc @zhouhaibing089
2017-01-10 13:33:14 -08:00
Jordan Liggitt a2670d3b9d
Allow rolebinding/clusterrolebinding with explicit bind permission check 2017-01-10 14:34:33 -05:00
Eric Paris 6f320061f5 Merge pull request #39649 from mbohlool/bugfix
Disable TestValidOpenAPISpec when -race test flag exists
2017-01-10 11:11:06 -05:00
mbohlool 4590477630 Disable TestValidOpenAPISpec when -race test flag exists 2017-01-09 21:24:38 -08:00
Kubernetes Submit Queue 3c56041384 Merge pull request #39457 from zhouhaibing089/gcc
Automatic merge from submit-queue (batch tested with PRs 37845, 39439, 39514, 39457, 38866)

Log a warning message when failed to find kind for resource in garbage collector controller

at this time, I do not think thirdparty api group version resources should be taken care by garbage collector controllers, and this line of call will fail actually: https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/garbagecollector/garbagecollector.go#L565, and as a result, the garbagecollector controller failed to start.
2017-01-09 13:15:19 -08:00
zhouhaibing089 b25873a4bc warning instead error when search kinds for resources 2017-01-08 09:47:43 +08:00
Kubernetes Submit Queue 7841d57ba9 Merge pull request #39416 from NickrenREN/master-externalAddresses
Automatic merge from submit-queue

optimize externalAddresses() return
2017-01-05 21:25:16 -08:00
NickrenREN 4ae0423d27 optimize externalAddresses() return
We do not use addresses and err in function body,so we drop them to maintain a consistent coding style
2017-01-06 09:36:53 +08:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
deads2k 4d7fcae85a mechanicals 2017-01-05 11:14:27 -05:00
Dr. Stefan Schimanski b76958d75a Add verbs to thirdparty resources in discovery 2017-01-04 14:21:40 +01:00
Dr. Stefan Schimanski 87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
Dr. Stefan Schimanski 2d58ffc129 Move pkg/{apiserver -> genericapiserver/api} 2017-01-03 14:54:03 +01:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Kubernetes Submit Queue 59bd66ce3e Merge pull request #39152 from liggitt/json-tags
Automatic merge from submit-queue (batch tested with PRs 39152, 39142, 39055)

Add test for json tags on internal and external types

Follow up from https://github.com/kubernetes/kubernetes/pull/38406

- adds static analysis tests preventing internal types from adding new json or protobuf tags
- adds static analysis tests requiring json tags on external types (and enforcing lower-case first letter)
- fixes issues found by the tests
2016-12-27 17:10:11 -08:00
wlan0 75da310757 sanitize names and add more comments, and other essential boilerplate changes 2016-12-22 14:37:15 -08:00
Jordan Liggitt 0e028b3964
Add test for json tags in internal/external types 2016-12-22 09:32:57 -05:00
Antoine Pelisse f6b57cd8a6 Update OWNERS approvers and reviewers: pkg/master 2016-12-19 15:52:07 -08:00
Dr. Stefan Schimanski d582c2d46d Update bazel and linted files 2016-12-19 23:13:14 +01:00
Dr. Stefan Schimanski 90216ce721 pkg/apiserver: split code out of pkg/apiserver
- move rest handler into handlers package
- move errors into handlers/errors package
- move negotation code into handlers/negotation package
- move http response writer helpers into handlers/responsewriter package
- split up pkg/apiserver/apiserver.go

Note: this is only an intermediate step towards a proper genericapiserver
package hierarchy.
2016-12-19 23:13:11 +01:00
Kubernetes Submit Queue 5b2823adb9 Merge pull request #38191 from sttts/sttts-move-master-options
Automatic merge from submit-queue

Move non-generic apiserver code out of the generic packages
2016-12-17 01:25:45 -08:00
Maciej Szulik 9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00
Dr. Stefan Schimanski 7adaac79ca Update bazel 2016-12-16 17:49:23 +01:00
Dr. Stefan Schimanski 7267299c3c genericapiserver: move MasterCount and service options into master 2016-12-16 17:23:43 +01:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Chao Xu 6709b7ada2 run hack/update-codegen.sh
run hack/verify-gofmt.sh
update bazel
2016-12-14 12:39:49 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Dr. Stefan Schimanski cab89a67df genericapiserver: unify swagger and openapi in config 2016-12-14 18:41:04 +01:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Kubernetes Submit Queue 5b5b1e7533 Merge pull request #38371 from wojtek-t/get_options_in_client
Automatic merge from submit-queue (batch tested with PRs 38354, 38371)

Add GetOptions parameter to Get() calls in client library

Ref #37473 

This PR is super mechanical - the non trivial commits are:
- Update client generator
- Register GetOptions in batch/v2alpha1 group
2016-12-09 04:12:09 -08:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Monis Khan a6bafbacbf
Refactor REST storage to use generic defaults
Signed-off-by: Monis Khan <mkhan@redhat.com>
2016-12-08 17:24:21 -05:00
Kubernetes Submit Queue 98a2808b94 Merge pull request #34643 from mbohlool/h2o
Automatic merge from submit-queue

Enable OpenAPI spec validation

Spec validation was failing on Jenkins. I am enabling it in this PR to figure out if we can get it pass. No review is necessary until all test passes.
2016-12-07 01:34:36 -08:00
deads2k b723333be3 move APIResourceConfigSource to master 2016-12-06 10:19:25 -05:00
deads2k 2923d09091 remove rbac super user 2016-12-05 13:49:54 -05:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Dr. Stefan Schimanski b2b0142b6f Update bazel 2016-12-03 18:35:18 +01:00
Dr. Stefan Schimanski 1f5511b131 Move RESTStorageProvider interface into pkg/master 2016-12-03 18:35:15 +01:00
Dr. Stefan Schimanski eeb582e53f Move DefaultServiceIPRange into pkg/master 2016-12-03 18:34:22 +01:00
deads2k ea8ad3e349 reconcile when service already exists 2016-12-01 09:14:31 -05:00
deads2k a111bd7690 switch to clients for bootstrap controller 2016-12-01 09:14:31 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu d0a725a522 master, genericapiserver, registry 2016-11-23 15:53:09 -08:00
Jordan Liggitt 7a5461a17c
Require at least one version in ThirdPartyResource objects 2016-11-17 22:51:06 -05:00
Wojciech Tyczynski 03b9be982f Fix TestServiceAlloc test 2016-11-14 10:11:37 +01:00
mbohlool c3d9d9a574 Enable OpenAPI spec validation 2016-11-07 02:55:48 -08:00
Chao Xu 783af943db Add v1.NodeLegacyHostIP to be consistent with the internal API;
Mark NodeLegacyHostIP will be deprecated in 1.7;
Let cloudprovider that used to only set NodeLegacyHostIP set the IP as both InternalIP and ExternalIP, to allow dprecation in 1.7
2016-11-04 14:29:49 -07:00
Kubernetes Submit Queue a05e46f4b7 Merge pull request #35923 from deads2k/api-35-discovery-ip-stuff
Automatic merge from submit-queue

Remove non-generic options from genericapiserver.Config

Remove non-generic options from genericapiserver.Config.  Changes the discovery CIDR/IP information to an interface and then demotes several fields.

I haven't pulled from them genericapiserver.Options, but that's a future option we have.  Segregation as as a followup at the very least.
2016-11-04 00:39:27 -07:00
Kubernetes Submit Queue f0ca9fbd9e Merge pull request #35567 from mwielgus/allowed_disruptions_b2
Automatic merge from submit-queue

Switch DisruptionBudget api from bool to int allowed disruptions [only v1beta1]

Continuation of #34546. Apparently it there is some bug that prevents us from having 2 different incompatibile version of API in integration tests. So in this PR v1alpha1 is removed until testing infrastructure is fixed.

Base PR comment:

Currently there is a single bool in disruption budget api that denotes whether 1 pod can be deleted or not. Every time a pod is deleted the apiserver filps the bool to false and the disruptionbudget controller sets it to true if more deletions are allowed. This works but it is far from optimal when the user wants to delete multiple pods (for example, by decreasing replicaset size from 10000 to 8000).
This PR adds a new api version v1beta1 and changes bool to int which contains a number of pods that can be deleted at once.

cc: @davidopp @mml @wojtek-t @fgrzadkowski @caesarxuchao
2016-11-03 15:50:19 -07:00
Marcin 3872a47074 Autogenerated code and docs 2016-11-03 18:36:32 +01:00
deads2k d82f98c9b3 remove non-generic options from genericapiserver.Config 2016-11-03 11:48:33 -04:00
deads2k 4c12c3b130 abstract out discovery IP determination 2016-11-03 11:45:51 -04:00
Kubernetes Submit Queue 909e19b88e Merge pull request #35900 from deads2k/api-34-healthz
Automatic merge from submit-queue

promote /healthz and /metrics to genericapiserver

Promotes `/healthz` to genericapiserver with methods to add healthz checks before running.

Promotes `/metrics` to genericapiserver gated by config flag.

@lavalamp adds the healthz checks linked to `postStartHooks` as promised.
2016-11-03 08:32:16 -07:00
Marcin 26acced6d8 Add policy api version v1beta1 and disable v1alpha1 2016-11-03 13:26:27 +01:00
Janet Kuo c25455e8b3 (Auto-gen) Run hack/update-all & update-bazel & update linted packages 2016-11-02 15:16:41 -07:00
Janet Kuo c15b9470f5 Replace apps/v1alpha1 with apps/v1beta1 and manually remove generated apps/v1alpha1 files
Manually remove generated apps/v1alpha1 types, protobuf, and api-reference doc files
Manually remove apps/v1alpha1 folder from 1.5 generated client
2016-11-02 15:16:23 -07:00
deads2k 912e6741b9 promote /metrics to genericapiserver 2016-11-01 14:42:01 -04:00
deads2k f56cbfa8d5 add healthz to genericapiserver 2016-11-01 14:39:33 -04:00
deads2k 7e65d5693b remove non-reuseable bits of MasterServer 2016-10-31 08:50:05 -04:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
mbohlool 75451b49f4 - Add GroupVersion as tags to OpenAPI spec
- Remove all end-point specs as they are not useful in light of GroupVersion tags in main spec
2016-10-25 14:27:48 -07:00
Dr. Stefan Schimanski 05fcc6b56a Update bazel 2016-10-22 14:31:56 +02:00
Dr. Stefan Schimanski cca05af615 Move swagger+openapi setup to routes and decouple from run 2016-10-22 13:42:22 +02:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
deads2k 9578523180 move proxytransport config out of the genericapiserver 2016-10-20 11:23:53 -04:00
deads2k f9cbc42581 separate third party resources from master (moves + consequences) 2016-10-19 07:40:58 -04:00
Dr. Stefan Schimanski 08d4fa5c4f Turn APIGroupPrefix into a constant 2016-10-19 11:52:15 +02:00
Kubernetes Submit Queue f39e86c0a5 Merge pull request #34474 from liggitt/connection-info-refactor
Automatic merge from submit-queue

Remove static kubelet client, refactor ConnectionInfoGetter

Follow up to https://github.com/kubernetes/kubernetes/pull/33718

* Collapses the multi-valued return to a `ConnectionInfo` struct
* Removes the "raw" connection info method and interface, since it was only used in a single non-test location (by the "real" connection info method)
* Disentangles the node REST object from being a ConnectionInfoProvider itself by extracting an implementation of ConnectionInfoProvider that takes a node (using a provided NodeGetter) and determines ConnectionInfo
* Plumbs the KubeletClientConfig to the point where we construct the helper object that combines the config and the node lookup. I anticipate adding a preference order for choosing an address type in https://github.com/kubernetes/kubernetes/pull/34259
2016-10-18 13:20:25 -07:00
Kubernetes Submit Queue 2f990ac429 Merge pull request #34979 from deads2k/tpr-04-storage-post-hook
Automatic merge from submit-queue

convert TPR controller to posthook instead of disable flag

Converts the third party resource controller into a posthook using a loopback client instead going direct to etcd.  This let's us eliminate more flags and special-casing during initialization.  Also, using a client brings us closer to building this without side-effects for downstream composers.
2016-10-18 06:39:41 -07:00
deads2k 1423654295 convert TPR controller to posthook instead of disable flag 2016-10-17 16:24:02 -04:00
deads2k 5a9b16d40a make version an explicit choice so zero config and customized work 2016-10-17 16:10:07 -04:00
Jordan Liggitt a082a2e749
Remove static kubelet client, refactor ConnectionInfoGetter 2016-10-15 22:15:04 -04:00
deads2k 7412be4465 default serializer 2016-10-14 11:27:32 -04:00
deads2k fbd5032da2 split genericapiserver configuration apart so that you can run without flag options 2016-10-13 13:09:53 -04:00
Kubernetes Submit Queue dd529f3c4a Merge pull request #34551 from deads2k/api-23-remove-legacy-prefixy
Automatic merge from submit-queue

Change legacy API resource registration

Updates the legacy API resource registration to emphasize its different-ness and to simplify supporting objects.  The option has to remain in the genericapiserverconfig for multiple prefixes to enable cases where composers/extenders had composed additional groupless APIs. See OpenShift as an example.

However this is now transparent to "normal" composers.

@ncdc since sttts is out.
2016-10-13 08:23:35 -07:00
mbohlool 5ba06cf2bc Make Kubernetes OpenAPI operation IDs unique 2016-10-12 14:54:12 -07:00
deads2k 6406aacb59 remove legacy API prefix from generic 2016-10-12 15:32:27 -04:00
deads2k 406c0a36ae cleanup cruft from API server structs 2016-10-11 10:56:05 -04:00
deads2k 5d3a210321 convert bootstrap controller to posthook to tighten master.go 2016-10-10 08:15:45 -04:00
Kubernetes Submit Queue f2016df2cc Merge pull request #34054 from deads2k/testapi-01-remove-default.groupversion
Automatic merge from submit-queue

remove testapi.Default.GroupVersion

I'm going to try to take this as a series of mechanicals.  This removes `testapi.Default.GroupVersion()` and replaces it with `registered.GroupOrDie(api.GroupName).GroupVersion`.

@caesarxuchao I'm trying to see how much of `pkg/api/testapi` I can remove.
2016-10-07 20:30:34 -07:00
Kubernetes Submit Queue f765f5e5d0 Merge pull request #33927 from deads2k/api-21-fix-improper-eviction
Automatic merge from submit-queue

fix pod eviction storage

Refactor pod eviction storage to remove the tight order coupling of the storage.  This also gets us ready to deal with cases where API groups are not co-located on the same server, though the particular client being used would assume a proxy.
2016-10-07 08:18:28 -07:00
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
Dr. Stefan Schimanski 68cee1d9ac Make genericapiserver handler chain customizable 2016-10-05 10:32:36 -04:00
deads2k 28358e4775 fix pod eviction storage 2016-10-05 07:55:49 -04:00
Lucas Käldström 348717c50a Remove the flannel experimental overlay 2016-10-04 11:53:53 +03:00
deads2k 1123f6788b move third party resource tests 2016-09-29 13:52:20 -04:00
deads2k 1c667e4fc5 move core storage out of master.go 2016-09-29 09:39:23 -04:00
Kubernetes Submit Queue 50e12ff5a2 Merge pull request #33575 from sttts/sttts-defaulted-config
Automatic merge from submit-queue

Decouple genericapiserver setDefault from New()
2016-09-29 01:52:46 -07:00
Dr. Stefan Schimanski 6f781625db Make genericapiserver Config.Complete type safe 2016-09-29 08:09:39 +02:00
Dr. Stefan Schimanski 61409c821b Turn embedding into composition: master.Config.{Config -> GenericConfig} 2016-09-29 08:09:39 +02:00
Dr. Stefan Schimanski 8391a19b57 Decouple defaulting from genericapiserver and master 2016-09-28 23:16:09 +02:00
Dr. Stefan Schimanski b4c6a68036 Unify genericapiserver Config.New() and master Config.New() 2016-09-28 19:19:54 +02:00
Dr. Stefan Schimanski 10cbaf7ce0 Store RequestInfo in Context
... in order to replace the manual RequestInfoResolver dependency injection
through out the code.
2016-09-28 18:51:34 +02:00
Kubernetes Submit Queue a845c92207 Merge pull request #33368 from sttts/sttts-prune-serviceerrorhandler
Automatic merge from submit-queue

Prune unused parameters and call only once

Two parameters of `InstallServiceErrorHandler` were not used. Pruning them allows us to move the service error handler installation for each api group to be moved into the constructor.
2016-09-26 22:29:52 -07:00
deads2k 7897691483 move straggler registry package 2016-09-23 16:24:49 -04:00
deads2k 17a21c7bdb move reststorage providers to their correct packages 2016-09-23 16:24:48 -04:00
Dr. Stefan Schimanski acf0a5264a Prune unused parameters and call only once 2016-09-23 14:53:09 +02:00
Dr. Stefan Schimanski 87356c0623 Cleanup handler chain 2016-09-23 12:03:58 +02:00
Kubernetes Submit Queue 1063903d01 Merge pull request #33266 from sttts/sttts-one-installapigroups
Automatic merge from submit-queue

Reduce genericapiserver api surface
2016-09-23 02:32:07 -07:00
deads2k f6882e8465 remove storage related fields from genericapiserver 2016-09-22 09:21:34 -04:00
Dr. Stefan Schimanski c727e27602 Reduce genericapiserver api surface 2016-09-22 13:43:32 +02:00
deads2k 561f8d75a5 move core resource registry packages 2016-09-21 10:11:50 -04:00
deads2k e9c1b87b80 move extensions registry packages 2016-09-21 09:14:38 -04:00
deads2k 7ee8596a02 refactor small API group packages 2016-09-21 09:14:38 -04:00
mbohlool 38b2567d8b Move generated openAPI specs out of genericapiserver and make it configurable 2016-09-20 14:06:10 -07:00
deads2k a2a6423574 separate RESTStorage by API group 2016-09-20 08:00:50 -04:00
deads2k 7d1f13d3e0 add GenericAPIServer posthooks for initialization 2016-09-19 14:58:27 -04:00
Kubernetes Submit Queue 12d916750e Merge pull request #32387 from sttts/sttts-handler-cleanup
Automatic merge from submit-queue

Cleanup non-rest apiserver handlers

- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-16 08:58:06 -07:00
Kubernetes Submit Queue e3f0ce2347 Merge pull request #32586 from deads2k/api-05-restrict-versions
Automatic merge from submit-queue

restrict discoverable versions to those that have resources

Prevents versions with no resources from appearing in discovery.

@soltysh ptal.  I think you have some issues for this, mind wiring them up?

```
kubectl api-versions
apps/v1alpha1
authentication.k8s.io/v1beta1
authorization.k8s.io/v1beta1
autoscaling/v1
batch/v1
certificates.k8s.io/v1alpha1
extensions/v1beta1
policy/v1alpha1
rbac.authorization.k8s.io/v1alpha1
storage.k8s.io/v1beta1
v1
```
Fixes  #29998.
2016-09-15 05:56:34 -07:00
Dr. Stefan Schimanski 7f78661d0b Cleanup non-rest apiserver handlers
- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and
  `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-15 13:22:45 +02:00
Clayton Coleman acb4c00b39
EnableGarbageCollection should be a struct member on RESTOptions
Not a global. Now that we have RESTOptions this was an easy change.
2016-09-15 00:09:28 -04:00
deads2k 26558da40d restrict discoverable versions to those that have resources 2016-09-14 09:16:11 -04:00
Timothy St. Clair 9f3841b452 Revert "Revert "Enable v3 Client as the default on UTs""
This reverts commit 9dcef2e3cd.
2016-09-14 07:27:21 -05:00
deads2k 8fac64b43f add localSAR 2016-09-13 08:54:23 -04:00
Kubernetes Submit Queue 544e64a7fb Merge pull request #32315 from liggitt/api-group-suffix
Automatic merge from submit-queue

Doc API group suffix, add test to catch new groups

Spawned from discussion in https://github.com/kubernetes/kubernetes/pull/31887

Doc and add tests to ensure new API groups are suffixed.

Also changed the doc to reference an API group containing the suffix as a starting point for new API groups.
2016-09-13 02:42:45 -07:00
mbohlool 54fee8c253 Improvements on OpenAPI spec generation:
- Generating models using go2idl library (no reflection anymore)
- Remove dependencies on go-restful/swagger
- Generate one swagger.json file for each web-service
- Bugfix: fixed a bug in trie implementation
2016-09-12 18:47:03 -07:00
Kubernetes Submit Queue 87526da3d9 Merge pull request #32198 from deads2k/storage-01-make-easier-to-inspect
Automatic merge from submit-queue

add logging for enabled/disabled API Groups

Adds logging to the apiserver to indicate which API groups are enabled and disabled as go through.  This will make it easier to identify what's gone wrong in cases where the API server is down during diagnoses and the config is inaccessible, like in GKE tests.  For example https://github.com/kubernetes/kubernetes/issues/32185#issuecomment-245255700 .

@wojtek-t This may have made the problem more obvious.
2016-09-09 23:05:07 -07:00
Jordan Liggitt 620cc66ead
Doc API group suffix, add test to catch new groups 2016-09-09 15:56:08 -04:00
deads2k 0e37530b09 add logging for enabled/disabled API groups 2016-09-09 11:31:15 -04:00
deads2k b0d770ad7b refactor genericapiserver new to combine initialization 2016-09-08 08:57:10 -04:00
Kubernetes Submit Queue bf4e9e9db8 Merge pull request #31245 from deads2k/api-02
Automatic merge from submit-queue

privatize, document, and scrub GenericAPIServer

I've gone through more of the `GenericAPIServer` struct, started documenting what the fields do and privatizing ones that aren't used elsewhere or are only used by components that need some refactoring too.
2016-09-08 03:47:50 -07:00
Kubernetes Submit Queue 7a4d81ea43 Merge pull request #31271 from deads2k/self-sar
Automatic merge from submit-queue

add selfsubjectaccessreview API

Exposes the REST API for self subject access reviews.  This allows a user to see whether or not they can perform a particular action.

@kubernetes/sig-auth
2016-09-08 01:29:48 -07:00
deads2k cd5b6cc491 move StorageClass to its own group 2016-09-06 08:41:17 -04:00
deads2k 554ff48da2 privatize, document, and scrub GenericAPIServer 2016-08-30 09:53:33 -04:00
deads2k 97529e3687 add selfsubjectaccessreview API 2016-08-29 09:51:54 -04:00
Hongchao Deng 9fc0e1e98d return destroy func to clean up internal resources of storage 2016-08-25 08:32:21 -07:00
Daniel Smith 9dcef2e3cd Revert "Enable v3 Client as the default on UTs" 2016-08-24 13:16:40 -07:00
Kubernetes Submit Queue 9484b2c0a0 Merge pull request #30890 from timothysc/etcd3_v3client
Automatic merge from submit-queue

Enable v3 Client as the default on UTs

Updates the default initialization to use clientv3 interface to etcd3, and fixes the UTs.  

This PR includes a cherry-pick of https://github.com/kubernetes/kubernetes/pull/30634 so we can validate the tests, so do not merge until that PR is complete.
2016-08-23 08:04:02 -07:00
Kubernetes Submit Queue f3329b7bae Merge pull request #30923 from Q-Lee/configure-webhook
Automatic merge from submit-queue

Configure webhook

**What this PR does / why we need it**: this configures the image policy webhook + admission controller for gce/gci.

addresses: #22888

**Release note**:
```Configure image verification admission controller and webhook on gce.
```
2016-08-22 21:46:47 -07:00
Timothy St. Clair 49b7ebd791 Switch UT default settings to leverage etcd3.v3client 2016-08-22 22:17:55 -05:00
Quintin Lee 2be0b40c55 Actually link in ImagePolicyWebhook and run initialization. 2016-08-22 16:54:03 -07:00
Matt Liggett c86b84ccc0 Add /eviction subresource.
This is for #12611.
2016-08-22 16:38:00 -07:00
mbohlool c5f1d63d6f Generates OpenAPI (aka Swagger 2.0) Spec on /swagger.json path 2016-08-18 15:32:04 -07:00
Timothy St. Clair 730fc70107 Update etcd default ports for v3, and validate tests 2016-08-17 07:49:19 -05:00
Kubernetes Submit Queue 69419a145a Merge pull request #29802 from jfrazelle/fix-go-vet-errors
Automatic merge from submit-queue

fix go vet errors

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

```release-note
```

This fixes the `go vet` errors brought about by go 1.7 testing re (#28742).

The are all pretty trivial and mostly related to literal composites.

also related to #16086
2016-08-15 13:10:08 -07:00
Kubernetes Submit Queue 3a8b21b3a5 Merge pull request #29724 from brendandburns/thirdparty3
Automatic merge from submit-queue

Fix third party APIResource reporting

@polvi @caesarxuchao @deads2k 

This "fixes" some additional bugs in third party `APIResourceList` reporting.

This code needs a bunch of cleanup, and more tests, but sending it out for a quick smell check review in case I'm doing something stupid.

Fixes the bug referenced here:  https://github.com/kubernetes/kubernetes/pull/28414#issuecomment-235346108 and in https://github.com/kubernetes/kubernetes/issues/23831

Fixes https://github.com/kubernetes/kubernetes/issues/25570
2016-08-13 17:10:20 -07:00
Brendan Burns b3658c7b16 Fix third party APIResource reporting 2016-08-13 15:51:34 -07:00
Hongchao Deng d0938094d9 move new etcd storage into cacher 2016-08-12 18:40:20 -07:00
Jess Frazelle 7e9d82129e
fix go vet errors
Signed-off-by: Jess Frazelle <jessfraz@google.com>

fix composites

Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:45:41 -07:00
AdoHe a6539f846a move RangeRegistry to a separate package for generic usage 2016-08-09 13:10:48 +08:00
Kubernetes Submit Queue 5f9447a91a Merge pull request #20573 from deads2k/plumb-in-SAR
Automatic merge from submit-queue

add subjectaccessreviews resource

Adds a subjectaccessreviews endpoint that uses the API server's authorizer to determine if a subject is allowed to perform an action.

Part of kubernetes/features#37
2016-08-05 14:39:28 -07:00
Kubernetes Submit Queue f9cadb290b Merge pull request #22919 from liggitt/http-test-etcd
Automatic merge from submit-queue

Allow starting test etcd with http

There are cases where we'll want to start a test etcd without https (external tools monitoring tests, tests with lots of parallelism, etc). This makes it an option.

Helps with https://github.com/kubernetes/kubernetes/issues/23127

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/22919)
<!-- Reviewable:end -->
2016-08-05 12:06:12 -07:00
deads2k 32920b5617 add subjectaccessreviews resource 2016-08-05 11:20:56 -04:00
Kubernetes Submit Queue 7921a9ce67 Merge pull request #25816 from soltysh/scheduledjob_kubectl
Automatic merge from submit-queue

ScheduledJob kubectl

@erictune the last part (kubectl) of the ScheduledJob, as usual builds on top of previous PRs, so only last 2 commits matter (the kubectl one and storage leftovers).

```release-note
* Introducing ScheduledJobs as described in [the proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/scheduledjob.md) as part of `batch/v2alpha1` version (experimental feature).
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-04 17:36:07 -07:00
Maciej Szulik f0b8edaccc ScheduledJob storage leftovers 2016-08-03 17:25:35 +02:00
deads2k 60dd4a5d26 interesting changes to add tokenreviews endpoint to implement webhook 2016-08-03 08:37:45 -04:00
Kubernetes Submit Queue 24216fe02f Merge pull request #26958 from resouer/util-line
Automatic merge from submit-queue

Refactoring runner resource container linedelimiter to it's own pkg

Continuing my work ref #15634

Anyone is ok to review this fix.
2016-08-03 02:26:12 -07:00
deads2k c30690a3bb separate out api group storage registration 2016-08-01 08:26:19 -04:00
Harry Zhang e0ab76019e Rename runnter pkg name 2016-07-29 02:37:00 -04:00
childsb f5bd7d471e API Changes for StorageClass 2016-07-28 19:01:01 -04:00
deads2k aa3db4d995 make the resource prefix in etcd configurable for cohabitation 2016-07-27 07:51:40 -04:00
deads2k 6f7007afc5 make addition group registration easier 2016-07-25 08:23:24 -04:00
k8s-merge-robot 63e23a2c75 Merge pull request #28414 from brendandburns/thirdparty
Automatic merge from submit-queue

Allow multiple APIs to register for the same API Group

Fixes https://github.com/kubernetes/kubernetes/issues/23831

@kubernetes/sig-api-machinery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-22 15:35:00 -07:00
Wojciech Tyczynski 4d0d115690 Revert "add tokenreviews endpoint to implement webhook" 2016-07-21 09:40:35 +02:00
deads2k 2c4a9f2e8d interesting changes to add tokenreviews endpoint to implement webhook 2016-07-20 15:11:56 -04:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
Jordan Liggitt d4d6a0ee4c
Allow starting test etcd with http 2016-07-10 22:28:01 -04:00
Casey Davenport 988359d0fe Enable extensions/v1beta1/NetworkPolicy by default 2016-07-07 10:04:46 -07:00
Wojciech Tyczynski 4fa3aba0c2 Get rid of DeleteAllEtcdKeys 2016-07-05 22:10:47 +02:00
Brendan Burns ca9a61b3fb Fix third party APIs to allow multiple APIs to register for the same group 2016-07-01 23:23:11 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot 32eccd413f Merge pull request #25562 from gtank/certificates-api-v9
Automatic merge from submit-queue

TLS bootstrap API group (alpha)

This PR only covers the new types and related client/storage code- the vast majority of the line count is codegen. The implementation differs slightly from the current proposal document based on discussions in design thread (#20439). The controller logic and kubelet support mentioned in the proposal are forthcoming in separate requests.

I submit that #18762 ("Creating a new API group is really hard") is, if anything, understating it. I've tried to structure the commits to illustrate the process.

@mikedanese @erictune @smarterclayton @deads2k

```release-note-experimental
An alpha implementation of the the TLS bootstrap API described in docs/proposals/kubelet-tls-bootstrap.md.
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-28 13:25:22 -07:00
George Tankersley 56a2cf40e6 tests: add certificates to existing test infrastructure 2016-06-28 12:05:40 -07:00
k8s-merge-robot eb4b402d2e Merge pull request #28025 from ncdc/refactor-master-bootstrap-controller
Automatic merge from submit-queue

Add EndpointReconcilerConfig to master Config

Add EndpointReconcilerConfig to master Config to allow downstream integrators to customize the reconciler and reconciliation interval when starting a customized master

@kubernetes/sig-api-machinery @deads2k @smarterclayton @liggitt @kubernetes/rh-cluster-infra
2016-06-28 08:07:41 -07:00
George Tankersley 0439b694ca apiserver: enable certificates api 2016-06-27 14:29:16 -07:00
Andy Goldstein b55cede866 Add EndpointReconcilerConfig to master Config
Add EndpointReconcilerConfig to master Config to allow downstream integrators to customize the reconciler
and reconciliation interval when starting a customized master.
2016-06-27 09:22:30 -04:00
k8s-merge-robot 6dff5d24d1 Merge pull request #25769 from deads2k/remove-dead-discovery-code
Automatic merge from submit-queue

remove confusing, dead code from master.go

Found while chasing something else, looks completely dead.
2016-06-24 13:56:31 -07:00
Maciej Szulik feb43c5e6d Reapply ScheduledJob tests (2ab885a53a) 2016-06-21 14:55:00 +02:00
Andy Goldstein 04ce042ff9 Extract interface for master endpoints reconciler.
Make the master endpoints reconciler an interface so its implementation can be overridden, if
desired.
2016-06-06 17:56:23 -04:00
k8s-merge-robot 421c16addd Merge pull request #25894 from brendandburns/thirdparty-watch
Automatic merge from submit-queue

Fix third party

Fixes https://github.com/kubernetes/kubernetes/issues/25421
Fixes https://github.com/kubernetes/kubernetes/issues/25422

@AdoHe @sjenning @caesarxuchao @lavalamp 

@kubernetes/sig-api-machinery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-04 15:42:41 -07:00
Brendan Burns 328a8392b1 Fix third party 2016-06-02 10:24:14 -07:00
k8s-merge-robot 99fab4a87d Merge pull request #25374 from brendandburns/plural
Automatic merge from submit-queue

Fix a bug with pluralization of third party resources

Fixes https://github.com/kubernetes/kubernetes/issues/25129

@kubernetes/sig-api-machinery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-01 02:25:30 -07:00
deads2k 82096d1279 remove confusing, dead code from master.go 2016-05-31 15:48:36 -04:00
Eric Chiang ef40aa9572 pkg/master: enable certificates API and add rbac authorizer 2016-05-25 14:24:47 -07:00
Jordan Liggitt 29252acd1a Change rest storage Update interface to retrieve updated object
Add OldObject to admission attributes

Update resthandler Patch/Update admission plumbing
2016-05-23 21:09:26 -04:00
Casey Davenport 47248f3698 v1beta1 NetworkPolicy API definition and client support 2016-05-19 19:02:54 -07:00
Matt Liggett f5e8d41431 Finish implementing policy API.
Registry implementation and addition to the master.
2016-05-13 17:27:58 -07:00
k8s-merge-robot 667f586083 Merge pull request #25196 from luxas/auto_create_kube_system
Automatic merge from submit-queue

Automatically create the kube-system namespace

At the same time we ensure that the `default` namespace is present, it also creates `kube-system` if it doesn't exist.

`kube-system` will now exist from the beginning, and will be recreated every 10s if deleted, in the same manner as the `default` ns

This makes UX much better, no need for `kubectl`ing a `kube-system.yaml` file anymore for a function that is essential to Kubernetes (addons). For instance, this makes dashboard deployment much easier when there's no need to check for the `kube-system` ns first.

A follow up in the future may remove places where logic to manually create the kube-system namespace is present.

Also fixed a small bug where `CreateNamespaceIfNeeded` ignored the `ns` parameter and was hardcoded to `api.NamespaceDefault`.

@davidopp @lavalamp @thockin @mikedanese @bryk @cheld @fgrzadkowski @smarterclayton @wojtek-t @dlorenc @vishh @dchen1107 @bgrant0607 @roberthbailey

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/25196)
<!-- Reviewable:end -->
2016-05-12 11:17:09 -07:00
k8s-merge-robot 4513b7c2a4 Merge pull request #25495 from davidopp/change-owners
Automatic merge from submit-queue

Remove myself from a bunch of OWNERS files

For the time being I am too overloaded to do non scheduler/admission related reviews that aren't explicitly assigned to me.

cc/ @brendandburns
2016-05-11 19:18:33 -07:00
k8s-merge-robot ac50a70992 Merge pull request #25459 from errm/misspell
Automatic merge from submit-queue

Corrects some misspellings in comments

This should help to make
https://goreportcard.com/report/k8s.io/kubernetes#misspell
look a little nicer.
2016-05-11 19:18:30 -07:00
David Oppenheimer 4ae37df7b7 Remove myself from a bunch of OWNERS files, as I am too overloaded
to do so many code reviews right now.
2016-05-11 13:34:51 -07:00
Ed Robinson afdbad078a
Corrects some misspellings in comments
This should help to make
https://goreportcard.com/report/k8s.io/kubernetes#misspell
look a little nicer.
2016-05-11 08:16:13 +01:00
Maciej Szulik a31ca0dc98 enable batch/v2alpha1 tests 2016-05-10 22:40:24 +02:00
Maciej Szulik 5ef870d4c7 Added JobTemplate, a preliminary step for ScheduledJob and Workflow 2016-05-10 21:48:39 +02:00
Brendan Burns b2bf960649 Add a test for pluralizing third party resources, fix bug. 2016-05-09 14:47:02 -07:00
Matt Liggett c00fa39eee Define PodDisruption API types. 2016-05-06 17:24:53 -07:00
Lucas Käldström 8ea3a9319c Automatically create the kube-system namespace 2016-05-05 22:27:49 +03: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
k8s-merge-robot d0b887e4e0 Merge pull request #24595 from zhouhaibing089/httpserverclose
Automatic merge from submit-queue

Uncomment the code that caused by #19254

Fix https://github.com/kubernetes/kubernetes/issues/24546.

@lavalamp
2016-04-28 01:41:16 -07:00
Hongchao Deng c0071a1595 add flags to enable etcd3 2016-04-28 09:48:16 +08:00
jianhuiz fdfe42ea44 move install of version handler to genericapiserver 2016-04-27 10:21:08 -07:00
Paul Morie c386850d23 Reduce LOC in third party controller test 2016-04-27 02:50:46 -04:00
k8s-merge-robot b04f6ffc48 Merge pull request #24646 from nikhiljindal/removeMasterDep
Automatic merge from submit-queue

Move SSHTunneler to genericapiserver and remove federated-apiserver's dependency on pkg/master

cc @jianhuiz
2016-04-25 19:50:37 -07: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
nikhiljindal f9f1e21e08 Moving master.SSHTunneler to genericapiserver 2016-04-22 11:47:05 -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
deads2k 6670b73b18 make storage enablement, serialization, and location orthogonal 2016-04-21 08:18:55 -04:00
Prashanth Balasubramanian 0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
deads2k a79cb3c44e stop changing the root path of the root webservice 2016-04-19 13:08:46 -04:00
k8s-merge-robot e81663c824 Merge pull request #24006 from caesarxuchao/thirdparty-preferredversion
Automatic merge from submit-queue

Use the first version as thirdparty resource preferredVersion

First commit is a one-liner, which implements the server-half of #23985.

The other two commits rearrange the test code, and add back a commented out test of thirdparty resource.

@lavalamp @nikhiljindal
2016-04-17 16:02:59 -07:00
k8s-merge-robot 2b9637da6a Merge pull request #23945 from smarterclayton/move_reset_metrics
Automatic merge from submit-queue

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).

@wojtek-t
2016-04-17 05:58:26 -07: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
k8s-merge-robot d44457ebaf Merge pull request #23903 from zhouhaibing089/https-fix
Automatic merge from submit-queue

the component status health check should check whether the scheme of backend storage url is https or not

fix https://github.com/kubernetes/kubernetes/issues/23897, when querying the component status of etcd (backend storage), the scheme of url is not checked and use `http` always, this commit aims to fix this.
2016-04-16 20:22:57 -07: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
Daniel Smith 4c539bf082 Merge pull request #23490 from wojtek-t/remove_set_from_storage_interface
Remove Set() from storage.Interface.
2016-04-13 14:22:05 -07:00
k8s-merge-robot f5e8e7453b Merge pull request #23806 from smarterclayton/streaming_watch
Automatic merge from submit-queue

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).

@wojtek-t @lavalamp
2016-04-13 05:18:17 -07:00
Chao Xu f315ffd8b1 make default thirdparty resource preferredVersion; adding back discovery tests 2016-04-12 10:09:09 -07:00
k8s-merge-robot acf9492cb1 Merge pull request #23660 from goltermann/vetclean
Automatic merge from submit-queue

Additional go vet fixes

Mostly:
- pass lock by value
- bad syntax for struct tag value
- example functions not formatted properly
2016-04-12 06:22:16 -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
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
zhouhaibing089 597fdede5a the component status health check should check whether the scheme of backend storage url is https or not 2016-04-08 07:26:27 +08:00
goltermann 696423e044 Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
Wojciech Tyczynski 53f433f019 Remove Set() from storage.Interface. 2016-04-04 17:54:18 +02:00
Brendan Burns be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
deads2k e8fb35d4d8 refactor resource overrides as positive logic interface 2016-03-28 09:24:49 -04:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
k8s-merge-robot b8e390a0f3 Merge pull request #22824 from brendandburns/enable
Auto commit by PR queue bot
2016-03-24 22:26:39 -07:00
Brendan Burns 1f5b4b8802 Address comments. 2016-03-24 15:44:31 -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
Brendan Burns 87a1635c93 Machine generated stuff 2016-03-22 14:41:37 -07: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
Brendan Burns a0fcbd1495 Enable third party resources. 2016-03-21 17:02:18 -07:00
CJ Cullen 5f3929f75d Add a SSHKey sync check to the master's healthz (when using SSHTunnels). 2016-03-17 19:14:25 -07:00
Mike Danese e21ebbcac4 give the kubernetes service client ip session affinity 2016-03-17 09:38:22 -07:00
Jordan Liggitt ad20045c8d Correctly identify namespace subresources in GetRequestInfo 2016-03-14 13:03:33 -04:00
k8s-merge-robot 5db0feb202 Merge pull request #22017 from caesarxuchao/fix-21955
Auto commit by PR queue bot
2016-03-10 14:37:43 -08:00
Madhusudan.C.S fe26381c90 Support for both map-based and set-based selectors in extensions/v1beta1.Scale
Here are a list of changes along with an explanation of how they work:
1. Add a new string field called TargetSelector to the external version of
   extensions Scale type (extensions/v1beta1.Scale). This is a serialized
   version of either the map-based selector (in case of ReplicationControllers)
   or the unversioned.LabelSelector struct (in case of Deployments and
   ReplicaSets).
2. Change the selector field in the internal Scale type (extensions.Scale) to
   unversioned.LabelSelector.
3. Add conversion functions to convert from two external selector fields to a
   single internal selector field. The rules for conversion are as follows:
   i.   If the target resource that this scale targets supports LabelSelector
        (Deployments and ReplicaSets), then serialize the LabelSelector and
        store the string in the TargetSelector field in the external version
        and leave the map-based Selector field as nil.
   ii.  If the target resource only supports a map-based selector
        (ReplicationControllers), then still serialize that selector and
	store the serialized string in the TargetSelector field. Also,
	set the the Selector map field in the external Scale type.
   iii. When converting from external to internal version, parse the
        TargetSelector string into LabelSelector struct if the string isn't
	empty. If it is empty, then check if the Selector map is set and just
	assign that map to the MatchLabels component of the LabelSelector.
   iv.  When converting from internal to external version, serialize the
        LabelSelector and store it in the TargetSelector field. If only
	the MatchLabel component is set, then also copy that value to
	the Selector map field in the external version.
4. HPA now just converts the LabelSelector field to a Selector interface
   type to list the pods.
5. Scale Get and Update etcd methods for Deployments and ReplicaSets now
   return extensions.Scale instead of autoscaling.Scale.
6. Consequently, SubresourceGroupVersion override and is "autoscaling"
   enabled check is now removed from pkg/master/master.go
7. Other small changes to labels package, fuzzer and LabelSelector
   helpers to piece this all together.
8. Add unit tests to HPA targeting Deployments and ReplicaSets.
9. Add an e2e test to HPA targeting ReplicaSets.
2016-03-09 17:54:17 -08:00
k8s-merge-robot 89c9c24987 Merge pull request #21964 from caesarxuchao/fix-thirdparty-parameter
Auto commit by PR queue bot
2016-03-07 00:59:17 -08:00
k8s-merge-robot a435537e27 Merge pull request #21966 from madhusudancs/scale-deployment-replicaset
Auto commit by PR queue bot
2016-03-04 14:40:10 -08:00
Madhusudan.C.S fa0794098f Define etcd storage methods for replicationcontrollers/scale subresource.
Also register replicationcontrollers/scale subresource. Along with
registering the resource, also specify the cross-group override for the
subresource since Scale belongs belongs to autoscaling/v1 but
ReplicationController belongs to api/v1.
2016-03-04 11:02:37 -08:00
Madhusudan.C.S 9e99f9fa0e Register scale subresource for Deployments and ReplicaSets.
Define etcd registry methods for scale subresource in Deployments and
ReplicaSets. Register them with the API server.
2016-03-04 11:01:36 -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
Chao Xu 56bddbcae5 fix thirdparty discovery, add test 2016-02-25 14:13:28 -08:00
Chao Xu 4adb110516 adding a unit test 2016-02-25 11:09:26 -08:00
Wojciech Tyczynski 506899008f Parallelization of namespace deletion 2016-02-25 16:33:25 +01:00
Chao Xu 5b108acb38 fix ParameterCodec for thirdparty resource 2016-02-24 21:45:30 -08:00
Wojciech Tyczynski 4eadc5e97b Introduce RESTOptions to configure per-resource storage 2016-02-22 16:28:28 +01:00