Compare commits

...

13 Commits

Author SHA1 Message Date
Kubernetes Publisher
bcf64c3d25 Fix Godeps.json to point to kubernetes-1.9.12-beta.0 tags 2018-10-04 12:42:05 +00:00
Kubernetes Publisher
115d23201c Merge pull request #67162 from dekkagaijin/automated-cherry-pick-of-#65799-upstream-release-1.9
Automated cherry pick of #65799: Escape illegal characters in remote extra keys

Kubernetes-commit: da2670acf516d03b4e8b9889f403602669704507
2018-09-10 13:25:39 -07:00
Kubernetes Publisher
c4528e9778 Merge pull request #66919 from sttts/sttts-client-go-scale-fix-2
Automatic merge from submit-queue.

client-go: fix arg in t.Fatalf

This breaks the publishing-bot's smoke tests.


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

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

**Special notes for your reviewer**:

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

```

Kubernetes-commit: 201616aac8cad1dff49ede91c783bc120d4e326b
2018-08-03 19:18:35 -07:00
Dr. Stefan Schimanski
9ca9c42570 client-go: fix arg in t.Fatalf
Kubernetes-commit: 61aece82e0f983e7665c38cb47b9045354cbc189
2018-08-02 16:34:45 +01:00
Jake Sanders
44f554f6a3 Escape illegal characters in remote extra keys
Signed-off-by: Jake Sanders <jsand@google.com>

Kubernetes-commit: 939f1dc6fca56d0d86216f3cb185c0007ed002e1
2018-07-03 21:19:15 -07:00
Kubernetes Publisher
e2680bfa77 Merge pull request #65298 from nikhita/cherrypick-jsoniter-bump-1.9
Automatic merge from submit-queue.

Manual cherrypick of #65034 to 1.9: make json serializer case sensitive

fixes partially https://github.com/kubernetes/kubernetes/issues/64612

This PR imports the latest jsoniterator library so that case sensitivity during unmarshalling is optional. The PR also sets Kubernetes json serializer to be case sensitive.

**Release note**:

```release-note
ACTION REQUIRED: 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.
```

/sig api-machinery
/kind bug
/assign caesarxuchao liggitt thockin sttts mbohlool

Kubernetes-commit: f4cf484c2cb6056e28fb9759a3c913be3eed990a
2018-06-27 07:27:00 +00:00
Nikhita Raghunath
e5757a7296 update staging godeps
Kubernetes-commit: 0f9246104e2c75a96150d8d06a87dfe7b40024c8
2018-06-21 11:59:07 +05:30
Kubernetes Publisher
1692bdde78 Merge pull request #63219 from liggitt/automated-cherry-pick-of-#62654-upstream-release-1.9
Automatic merge from submit-queue.

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

Cherry pick of #62654 on release-1.9.

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

```release-note
Fixes the kubernetes.default.svc loopback service resolution to use a loopback configuration.
```

Kubernetes-commit: b6222f0609982f7b1ecf7caeef434e8f61e49194
2018-05-15 14:44:34 +00:00
Kubernetes Publisher
e35117bf8f Merge pull request #63626 from roycaihw/release-1.9
Automatic merge from submit-queue.

Manual cherrypick of kube-openapi changes for release-1.9

**What this PR does / why we need it**:
Cherry-picks https://github.com/kubernetes/kube-openapi/pull/64 and https://github.com/kubernetes/kube-openapi/pull/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 @mbohlool
/sig api-machinery

Kubernetes-commit: 8d48604c2eca912159636be258a5e68bfc4c6643
2018-05-10 14:42:28 +00:00
Haowei Cai
0401348fc7 generated
Kubernetes-commit: 446c4f107857f2e3589f8ce1632ad697161aba11
2018-05-09 15:22:42 -07:00
Kubernetes Publisher
65b43df093 sync: update godeps 2018-04-17 14:41:10 +00:00
Jordan Liggitt
2eeae9f2aa ensure tls server name is used in transport
Kubernetes-commit: 4aea02a0f30cab2e2729459901baf79db5020b0d
2018-04-17 00:59:27 -04:00
Jordan Liggitt
be703b4263 distinguish custom dialers in transport cache
Kubernetes-commit: e2fb33bdb8d2b043d3c88b854bfaad0467da8db6
2018-04-17 00:58:56 -04:00
8 changed files with 341 additions and 101 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": [
"./..."
],
@@ -228,7 +228,7 @@
},
{
"ImportPath": "github.com/json-iterator/go",
"Rev": "36b14963da70d11297d313183d7e6388c8510e1e"
"Rev": "f2b4162afba35581b6d4a50d3b8f34e33c144682"
},
{
"ImportPath": "github.com/juju/ratelimit",
@@ -246,6 +246,14 @@
"ImportPath": "github.com/mailru/easyjson/jwriter",
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
},
{
"ImportPath": "github.com/modern-go/concurrent",
"Rev": "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94"
},
{
"ImportPath": "github.com/modern-go/reflect2",
"Rev": "05fbef0ca5da472bbf96c9322b84a53edc03c9fd"
},
{
"ImportPath": "github.com/peterbourgon/diskv",
"Rev": "5f041e8faa004a95c88a202771f4cc3e991971e6"
@@ -372,339 +380,339 @@
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/apps/v1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/authentication/v1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/authorization/v1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/batch/v1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/core/v1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/networking/v1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/rbac/v1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/storage/v1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "acf347b865f29325eb61f4cd2df11e86e073a5ee"
"Rev": "1c927e0d5dea6770c2d95a8bcaddd8632b5a5c42"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "19e3f5aa3adca672c153d324e6b7d82ff8935f03"
"Rev": "1926e7bb5c13e9c651830fe950cb623071bb03d2"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/common",
"Rev": "39a7bf85c140f972372c2a0d1ee40adbf0c8bfe1"
"Rev": "7ee50c0aa8059d610950c952a9ed7a5e33ab336a"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
"Rev": "39a7bf85c140f972372c2a0d1ee40adbf0c8bfe1"
"Rev": "7ee50c0aa8059d610950c952a9ed7a5e33ab336a"
}
]
}

View File

@@ -99,7 +99,7 @@ func fakeScaleClient(t *testing.T) (ScalesGetter, []schema.GroupResource) {
restMapperRes, err := discovery.GetAPIGroupResources(fakeDiscoveryClient)
if err != nil {
t.Fatalf("unexpected error while constructing resource list from fake discovery client: %v")
t.Fatalf("unexpected error while constructing resource list from fake discovery client: %v", err)
}
restMapper := discovery.NewRESTMapper(restMapperRes, apimeta.InterfacesForUnstructured)

View File

@@ -59,7 +59,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
}
@@ -88,5 +88,5 @@ func tlsConfigKey(c *Config) (string, error) {
return "", err
}
// Only include the things that actually affect the tls.Config
return fmt.Sprintf("%v/%x/%x/%x/%v", c.TLS.Insecure, c.TLS.CAData, c.TLS.CertData, c.TLS.KeyData, c.TLS.ServerName), nil
return fmt.Sprintf("%v/%x/%x/%x/%v/%v", c.TLS.Insecure, c.TLS.CAData, c.TLS.CertData, c.TLS.KeyData, c.TLS.ServerName, 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

@@ -17,6 +17,7 @@ limitations under the License.
package transport
import (
"bytes"
"fmt"
"net/http"
"path/filepath"
@@ -160,7 +161,7 @@ func SetAuthProxyHeaders(req *http.Request, username string, groups []string, ex
}
for key, values := range extra {
for _, value := range values {
req.Header.Add("X-Remote-Extra-"+key, value)
req.Header.Add("X-Remote-Extra-"+headerKeyEscape(key), value)
}
}
}
@@ -277,7 +278,7 @@ func (rt *impersonatingRoundTripper) RoundTrip(req *http.Request) (*http.Respons
}
for k, vv := range rt.impersonate.Extra {
for _, v := range vv {
req.Header.Add(ImpersonateUserExtraHeaderPrefix+k, v)
req.Header.Add(ImpersonateUserExtraHeaderPrefix+headerKeyEscape(k), v)
}
}
@@ -453,3 +454,110 @@ func (rt *debuggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, e
func (rt *debuggingRoundTripper) WrappedRoundTripper() http.RoundTripper {
return rt.delegatedRoundTripper
}
func legalHeaderByte(b byte) bool {
return int(b) < len(legalHeaderKeyBytes) && legalHeaderKeyBytes[b]
}
func shouldEscape(b byte) bool {
// url.PathUnescape() returns an error if any '%' is not followed by two
// hexadecimal digits, so we'll intentionally encode it.
return !legalHeaderByte(b) || b == '%'
}
func headerKeyEscape(key string) string {
var buf bytes.Buffer
for i := 0; i < len(key); i++ {
b := key[i]
if shouldEscape(b) {
// %-encode bytes that should be escaped:
// https://tools.ietf.org/html/rfc3986#section-2.1
fmt.Fprintf(&buf, "%%%02X", b)
continue
}
buf.WriteByte(b)
}
return buf.String()
}
// legalHeaderKeyBytes was copied from net/http/lex.go's isTokenTable.
// See https://httpwg.github.io/specs/rfc7230.html#rule.token.separators
var legalHeaderKeyBytes = [127]bool{
'%': true,
'!': true,
'#': true,
'$': true,
'&': true,
'\'': true,
'*': true,
'+': true,
'-': true,
'.': true,
'0': true,
'1': true,
'2': true,
'3': true,
'4': true,
'5': true,
'6': true,
'7': true,
'8': true,
'9': true,
'A': true,
'B': true,
'C': true,
'D': true,
'E': true,
'F': true,
'G': true,
'H': true,
'I': true,
'J': true,
'K': true,
'L': true,
'M': true,
'N': true,
'O': true,
'P': true,
'Q': true,
'R': true,
'S': true,
'T': true,
'U': true,
'W': true,
'V': true,
'X': true,
'Y': true,
'Z': true,
'^': true,
'_': true,
'`': true,
'a': true,
'b': true,
'c': true,
'd': true,
'e': true,
'f': true,
'g': true,
'h': true,
'i': true,
'j': true,
'k': true,
'l': true,
'm': true,
'n': true,
'o': true,
'p': true,
'q': true,
'r': true,
's': true,
't': true,
'u': true,
'v': true,
'w': true,
'x': true,
'y': true,
'z': true,
'|': true,
'~': true,
}

View File

@@ -129,6 +129,32 @@ func TestImpersonationRoundTripper(t *testing.T) {
ImpersonateUserExtraHeaderPrefix + "Second": {"B", "b"},
},
},
{
name: "escape handling",
impersonationConfig: ImpersonationConfig{
UserName: "user",
Extra: map[string][]string{
"test.example.com/thing.thing": {"A", "a"},
},
},
expected: map[string][]string{
ImpersonateUserHeader: {"user"},
ImpersonateUserExtraHeaderPrefix + `Test.example.com%2fthing.thing`: {"A", "a"},
},
},
{
name: "double escape handling",
impersonationConfig: ImpersonationConfig{
UserName: "user",
Extra: map[string][]string{
"test.example.com/thing.thing%20another.thing": {"A", "a"},
},
},
expected: map[string][]string{
ImpersonateUserHeader: {"user"},
ImpersonateUserExtraHeaderPrefix + `Test.example.com%2fthing.thing%2520another.thing`: {"A", "a"},
},
},
}
for _, tc := range tcs {
@@ -163,9 +189,10 @@ func TestImpersonationRoundTripper(t *testing.T) {
func TestAuthProxyRoundTripper(t *testing.T) {
for n, tc := range map[string]struct {
username string
groups []string
extra map[string][]string
username string
groups []string
extra map[string][]string
expectedExtra map[string][]string
}{
"allfields": {
username: "user",
@@ -174,6 +201,34 @@ func TestAuthProxyRoundTripper(t *testing.T) {
"one": {"alpha", "bravo"},
"two": {"charlie", "delta"},
},
expectedExtra: map[string][]string{
"one": {"alpha", "bravo"},
"two": {"charlie", "delta"},
},
},
"escaped extra": {
username: "user",
groups: []string{"groupA", "groupB"},
extra: map[string][]string{
"one": {"alpha", "bravo"},
"example.com/two": {"charlie", "delta"},
},
expectedExtra: map[string][]string{
"one": {"alpha", "bravo"},
"example.com%2ftwo": {"charlie", "delta"},
},
},
"double escaped extra": {
username: "user",
groups: []string{"groupA", "groupB"},
extra: map[string][]string{
"one": {"alpha", "bravo"},
"example.com/two%20three": {"charlie", "delta"},
},
expectedExtra: map[string][]string{
"one": {"alpha", "bravo"},
"example.com%2ftwo%2520three": {"charlie", "delta"},
},
},
} {
rt := &testRoundTripper{}
@@ -214,7 +269,7 @@ func TestAuthProxyRoundTripper(t *testing.T) {
actualExtra[extraKey] = append(actualExtra[key], values...)
}
}
if e, a := tc.extra, actualExtra; !reflect.DeepEqual(e, a) {
if e, a := tc.expectedExtra, actualExtra; !reflect.DeepEqual(e, a) {
t.Errorf("%s expected %v, got %v", n, e, a)
continue
}
@@ -277,3 +332,58 @@ func TestCacheRoundTripper(t *testing.T) {
t.Errorf("Invalid content read from cache %q", string(content))
}
}
// TestHeaderEscapeRoundTrip tests to see if foo == url.PathUnescape(headerEscape(foo))
// This behavior is important for client -> API server transmission of extra values.
func TestHeaderEscapeRoundTrip(t *testing.T) {
t.Parallel()
testCases := []struct {
name string
key string
}{
{
name: "alpha",
key: "alphabetical",
},
{
name: "alphanumeric",
key: "alph4num3r1c",
},
{
name: "percent encoded",
key: "percent%20encoded",
},
{
name: "almost percent encoded",
key: "almost%zzpercent%xxencoded",
},
{
name: "illegal char & percent encoding",
key: "example.com/percent%20encoded",
},
{
name: "weird unicode stuff",
key: "example.com/ᛒᚥᛏᛖᚥᚢとロビン",
},
{
name: "header legal chars",
key: "abc123!#$+.-_*\\^`~|'",
},
{
name: "legal path, illegal header",
key: "@=:",
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
escaped := headerKeyEscape(tc.key)
unescaped, err := url.PathUnescape(escaped)
if err != nil {
t.Fatalf("url.PathUnescape(%q) returned error: %v", escaped, err)
}
if tc.key != unescaped {
t.Errorf("url.PathUnescape(headerKeyEscape(%q)) returned %q, wanted %q", tc.key, unescaped, tc.key)
}
})
}
}

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{