Commit Graph

247 Commits

Author SHA1 Message Date
deads2k
c4fae4e690 mechanical repercussions 2017-01-11 15:20:36 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
deads2k
4d7fcae85a mechanicals 2017-01-05 11:14:27 -05:00
deads2k
ca58ec0237 mechanical changes for move 2017-01-04 10:27:05 -05:00
deads2k
ab1b77673f decouple genericapiserver from non-generic authenticator 2016-12-22 07:48:08 -05: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
Wojciech Tyczynski
a9ec31209e GetOptions - fix tests 2016-12-09 09:42:01 +01:00
deads2k
b723333be3 move APIResourceConfigSource to master 2016-12-06 10:19:25 -05:00
Timothy St. Clair
d15e20eed4 Reduce the etcd surface area in the integration test to minimize the client dependency. 2016-11-28 15:58:39 -06: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
f3b5d514ab test/integration 2016-11-23 15:53:09 -08:00
deads2k
d82f98c9b3 remove non-generic options from genericapiserver.Config 2016-11-03 11:48:33 -04: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
Clayton Coleman
ca2f1b87ad
Replace negotiation with a new method that can extract info
Alter how runtime.SerializeInfo is represented to simplify negotiation
and reduce the need to allocate during negotiation. Simplify the dynamic
client's logic around negotiating type. Add more tests for media type
handling where necessary.
2016-10-28 11:30:11 -04:00
Jan Chaloupka
4fde09d308 Replace client with clientset in code 2016-10-23 22:00:35 +02:00
Dr. Stefan Schimanski
cca05af615 Move swagger+openapi setup to routes and decouple from run 2016-10-22 13:42:22 +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
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
deads2k
518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
deads2k
9f4f6a1cba fix integration tests for loopback client 2016-10-04 08:40:59 -04:00
deads2k
57039cfdfa make well-known users and groups into constants 2016-09-30 10:34:33 -04:00
deads2k
4c8959df59 pass loopback config to posthooks 2016-09-30 10:34:33 -04: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
deads2k
48ac4d549d change e2e scale to avoid adapter 2016-09-26 07:58:01 -04:00
deads2k
f6882e8465 remove storage related fields from genericapiserver 2016-09-22 09:21:34 -04:00
mbohlool
38b2567d8b Move generated openAPI specs out of genericapiserver and make it configurable 2016-09-20 14:06:10 -07:00
deads2k
7d1f13d3e0 add GenericAPIServer posthooks for initialization 2016-09-19 14:58:27 -04: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
deads2k
519c13745f convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
deads2k
cd5b6cc491 move StorageClass to its own group 2016-09-06 08:41:17 -04:00
Kubernetes Submit Queue
7979801e54 Merge pull request #28860 from ericchiang/separate-apiserver-authz-options
Automatic merge from submit-queue

pkg/genericapiserver/options: don't import pkg/apiserver

Refactor the authorization options for the API server so
pkg/apiserver isn't directly imported by the options package.

Closes #28544

cc @smarterclayton

@madhusudancs, @nikhiljindal I've updated `federation/cmd/federation-apiserver/app/server.go` to include the RBAC options with this change. I don't know if this was intentionally left out in the first place but would like your feedback.
2016-08-21 09:49:14 -07:00
mbohlool
c5f1d63d6f Generates OpenAPI (aka Swagger 2.0) Spec on /swagger.json path 2016-08-18 15:32:04 -07:00
Eric Chiang
b4eaf625a0 pkg/genericapiserver/options: don't import pkg/apiserver
Refactor the authorization options for the API server so
pkg/apiserver isn't directly imported by the options package.
2016-08-18 13:01:50 -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
Chao Xu
96c84303bd fix kubectl rolling-update when GC is enabled 2016-08-03 15:57:03 -07:00
Wojciech Tyczynski
4fa3aba0c2 Get rid of DeleteAllEtcdKeys 2016-07-05 22:10:47 +02:00
Wojciech Tyczynski
122f97d29b Migrate remaining integration tests 2016-07-05 13:34:27 +02:00
Wojciech Tyczynski
925ba42507 Avoid annoying logs in integration tests 2016-07-04 16:52:55 +02:00
Wojciech Tyczynski
bee29b59d2 Cleanup integration RunAMaster 2016-07-04 15:53:56 +02:00
Wojciech Tyczynski
ac270b66b7 Move first few integration tests to use dedicated namespaces 2016-07-04 13:21:26 +02:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
George Tankersley
56a2cf40e6 tests: add certificates to existing test infrastructure 2016-06-28 12:05:40 -07:00
Jan Safranek
a114df7d59 integration tests: add env. variable for etcd URL.
Many integration tests delete all keys in etcd as part of their cleanup.
To run these tests in parallel we must run several etcd daemons, each on
different port and pass etcd url to the test suite.
2016-06-20 10:40:49 +02:00
Daniel Smith
8af08f90b5 remove unused prefix code, fix comment 2016-06-16 14:29:40 -07:00
Daniel Smith
6e6ae452e5 Make each integration test use different prefix 2016-06-12 13:33:31 -07:00
Chao Xu
d03fe34114 enable watchCache in test/integration/ tests 2016-05-28 15:46:12 -07:00
Eric Chiang
323e804f39 add rbac for tests and kubectl 2016-05-25 14:25:56 -07:00
Matt Liggett
f5e8d41431 Finish implementing policy API.
Registry implementation and addition to the master.
2016-05-13 17:27:58 -07: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
Hongchao Deng
c0071a1595 add flags to enable etcd3 2016-04-28 09:48:16 +08:00
zhouhaibing089
bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08: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
f0c33d65b6 start sharing the pod cache and list/watch 2016-04-18 08:51:55 -04: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
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
deads2k
e8fb35d4d8 refactor resource overrides as positive logic interface 2016-03-28 09:24:49 -04:00
Kris
e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
mqliang
e44e71ca87 make cache size configurable 2016-02-24 22:37:02 +08:00
Eric Tune
d5f303d3d7 Fixed and added tests 2016-02-19 09:20:56 -08:00
Piotr Szczesniak
d9705940d6 Fixed and added tests 2016-02-15 21:39:00 +01:00
Chao Xu
184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
Nikhil Jindal
59820827d4 Merge pull request #20513 from nikhiljindal/apiserverExampleTest
Adding test for apiserver example
2016-02-04 11:28:58 -08:00
nikhiljindal
c7beb9078c Updating methods to return error rather than using glog.Fatalf 2016-02-03 16:00:45 -08:00
Chao Xu
f9f5736b01 grep sed 2016-02-03 13:06:07 -08:00
k8s-merge-robot
c5260c8c71 Merge pull request #20145 from mqliang/quorum-read
Auto commit by PR queue bot
2016-02-02 05:50:41 -08:00
Chao Xu
c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
mqliang
b0e06c14e5 add a knob to enable quorum read 2016-01-30 20:32:12 +08:00
Clayton Coleman
38c7eded99 Prepare for content-type negotiation
Combine the fields that will be used for content transformation
(content-type, codec, and group version) into a single struct in client,
and then pass that struct into the rest client and request. Set the
content-type when sending requests to the server, and accept the content
type as primary.

Will form the foundation for content-negotiation via the client.
2016-01-26 17:44:30 -05:00
Clayton Coleman
4d127dc969 Initialize API servers with negotiated serializers
Pass down into the server initialization the necessary interface for
handling client/server content type negotiation. Add integration tests
for the negotiation.
2016-01-22 01:10:22 -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
nikhiljindal
2d952aaa87 Extracting APIServer machinery code into a library 2015-12-16 13:54:23 -08:00
deads2k
d0aaf13920 use constants for group names 2015-12-14 10:04:10 -05:00
Wojciech Tyczynski
960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
deads2k
2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
k8s-merge-robot
6479f5e93f Merge pull request #18136 from nikhiljindal/del-new-etcd-storage
Auto commit by PR queue bot
2015-12-03 04:10:00 -08:00
nikhiljindal
5c556baa2f Removing duplicate NewEtcdStorage code 2015-12-03 01:37:44 -08:00
Wojciech Tyczynski
6dcb689d4e Simplify List() signature in clients. 2015-12-03 09:54:07 +01:00
nikhiljindal
41ebe6f1a3 Cleaning up duplicate master config inits 2015-12-02 15:03:22 -08:00
k8s-merge-robot
689586c6ae Merge pull request #16153 from gmarek/use_api_ports
Auto commit by PR queue bot
2015-12-02 05:57:49 -08:00
gmarek
459131fd92 Use KubeletPort reported in NodeStatus instead of cluster-wide master config, take 2. 2015-12-02 13:38:17 +01:00
Wojciech Tyczynski
8343c8ce6c Pass ListOptions to List() methods. 2015-12-01 15:00:36 +01:00
k8s-merge-robot
a836b1e261 Merge pull request #17326 from caesarxuchao/grooupVersion-lastest
Auto commit by PR queue bot
2015-12-01 05:05:40 -08:00
Chao Xu
6e192760e3 refactoring latest.go GroupVersion;
clean up latest.go GroupVersions;
remove latest.GroupMeta.Group;
remove latest.GroupMeta.Version.
2015-11-30 11:30:21 -08:00
deads2k
1ac6d8afd3 update reaper, scaler, describer for GroupKind 2015-11-30 09:22:39 -05:00
deads2k
a87d927588 update client.Config to use GroupVersion 2015-11-21 08:29:26 -05:00
k8s-merge-robot
7ad8bb1787 Merge pull request #17161 from soltysh/strip_reaper
Auto commit by PR queue bot
2015-11-17 05:45:35 -08:00
Maciej Szulik
64f778804d Remove string from Reaper.Stop signature 2015-11-17 12:09:08 +01:00
Wojciech Tyczynski
3df5d1dbc3 Move storage-related dirs under pkg/storage. 2015-11-12 19:49:32 +01:00
nikhiljindal
a0c038982e Fixing integrations test 2015-10-15 16:54:17 -07:00
nikhiljindal
7bcc4a6755 Allowing runtimeConfig to support enabling/disabling specific extension resources 2015-10-15 14:24:22 -07:00
eulerzgy
4ed5f9d240 adjust package name for pkg/controller directory 2015-10-12 09:51:27 +08:00
Chao Xu
f3caff2a79 testapi.Experimental -> testapi.Extensions 2015-10-09 15:15:35 -07:00
Chao Xu
80f213c376 "experimental" -> "extensions" 2015-10-09 15:14:03 -07:00
Wojciech Tyczynski
df79026b79 Extend resyncPeriods in controllers in production. 2015-10-08 09:10:09 +02:00
Wojciech Tyczynski
0f1cbe37a4 Events in separate etcd 2015-10-05 10:54:24 +02:00
Chao Xu
ae1293418b move experimental/v1 to experimental/v1alpha1;
use "group/version" in many places where used to expect "version" only.
2015-09-24 15:32:11 -07:00
Maciej Szulik
48775319d9 Reaper and scaler for jobs 2015-09-23 13:06:34 +02:00
Chao Xu
1278771b34 let apiserver support api discovery 2015-09-21 12:20:24 -07:00
Muhammed Uluyol
f855e75805 Correctly do swagger validation with experimental.
Before we tried both groups, first api then experimental. If
experimental failed, the error message would be discarded and the
message for api would be shown. This commit changes this behavior so
that we detect which api group we should be using and only show the
error for that group.
2015-09-17 22:54:56 -04:00
Chao Xu
9bef5ff99d register experimental apis as apis/experimental/..
mark --api-version as deprecated
2015-09-15 11:25:01 -07:00
Chao Xu
f5023929d8 fix broken files after rebase 2015-09-12 15:45:12 -07:00
Chao Xu
dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Daniel Smith
ccd9e3e247 Run all automated tools 2015-09-11 16:11:08 -07:00
Daniel Smith
4c2adabf42 move; sed replace 2015-09-11 16:03:22 -07:00
Daniel Smith
b225c1d47a Run gofmt (separate commit for easy rebases) 2015-09-10 17:17:59 -07:00
Daniel Smith
15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
Chao Xu
9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Timothy St. Clair
2b7e758c3c Fixes the experimental api, which appeared to be completely broken.
Fix for rebase with nikhiljindal/deploymentController
2015-09-03 21:56:45 -05:00
Kris Rousey
ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Muhammed Uluyol
fab367230f Add experimental API support to kubectl 2015-08-11 16:49:55 -07:00
Kris Rousey
565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Mike Danese
17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
gmarek
d27ad5b714 Controller codebase refactoring 2015-08-03 17:06:25 +02:00
Muhammed Uluyol
58a875ac2c Add (stopgap) support for an experimental API prefix. 2015-07-30 18:14:29 -07:00
Wojciech Tyczynski
99d6b0e9f4 Rename storage interfaces 2015-07-30 10:34:57 +02:00
Wojciech Tyczynski
d17985f1ad Move StorageInterface to pkg/storage. 2015-07-30 09:32:04 +02:00
Ananya Kumar
47dd0bc6f9 Refactor package controller 2015-07-29 09:54:35 -07:00
Wojciech Tyczynski
9d943df397 Private EtcdHelper 2015-07-27 09:20:13 +02:00
Tim Hockin
1c3233a1d4 Remove v1beta3 2015-07-23 17:21:27 -07:00
nikhiljindal
c465a50891 Stop exposing v1beta3 by default 2015-07-08 15:27:41 -07:00
nikhiljindal
2e9e46dd08 Updating scripts to use v1 instead of v1beta3 2015-07-01 00:23:16 -07:00
Chao Xu
ef61b031f5 make v1 enabled by default 2015-06-04 11:37:44 -07:00
Brian Grant
e7788771d6 Merge pull request #9030 from brendandburns/kubectl
Add a custom timeout flag for stop/delete.
2015-06-03 21:14:50 -07:00
Brendan Burns
ab0c9b8e1e Add a custom timeout flag for stop/delete. Also try to be smarter about setting the timeout. 2015-06-03 11:21:30 -07:00
Chao Xu
89c8949e78 add v1 to hack/test-integration.sh 2015-06-02 14:55:45 -07:00
Chao Xu
9c1153322e update PodSpec.Host to PodSpec.NodeName in /pkg/api/types.go and /pkg/api/v1beta3/types.go 2015-05-28 14:10:06 -07:00
Anastasis Andronidis
9e3a540940 rename resize to scale 2015-05-27 19:08:06 +02:00
Prashanth Balasubramanian
4200033c0a Add a simple master benchmark and a wrapper to run it. 2015-05-15 17:30:17 -07:00