Commit Graph

403 Commits (2bb2604f0b0d55bcc624030fbea6dd4d139c96a2)

Author SHA1 Message Date
Paul Morie 22ecfe5d14 Make generic registry easier to understand 2017-01-23 09:51:09 -05:00
Kubernetes Submit Queue b5929bfb2b Merge pull request #38789 from jessfraz/cleanup-temp-dirs
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

Cleanup temp dirs

So funny story my /tmp ran out of space running the unit tests so I am cleaning up all the temp dirs we create.
2017-01-20 12:34:58 -08:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
Kubernetes Submit Queue fe69dcf861 Merge pull request #40018 from sttts/sttts-genericapiserver-storage-dep
Automatic merge from submit-queue (batch tested with PRs 40008, 40005, 40018)

Fix wrong rename pkg/storage.Is{TestFail -> Conflict}
2017-01-18 04:04:49 -08:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Clayton Coleman 36acd90aba
Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
Dr. Stefan Schimanski 7271921405 Fix wrong rename pkg/storage.Is{TestFail -> Conflict} 2017-01-17 13:18:11 +01:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Kubernetes Submit Queue ec75d1c7c5 Merge pull request #36522 from apelisse/owners-pkg-storage
Automatic merge from submit-queue

Curating Owners: pkg/storage

cc @lavalamp @timothysc @liggitt @xiang90 @wojtek-t

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-13 15:19:16 -08:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
Kubernetes Submit Queue e73d66ce44 Merge pull request #37557 from sttts/sttts-update-ugorji
Automatic merge from submit-queue

Update ugorji/go/codec godep

In order to pick-up https://github.com/ugorji/go/issues/119 and to get rid of the workaround at https://github.com/kubernetes/kubernetes/pull/36909/files#diff-a09eb061a0fb0ef3c9ef9d696f1ad0b4R426.
2017-01-12 02:36:16 -08:00
Kubernetes Submit Queue 8d4cc53175 Merge pull request #39483 from deads2k/generic-15-deps-02-for-real
Automatic merge from submit-queue

move no k8s.io/kubernetes dep packages for genericapiserver

Move the next set of no-dep packages for genericapiserver.  Feel the ratchet click!

```
k8s.io/kubernetes/pkg/auth/authenticator/bearertoken -> k8s.io/apiserver/pkg/authentication/request/bearertoken
k8s.io/kubernetes/pkg/auth/authorizer/union -> k8s.io/apiserver/pkg/authorization/union
k8s.io/kubernetes/pkg/auth/group -> k8s.io/apiserver/pkg/authentication/group
k8s.io/kubernetes/pkg/httplog -> k8s.io/apiserver/pkg/httplog
k8s.io/kubernetes/pkg/ssh -> k8s.io/apiserver/pkg/ssh
k8s.io/kubernetes/pkg/storage/etcd/metrics -> k8s.io/apiserver/pkg/storage/etcd/metrics
k8s.io/kubernetes/pkg/util/cache -> k8s.io/apiserver/pkg/util/cache
k8s.io/kubernetes/plugin/pkg/auth/authenticator/request/anonymous -> k8s.io/apiserver/pkg/authentication/request/anonymous
k8s.io/kubernetes/plugin/pkg/auth/authenticator/request/union -> k8s.io/apiserver/pkg/authentication/request/union
k8s.io/kubernetes/plugin/pkg/auth/authenticator/request/x509 -> k8s.io/apiserver/pkg/authentication/request/x509
k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/tokenfile -> k8s.io/apiserver/pkg/authentication/token/tokenfile
```

@sttts
2017-01-11 15:16:13 -08:00
Kubernetes Submit Queue dc7fd284f0 Merge pull request #37467 from linyouchong/linyouchong-20161125
Automatic merge from submit-queue

delete unused variable in etcd_help_test.go

**What this PR does / why we need it**:
delete unused variable validEtcdVersion ,for keep the code clean

**Special notes for your reviewer**: none

**Release note**:  none
2017-01-11 14:33:05 -08:00
Dr. Stefan Schimanski 2741eb7fdb Update generated files 2017-01-11 21:54:07 +01:00
deads2k c4fae4e690 mechanical repercussions 2017-01-11 15:20:36 -05:00
deads2k 5280c8d3ac moves of genericapiserver packages without dependencies 2017-01-11 15:06:38 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Kubernetes Submit Queue f4a8713088 Merge pull request #36229 from wojtek-t/bump_etcd_version
Automatic merge from submit-queue (batch tested with PRs 36229, 39450)

Bump etcd to 3.0.14 and switch to v3 API in etcd.

Ref #20504

**Release note**:

```release-note
Switch default etcd version to 3.0.14.
Switch default storage backend flag in apiserver to `etcd3` mode.
```
2017-01-04 17:36:06 -08:00
Jess Frazelle 03f5866ede
cleanup etcd_certificates in /tmp
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:27:05 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Wojciech Tyczynski d31ff83fdc Fix bug of delivering random parts of events 2016-12-22 20:03:38 +01:00
Wojciech Tyczynski 498a893fa3 Switch to etcd v3 API by default 2016-12-20 11:57:46 +01:00
Wojciech Tyczynski d5e235c831 Reduce timeout for waiting for resource version 2016-12-20 10:05:38 +01:00
Daniel Smith efd2ad825a Update OWNERS 2016-12-19 15:55:20 -08:00
Antoine Pelisse 76782c8cfc Update OWNERS approvers and reviewers: pkg/storage 2016-12-19 15:55:06 -08:00
Wojciech Tyczynski 457c9a2e6e Reduce amount of allocations in cacher 2016-12-19 13:51:07 +01:00
Kubernetes Submit Queue f02c8e47bc Merge pull request #38669 from caesarxuchao/fix-cacher
Automatic merge from submit-queue

Fix leaking goroutines in watch cache

Fixes #38670 which causes leaked goroutines in the API server. The root cause is: if the WatchServer timeout [fires](https://github.com/kubernetes/kubernetes/blob/master/pkg/apiserver/watch.go#L187-L188) when the `result` channel is full, `sendWatchCacheEvent` will be blocked on the write to the `result` even though `cacheWatch.Stop()` is [called](https://github.com/kubernetes/kubernetes/blob/master/pkg/apiserver/watch.go#L171), because WatchServer stops consuming the `result` channel after the timeout.
Thanks to @krousey for identifying the problem. cc @mml @yujuhong
2016-12-13 00:43:08 -08:00
Chao Xu 7e787b144a fix leaking goroutine issues in watch cache 2016-12-12 21:41:33 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Kubernetes Submit Queue e732ee70f4 Merge pull request #38406 from liggitt/remove-internal-json-annotations
Automatic merge from submit-queue

Remove json serialization annotations from internal types

fixes #3933

Internal types should never be serialized, and including json serialization tags on them makes it possible to accidentally do that without realizing it.

fixes in this PR:

* types
  * [x] remove json tags from internal types
  * [x] fix references from serialized types to internal ObjectMeta
* generation
  * [x] remove generated json codecs for internal types (they should never be used)
* kubectl
  * [x] fix `apply` to operate on versioned object
  * [x] fix sorting by field to operate on versioned object
  * [x] fix `--record` to build annotation patch using versioned object
* hpa
  * [x] fix unmarshaling to internal CustomMetricTargetList in validation
* thirdpartyresources
  * [x] fix encoding API responses using internal ObjectMeta
* tests
  * [x] fix tests to use versioned objects when checking encoded content
  * [x] fix tests passing internal objects to generic printers

follow ups (will open tracking issues or additional PRs):
- [ ] remove json tags from internal kubeconfig types (`kubectl config set` pathfinding needs to work against external type)
- [ ] HPA should version CustomMetricTargetList serialization in annotations
- [ ] revisit how TPR resthandlers encoding objects
- [ ] audit and add tests for printer use (human-readable printer requires internal versions, generic printers require external versions)
- [ ] add static analysis tests preventing new internal types from adding tags
- [ ] add static analysis tests requiring json tags on external types (and enforcing lower-case first letter)
- [ ] add more tests for `kubectl get` exercising known and unknown types with all output options
2016-12-10 14:00:17 -08:00
Jordan Liggitt 4536388909
Update bazel 2016-12-09 16:26:06 -05:00
Jordan Liggitt fcf5bbccd6
Fix references from serializable types to use v1.ObjectMeta 2016-12-09 16:26:04 -05:00
Wojciech Tyczynski 01699ef320 Proper fix for non-receiving watchers 2016-12-09 09:43:10 +01:00
Kubernetes Submit Queue 34c873a748 Merge pull request #36711 from hongchaodeng/e4
Automatic merge from submit-queue (batch tested with PRs 38181, 38128, 36711)

etcd2: have prefix always prepended

The prefix issue is discussed in #36290.

This is fixing etcd2 behavior separately.

**release note**:
```
etcd2: have prefix always prepended
```
2016-12-07 03:09:34 -08:00
Kubernetes Submit Queue 6cfe041b53 Merge pull request #38200 from hongchaodeng/e
Automatic merge from submit-queue (batch tested with PRs 37032, 38119, 38186, 38200, 38139)

etcd2: remove unnecessary PrevValue in SetOption

ref: https://github.com/kubernetes/kubernetes/issues/37994

Summary:
- PrevValue is set in HTTP header, and large value (>1MB) could exceed check limit
- We don't need PrevValue indeed since we already use PrevIndex in SetOptions and each PrevIndex corresponds to each PrevValue.

I don't really think we need extra tests for this. There is already test for GuaranteedUpdate covering its use cases.
2016-12-06 18:29:38 -08:00
Hongchao Deng 7a0176da57 etcd2: remove unnecessary PrevValue in SetOption 2016-12-06 09:24:49 -08:00
Hongchao Deng 14ed02d0dd pkg/storage/etcd: update bazel 2016-12-05 15:10:38 -08:00
Hongchao Deng b6e329654e etcd2: have prefix always prepended 2016-12-05 15:10:38 -08:00
Hongchao Deng 62c0e5abc3 pkg/storage: docs on watch 0 behavior 2016-12-05 15:10:24 -08:00
Hongchao Deng 34db128af9 etcd2: watch on 0 to return ADDED always 2016-12-05 15:10:24 -08:00
Hongchao Deng 51d9bb1f2b etcd3: have prefix to always prepended 2016-12-04 21:45:07 -08: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
Kubernetes Submit Queue 16a9c0b49c Merge pull request #37692 from wojtek-t/storage_resource_version_for_get
Automatic merge from submit-queue

Handle RV in Get calls to storage interface.

Ref #37473
2016-12-03 11:44:29 -08:00
Kubernetes Submit Queue 959d386ccf Merge pull request #36709 from hongchaodeng/e3
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

[etcd] test cleanup: remove unnecessary AddPrefix()

What?
Remove etcdtest.AddPrefix() in tests. They will be automatically prepended in etcd storage.

Why?
ref: #36290 #36374
After the change, it will double prepend.
2016-12-03 08:55:56 -08:00
Wojciech Tyczynski ec247315be Handle RV in Get calls to storage interface. 2016-12-03 10:18:43 +01:00
Kubernetes Submit Queue cd560926bd Merge pull request #36889 from wojtek-t/reuse_fields_and_labels
Automatic merge from submit-queue

Reuse fields and labels

This should significantly reduce memory allocations in apiserver in large cluster.
Explanation:
- every kubelet is refreshing watch every 5-10 minutes (this generally is not causing relist - it just renews watch)
- that means, in 5000-node cluster, we are issuing ~10 watches per second
- since we don't have "watch heartbets", the watch is issued from previously received resourceVersion
- to make some assumption, let's assume pods are evenly spread across pods, and writes for them are evenly spread - that means, that a given kubelet is interested in 1 per 5000 pod changes
- with that assumption, each watch, has to process 2500 (on average) previous watch events
- for each of such even, we are currently computing fields.

This PR is fixing this problem.
2016-12-02 21:49:43 -08:00
Wojciech Tyczynski 36e6cd19e1 Cache fields for filtering in watchCache. 2016-11-29 09:48:09 +01:00