Commit Graph

661 Commits

Author SHA1 Message Date
Kubernetes Publisher
bae75f0568 fix the webhook unit test; the server cert needs to have a valid CN;
fix a fuzzer;

Kubernetes-commit: 856a1db57a05e19ea6261e38211d2ab1bf864dd1
2017-09-22 11:22:07 +00:00
Kubernetes Publisher
baf97d23c3 plumb the proxyTransport to the webhook admission plugin;
set the ServerName in the config for webhook admission plugin.

Kubernetes-commit: 186a0684d582272aa2fbfec390aea5fbb88a8bc6
2017-09-22 11:22:07 +00:00
Kubernetes Publisher
0fd8a31bad Merge pull request #50012 from deads2k/cli-17-discovery
Automatic merge from submit-queue

use specified discovery information if possible

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

This uses the available discovery information if available, but it seems we never updated "normal" resources to show the singular name, so its often not available.  I've left this code compatible.

@enisoc @ash2k
@kubernetes/sig-api-machinery-misc

```release-note
custom resources that use unconventional pluralization now work properly with kubectl and garbage collection
```

Kubernetes-commit: e190f391129260527c119fe319216212c916ae5d
2017-09-22 11:22:07 +00:00
Kubernetes Publisher
06d5d62599 Merge pull request #52227 from liggitt/non-preferred-version-priority
Automatic merge from submit-queue (batch tested with PRs 52227, 52120)

Fix discovery restmapper finding resources in non-preferred versions

Fixes: #52219

Also reverts behavioral changes to tests that version-qualified cronjobs to work around this issue.

The discovery rest mapper was only populating the priority rest mapper's search list with preferred groupversions.

That meant that if a resource existed in multiple non-preferred versions, AND did not exist in the preferred version (like cronjob, which only exists in v1beta2.batch and v2alpha1.batch, but not v1.batch), the priority restmapper would not find it in its group/version priority list, and would return an error.

```release-note
Fixed an issue looking up cronjobs when they existed in more than one API version
```

Kubernetes-commit: 77e660ed15e927e4e901f42bb3f6790775f8107d
2017-09-22 11:22:07 +00:00
Kubernetes Publisher
cecfce38a7 use specified discovery information if possible
Kubernetes-commit: 1c8a9e406054e4163b8c81176f14478272ebf767
2017-09-22 11:22:07 +00:00
Kubernetes Publisher
7a2d69e09e Fix discovery restmapper finding resources in non-preferred versions
Kubernetes-commit: a6316fb3a525a6a88ca74cfa76c2892455fcf832
2017-09-22 11:22:06 +00:00
Kubernetes Publisher
c6f8cf2c47 sync: update godeps 2017-09-09 21:30:45 +00:00
Kubernetes Publisher
fa6f560e89 Merge pull request #51876 from smarterclayton/disable_client_paging
Automatic merge from submit-queue (batch tested with PRs 48552, 51876)

Disable default paging in list watches

For 1.8 this will be off by default. In 1.9 it will be on by default.
Add tests and rename some fields to use the `chunking` terminology.

Note that the pager may be used for other things besides chunking.

Follow on to #48921, we left the field on to get some exercise in the normal code paths, but needs to be disabled for 1.8.

@liggitt let's merge on wednesday.

Kubernetes-commit: eda3db550bd72499d735938a1911f9f7e88870f8
2017-09-09 21:30:07 +00:00
Clayton Coleman
f549520368 Disable default paging in list watches
For 1.8 this will be off by default. In 1.9 it will be on by default.
Add tests and rename some fields to use the `chunking` terminology.

Note that the pager may be used for other things besides chunking.

Kubernetes-commit: 8b571bb63bd8a9a6a37db6046a6ab35d3b047bf4
2017-09-09 21:30:07 +00:00
Kubernetes Publisher
4e283c96d6 Merge pull request #50708 from DirectXMan12/versions/autoscaling-v2beta1
Automatic merge from submit-queue (batch tested with PRs 51956, 50708)

Move autoscaling/v2 from alpha1 to beta1

This graduates autoscaling/v2alpha1 to autoscaling/v2beta1.  The move is more-or-less just a straightforward rename.

Part of kubernetes/features#117

```release-note
v2 of the autoscaling API group, including improvements to the HorizontalPodAutoscaler, has moved from alpha1 to beta1.
```

Kubernetes-commit: 3168bd4b123629d7d33ee976437175d8cde5f0cc
2017-09-09 21:30:06 +00:00
Solly Ross
561701ed84 Move Autoscaling v2{alpha1 --> beta1}
This commit renames autoscaling/v2alpha1 to autoscaling/v2beta1.
Only the API-related code is moved in this commit.

Kubernetes-commit: b0af4024753bd0eac43a57282b3f6414488db299
2017-09-09 21:30:06 +00:00
Kubernetes Publisher
bf0966b346 Merge pull request #51795 from dims/bug-fix-51755
Automatic merge from submit-queue (batch tested with PRs 51984, 51351, 51873, 51795, 51634)

Bug Fix - Adding an allowed address pair wipes port security groups

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

Fix for cloud routes enabled instances will have their security groups
removed when the allowed address pair is added to the instance's port.

Upstream bug report is in:
https://github.com/gophercloud/gophercloud/issues/509

Upstream bug fix is in:
https://github.com/gophercloud/gophercloud/pull/510

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

Fixes #51755

**Special notes for your reviewer**:

Just an fix in vendored code. minimal changes needed in OpenStack cloud provider

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 9a8cb435b77085fa7d518c4428a02eae316b1003
2017-09-06 13:50:12 +00:00
Kubernetes Publisher
aa671fcc5b Merge pull request #51751 from dashpole/update_cadvisor_godep
Automatic merge from submit-queue (batch tested with PRs 51186, 50350, 51751, 51645, 51837)

Update Cadvisor Dependency

Fixes: https://github.com/kubernetes/kubernetes/issues/51832
This is the worst dependency update ever...
The root of the problem is the [name change of Sirupsen -> sirupsen](https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276).  This means that in order to update cadvisor, which venders the lowercase, we need to update all dependencies to use the lower-cased version.  With that being said, this PR updates the following packages:

`github.com/docker/docker`
- `github.com/docker/distribution`
  - `github.com/opencontainers/go-digest`
  - `github.com/opencontainers/image-spec`
  - `github.com/opencontainers/runtime-spec`
  - `github.com/opencontainers/selinux`
  - `github.com/opencontainers/runc`
    - `github.com/mrunalp/fileutils`
  - `golang.org/x/crypto`
    - `golang.org/x/sys`
- `github.com/docker/go-connections`
- `github.com/docker/go-units`
- `github.com/docker/libnetwork`
- `github.com/docker/libtrust`
- `github.com/sirupsen/logrus`
- `github.com/vishvananda/netlink`

`github.com/google/cadvisor`
- `github.com/euank/go-kmsg-parser`

`github.com/json-iterator/go`

Fixed https://github.com/kubernetes/kubernetes/issues/51832

```release-note
Fix journalctl leak on kubelet restart
Fix container memory rss
Add hugepages monitoring support
Fix incorrect CPU usage metrics with 4.7 kernel
Add tmpfs monitoring support
```

Kubernetes-commit: 99aa992ce845fe947a406ac4d3f99d2208f0416b
2017-09-06 13:49:43 +00:00
Davanum Srinivas
d26bea504f Bug Fix - Adding an allowed address pair wipes port security groups
Fix for cloud routes enabled instances will have their security groups
removed when the allowed address pair is added to the instance's port.

Upstream bug report is in:
https://github.com/gophercloud/gophercloud/issues/509

Upstream bug fix is in:
https://github.com/gophercloud/gophercloud/pull/510

Kubernetes-commit: 74a3d89ad4ff1508a16bacb0c333a1f795c31470
2017-09-06 13:49:43 +00:00
Kubernetes Publisher
4bea3a5096 sync: reset Godeps/Godeps.json 2017-09-06 13:49:43 +00:00
David Ashpole
8e9c6b2322 update cadvisor, docker, and runc godeps
Kubernetes-commit: e5a6a79fd75372fcc7fa32ccf8d80ed9e0335b17
2017-09-06 13:49:15 +00:00
Kubernetes Publisher
5859689dc3 sync: reset Godeps/Godeps.json 2017-09-06 13:49:15 +00:00
Kubernetes Publisher
bac0212263 Merge pull request #47367 from derekwaynecarr/event-spam
Automatic merge from submit-queue

Add client side event spam filtering

**What this PR does / why we need it**:
Add client side event spam filtering to stop excessive traffic to api-server from internal cluster components.

this pr defines a per source+object event budget of 25 burst with refill of 1 every 5 minutes.

i tested this pr on the following scenarios:

**Scenario 1: Node with 50 crash-looping pods**
```
$ create 50 crash-looping pods on a single node
$ kubectl run bad --image=busybox --replicas=50 --command -- derekisbad
```
Before:
* POST events with peak of 1.7 per second, long-tail: 0.2 per second
* PATCH events with peak of 5 per second, long-tail: 5 per second

After:
* POST events with peak of 1.7 per second, long-tail: 0.2 per second
* PATCH events with peak of 3.6 per second, long-tail: 0.2 per second

Observation:
* https://github.com/kubernetes/kubernetes/pull/47462 capped the number of total events in the long-tail as expected, but did nothing to improve total spam of master.

**Scenario 2: replication controller limited by quota**
```
$ kubectl create quota my-quota --hard=pods=1
$ kubectl run nginx --image=nginx --replicas=50
```
Before:
* POST events not relevant as aggregation worked well here.
* PATCH events with peak and long-tail of 13.6 per second

After:
* POST events not relevant as aggregation worked well here.
* PATCH events with peak: .35 per second, and long-tail of 0

**Which issue this PR fixes**
fixes https://github.com/kubernetes/kubernetes/issues/47366

**Special notes for your reviewer**:
this was a significant problem in a kube 1.5 cluster we are running where events were co-located in a single etcd.  this cluster was normal to have larger numbers of unhealty pods as well as denial by quota.

**Release note**:
```release-note
add support for client-side spam filtering of events
```

Kubernetes-commit: 870406bec5b6e071c3854298bd357629b2939f7c
2017-09-05 13:48:56 +00:00
Derek Carr
170149c11b Add client side event rate limiting
Kubernetes-commit: b62fa1d72855ef1eb02ec2c908b16b7477feb3b1
2017-09-05 13:48:55 +00:00
Kubernetes Publisher
a18b27ec1f Merge pull request #51868 from sttts/sttts-fix-client-go-build
Automatic merge from submit-queue (batch tested with PRs 51845, 51868, 51864)

client-go: fix 'go build ./...'

Kubernetes-commit: 0f8febf1b42c0de19b4728a15dea3d06a2b67e34
2017-09-04 13:49:16 +00:00
Kubernetes Publisher
4d791e3272 Merge pull request #51638 from mfojtik/client-gen-custom-methods
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Allow custom client verbs to be generated using client-gen

This change will allow to define custom verbs for resources using the following new tag:

```
// +genclient:method=Foo,verb=create,subresource=foo,input=Bar,output=k8s.io/pkg/api.Blah
```

This will generate client method `Foo(bar *Bar) (*api.Blah, error)` (format depends on the particular verb type)

With this change we can add `UpdateScale()` and `GetScale()` into all scalable resources. Note that intention of this PR is not to fix the Scale(), but that is used as an example of this new capability.
Additionally this will also allow us to get rid of `// +genclient:noStatus` and fix guessing of the "updateStatus" subresource presence based on the existence of '.Status' field.
Basically you will have to add following into all types you want to generate `UpdateStatus()` for:

```
// +genclient:method=UpdateStatus,verb=update,subresource=status
```

This allows further extension of the client without writing an expansion (which proved to be pain to maintain and copy...). Also allows to customize native CRUD methods if needed (input/output types).

```release-note
NONE
```

Kubernetes-commit: bee221cca98f1ebf0d46e18d58ecd309bf4f6199
2017-09-04 13:49:16 +00:00
Dr. Stefan Schimanski
bab8392c82 client-go: fix 'go build ./...'
Test-only directories seem to confuse go-build and make it fail. We do this as
a smoke test in the github publishing bot.

Kubernetes-commit: 48cba8a44f94d70cf2ff0ed4fb765c84da8519a6
2017-09-04 13:49:16 +00:00
Michal Fojtik
e748549190 generate UpdateScale and GetScale verbs for scalable resources
Kubernetes-commit: 7d2be1c521dc7f93ae3f83dd123199963598c938
2017-09-04 13:49:16 +00:00
Michal Fojtik
ab00972686 update bazel
Kubernetes-commit: ba731a6ccaaae3ad2c31a6d35df849c00c7f0d4d
2017-09-04 13:49:16 +00:00
Michal Fojtik
bf85a9d89b add missing sub-resources test actions
Kubernetes-commit: c026b62d19d83d4f68235d1bd039a469e87d215d
2017-09-04 13:49:16 +00:00
Kubernetes Publisher
74549f85f4 Merge pull request #50579 from erhudy/bugfix/29271-accept-prefixed-namespaces
Automatic merge from submit-queue

Fixes kubernetes/kubernetes#29271: accept prefixed namespaces

**What this PR does / why we need it**: `kubectl get namespaces -o name` outputs the names of all namespaces, prefixed with `namespaces/`. This changeset allows these namespace names to be passed directly back in to `kubectl` via the `-n` flag without reprocessing them to remove `namespaces/`.

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

**Special notes for your reviewer**:

**Release note**:

```NONE
```

Kubernetes-commit: ab27bc9e6e020fc475b4872a6c049ac7fe91edbb
2017-09-03 08:33:24 -07:00
Edmund Rhudy
d779598b40 Update Bazel configuration for flag.go and overrides_test.go
Kubernetes-commit: 0d0591046c3ea7780600746846e64c2a7abbf1fe
2017-09-04 13:49:15 +00:00
Edmund Rhudy
6316abbfad Add tests for stripping "namespaces/" from passed-in namespace
Kubernetes-commit: 33dff7275da46788ab4126e269a497da9c1c8003
2017-09-04 13:49:15 +00:00
Jordan Liggitt
809288e704 Allow -n namespaces/<ns>
Kubernetes-commit: 666e4be37bab925d0842935bccd3ef849d802608
2017-09-04 13:49:15 +00:00
Kubernetes Publisher
568b669bea sync: update godeps 2017-09-03 13:50:06 +00:00
Kubernetes Publisher
8466173067 Merge pull request #50497 from dixudx/kubectl-include-uninitialized
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

Introduce new flag "--include-uninitialized" to kubectl

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

Introduce `--include-uninitialized` as a global flag to kubectl

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

**Special notes for your reviewer**:
/assign @caesarxuchao @smarterclayton @ahmetb @deads2k

**Release note**:

```release-note
Add flag "--include-uninitialized" to kubectl annotate, apply, edit-last-applied, delete, describe, edit, get, label, set. "--include-uninitialized=true" makes kubectl commands apply to uninitialized objects, which by default are ignored if the names of the objects are not provided. "--all" also makes kubectl commands apply to uninitialized objects. Please see the [initializer](https://kubernetes.io/docs/admin/extensible-admission-controllers/) doc for more details.
```

Kubernetes-commit: 5c0b265a9bd7213749460ec44da30571adafdb27
2017-09-03 13:49:08 +00:00
Kubernetes Publisher
1213be369b Merge pull request #48921 from smarterclayton/paging_prototype
Automatic merge from submit-queue (batch tested with PRs 50832, 51119, 51636, 48921, 51712)

Alpha list paging implementation

Design in kubernetes/community#896

Support `?limit=NUMBER`, `?continue=CONTINUATIONTOKEN`, and a `continue` field
on ListMeta and pass through to etcd. Perform minor validation as an example.

```
# first out of three
$ curl http://127.0.0.1:8080/api/v1/namespaces?limit=1
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "146",
    "next": "ZGVmYXVsdA"
  },
  "items": [
    {
      "metadata": {
        "name": "default",
        "selfLink": "/api/v1/namespaces/default",
        "uid": "f95e1390-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "4",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
...
# last
$ curl "http://127.0.0.1:8080/api/v1/namespaces?limit=1&continue=a3ViZS1wdWJsaWM"
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "145"
  },
  "items": [
    {
      "metadata": {
        "name": "kube-system",
        "selfLink": "/api/v1/namespaces/kube-system",
        "uid": "f95e9484-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "5",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
```

Kubernetes-commit: 35ffb5c6cf70974c0a571cd1ebdc72ad8d0f8332
2017-09-03 13:49:08 +00:00
Di Xu
994192e4fe kubectl add global flag --include-uninitialized
Kubernetes-commit: 789a95971d46589fd8dd7cd4fa8ac8903189b961
2017-09-03 13:49:08 +00:00
Kubernetes Publisher
48ade6dd30 Merge pull request #51130 from luxas/fake_discovery
Automatic merge from submit-queue (batch tested with PRs 51335, 51364, 51130, 48075, 50920)

Add the possibility to set return values for the FakeDiscovery implementation

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

As an user of the fake clientset (with the fake discovery), I want to be able to set the fake server's version on demand like this for example:

```go
func TestFakingServerVersion(t *testing.T) {
	client := fakeclientset.NewSimpleClientset()
	fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery)
	if !ok {
		t.Fatalf("couldn't convert Discovery() to *FakeDiscovery")
	}

	testGitCommit := "v1.0.0"
	fakeDiscovery.FakedServerVersion = &version.Info{
		GitCommit: testGitCommit,
	}

	sv, err := client.Discovery().ServerVersion()
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	if sv.GitCommit != testGitCommit {
		t.Fatalf("unexpected faked discovery return value: %q", sv.GitCommit)
	}
}
```

This PR makes that possible, in wait for a more sophisticated FakeDiscovery implementation generally.

**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/sig-api-machinery-pr-reviews

Kubernetes-commit: 94d9457e4e4786b735c5be1224f831c6010691b5
2017-09-03 13:49:07 +00:00
Clayton Coleman
6adf847055 Server side implementation of paging for etcd3
Add a feature gate in the apiserver to control whether paging can be
used. Add controls to the storage factory that allow it to be disabled
per resource. Use a JSON encoded continuation token that can be
versioned. Create a 410 error if the continuation token is expired.

Adds GetContinue() to ListMeta.

Kubernetes-commit: 8952a0cb722b77459cf2701632a30f5b264f5aba
2017-09-03 13:49:07 +00:00
Kubernetes Publisher
2074f53993 Merge pull request #48051 from xilabao/add-selfsubjectrulesreview-api
Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

Add selfsubjectrulesreview in authorization

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

**Which issue this PR fixes**: fixes #47834 #31292

**Special notes for your reviewer**:

**Release note**:

```release-note
Add selfsubjectrulesreview API for allowing users to query which permissions they have in a given namespace.
```
/cc @deads2k @liggitt

Kubernetes-commit: c84b3132a2f1c784447ed6f405be9fe9a601d423
2017-09-03 13:49:07 +00:00
Lucas Käldström
0c6cc8dd98 autogenerated code
Kubernetes-commit: e1cff67aa608723005eabf2e70333d14f6d40586
2017-09-03 13:49:07 +00:00
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