Commit Graph

829 Commits

Author SHA1 Message Date
Clayton Coleman
2b76a1826e Enable paging for all list watchers
Kubernetes-commit: 500b130ff0a2c744b21cfb8e6d09e94b707dec61
2017-09-03 13:49:07 +00:00
Lucas Käldström
78f8f273df Make it possible to fake the ServerVersion in the FakeDiscovery implementation
Kubernetes-commit: 9b060faa2aaa262104a52c57d08ec67dc60949d9
2017-09-03 13:49:07 +00:00
Clayton Coleman
7b48f37a96 Add a new paging utility for client side ranging
Kubernetes-commit: fb68d1d3a7bfb69f3884db6d360816fb2e7eda1e
2017-09-03 13:49:07 +00:00
xilabao
daf8ef60c5 create the methods in the generated expansion files
Kubernetes-commit: 790374da10d3a59899ae832c24a73349b802f72b
2017-09-03 13:49:06 +00:00
Chen Rong
35d425a0d9 generated
Kubernetes-commit: ed8adf6e51d76b3652be3b433b2dab590f1ff1f0
2017-09-03 13:49:06 +00:00
Kubernetes Publisher
f95030429f Merge pull request #48287 from thockin/json-iterator
Automatic merge from submit-queue

Use json-iterator instead of ugorji for JSON.

@smarterclayton @wojtek-t

Fixes #36120
xref #18762

```release-note
Switch JSON marshal/unmarshal to json-iterator library.  Performance should be close to previous with no generated code.
```

Kubernetes-commit: 6a845c67f097cd76f9d90ab3c9c5b5603c70afe4
2017-09-01 16:20:06 +00:00
Tim Hockin
462d9adec6 Remove generated JSON code
Kubernetes-commit: 9e2fccd1de5384a6ecadf54849f612a10ecfe93a
2017-09-01 16:19:32 +00:00
Kubernetes Publisher
8fd8317e74 sync: reset Godeps/Godeps.json 2017-09-01 16:19:32 +00:00
Kubernetes Publisher
1d8640158d Merge pull request #51381 from mengqiy/debug_kubectl_get_cm
Automatic merge from submit-queue (batch tested with PRs 50719, 51216, 50212, 51408, 51381)

Surface reasonable error when connection closed

Try to detect connection closure when API server closed the connection due to timeout.
Surface reasonable error when connection closed.

Further improvement may be retrying when detect connection closure

related to #51353

```release-note
Surface reasonable error when client detects connection closed.
```

/assign @mml @caesarxuchao

Kubernetes-commit: 1a3a0713b218566be951fabd5d87184c2e240329
2017-08-31 21:09:19 -07:00
Kubernetes Publisher
00f65f7d44 Merge pull request #50404 from apelisse/http-cache
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404)

Kubectl to use http caching to cache openapi responses from the server

**What this PR does / why we need it**:

This PR is trying to address the problems raised in #50254

> * uses a disk-based cache that is not safe between processes (does not use atomic fs operations)
> * writes get/list responses to disk that should not be cached (like kubectl get secrets)
> * is vulnerable to partially written cache responses being used as responses to future requests
> * breaks uses of the client transport that make use of websockets
> * defaults to enabling the cache for any client builder using RecommendedConfigOverrideFlags or DefaultClientConfig which affects more components than just kubectl

All of these points are addressed by this pull-request:
1. It now uses atomic fs operations
2. Doesn't cache by default, only if requested by the client (and it's only done by openapi client)
3. Fixed because of atomic fs operations
4. Found the reason for the bug: Cache wrapper couldn't be unwrapped. I implemented the `WrappedRoundTripper` interface.
5. Since 2. is fixed, I think that should be fine

@smarterclayton @liggitt

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50254

**Special notes for your reviewer**:

**Release note**:

```release-note
Allows kubectl to use http caching mechanism for the OpenAPI schema. The cache directory can be configured through `--cache-dir` command line flag to kubectl. If set to empty string, caching will be disabled.
```

Kubernetes-commit: 0f2c2bd847ca7a66035b2289e83359ef4c923617
2017-09-01 16:19:32 +00:00
ymqytw
f62736c05e return reasonable error when connection closed
Kubernetes-commit: 4de18dec2ba284657c89f7b6e1074385dc1d1baf
2017-09-01 16:19:32 +00:00
Antoine Pelisse
2ed3ee4524 client-go cache: Make caching layer Unwrappable
Kubernetes-commit: a804d440c3dfab8820c7f2d231dcaecb201be7b5
2017-09-01 16:19:00 +00:00
Antoine Pelisse
0b7513368a c-go cache: Use diskv TempDir to get atomic write
Kubernetes-commit: e58da7bb7c1800ffd4f24cf77c2e3f3cdfcdf906
2017-09-01 16:19:00 +00:00
Antoine Pelisse
1429110930 c-go cache: Only cache discovery requests
Only cache discovery requests, and only for kubectl.

Kubernetes-commit: a97a1ba14e06ce9dadf0d1e8ea35083842678576
2017-09-01 16:19:00 +00:00
Antoine Pelisse
e3b9d1a520 c-go: Update diskv to get atomic fs cache write
Kubernetes-commit: 30325cd580af08e13a0ebc89252842eb955fd94e
2017-09-01 16:19:00 +00:00
Antoine Pelisse
928f5804e3 Revert "Revert "Merge pull request #47353 from apelisse/http-cache""
This reverts commit 4ee72eb300423772020dd1cf208159058ba7dab5.

Kubernetes-commit: 332b681bd1d961e2cee16bca10784088a8d308f1
2017-09-01 16:19:00 +00:00
Kubernetes Publisher
1ceb9f71e1 sync: reset Godeps/Godeps.json 2017-09-01 16:19:00 +00:00
Kubernetes Publisher
17da6b01b2 Merge pull request #50775 from apelisse/fail-gke-failing-test
Automatic merge from submit-queue

client-go: Make conditionalTransport a WrapperRoundTripper

**What this PR does / why we need it**:
Fixes broken GKE test: https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/logs/ci-kubernetes-e2e-gke/

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```

Kubernetes-commit: a9cceacdaea72d505d8827521f70123c8c2bbd73
2017-09-01 16:18:59 +00:00
Antoine Pelisse
fc47db2e7e client-go: Update RoundTrippers to be Unwrappable
Kubernetes-commit: fd5775c192fb4d47250a2d99f3e022acb1c7c0f0
2017-09-01 16:18:59 +00:00
wackxu
d31224ad22 add verify case in index_test.go
Kubernetes-commit: 4ab3f4500164d9a15628c4646810f67b37e57023
2017-09-01 10:03:08 +08:00
Kubernetes Publisher
db8228460e Merge pull request #51467 from liggitt/client-go-owner
Automatic merge from submit-queue

Add liggitt to client-go approvers

/assign @lavalamp
/assign @deads2k

Kubernetes-commit: a64eeb47f6ed4aa2587113793a76878b876809f9
2017-08-29 12:54:04 +00:00
Kubernetes Publisher
2554b0b462 Merge pull request #50562 from atlassian/call-cleanup-properly
Automatic merge from submit-queue (batch tested with PRs 51134, 51122, 50562, 50971, 51327)

Call the right cleanup function

**What this PR does / why we need it**:
`defer cleanup()` will always call the function that was returned by the first call to `r.resyncChan()` but it should call the one returned by the last call.

**Special notes for your reviewer**:
This will print `c1`, not `c2`. See https://play.golang.org/p/FDjDbUxOvI
```go
func main() {
	var c func()
	c = c1
	defer c()
	c = c2
}

func c1 () {
	fmt.Println("c1")
}

func c2 () {
	fmt.Println("c2")
}
```

**Release note**:
```release-note
NONE
```
/kind bug
/sig api-machinery

Kubernetes-commit: ccae631ff9d82e302631fc7f1965a09c4e1e9f56
2017-08-29 12:54:04 +00:00
Jordan Liggitt
83f7b229ea Add liggitt to client-go approvers
Kubernetes-commit: 838d8a72740ba8f85103bb9dc352f6c8588a977e
2017-08-29 12:54:04 +00:00
Kubernetes Publisher
e1798d5fa2 Merge pull request #51154 from RenaudWasTaken/gRPC-updated-1-3-0
Automatic merge from submit-queue (batch tested with PRs 51193, 51154, 42689, 51189, 51200)

Bumped gRPC version to 1.3.0

**What this PR does / why we need it**:

This PR bumps down the version of the vendored version of gRPC from v1.5.1 to v1.3.0
This is needed as part of the Device Plugin API where we expect client and server to use the Keep alive feature in order to detect an error.

Unfortunately I had to also bump the version of `golang.org/x/text` and `golang.org/x/net`.

- Design document: kubernetes/community#695
- PR tracking: [kubernetes/features#368](https://github.com/kubernetes/features/issues/368#issuecomment-321625420)

**Which issue this PR fixes**: fixes #51099
Which was caused by my previous PR updating to 1.5.1

**Special notes for your reviewer**:
@vishh @jiayingz @shyamjvs

**Release note**:
```
Bumped gRPC to v1.3.0
```

Kubernetes-commit: 5fb38a325efb343c2a0467a12732829bd5ed3c3c
2017-08-29 12:54:04 +00:00
Mikhail Mazurskiy
174c4c21d7 Call the right cleanup function
Kubernetes-commit: 1ab88c94e8e3b9ccfe16b2b0dbf26f688be1d4df
2017-08-29 12:54:04 +00:00
Kubernetes Publisher
8797b732d6 Merge pull request #51109 from kubernetes/revert-50531-gRPC-keep-alive-godeps
Automatic merge from submit-queue

Revert "Updated gRPC vendoring to support Keep Alive"

Reverts kubernetes/kubernetes#50531

Ref - https://github.com/kubernetes/kubernetes/issues/51099

/cc @wojtek-t @RenaudWasTaken

Kubernetes-commit: b0ad3a1c5d56c9129ea389fe7456dfe75be4ce72
2017-08-29 12:53:33 +00:00
Renaud Gaubert
4df9860776 Bumped gRPC version to 1.3.0
Kubernetes-commit: 1daaeb352f87399a4967b7ad72228e84a32f1e90
2017-08-29 12:53:33 +00:00
Kubernetes Publisher
ee3e658398 sync: reset Godeps/Godeps.json 2017-08-29 12:53:33 +00:00
Shyam JVS
273e78d7c8 Revert "Updated gRPC vendoring to support Keep Alive"
Kubernetes-commit: 3b014e103b2dc3fca76847ddf852a1dfd8a2be99
2017-08-29 12:53:02 +00:00
Kubernetes Publisher
863a062955 sync: reset Godeps/Godeps.json 2017-08-29 12:53:02 +00:00
NickrenREN
40083c8b91 Import gophercloud package first
Kubernetes-commit: 0c7d7becf8d1cb7a4ee1c8495c19afd644784cd1
2017-08-28 22:15:03 +08:00
Kubernetes Publisher
807ac87af2 Merge pull request #51030 from ncdc/ncdc-owners
Automatic merge from submit-queue

Add ncdc to client-go/tools/cache OWNERS

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>

@kubernetes/sig-api-machinery-misc @lavalamp @smarterclayton @deads2k @sttts @liggitt @caesarxuchao @cheftako any objections?

Kubernetes-commit: 07dea6b4470f4f09ec0e42fed7d513e7245a5cf9
2017-08-21 19:10:23 -07:00
Kubernetes Publisher
989de02eb2 Merge pull request #50531 from NVIDIA/gRPC-keep-alive-godeps
Automatic merge from submit-queue (batch tested with PRs 50531, 50853, 49976, 50939, 50607)

Updated gRPC vendoring to support Keep Alive

**What this PR does / why we need it**:

This PR bumps the version of the vendored version of gRPC from v1.0.4 to v1.5.1
This is needed as part of the Device Plugin API where we expect client and server to use the Keep alive feature in order to detect an error.

Unfortunately I had to also bump the version of `golang.org/x/text` and `golang.org/x/net`.

- Design document: kubernetes/community#695
- PR tracking: [kubernetes/features#368](https://github.com/kubernetes/features/issues/368#issuecomment-321625420)

**Special notes for your reviewer**:
@vishh @jiayingz

**Release note**:
```
Bumped gRPC from v1.0.4 to v1.5.1
```

Kubernetes-commit: 967c19df4916160d4d4fbd9a65bad41a53992de8
2017-08-29 12:53:02 +00:00
Andy Goldstein
97bf9e0e35 Add ncdc to client-go/tools/cache OWNERS
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>

Kubernetes-commit: 49bef684d3adc28fedf940d20fb9a2ae58c12c1b
2017-08-29 12:53:02 +00:00
Renaud Gaubert
97b64b59a9 Updated gRPC version to support Keep Alive
Kubernetes-commit: faee6d6d5d0bf6d753a60c1338c6fbf17a2d956d
2017-08-29 12:52:28 +00:00
Kubernetes Publisher
5b8c25a312 sync: reset Godeps/Godeps.json 2017-08-29 12:52:28 +00:00
Kubernetes Publisher
1dd484c969 Merge pull request #50871 from liyinan926/lister-v1beta2
Automatic merge from submit-queue (batch tested with PRs 50693, 50831, 47506, 49119, 50871)

Added lister expansions for DaemonSet, Deployment, ReplicaSet, and StatefulSet for apps/v1beta2

**What this PR does / why we need it**:
This PR copies list expansions for  `DaemonSet`, `Deployment`, `ReplicaSet`, and `StatefulSet` to `apps/v1beta2` from `extensions/v1beta1` and `apps/v1beta1`.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50870.

**Special notes for your reviewer**:
@kow3ns @janetkuo 

**Release note**:
```release-note
NONE
```

Kubernetes-commit: 5c03d3759d7a9065b0b67b1cfb4bc8ee095cd639
2017-08-21 14:30:06 -07:00
Yinan Li
b511eba3ca Added lister expansions for DaemonSet, Deployment, ReplicaSet, and
StatefulSet for apps/v1beta2

Kubernetes-commit: 5cb7ddbf54c0ce4a37ea2e99735abb1abafc6d97
2017-08-29 12:52:28 +00:00
Kubernetes Publisher
600e2800bb Merge pull request #50631 from luxas/kubeadm_dryrun_apiclient
Automatic merge from submit-queue (batch tested with PRs 47896, 50678, 50620, 50631, 51005)

kubeadm: Adds dry-run support for kubeadm using the `--dry-run` option

**What this PR does / why we need it**:

Adds dry-run support to kubeadm by creating a fake clientset that can get totally fake values (like in the init case), or delegate GETs/LISTs to a real API server but discard all edits like POST/PUT/PATCH/DELETE

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

fixes: https://github.com/kubernetes/kubeadm/issues/389

**Special notes for your reviewer**:

This PR depends on https://github.com/kubernetes/kubernetes/pull/50626, first three commits are from there
This PR is a dependency for https://github.com/kubernetes/kubernetes/pull/48899 (kubeadm upgrades)

I have some small things to fixup and I'll yet write unit tests, but PTAL if you think this is going in the right direction

**Release note**:

```release-note
kubeadm: Adds dry-run support for kubeadm using the `--dry-run` option
```
cc @kubernetes/sig-cluster-lifecycle-pr-reviews @kubernetes/sig-api-machinery-pr-reviews

Kubernetes-commit: d852b8aad9397f530967b2b310a87966eb8b7e87
2017-08-21 08:26:26 -07:00
Kubernetes Publisher
f96ed3fc69 Merge pull request #50146 from gmarek/deepcopyinto
Automatic merge from submit-queue (batch tested with PRs 46512, 50146)

Make metav1.(Micro)?Time functions take pointers

Is there any reason for those functions not to be on pointers?

Kubernetes-commit: b59ad9cbfff866093a6c0ee26c3562e9ec9133e4
2017-08-29 12:52:28 +00:00
Lucas Käldström
1bc6d1247e kubeadm: Adds dry-run support for kubeadm using the '--dry-run' option
Kubernetes-commit: 0bf84aa182449ab51cbb5f819da3fbcad19690a2
2017-08-29 12:52:28 +00:00
Kubernetes Publisher
0f0bf98750 Merge pull request #50698 from liyinan926/cr-v1beta2
Automatic merge from submit-queue (batch tested with PRs 50563, 50698, 50796)

Add ControllerRevision to apps/v1beta2

**What this PR does / why we need it**:
This PR added `ControllerRevision` currently in `apps/v1beta1` to `apps/v1beta2`.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50696.

**Special notes for your reviewer**:
@kow3ns @janetkuo

**Release note**:
```release-note
Add ControllerRevision to apps/v1beta2
```

Kubernetes-commit: 9d302ecffae53962d012659ef048c11b37de0ee6
2017-08-29 12:52:27 +00:00
gmarek
890c48c52e Make metav1.(Micro)?Time functions take pointers
Kubernetes-commit: 0504cfbc2556155c31e5db43673d6b903c64dfa2
2017-08-29 12:52:27 +00:00
Yinan Li
c16edbc0b0 Added auto-generated changes
Kubernetes-commit: 3b4f263b6706415c97e42cf7e1772f79a2d180db
2017-08-29 12:52:27 +00:00
Kubernetes Publisher
660679d0b8 Merge pull request #41901 from soltysh/cronjobs_beta
Automatic merge from submit-queue

Promote CronJobs to batch/v1beta1 - just the API

This PR promotes CronJobs to beta.

@erictune @kubernetes/sig-apps-api-reviews @kubernetes/api-approvers ptal

This builds on top of #41890 and needs #40932 as well

```release-note
Promote CronJobs to batch/v1beta1.
```

Kubernetes-commit: 4032896ef17dd8346b597c38ba66e0d9eb1547a3
2017-08-16 15:59:46 -07:00
Kubernetes Publisher
ae992f7e2c Merge pull request #50204 from smarterclayton/move_list_to_metav1
Automatic merge from submit-queue (batch tested with PRs 50711, 50742, 50204)

Move List (the type) into metav1 but preserve the exposed type

Make a list something that other components can use without depending on the core API. This does not change the public API exposure of `List` (it is still in `v1`) but makes the interface common across both.

Kubernetes-commit: 49ed2a3115d33a78291c92b3ffda5acbe59e6d4a
2017-08-29 12:52:27 +00:00
Maciej Szulik
e60e32ff02 Generated changes for CronJobs in batch/v1beta1
Kubernetes-commit: 025de6a35ab0aab6fe4f01108660095f10383d2e
2017-08-29 12:52:27 +00:00
Kubernetes Publisher
b1046943dc Merge pull request #50639 from simo5/setheader
Automatic merge from submit-queue (batch tested with PRs 50023, 50639)

Extend SetHeader Requests method ito accept multiple values

This allows to set headers that are multivalued directly.
The headers variable is not directly accessible and currently
SetHeaders allows to set only one value.

```release-note
NONE
```

Kubernetes-commit: 039f898c07a643d6ef244fcb65daff5a53de41c8
2017-08-29 12:52:26 +00:00
Clayton Coleman
32ad290dcb Move List (the type) into metav1 but preserve the exposed type
Kubernetes-commit: 1b3836d5df302281a9db4b03bdc8fd5079142431
2017-08-29 12:52:26 +00:00
Kubernetes Publisher
4de1c5fff8 Merge pull request #47011 from mengqiy/kubectl_extraction
Automatic merge from submit-queue

move retry to client-go

Move `k8s.io/kubernetes/pkg/client/retry` to `k8s.io/client-go/util/retry`.

Part of a series of PRs to address kubernetes/community#598

```release-note
NONE
```

Kubernetes-commit: 37ab30f24ccac3105c4570e865e11ddc3ddcb1c9
2017-08-29 12:52:26 +00:00