Compare commits

..

11 Commits

Author SHA1 Message Date
Kubernetes Publisher
b0722d92a7 Fix Godeps.json to point to kubernetes-1.10.5 tags 2018-06-21 15:29:33 +00:00
Kubernetes Publisher
a312bfe35c Merge pull request #65157 from caesarxuchao/cherrypick-65034-1.10
Automatic merge from submit-queue.

Manually cherrypick #65034 to 1.10

Manually cherrypicking #65034. Using hack/cherry_pick_pull.sh to cherrypick is difficult because that requires cherrypicking #63059 first.

This PR imported the latest jsoniterator library so that case sensitivity during unmarhsaling is optional. The PR also set Kubernetes json serializer to be case sensitive.

Fix #64612.

```release-notes
Kubernetes json deserializer is now case-sensitive to restore compatibility with pre-1.8 servers.
If your config files contains fields with wrong case, the config files will be now invalid.
```

Kubernetes-commit: 32ac1c9073b132b8ba18aa830f46b77dcceb0723
2018-06-19 23:27:44 +00:00
Chao Xu
805e310466 use the latest json-iter
Kubernetes-commit: 0bf82f28ff092cd2a2efea324a139b4a1bd9f436
2018-06-15 10:46:42 -07:00
Kubernetes Publisher
26a26f55b2 Merge pull request #63448 from dims/automated-cherry-pick-of-#62505-upstream-release-1.10
Automatic merge from submit-queue.

Automated cherry pick of #62505: update godeps to use latest pflag

Cherry pick of #62505 on release-1.10.

#62505: update godeps to use latest pflag

```release-note
Show help for deprecated Kubelet flags
```

Kubernetes-commit: 8959a0aa87adf07c4ff821bf6d79714b3d615e8a
2018-06-01 18:43:21 +00:00
Kubernetes Publisher
0be17c78bf Merge pull request #63627 from roycaihw/release-1.10
Automatic merge from submit-queue.

Manual cherrypick of kube-openapi changes for release-1.10

**What this PR does / why we need it**:
Cherry-picks kubernetes/kube-openapi#64 and kubernetes/kube-openapi#67
Fixes bugs that make apiserver panic when aggregating valid but not well formed OpenAPI spec (with empty `Paths`/`Definitions`)

**Release note**:

```release-note
Fixes bugs that make apiserver panic when aggregating valid but not well formed OpenAPI spec
```

/cc @MaciekPytel
/sig api-machinery

Kubernetes-commit: 42b63c8b19d1ad96399ec3f5a409da67e2fd19bd
2018-05-15 18:50:12 +00:00
Haowei Cai
1d79704297 generated
Kubernetes-commit: 56d903a426f6cdaf420a507f0c36d45058a5bcc0
2018-05-09 14:46:14 -07:00
Kubernetes Publisher
33f2870a2b Merge pull request #62654 from liggitt/automated-cherry-pick-of-#62649-upstream-release-1.10
Automatic merge from submit-queue.

Automated cherry pick of #62649: Ensure service routing resolves kubernetes.default.svc

Cherry pick of #62649 on release-1.10.

#62649: Ensure service routing resolves kubernetes.default.svc

Kubernetes-commit: 5f050faa9d28b3013a11344682038cae26059cdd
2018-04-24 14:15:16 -07:00
Kubernetes Publisher
27ca8df003 sync: update godeps 2018-04-17 14:44:47 +00:00
Jordan Liggitt
262ea94a59 ensure tls server name is used in transport
Kubernetes-commit: 22cc5683fd1b9e24f90a36a937f53a54c1730cff
2018-04-17 00:59:27 -04:00
Jordan Liggitt
345769d958 distinguish custom dialers in transport cache
Kubernetes-commit: 5b02bce088255a9b8705e3b775487cddfc6f7b9d
2018-04-17 00:58:56 -04:00
Michael Taufen
ac76ac5060 update godeps to use latest pflag
Kubernetes-commit: a58a84cfc006401910396b049b410cfb80676169
2018-04-12 17:12:43 -07:00
5 changed files with 118 additions and 94 deletions

180
Godeps/Godeps.json generated
View File

@@ -1,7 +1,7 @@
{
"ImportPath": "k8s.io/client-go",
"GoVersion": "go1.9",
"GodepVersion": "v79",
"GodepVersion": "v80",
"Packages": [
"./..."
],
@@ -148,7 +148,15 @@
},
{
"ImportPath": "github.com/json-iterator/go",
"Rev": "13f86432b882000a51c6e610c620974462691a97"
"Rev": "f2b4162afba35581b6d4a50d3b8f34e33c144682"
},
{
"ImportPath": "github.com/modern-go/concurrent",
"Rev": "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94"
},
{
"ImportPath": "github.com/modern-go/reflect2",
"Rev": "05fbef0ca5da472bbf96c9322b84a53edc03c9fd"
},
{
"ImportPath": "github.com/pmezard/go-difflib/difflib",
@@ -156,7 +164,7 @@
},
{
"ImportPath": "github.com/spf13/pflag",
"Rev": "4c012f6dcd9546820e378d0bdda4d8fc772cdfea"
"Rev": "583c0c0531f06d5278b7d917446061adc344b5cd"
},
{
"ImportPath": "github.com/stretchr/testify/assert",
@@ -248,335 +256,335 @@
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/apps/v1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/authentication/v1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/authorization/v1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/batch/v1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/core/v1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/networking/v1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/rbac/v1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/storage/v1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
"Rev": "6c0bbc3e58fab96285be9b6ed41b12b58c737a96"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
"Rev": "e386b2658ed20923da8cc9250e552f082899a1ee"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
"Rev": "50ae88d24ede7b8bad68e23c805b5d3da5c8abaf"
"Rev": "39cb288412c48cb533ba4be5d6c28620b9a0c1b4"
}
]
}

View File

@@ -44,6 +44,7 @@ type tlsCacheKey struct {
certData string
keyData string
serverName string
dial string
}
func (t tlsCacheKey) String() string {
@@ -51,7 +52,7 @@ func (t tlsCacheKey) String() string {
if len(t.keyData) > 0 {
keyText = "<redacted>"
}
return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, serverName:%s", t.insecure, t.caData, t.certData, keyText, t.serverName)
return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, serverName:%s, dial:%s", t.insecure, t.caData, t.certData, keyText, t.serverName, t.dial)
}
func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) {
@@ -75,7 +76,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) {
return nil, err
}
// The options didn't require a custom TLS config
if tlsConfig == nil {
if tlsConfig == nil && config.Dial == nil {
return http.DefaultTransport, nil
}
@@ -109,5 +110,6 @@ func tlsConfigKey(c *Config) (tlsCacheKey, error) {
certData: string(c.TLS.CertData),
keyData: string(c.TLS.KeyData),
serverName: c.TLS.ServerName,
dial: fmt.Sprintf("%p", c.Dial),
}, nil
}

View File

@@ -17,6 +17,7 @@ limitations under the License.
package transport
import (
"net"
"net/http"
"testing"
)
@@ -53,6 +54,8 @@ func TestTLSConfigKey(t *testing.T) {
// Make sure config fields that affect the tls config affect the cache key
uniqueConfigurations := map[string]*Config{
"no tls": {},
"dialer": {Dial: net.Dial},
"dialer2": {Dial: func(network, address string) (net.Conn, error) { return nil, nil }},
"insecure": {TLS: TLSConfig{Insecure: true}},
"cadata 1": {TLS: TLSConfig{CAData: []byte{1}}},
"cadata 2": {TLS: TLSConfig{CAData: []byte{2}}},
@@ -104,11 +107,6 @@ func TestTLSConfigKey(t *testing.T) {
}
for nameA, valueA := range uniqueConfigurations {
for nameB, valueB := range uniqueConfigurations {
// Don't compare to ourselves
if nameA == nameB {
continue
}
keyA, err := tlsConfigKey(valueA)
if err != nil {
t.Errorf("Unexpected error for %q: %v", nameA, err)
@@ -119,6 +117,15 @@ func TestTLSConfigKey(t *testing.T) {
t.Errorf("Unexpected error for %q: %v", nameB, err)
continue
}
// Make sure we get the same key on the same config
if nameA == nameB {
if keyA != keyB {
t.Errorf("Expected identical cache keys for %q and %q, got:\n\t%s\n\t%s", nameA, nameB, keyA, keyB)
}
continue
}
if keyA == keyB {
t.Errorf("Expected unique cache keys for %q and %q, got:\n\t%s\n\t%s", nameA, nameB, keyA, keyB)
continue

View File

@@ -52,7 +52,7 @@ func New(config *Config) (http.RoundTripper, error) {
// TLSConfigFor returns a tls.Config that will provide the transport level security defined
// by the provided Config. Will return nil if no transport level security is requested.
func TLSConfigFor(c *Config) (*tls.Config, error) {
if !(c.HasCA() || c.HasCertAuth() || c.TLS.Insecure) {
if !(c.HasCA() || c.HasCertAuth() || c.TLS.Insecure || len(c.TLS.ServerName) > 0) {
return nil, nil
}
if c.HasCA() && c.TLS.Insecure {

View File

@@ -101,6 +101,13 @@ func TestNew(t *testing.T) {
Config: &Config{},
},
"server name": {
TLS: true,
Config: &Config{TLS: TLSConfig{
ServerName: "foo",
}},
},
"ca transport": {
TLS: true,
Config: &Config{