From 392a4d949fa7ff1cb01d84e392ea713602255f2a Mon Sep 17 00:00:00 2001 From: deads2k Date: Thu, 19 Jan 2017 13:15:12 -0500 Subject: [PATCH 1/7] update client-go staging --- .../src/k8s.io/client-go/Godeps/Godeps.json | 74 +- .../k8s.io/apimachinery}/pkg/fields/doc.go | 0 .../k8s.io/apimachinery}/pkg/fields/fields.go | 0 .../apimachinery}/pkg/fields/requirements.go | 0 .../apimachinery}/pkg/fields/selector.go | 0 .../k8s.io/apimachinery/pkg/openapi/doc.go | 18 + .../typed/core/v1/event_expansion.go | 2 +- .../core/v1/fake/fake_event_expansion.go | 2 +- .../k8s.io/client-go/pkg/api/conversion.go | 2 +- .../src/k8s.io/client-go/pkg/api/defaults.go | 2 +- .../src/k8s.io/client-go/pkg/api/helpers.go | 2 +- staging/src/k8s.io/client-go/pkg/api/types.go | 6 +- .../k8s.io/client-go/pkg/api/v1/defaults.go | 3 + .../client-go/pkg/api/v1/generated.pb.go | 1314 +++++++++-------- .../client-go/pkg/api/v1/generated.proto | 5 + .../k8s.io/client-go/pkg/api/v1/helpers.go | 2 +- .../client-go/pkg/api/v1/types.generated.go | 432 +++--- .../src/k8s.io/client-go/pkg/api/v1/types.go | 4 + .../pkg/api/v1/types_swagger_doc_generated.go | 1 + .../pkg/api/v1/zz_generated.conversion.go | 2 + .../pkg/api/zz_generated.deepcopy.go | 2 +- .../pkg/apis/apps/v1beta1/types.generated.go | 2 +- .../pkg/apis/batch/v1/types.generated.go | 2 +- .../apis/batch/v2alpha1/types.generated.go | 4 +- .../extensions/v1beta1/types.generated.go | 6 +- .../client-go/pkg/apis/kubeadm/types.go | 1 + .../pkg/apis/kubeadm/v1alpha1/defaults.go | 9 +- .../pkg/apis/kubeadm/v1alpha1/types.go | 1 + .../k8s.io/client-go/pkg/util/cert/cert.go | 2 +- .../pkg/util/strategicpatch/patch.go | 52 +- staging/src/k8s.io/client-go/rest/request.go | 2 +- .../src/k8s.io/client-go/testing/actions.go | 2 +- .../k8s.io/client-go/tools/cache/listwatch.go | 2 +- .../client-go/tools/record/events_cache.go | 2 +- 34 files changed, 1060 insertions(+), 900 deletions(-) rename staging/src/k8s.io/client-go/{ => _vendor/k8s.io/apimachinery}/pkg/fields/doc.go (100%) rename staging/src/k8s.io/client-go/{ => _vendor/k8s.io/apimachinery}/pkg/fields/fields.go (100%) rename staging/src/k8s.io/client-go/{ => _vendor/k8s.io/apimachinery}/pkg/fields/requirements.go (100%) rename staging/src/k8s.io/client-go/{ => _vendor/k8s.io/apimachinery}/pkg/fields/selector.go (100%) create mode 100644 staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/doc.go diff --git a/staging/src/k8s.io/client-go/Godeps/Godeps.json b/staging/src/k8s.io/client-go/Godeps/Godeps.json index ca7ac927357..fb26189799c 100644 --- a/staging/src/k8s.io/client-go/Godeps/Godeps.json +++ b/staging/src/k8s.io/client-go/Godeps/Godeps.json @@ -324,143 +324,147 @@ }, { "ImportPath": "k8s.io/apimachinery/pkg/api/errors", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/fields", + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/openapi", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/rand", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/version", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "fd5da6b9d070d172e9677941ced569deabdd05ea" + "Rev": "a6364387e6d54a910a0810543a14b6867eafaa99" } ] } diff --git a/staging/src/k8s.io/client-go/pkg/fields/doc.go b/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/doc.go similarity index 100% rename from staging/src/k8s.io/client-go/pkg/fields/doc.go rename to staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/doc.go diff --git a/staging/src/k8s.io/client-go/pkg/fields/fields.go b/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/fields.go similarity index 100% rename from staging/src/k8s.io/client-go/pkg/fields/fields.go rename to staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/fields.go diff --git a/staging/src/k8s.io/client-go/pkg/fields/requirements.go b/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/requirements.go similarity index 100% rename from staging/src/k8s.io/client-go/pkg/fields/requirements.go rename to staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/requirements.go diff --git a/staging/src/k8s.io/client-go/pkg/fields/selector.go b/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/selector.go similarity index 100% rename from staging/src/k8s.io/client-go/pkg/fields/selector.go rename to staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/selector.go diff --git a/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/doc.go b/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/doc.go new file mode 100644 index 00000000000..5ed572cc136 --- /dev/null +++ b/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// package openapi holds shared codes and types between open API code generator and spec generator. +package openapi diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go index 15930844ee6..bad8b4bd6e8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go @@ -19,11 +19,11 @@ package v1 import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/fields" ) // The EventExpansion interface allows manually adding extra methods to the EventInterface. diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go index 7ed87d53696..f66bb862333 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go @@ -17,10 +17,10 @@ limitations under the License. package fake import ( + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/fields" "k8s.io/client-go/testing" ) diff --git a/staging/src/k8s.io/client-go/pkg/api/conversion.go b/staging/src/k8s.io/client-go/pkg/api/conversion.go index c8234ceebc5..7808b9f4934 100644 --- a/staging/src/k8s.io/client-go/pkg/api/conversion.go +++ b/staging/src/k8s.io/client-go/pkg/api/conversion.go @@ -21,11 +21,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/client-go/pkg/api/resource" - "k8s.io/client-go/pkg/fields" "k8s.io/client-go/pkg/util/intstr" utillabels "k8s.io/client-go/pkg/util/labels" ) diff --git a/staging/src/k8s.io/client-go/pkg/api/defaults.go b/staging/src/k8s.io/client-go/pkg/api/defaults.go index 57ffd7bff7f..baa49a8d7eb 100644 --- a/staging/src/k8s.io/client-go/pkg/api/defaults.go +++ b/staging/src/k8s.io/client-go/pkg/api/defaults.go @@ -17,9 +17,9 @@ limitations under the License. package api import ( + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/pkg/fields" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { diff --git a/staging/src/k8s.io/client-go/pkg/api/helpers.go b/staging/src/k8s.io/client-go/pkg/api/helpers.go index ac897d6987c..522e4db6ffa 100644 --- a/staging/src/k8s.io/client-go/pkg/api/helpers.go +++ b/staging/src/k8s.io/client-go/pkg/api/helpers.go @@ -27,13 +27,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/pkg/api/resource" - "k8s.io/client-go/pkg/fields" ) // Conversion error conveniently packages up errors in conversions. diff --git a/staging/src/k8s.io/client-go/pkg/api/types.go b/staging/src/k8s.io/client-go/pkg/api/types.go index f815d469290..15f99e22993 100644 --- a/staging/src/k8s.io/client-go/pkg/api/types.go +++ b/staging/src/k8s.io/client-go/pkg/api/types.go @@ -18,11 +18,11 @@ package api import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/pkg/api/resource" - "k8s.io/client-go/pkg/fields" "k8s.io/client-go/pkg/util/intstr" ) @@ -1856,6 +1856,10 @@ type PodSpec struct { // If specified, the pod's scheduling constraints // +optional Affinity *Affinity + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + SchedulerName string } // Sysctl defines a kernel parameter to be set diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/defaults.go b/staging/src/k8s.io/client-go/pkg/api/v1/defaults.go index 764f84d9c69..6ea86ce85cc 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/defaults.go +++ b/staging/src/k8s.io/client-go/pkg/api/v1/defaults.go @@ -174,6 +174,9 @@ func SetDefaults_PodSpec(obj *PodSpec) { period := int64(DefaultTerminationGracePeriodSeconds) obj.TerminationGracePeriodSeconds = &period } + if obj.SchedulerName == "" { + obj.SchedulerName = DefaultSchedulerName + } } func SetDefaults_Probe(obj *Probe) { if obj.TimeoutSeconds == 0 { diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/generated.pb.go b/staging/src/k8s.io/client-go/pkg/api/v1/generated.pb.go index 45745c10ccd..f2c14e8e57a 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/generated.pb.go +++ b/staging/src/k8s.io/client-go/pkg/api/v1/generated.pb.go @@ -6112,6 +6112,12 @@ func (m *PodSpec) MarshalTo(data []byte) (int, error) { } i += n122 } + data[i] = 0x9a + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.SchedulerName))) + i += copy(data[i:], m.SchedulerName) return i, nil } @@ -10213,6 +10219,8 @@ func (m *PodSpec) Size() (n int) { l = m.Affinity.Size() n += 2 + l + sovGenerated(uint64(l)) } + l = len(m.SchedulerName) + n += 2 + l + sovGenerated(uint64(l)) return n } @@ -12577,6 +12585,7 @@ func (this *PodSpec) String() string { `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, `Subdomain:` + fmt.Sprintf("%v", this.Subdomain) + `,`, `Affinity:` + strings.Replace(fmt.Sprintf("%v", this.Affinity), "Affinity", "Affinity", 1) + `,`, + `SchedulerName:` + fmt.Sprintf("%v", this.SchedulerName) + `,`, `}`, }, "") return s @@ -31407,6 +31416,35 @@ func (m *PodSpec) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchedulerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchedulerName = string(data[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -39586,641 +39624,643 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 10174 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0xbd, 0x7d, 0x70, 0x24, 0xc7, - 0x75, 0x18, 0xae, 0xd9, 0xc5, 0xd7, 0x3e, 0x7c, 0x5e, 0xdf, 0x07, 0x41, 0x88, 0x3c, 0x1c, 0x87, - 0x22, 0x75, 0x24, 0x8f, 0x80, 0xee, 0x48, 0x8a, 0x27, 0x51, 0x3f, 0x4a, 0x00, 0x16, 0xb8, 0x83, - 0xee, 0x6b, 0xd9, 0x8b, 0xbb, 0xa3, 0x24, 0xfe, 0x24, 0x0e, 0x76, 0x1a, 0xc0, 0xe8, 0x06, 0x33, - 0xcb, 0x99, 0x59, 0xdc, 0x41, 0x8a, 0xaa, 0x6c, 0x99, 0x65, 0x57, 0x2a, 0x4a, 0xa2, 0x94, 0x4b, - 0x55, 0xa9, 0x38, 0x89, 0x9d, 0x54, 0x39, 0xa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7b, 0x66, 0x2d, 0x97, 0x0a, 0xf7, 0x28, 0x8d, 0x6e, 0xc1, 0x24, 0x5b, 0x4f, - 0x8d, 0x8e, 0xef, 0x37, 0x42, 0xdf, 0x6b, 0xed, 0x4e, 0x4f, 0x30, 0x86, 0xcf, 0x48, 0x5b, 0x7b, - 0xd5, 0x44, 0x53, 0x1b, 0x24, 0xfd, 0x87, 0xb3, 0xa5, 0x91, 0x0f, 0x93, 0x31, 0x69, 0x75, 0x22, - 0x2f, 0xd9, 0xa5, 0x73, 0x9f, 0x3c, 0x48, 0xa6, 0x27, 0xcb, 0xd8, 0x54, 0x4d, 0xb3, 0x10, 0x77, - 0x74, 0x64, 0x80, 0x38, 0xcb, 0x9a, 0x8a, 0x8a, 0x38, 0x71, 0xbd, 0x60, 0x7a, 0x8a, 0x29, 0xd1, - 0x6a, 0x7d, 0x35, 0x29, 0x10, 0x73, 0x1c, 0x33, 0x55, 0xe9, 0x8f, 0x5b, 0x54, 0xf6, 0x9e, 0x60, - 0x84, 0xa9, 0xa9, 0x2a, 0x11, 0x38, 0xa5, 0xa1, 0xfb, 0x55, 0x92, 0xec, 0x4e, 0x23, 0x46, 0xaa, - 0x96, 0xda, 0xda, 0xda, 0xe7, 0x30, 0x85, 0xa3, 0x3b, 0x30, 0x4c, 0x82, 0x9d, 0x95, 0x28, 0xdc, - 0x9e, 0x3e, 0x59, 0x46, 0x06, 0x2c, 0x73, 0x62, 0xbe, 0x2b, 0xa4, 0xda, 0xb2, 0x00, 0x63, 0xc9, - 0xcc, 0x5e, 0x87, 0x09, 0x25, 0x2e, 0xd8, 0xa8, 0xa3, 0x59, 0x18, 0xa4, 0x12, 0x51, 0x5a, 0x70, - 0x35, 0xda, 0x35, 0x2a, 0x28, 0x63, 0xcc, 0xe1, 0xac, 0x6b, 0xde, 0x57, 0xc8, 0xe2, 0x6e, 0x42, - 0xb8, 0x26, 0x5f, 0xd5, 0xba, 0x26, 0x11, 0x38, 0xa5, 0xb1, 0xff, 0x37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0xf2, 0x08, 0x45, 0x35, 0x87, 0xea, - 0x25, 0xbb, 0x98, 0xe3, 0xd0, 0x65, 0x18, 0x8b, 0x08, 0x9b, 0x29, 0x4b, 0x54, 0xab, 0x62, 0x53, - 0x6f, 0x30, 0x55, 0xbf, 0xb0, 0x86, 0xc3, 0x06, 0x65, 0xaa, 0x7d, 0x0f, 0x1d, 0xa0, 0x7d, 0x3f, - 0x07, 0xc3, 0xec, 0x87, 0x9a, 0x15, 0xea, 0x0b, 0xad, 0x72, 0x30, 0x96, 0xf8, 0xec, 0x24, 0x1a, - 0x29, 0x39, 0x89, 0x9e, 0x87, 0x89, 0xba, 0x43, 0xb6, 0xc3, 0x60, 0x39, 0x70, 0xdb, 0xa1, 0x17, - 0x24, 0x68, 0x1a, 0x06, 0xd8, 0x7e, 0xc2, 0xd7, 0xfb, 0x00, 0xe5, 0x80, 0x07, 0xa8, 0x06, 0x6d, - 0xff, 0x1f, 0x0b, 0xc6, 0xeb, 0xc4, 0x27, 0x09, 0xb9, 0xd5, 0x66, 0x7e, 0x17, 0xb4, 0x02, 0x68, - 0x33, 0x72, 0x5a, 0xa4, 0x41, 0x22, 0x2f, 0x74, 0x9b, 0xa4, 0x15, 0x06, 0xec, 0xe4, 0x81, 0x6e, - 0x90, 0x67, 0xf6, 0xf7, 0x66, 0xd1, 0x95, 0x2e, 0x2c, 0xce, 0x29, 0x81, 0x5c, 0x18, 0x6f, 0x47, - 0xc4, 0x70, 0x14, 0x59, 0xc5, 0x1b, 0x7e, 0x43, 0x2f, 0xc2, 0x75, 0x52, 0x03, 0x84, 0x4d, 0xa6, - 0xe8, 0x33, 0x30, 0x15, 0x46, 0xed, 0x2d, 0x27, 0xa8, 0x93, 0x36, 0x09, 0x5c, 0xaa, 0x88, 0x0b, - 0xaf, 0xe0, 0xa9, 0xfd, 0xbd, 0xd9, 0xa9, 0x5b, 0x19, 0x1c, 0xee, 0xa2, 0xb6, 0x7f, 0xad, 0x02, - 0xa7, 0xeb, 0xe1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, 0xa8, 0xf1, 0xb3, 0x8c, 0x74, 0x72, 0xf4, - 0x79, 0x36, 0xc2, 0x4c, 0x9a, 0x35, 0xc9, 0x03, 0xa7, 0xec, 0xa4, 0x5a, 0xc9, 0x44, 0x75, 0xd5, - 0xf4, 0xac, 0x5f, 0x15, 0x70, 0xac, 0x28, 0xd0, 0x79, 0x18, 0x09, 0x42, 0x97, 0x1f, 0x37, 0xf1, - 0x4d, 0x97, 0x4d, 0xb9, 0x9b, 0x02, 0x86, 0x15, 0xd6, 0xfe, 0x86, 0x05, 0x63, 0xb2, 0x8f, 0x25, - 0x35, 0x5c, 0xba, 0x48, 0x52, 0xed, 0x36, 0x5d, 0x24, 0x54, 0x43, 0x65, 0x18, 0x43, 0x31, 0xad, - 0xf6, 0xa3, 0x98, 0xda, 0xbf, 0x59, 0x81, 0x09, 0xd9, 0x9c, 0x66, 0x67, 0x3d, 0x26, 0x74, 0xdf, - 0xae, 0x39, 0x7c, 0xf0, 0x89, 0x9c, 0x67, 0x2f, 0x16, 0x99, 0x10, 0xc6, 0x37, 0x4b, 0xf5, 0x82, - 0x05, 0xc9, 0x07, 0xa7, 0x2c, 0xd1, 0x0e, 0x9c, 0x08, 0xc2, 0x84, 0xed, 0x07, 0x0a, 0x5f, 0xce, - 0x17, 0x9c, 0xad, 0xe7, 0x71, 0x51, 0xcf, 0x89, 0x9b, 0x59, 0x7e, 0xb8, 0xbb, 0x0a, 0x74, 0x4b, - 0xba, 0x46, 0xaa, 0xac, 0xae, 0xe7, 0xcb, 0xd5, 0xd5, 0xdb, 0x33, 0x62, 0xff, 0xd0, 0x82, 0x9a, - 0x24, 0x3b, 0x8e, 0x43, 0x81, 0xbb, 0x30, 0x1c, 0xb3, 0x4f, 0x24, 0x87, 0xeb, 0x42, 0xb9, 0x2e, - 0xf0, 0xef, 0x9a, 0x6e, 0x82, 0xfc, 0x7f, 0x8c, 0x25, 0x37, 0xe6, 0xe2, 0x54, 0x1d, 0xf9, 0xc0, - 0xb9, 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, 0x47, 0x73, 0x45, 0x37, 0x86, 0x13, 0xbe, 0x13, 0x27, 0x57, 0x89, 0x13, 0x25, - 0xeb, 0xc4, 0x61, 0x07, 0x8d, 0xd9, 0x20, 0x86, 0x12, 0x67, 0x97, 0x2a, 0xfa, 0xe7, 0x7a, 0x96, - 0x19, 0xee, 0xe6, 0x8f, 0x76, 0x00, 0xb1, 0x43, 0xcd, 0xc8, 0x09, 0x62, 0xde, 0x17, 0x4f, 0xb8, - 0x69, 0xfb, 0xab, 0x75, 0x46, 0xd4, 0x8a, 0xae, 0x77, 0x71, 0xc3, 0x39, 0x35, 0x68, 0xc7, 0xd6, - 0x83, 0x65, 0x8f, 0xad, 0x87, 0x0a, 0xa2, 0x8a, 0x7f, 0xde, 0x82, 0x93, 0xf4, 0xb3, 0x98, 0x11, - 0xa8, 0x31, 0x0a, 0x61, 0x92, 0x4e, 0x3b, 0x9f, 0x24, 0x12, 0x26, 0xd6, 0x57, 0x81, 0x66, 0x6d, - 0xf2, 0x49, 0xd5, 0xb7, 0x6b, 0x26, 0x33, 0x9c, 0xe5, 0x6e, 0x7f, 0xc7, 0x02, 0x16, 0xe2, 0x76, - 0x0c, 0x9b, 0xd9, 0x15, 0x73, 0x33, 0xb3, 0x8b, 0x25, 0x46, 0x8f, 0x7d, 0xec, 0x65, 0x98, 0xa2, - 0xd8, 0x46, 0x14, 0x3e, 0xd8, 0x95, 0x8a, 0x76, 0xb1, 0xbf, 0xf6, 0xdd, 0x0a, 0x5f, 0x36, 0xea, - 0xde, 0x19, 0xfa, 0x05, 0x0b, 0x46, 0x5a, 0x4e, 0xdb, 0x69, 0xf1, 0x7c, 0x2f, 0x25, 0x7c, 0x32, - 0x46, 0xf9, 0xb9, 0x25, 0x51, 0x96, 0xfb, 0x13, 0x3e, 0x26, 0xbb, 0x2e, 0xc1, 0x85, 0x3e, 0x04, - 0x55, 0xf9, 0x8c, 0x07, 0xe3, 0x06, 0xb3, 0x23, 0x34, 0x42, 0x7f, 0xc1,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 0x38, - 0x43, 0x8d, 0xea, 0x30, 0x45, 0x21, 0x4c, 0xa3, 0x94, 0x1c, 0xf8, 0x3d, 0x32, 0xb5, 0x33, 0x5f, - 0xcb, 0xe0, 0x71, 0x57, 0x09, 0xb4, 0x00, 0x93, 0x5c, 0xb7, 0xa0, 0x56, 0x1c, 0xfb, 0x0e, 0x22, - 0x92, 0x52, 0x2d, 0x82, 0x5b, 0x26, 0x1a, 0x67, 0xe9, 0xd1, 0x65, 0x18, 0x73, 0xa2, 0xd6, 0x96, - 0x97, 0x90, 0x56, 0xd2, 0x89, 0x78, 0x66, 0x02, 0x2d, 0x7c, 0x60, 0x41, 0xc3, 0x61, 0x83, 0xd2, - 0xfe, 0x0a, 0x9c, 0xcc, 0x09, 0xdb, 0xa6, 0x13, 0xc7, 0x69, 0x7b, 0xb2, 0x4f, 0x99, 0x40, 0xa5, - 0x85, 0xc6, 0xaa, 0xec, 0x8d, 0x46, 0x45, 0x67, 0x27, 0xf3, 0x25, 0x6b, 0x39, 0xf9, 0xd4, 0xec, - 0x5c, 0x91, 0x08, 0x9c, 0xd2, 0xd8, 0xff, 0xa3, 0x06, 0x9a, 0xab, 0xa5, 0x44, 0x78, 0xca, 0x65, - 0x18, 0x93, 0x69, 0x26, 0xb5, 0xf4, 0x6e, 0xaa, 0x9b, 0x57, 0x34, 0x1c, 0x36, 0x28, 0x69, 0xdb, - 0x02, 0xe9, 0x40, 0xca, 0x86, 0x45, 0x29, 0xcf, 0x12, 0x4e, 0x69, 0xd0, 0x05, 0x18, 0x89, 0x89, - 0xbf, 0x71, 0xdd, 0x0b, 0xee, 0x89, 0x89, 0xad, 0xa4, 0x72, 0x53, 0xc0, 0xb1, 0xa2, 0x40, 0x8b, - 0x50, 0xed, 0x78, 0xae, 0x98, 0xca, 0x52, 0x65, 0xa8, 0xde, 0x5e, 0xad, 0x3f, 0xdc, 0x9b, 0x7d, - 0xaa, 0x57, 0x9e, 0x4e, 0x6a, 0x4c, 0xc7, 0x73, 0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0xb3, 0x92, 0x0c, 0x70, 0xca, 0x0b, 0x5d, 0x02, 0x48, 0x64, - 0x80, 0x44, 0x2c, 0xb2, 0x72, 0x28, 0xbd, 0x54, 0x85, 0x4e, 0xc4, 0x58, 0xa3, 0x42, 0x2f, 0x40, - 0x2d, 0x71, 0x3c, 0xff, 0xba, 0x17, 0x90, 0x58, 0x04, 0x98, 0x88, 0x44, 0xba, 0x02, 0x88, 0x53, - 0x3c, 0xdd, 0xef, 0xd9, 0xd5, 0x5c, 0xfe, 0x0a, 0xc4, 0x08, 0xa3, 0x66, 0xfb, 0xfd, 0x75, 0x05, - 0xc5, 0x1a, 0x85, 0xfd, 0x12, 0xdb, 0xb7, 0xfb, 0x8c, 0xcf, 0xff, 0x71, 0x05, 0x50, 0x83, 0x05, - 0x62, 0x18, 0x0f, 0x70, 0x6c, 0xc1, 0x44, 0x4c, 0xae, 0x7b, 0x41, 0xe7, 0x81, 0x60, 0x55, 0xee, - 0x42, 0x44, 0x73, 0x59, 0x2f, 0xc3, 0x6f, 0xa3, 0x9a, 0x30, 0x9c, 0xe1, 0x4b, 0x87, 0x24, 0xea, - 0x04, 0x0b, 0xf1, 0xed, 0x98, 0x44, 0xe2, 0xa9, 0x0b, 0x36, 0x24, 0x58, 0x02, 0x71, 0x8a, 0xa7, - 0x53, 0x80, 0xfd, 0xb9, 0x19, 0x06, 0x38, 0x0c, 0x13, 0x39, 0x69, 0x58, 0xea, 0x73, 0x0d, 0x8e, - 0x0d, 0x2a, 0xb4, 0x02, 0x28, 0xee, 0xb4, 0xdb, 0x3e, 0x3b, 0xdb, 0x72, 0xfc, 0x2b, 0x51, 0xd8, - 0x69, 0xf3, 0x58, 0x5c, 0x91, 0x35, 0xbc, 0xd9, 0x85, 0xc5, 0x39, 0x25, 0xe8, 0x92, 0xdf, 0x88, - 0xd9, 0x6f, 0x71, 0xdb, 0x96, 0xfb, 0xd8, 0x9a, 0x0c, 0x84, 0x25, 0xce, 0xfe, 0x1a, 0xdb, 0x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, 0x7e, 0xef, 0xec, 0x87, 0xfe, - 0xf0, 0xbd, 0xb3, 0x1f, 0xfa, 0x99, 0xfd, 0xb3, 0xd6, 0x8f, 0xf6, 0xcf, 0x5a, 0x3f, 0xde, 0x3f, - 0x6b, 0xfd, 0xc9, 0xfe, 0x59, 0xeb, 0x9b, 0x7f, 0x7a, 0xf6, 0x43, 0x9f, 0xaf, 0xec, 0x5c, 0xfc, - 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x11, 0x03, 0x70, 0xb9, 0x1d, 0xb8, 0x00, 0x00, + // 10194 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xc7, + 0x75, 0x98, 0x66, 0x17, 0x5f, 0xfb, 0xf0, 0x79, 0x7d, 0x1f, 0x04, 0x61, 0xf2, 0x70, 0x1c, 0x8a, + 0xd4, 0x91, 0x3c, 0x02, 0xba, 0x23, 0x29, 0x9e, 0x44, 0x85, 0x12, 0x80, 0x05, 0xee, 0xa0, 0x3b, + 0xdc, 0x2d, 0x7b, 0x71, 0x77, 0x94, 0xc4, 0x48, 0x1c, 0xec, 0x34, 0x80, 0xd1, 0xcd, 0xce, 0x2c, + 0x67, 0x66, 0x71, 0x07, 0x29, 0xaa, 0xb2, 0x65, 0x96, 0x5d, 0xa9, 0x28, 0x89, 0x52, 0x2e, 0x55, + 0xa5, 0xe2, 0xa4, 0xec, 0xa4, 0xca, 0x29, 0x25, 0xae, 0x7c, 0x28, 0x8a, 0x2d, 0xb9, 0xac, 0x24, + 0x95, 0xc4, 0x56, 0xe4, 0x7c, 0xb8, 0x94, 0x72, 0x55, 0xec, 0x58, 0x55, 0x88, 0x09, 0xa7, 0xf2, + 0x33, 0x3f, 0x92, 0x7f, 0x48, 0x2a, 0x49, 0xf5, 0xe7, 0x74, 0xcf, 0xee, 0x62, 0x66, 0xc1, 0x03, + 0x44, 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0x15, 0x06, 0x24, 0x48, 0x96, 0xc2, 0xc0, 0xe5, 0xdb, 0xe9, 0x27, 0x60, 0x20, 0xa1, 0x55, + 0xf1, 0x66, 0x3d, 0x2b, 0x3f, 0x0b, 0xad, 0xe0, 0x60, 0x6f, 0xf6, 0x5c, 0x67, 0x09, 0xd6, 0x04, + 0x56, 0x06, 0x7d, 0x1c, 0x86, 0xe2, 0xc4, 0x49, 0xda, 0xb1, 0x68, 0xe8, 0x53, 0xb2, 0xa1, 0x75, + 0x06, 0x3d, 0xd8, 0x9b, 0x9d, 0x54, 0xc5, 0x38, 0x08, 0x8b, 0x02, 0xe8, 0x39, 0x18, 0x6e, 0x92, + 0x38, 0x76, 0xb6, 0xa4, 0x80, 0x9b, 0x14, 0x65, 0x87, 0xd7, 0x38, 0x18, 0x4b, 0x3c, 0x7a, 0x1a, + 0x06, 0x49, 0x14, 0x85, 0x91, 0x98, 0x11, 0xe3, 0x82, 0x70, 0x70, 0x99, 0x02, 0x31, 0xc7, 0xd9, + 0xff, 0xd9, 0x82, 0x49, 0xd5, 0x56, 0x5e, 0xd7, 0x09, 0x2c, 0x79, 0x17, 0xa0, 0x21, 0x3b, 0x18, + 0xb3, 0x85, 0xa6, 0xd5, 0xd1, 0x7d, 0xfa, 0x75, 0x0e, 0x68, 0x5a, 0x87, 0x02, 0xc5, 0x58, 0xe3, + 0x6b, 0xff, 0x1b, 0x0b, 0x4e, 0x67, 0xfa, 0x76, 0xd3, 0x8b, 0x13, 0xf4, 0x56, 0x47, 0xff, 0xe6, + 0x8a, 0xf5, 0x8f, 0x96, 0x66, 0xbd, 0x53, 0xf3, 0x45, 0x42, 0xb4, 0xbe, 0x61, 0x18, 0xf4, 0x12, + 0xd2, 0x94, 0xdd, 0x7a, 0xb1, 0x60, 0xb7, 0x78, 0xfb, 0xd2, 0xaf, 0xb4, 0x4a, 0x79, 0x60, 0xce, + 0xca, 0xfe, 0x5f, 0x16, 0x54, 0x96, 0xc2, 0x60, 0xd3, 0x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, 0xb2, 0x4b, 0xe7, + 0x3e, 0x79, 0x98, 0x4c, 0x4f, 0x16, 0xb1, 0xa9, 0xea, 0x66, 0x21, 0xee, 0xe8, 0xc8, 0x00, 0x71, + 0x96, 0x35, 0x15, 0x15, 0x71, 0xe2, 0x7a, 0xc1, 0xf4, 0x14, 0x53, 0xa2, 0xd5, 0xfa, 0xaa, 0x53, + 0x20, 0xe6, 0x38, 0x66, 0xaa, 0xd2, 0x1f, 0xb7, 0xa9, 0xec, 0x3d, 0xc5, 0x08, 0x53, 0x53, 0x55, + 0x22, 0x70, 0x4a, 0x43, 0xf7, 0xab, 0x24, 0xd9, 0x9d, 0x46, 0x8c, 0x54, 0x2d, 0xb5, 0xf5, 0xf5, + 0xcf, 0x62, 0x0a, 0x47, 0x77, 0x61, 0x98, 0x04, 0x3b, 0x2b, 0x51, 0xd8, 0x9c, 0x3e, 0x5d, 0x44, + 0x06, 0x2c, 0x73, 0x62, 0xbe, 0x2b, 0xa4, 0xda, 0xb2, 0x00, 0x63, 0xc9, 0xcc, 0xde, 0x80, 0x09, + 0x25, 0x2e, 0xd8, 0xa8, 0xa3, 0x59, 0x18, 0xa4, 0x12, 0x51, 0x5a, 0x70, 0x15, 0xda, 0x35, 0x2a, + 0x28, 0x63, 0xcc, 0xe1, 0xac, 0x6b, 0xde, 0x97, 0xc9, 0xe2, 0x6e, 0x42, 0xb8, 0x26, 0x5f, 0xd6, + 0xba, 0x26, 0x11, 0x38, 0xa5, 0xb1, 0xff, 0x0f, 0xdf, 0x6b, 0x53, 0x99, 0x54, 0x40, 0x1e, 0x5f, + 0x82, 0x91, 0xed, 0x30, 0x4e, 0x28, 0x35, 0xab, 0x63, 0x30, 0xdd, 0x5d, 0xaf, 0x0b, 0x38, 0x56, + 0x14, 0xe8, 0x35, 0x18, 0x6f, 0xe8, 0x15, 0x88, 0x2d, 0xe2, 0xac, 0x28, 0x62, 0xd6, 0x8e, 0x4d, + 0x5a, 0x74, 0x15, 0x46, 0x98, 0x5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xad, 0x3c, 0x9c, 0x78, 0xe4, 0xe8, 0x26, 0xf9, 0x52, 0x96, 0x19, 0xee, 0xe4, + 0x8f, 0x42, 0x38, 0xe5, 0xd2, 0x85, 0x64, 0x54, 0x5a, 0xe9, 0x3f, 0x86, 0x99, 0x56, 0x58, 0xcd, + 0x32, 0xc2, 0x9d, 0xbc, 0xd1, 0x17, 0x60, 0x46, 0x02, 0x3b, 0x6f, 0x58, 0xb2, 0xe5, 0x52, 0x5e, + 0x3c, 0xbf, 0xbf, 0x37, 0x3b, 0x53, 0xed, 0x49, 0x85, 0x0f, 0xe1, 0x80, 0xde, 0x82, 0x21, 0x76, + 0x08, 0x13, 0x4f, 0x8f, 0xb2, 0xdd, 0xee, 0xe5, 0x22, 0x91, 0xf0, 0x74, 0xd6, 0xcf, 0xb1, 0xa3, + 0x1c, 0x11, 0xe3, 0x99, 0x9e, 0x6c, 0x31, 0x20, 0x16, 0x3c, 0x51, 0x0b, 0x46, 0x9d, 0x20, 0x08, + 0x13, 0x87, 0x2b, 0x61, 0x63, 0x45, 0xf4, 0x48, 0xad, 0x8a, 0x85, 0xb4, 0x2c, 0xaf, 0x47, 0x05, + 0x8e, 0x69, 0x18, 0xac, 0x57, 0x81, 0x1e, 0xc0, 0x64, 0xf8, 0x80, 0x0a, 0x4c, 0x79, 0x0e, 0x11, + 0x4f, 0x8f, 0x9b, 0x1d, 0xcb, 0xf1, 0xaa, 0x1a, 0x85, 0x35, 0x49, 0x66, 0x32, 0xc5, 0xd9, 0x5a, + 0xd0, 0x9c, 0xe1, 0x5b, 0x9e, 0x48, 0x23, 0x99, 0x53, 0xdf, 0xb2, 0xee, 0x4a, 0x66, 0xb7, 0x78, + 0x79, 0xf4, 0x22, 0x93, 0x08, 0x93, 0x99, 0x5b, 0xbc, 0x29, 0x0a, 0xeb, 0x74, 0x33, 0x1f, 0x87, + 0x51, 0x6d, 0xe0, 0xfb, 0x09, 0x99, 0x9d, 0x79, 0x1d, 0xa6, 0xb2, 0x03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xe5, 0x62, 0xcf, 0x4b, + 0x89, 0x3a, 0x58, 0x88, 0x90, 0xbc, 0x24, 0xf6, 0x53, 0x1b, 0xff, 0x79, 0x8f, 0x78, 0x5b, 0xdb, + 0x09, 0x71, 0xb3, 0x1d, 0x3b, 0xb9, 0xf8, 0xcf, 0xff, 0x66, 0xc1, 0x64, 0xa6, 0x76, 0xe4, 0x77, + 0xbb, 0x67, 0x72, 0x44, 0xc7, 0xc6, 0xa9, 0xdc, 0x8b, 0x29, 0x73, 0x00, 0xca, 0x3f, 0x2d, 0xdd, + 0x0f, 0x4c, 0x17, 0x53, 0x0e, 0xec, 0x18, 0x6b, 0x14, 0xe8, 0x15, 0x18, 0x4d, 0xc2, 0x56, 0xe8, + 0x87, 0x5b, 0xbb, 0x37, 0x88, 0xcc, 0x66, 0xa0, 0x7c, 0xfb, 0xeb, 0x29, 0x0a, 0xeb, 0x74, 0xf6, + 0xf7, 0xcb, 0x90, 0x7d, 0x89, 0xec, 0xff, 0xcf, 0xd3, 0x9f, 0x9e, 0x79, 0xfa, 0x87, 0x16, 0x4c, + 0xd1, 0xda, 0x59, 0x80, 0x87, 0x8c, 0xd3, 0x54, 0xf9, 0xd4, 0xad, 0x43, 0xf2, 0xa9, 0x3f, 0x4b, + 0xa5, 0x9d, 0x1b, 0xb6, 0x13, 0xe1, 0x32, 0xd1, 0x84, 0x18, 0x85, 0x62, 0x81, 0x15, 0x74, 0x24, + 0x8a, 0xc4, 0x85, 0x16, 0x9d, 0x8e, 0x44, 0x11, 0x16, 0x58, 0x99, 0x6e, 0x7d, 0xa0, 0x47, 0xba, + 0x75, 0x96, 0x0f, 0x48, 0x04, 0x16, 0x08, 0x75, 0x40, 0xcb, 0x07, 0x24, 0x23, 0x0e, 0x52, 0x1a, + 0xfb, 0x3b, 0x65, 0x18, 0xab, 0x85, 0x6e, 0x1a, 0x80, 0xfd, 0xb2, 0x11, 0x80, 0x7d, 0x21, 0x13, + 0x80, 0x3d, 0xa5, 0xd3, 0x3e, 0x9a, 0xf8, 0x6b, 0x91, 0x37, 0x8a, 0x3d, 0x08, 0x70, 0xc4, 0xd8, + 0x6b, 0x23, 0x6f, 0x94, 0x62, 0x84, 0x4d, 0xbe, 0x7f, 0x96, 0x62, 0xae, 0xff, 0xb7, 0x05, 0x13, + 0xb5, 0xd0, 0xa5, 0x13, 0xf4, 0xcf, 0xd2, 0x6c, 0xd4, 0xb3, 0x4d, 0x0d, 0x1d, 0x92, 0x6d, 0xea, + 0x1f, 0x59, 0x30, 0x5c, 0x0b, 0xdd, 0x13, 0x70, 0x27, 0xae, 0x98, 0xee, 0xc4, 0xa7, 0x72, 0x25, + 0x6f, 0x0f, 0x0f, 0xe2, 0x6f, 0x96, 0x61, 0x9c, 0xb6, 0x38, 0xdc, 0x92, 0xdf, 0xcb, 0x18, 0x1b, + 0xab, 0xc0, 0xd8, 0x50, 0x95, 0x30, 0xf4, 0xfd, 0xf0, 0x41, 0xf6, 0xdb, 0xad, 0x30, 0x28, 0x16, + 0x58, 0x74, 0x09, 0x46, 0x5a, 0x11, 0xd9, 0xf1, 0xc2, 0x76, 0x9c, 0xbd, 0x1c, 0x57, 0x13, 0x70, + 0xac, 0x28, 0xd0, 0xcb, 0x30, 0x16, 0x7b, 0x41, 0x83, 0xc8, 0xb0, 0x83, 0x01, 0x16, 0x76, 0xc0, + 0x13, 0xfb, 0x69, 0x70, 0x6c, 0x50, 0xa1, 0x7b, 0x50, 0x61, 0xff, 0xd9, 0x0a, 0xea, 0x3f, 0x53, + 0x3b, 0xcf, 0x66, 0x25, 0x19, 0xe0, 0x94, 0x17, 0xba, 0x02, 0x90, 0xc8, 0x00, 0x89, 0x58, 0x64, + 0xe5, 0x50, 0x7a, 0xa9, 0x0a, 0x9d, 0x88, 0xb1, 0x46, 0x85, 0x5e, 0x80, 0x4a, 0xe2, 0x78, 0xfe, + 0x4d, 0x2f, 0x20, 0xb1, 0x08, 0x30, 0x11, 0x89, 0x74, 0x05, 0x10, 0xa7, 0x78, 0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, 0xad, 0x1f, 0xee, 0x9f, + 0xb7, 0x7e, 0xb4, 0x7f, 0xde, 0xfa, 0x93, 0xfd, 0xf3, 0xd6, 0x37, 0xfe, 0xf4, 0xfc, 0x87, 0x3e, + 0x57, 0xda, 0xb9, 0xfc, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x75, 0x32, 0x32, 0x5a, 0xb8, + 0x00, 0x00, } diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/generated.proto b/staging/src/k8s.io/client-go/pkg/api/v1/generated.proto index d5ffcae707a..4693f988cd5 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/generated.proto +++ b/staging/src/k8s.io/client-go/pkg/api/v1/generated.proto @@ -2553,6 +2553,11 @@ message PodSpec { // If specified, the pod's scheduling constraints // +optional optional Affinity affinity = 18; + + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + optional string schedulername = 19; } // PodStatus represents information about the status of a pod. Status may trail the actual diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/helpers.go b/staging/src/k8s.io/client-go/pkg/api/v1/helpers.go index b881c8bfa80..8b5b2b22708 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/helpers.go +++ b/staging/src/k8s.io/client-go/pkg/api/v1/helpers.go @@ -22,12 +22,12 @@ import ( "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/fields" ) // IsOpaqueIntResourceName returns true if the resource name has the opaque diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/types.generated.go b/staging/src/k8s.io/client-go/pkg/api/v1/types.generated.go index f753506c8aa..f1edbef6b42 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/types.generated.go +++ b/staging/src/k8s.io/client-go/pkg/api/v1/types.generated.go @@ -29772,7 +29772,7 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [18]bool + var yyq2 [19]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = len(x.Volumes) != 0 @@ -29792,9 +29792,10 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { yyq2[15] = x.Hostname != "" yyq2[16] = x.Subdomain != "" yyq2[17] = x.Affinity != nil + yyq2[18] = x.SchedulerName != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(18) + r.EncodeArrayStart(19) } else { yynn2 = 1 for _, b := range yyq2 { @@ -30277,6 +30278,31 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[18] { + yym62 := z.EncBinary() + _ = yym62 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[18] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("schedulername")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym63 := z.EncBinary() + _ = yym63 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -30550,6 +30576,18 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.Affinity.CodecDecodeSelf(d) } + case "schedulername": + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv36 := &x.SchedulerName + yym37 := z.DecBinary() + _ = yym37 + if false { + } else { + *((*string)(yyv36)) = r.DecodeString() + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -30561,16 +30599,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj36 int - var yyb36 bool - var yyhl36 bool = l >= 0 - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + var yyj38 int + var yyb38 bool + var yyhl38 bool = l >= 0 + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30578,21 +30616,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv37 := &x.Volumes - yym38 := z.DecBinary() - _ = yym38 + yyv39 := &x.Volumes + yym40 := z.DecBinary() + _ = yym40 if false { } else { - h.decSliceVolume((*[]Volume)(yyv37), d) + h.decSliceVolume((*[]Volume)(yyv39), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30600,21 +30638,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Containers = nil } else { - yyv39 := &x.Containers - yym40 := z.DecBinary() - _ = yym40 + yyv41 := &x.Containers + yym42 := z.DecBinary() + _ = yym42 if false { } else { - h.decSliceContainer((*[]Container)(yyv39), d) + h.decSliceContainer((*[]Container)(yyv41), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30622,16 +30660,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RestartPolicy = "" } else { - yyv41 := &x.RestartPolicy - yyv41.CodecDecodeSelf(d) + yyv43 := &x.RestartPolicy + yyv43.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30644,20 +30682,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TerminationGracePeriodSeconds == nil { x.TerminationGracePeriodSeconds = new(int64) } - yym43 := z.DecBinary() - _ = yym43 + yym45 := z.DecBinary() + _ = yym45 if false { } else { *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30670,20 +30708,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.ActiveDeadlineSeconds == nil { x.ActiveDeadlineSeconds = new(int64) } - yym45 := z.DecBinary() - _ = yym45 + yym47 := z.DecBinary() + _ = yym47 if false { } else { *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30691,16 +30729,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DNSPolicy = "" } else { - yyv46 := &x.DNSPolicy - yyv46.CodecDecodeSelf(d) + yyv48 := &x.DNSPolicy + yyv48.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30708,21 +30746,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeSelector = nil } else { - yyv47 := &x.NodeSelector - yym48 := z.DecBinary() - _ = yym48 + yyv49 := &x.NodeSelector + yym50 := z.DecBinary() + _ = yym50 if false { } else { - z.F.DecMapStringStringX(yyv47, false, d) + z.F.DecMapStringStringX(yyv49, false, d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30730,29 +30768,7 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ServiceAccountName = "" } else { - yyv49 := &x.ServiceAccountName - yym50 := z.DecBinary() - _ = yym50 - if false { - } else { - *((*string)(yyv49)) = r.DecodeString() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DeprecatedServiceAccount = "" - } else { - yyv51 := &x.DeprecatedServiceAccount + yyv51 := &x.ServiceAccountName yym52 := z.DecBinary() _ = yym52 if false { @@ -30760,21 +30776,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv51)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.NodeName = "" + x.DeprecatedServiceAccount = "" } else { - yyv53 := &x.NodeName + yyv53 := &x.DeprecatedServiceAccount yym54 := z.DecBinary() _ = yym54 if false { @@ -30782,13 +30798,35 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv53)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeName = "" + } else { + yyv55 := &x.NodeName + yym56 := z.DecBinary() + _ = yym56 + if false { + } else { + *((*string)(yyv55)) = r.DecodeString() + } + } + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30796,29 +30834,7 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.HostNetwork = false } else { - yyv55 := &x.HostNetwork - yym56 := z.DecBinary() - _ = yym56 - if false { - } else { - *((*bool)(yyv55)) = r.DecodeBool() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostPID = false - } else { - yyv57 := &x.HostPID + yyv57 := &x.HostNetwork yym58 := z.DecBinary() _ = yym58 if false { @@ -30826,21 +30842,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv57)) = r.DecodeBool() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.HostIPC = false + x.HostPID = false } else { - yyv59 := &x.HostIPC + yyv59 := &x.HostPID yym60 := z.DecBinary() _ = yym60 if false { @@ -30848,13 +30864,35 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv59)) = r.DecodeBool() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostIPC = false + } else { + yyv61 := &x.HostIPC + yym62 := z.DecBinary() + _ = yym62 + if false { + } else { + *((*bool)(yyv61)) = r.DecodeBool() + } + } + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30869,13 +30907,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.SecurityContext.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30883,21 +30921,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv62 := &x.ImagePullSecrets - yym63 := z.DecBinary() - _ = yym63 + yyv64 := &x.ImagePullSecrets + yym65 := z.DecBinary() + _ = yym65 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv62), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv64), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30905,29 +30943,7 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Hostname = "" } else { - yyv64 := &x.Hostname - yym65 := z.DecBinary() - _ = yym65 - if false { - } else { - *((*string)(yyv64)) = r.DecodeString() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Subdomain = "" - } else { - yyv66 := &x.Subdomain + yyv66 := &x.Hostname yym67 := z.DecBinary() _ = yym67 if false { @@ -30935,13 +30951,35 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv66)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subdomain = "" + } else { + yyv68 := &x.Subdomain + yym69 := z.DecBinary() + _ = yym69 + if false { + } else { + *((*string)(yyv68)) = r.DecodeString() + } + } + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30956,18 +30994,40 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Affinity.CodecDecodeSelf(d) } - for { - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv71 := &x.SchedulerName + yym72 := z.DecBinary() + _ = yym72 + if false { } else { - yyb36 = r.CheckBreak() + *((*string)(yyv71)) = r.DecodeString() } - if yyb36 { + } + for { + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj36-1, "") + z.DecStructFieldNotFound(yyj38-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -64225,7 +64285,7 @@ func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 688) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 704) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -64344,7 +64404,7 @@ func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Deco yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 736) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 752) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/types.go b/staging/src/k8s.io/client-go/pkg/api/v1/types.go index ff9241dc916..25c7b41033f 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/types.go +++ b/staging/src/k8s.io/client-go/pkg/api/v1/types.go @@ -2140,6 +2140,10 @@ type PodSpec struct { // If specified, the pod's scheduling constraints // +optional Affinity *Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"` + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + SchedulerName string `json:"schedulername,omitempty" protobuf:"bytes,19,opt,name=schedulername"` } // PodSecurityContext holds pod-level security attributes and common container settings. diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go index 010bfb7f4c8..36c9ced8c5f 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go @@ -1294,6 +1294,7 @@ var map_PodSpec = map[string]string{ "hostname": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", "subdomain": "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", "affinity": "If specified, the pod's scheduling constraints", + "schedulername": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", } func (PodSpec) SwaggerDoc() map[string]string { diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go b/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go index ecc51a33d42..aa7aabae2e0 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go +++ b/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go @@ -3069,6 +3069,7 @@ func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conv out.Hostname = in.Hostname out.Subdomain = in.Subdomain out.Affinity = (*api.Affinity)(unsafe.Pointer(in.Affinity)) + out.SchedulerName = in.SchedulerName return nil } @@ -3106,6 +3107,7 @@ func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conv out.Hostname = in.Hostname out.Subdomain = in.Subdomain out.Affinity = (*Affinity)(unsafe.Pointer(in.Affinity)) + out.SchedulerName = in.SchedulerName return nil } diff --git a/staging/src/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go b/staging/src/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go index ce8a0d6e851..59a75f26d55 100644 --- a/staging/src/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go @@ -23,10 +23,10 @@ package api import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" + fields "k8s.io/apimachinery/pkg/fields" labels "k8s.io/apimachinery/pkg/labels" runtime "k8s.io/apimachinery/pkg/runtime" types "k8s.io/apimachinery/pkg/types" - fields "k8s.io/client-go/pkg/fields" reflect "reflect" ) diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go index f91902248a8..5effa1bed95 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go @@ -1679,7 +1679,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 808) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 824) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go b/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go index 62ab84c0430..be8415982b3 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go +++ b/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go @@ -2481,7 +2481,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 832) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 848) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go b/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go index 6c81a390354..e5815f46d92 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go +++ b/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go @@ -4534,7 +4534,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 832) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 848) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -4772,7 +4772,7 @@ func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1080) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1096) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go b/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go index 6e69e1da0ef..bad0b47964b 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go +++ b/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go @@ -21093,7 +21093,7 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 872) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 888) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -21212,7 +21212,7 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 768) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 784) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -21926,7 +21926,7 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 808) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 824) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/staging/src/k8s.io/client-go/pkg/apis/kubeadm/types.go b/staging/src/k8s.io/client-go/pkg/apis/kubeadm/types.go index f922bf0e4ed..aa6f6e004f8 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/kubeadm/types.go +++ b/staging/src/k8s.io/client-go/pkg/apis/kubeadm/types.go @@ -39,6 +39,7 @@ type MasterConfiguration struct { Networking Networking KubernetesVersion string CloudProvider string + AuthorizationMode string } type API struct { diff --git a/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/defaults.go b/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/defaults.go index f676020eff6..2d5c0d27303 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/defaults.go +++ b/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/defaults.go @@ -16,9 +16,7 @@ limitations under the License. package v1alpha1 -import ( - "k8s.io/apimachinery/pkg/runtime" -) +import "k8s.io/apimachinery/pkg/runtime" const ( DefaultServiceDNSDomain = "cluster.local" @@ -27,6 +25,7 @@ const ( DefaultKubernetesFallbackVersion = "v1.5.0" DefaultAPIBindPort = 6443 DefaultDiscoveryBindPort = 9898 + DefaultAuthorizationMode = "RBAC" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { @@ -56,4 +55,8 @@ func SetDefaults_MasterConfiguration(obj *MasterConfiguration) { if obj.Discovery.Token == nil && obj.Discovery.File == nil && obj.Discovery.HTTPS == nil { obj.Discovery.Token = &TokenDiscovery{} } + + if obj.AuthorizationMode == "" { + obj.AuthorizationMode = DefaultAuthorizationMode + } } diff --git a/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/types.go b/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/types.go index cc26c3de9bf..91dca1f9360 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/types.go +++ b/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/types.go @@ -29,6 +29,7 @@ type MasterConfiguration struct { Networking Networking `json:"networking"` KubernetesVersion string `json:"kubernetesVersion"` CloudProvider string `json:"cloudProvider"` + AuthorizationMode string `json:"authorizationMode"` } type API struct { diff --git a/staging/src/k8s.io/client-go/pkg/util/cert/cert.go b/staging/src/k8s.io/client-go/pkg/util/cert/cert.go index fff5b38d634..05664c927be 100644 --- a/staging/src/k8s.io/client-go/pkg/util/cert/cert.go +++ b/staging/src/k8s.io/client-go/pkg/util/cert/cert.go @@ -90,7 +90,7 @@ func NewSignedCert(cfg Config, key *rsa.PrivateKey, caCert *x509.Certificate, ca certTmpl := x509.Certificate{ Subject: pkix.Name{ CommonName: cfg.CommonName, - Organization: caCert.Subject.Organization, + Organization: cfg.Organization, }, DNSNames: cfg.AltNames.DNSNames, IPAddresses: cfg.AltNames.IPs, diff --git a/staging/src/k8s.io/client-go/pkg/util/strategicpatch/patch.go b/staging/src/k8s.io/client-go/pkg/util/strategicpatch/patch.go index 49179313ea6..1c1319ea446 100644 --- a/staging/src/k8s.io/client-go/pkg/util/strategicpatch/patch.go +++ b/staging/src/k8s.io/client-go/pkg/util/strategicpatch/patch.go @@ -48,6 +48,13 @@ const ( deleteFromPrimitiveListDirectivePrefix = "$deleteFromPrimitiveList" ) +// JSONMap is a representations of JSON object encoded as map[string]interface{} +// where the children can be either map[string]interface{}, []interface{} or +// primitive type). +// Operating on JSONMap representation is much faster as it doesn't require any +// json marshaling and/or unmarshaling operations. +type JSONMap map[string]interface{} + // IsPreconditionFailed returns true if the provided error indicates // a precondition failed. func IsPreconditionFailed(err error) bool { @@ -136,11 +143,6 @@ func RequireMetadataKeyUnchanged(key string) PreconditionFunc { } } -// Deprecated: Use the synonym CreateTwoWayMergePatch, instead. -func CreateStrategicMergePatch(original, modified []byte, dataStruct interface{}) ([]byte, error) { - return CreateTwoWayMergePatch(original, modified, dataStruct) -} - // CreateTwoWayMergePatch creates a patch that can be passed to StrategicMergePatch from an original // document and a modified document, which are passed to the method as json encoded content. It will // return a patch that yields the modified document when applied to the original document, or an error @@ -160,12 +162,24 @@ func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, f } } + patchMap, err := CreateTwoWayMergeMapPatch(originalMap, modifiedMap, dataStruct, fns...) + if err != nil { + return nil, err + } + + return json.Marshal(patchMap) +} + +// CreateTwoWayMergeMapPatch creates a patch from an original and modified JSON objects, +// encoded JSONMap. +// The serialized version of the map can then be passed to StrategicMergeMapPatch. +func CreateTwoWayMergeMapPatch(original, modified JSONMap, dataStruct interface{}, fns ...PreconditionFunc) (JSONMap, error) { t, err := getTagStructType(dataStruct) if err != nil { return nil, err } - patchMap, err := diffMaps(originalMap, modifiedMap, t, false, false) + patchMap, err := diffMaps(original, modified, t, false, false) if err != nil { return nil, err } @@ -177,7 +191,7 @@ func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, f } } - return json.Marshal(patchMap) + return patchMap, nil } // Returns a (recursive) strategic merge patch that yields modified when applied to original. @@ -494,12 +508,6 @@ loopB: return patch, nil } -// Deprecated: StrategicMergePatchData is deprecated. Use the synonym StrategicMergePatch, -// instead, which follows the naming convention of evanphx/json-patch. -func StrategicMergePatchData(original, patch []byte, dataStruct interface{}) ([]byte, error) { - return StrategicMergePatch(original, patch, dataStruct) -} - // StrategicMergePatch applies a strategic merge patch. The patch and the original document // must be json encoded content. A patch can be created from an original and a modified document // by calling CreateStrategicMergePatch. @@ -524,12 +532,7 @@ func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte return nil, errBadJSONDoc } - t, err := getTagStructType(dataStruct) - if err != nil { - return nil, err - } - - result, err := mergeMap(originalMap, patchMap, t, true) + result, err := StrategicMergeMapPatch(originalMap, patchMap, dataStruct) if err != nil { return nil, err } @@ -537,6 +540,17 @@ func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte return json.Marshal(result) } +// StrategicMergePatch applies a strategic merge patch. The original and patch documents +// must be JSONMap. A patch can be created from an original and modified document by +// calling CreateTwoWayMergeMapPatch. +func StrategicMergeMapPatch(original, patch JSONMap, dataStruct interface{}) (JSONMap, error) { + t, err := getTagStructType(dataStruct) + if err != nil { + return nil, err + } + return mergeMap(original, patch, t, true) +} + func getTagStructType(dataStruct interface{}) (reflect.Type, error) { if dataStruct == nil { return nil, fmt.Errorf(errBadArgTypeFmt, "struct", "nil") diff --git a/staging/src/k8s.io/client-go/rest/request.go b/staging/src/k8s.io/client-go/rest/request.go index 59b665698c7..166366618a3 100644 --- a/staging/src/k8s.io/client-go/rest/request.go +++ b/staging/src/k8s.io/client-go/rest/request.go @@ -35,6 +35,7 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,7 +45,6 @@ import ( "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api/v1" pathvalidation "k8s.io/client-go/pkg/api/validation/path" - "k8s.io/client-go/pkg/fields" "k8s.io/client-go/pkg/util/flowcontrol" restclientwatch "k8s.io/client-go/rest/watch" "k8s.io/client-go/tools/metrics" diff --git a/staging/src/k8s.io/client-go/testing/actions.go b/staging/src/k8s.io/client-go/testing/actions.go index 3af5f74dcc9..44656b2e43d 100644 --- a/staging/src/k8s.io/client-go/testing/actions.go +++ b/staging/src/k8s.io/client-go/testing/actions.go @@ -21,12 +21,12 @@ import ( "path" "strings" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/fields" ) func NewRootGetAction(resource schema.GroupVersionResource, name string) GetActionImpl { diff --git a/staging/src/k8s.io/client-go/tools/cache/listwatch.go b/staging/src/k8s.io/client-go/tools/cache/listwatch.go index c3b6177ad4a..c1270060a0a 100644 --- a/staging/src/k8s.io/client-go/tools/cache/listwatch.go +++ b/staging/src/k8s.io/client-go/tools/cache/listwatch.go @@ -20,11 +20,11 @@ import ( "time" "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/fields" "k8s.io/client-go/rest" ) diff --git a/staging/src/k8s.io/client-go/tools/record/events_cache.go b/staging/src/k8s.io/client-go/tools/record/events_cache.go index caa8f60d317..abb03ebbab1 100644 --- a/staging/src/k8s.io/client-go/tools/record/events_cache.go +++ b/staging/src/k8s.io/client-go/tools/record/events_cache.go @@ -244,7 +244,7 @@ func (e *eventLogger) eventObserve(newEvent *v1.Event) (*v1.Event, []byte, error newData, _ := json.Marshal(event) oldData, _ := json.Marshal(eventCopy2) - patch, err = strategicpatch.CreateStrategicMergePatch(oldData, newData, event) + patch, err = strategicpatch.CreateTwoWayMergePatch(oldData, newData, event) } // record our new observation From 32a2c2d05cc29ad16ea3b002d341f7c78ad7dc66 Mon Sep 17 00:00:00 2001 From: deads2k Date: Thu, 19 Jan 2017 10:07:51 -0500 Subject: [PATCH 2/7] remove old restclient --- .../fake/generator_fake_for_group.go | 2 +- .../generators/generator_for_clientset.go | 2 +- .../generators/generator_for_group.go | 2 +- .../generators/generator_for_type.go | 2 +- pkg/client/restclient/BUILD | 100 - pkg/client/restclient/OWNERS | 24 - pkg/client/restclient/client.go | 258 --- pkg/client/restclient/client_test.go | 340 ---- pkg/client/restclient/config.go | 380 ---- pkg/client/restclient/config_test.go | 231 --- pkg/client/restclient/plugin.go | 73 - pkg/client/restclient/plugin_test.go | 311 --- pkg/client/restclient/request.go | 1200 ------------ pkg/client/restclient/request_test.go | 1710 ----------------- pkg/client/restclient/transport.go | 98 - pkg/client/restclient/url_utils.go | 90 - pkg/client/restclient/url_utils_test.go | 61 - pkg/client/restclient/urlbackoff.go | 107 -- pkg/client/restclient/urlbackoff_test.go | 79 - pkg/client/restclient/versions.go | 88 - pkg/util/cert/BUILD | 46 - pkg/util/cert/cert.go | 207 -- pkg/util/cert/csr.go | 63 - pkg/util/cert/io.go | 129 -- pkg/util/cert/pem.go | 107 -- pkg/util/testing/BUILD | 38 - pkg/util/testing/fake_handler.go | 139 -- pkg/util/testing/tmpdir.go | 44 - staging/copy.sh | 16 +- .../client-go/pkg}/util/cert/csr_test.go | 0 .../util/cert/testdata/dontUseThisKey.pem | 0 .../client-go/pkg}/util/cert/triple/BUILD | 0 .../client-go/pkg}/util/cert/triple/triple.go | 0 .../client-go/pkg/util/clock/clock_test.go | 184 ++ .../pkg/util/flowcontrol/backoff_test.go | 195 ++ .../pkg/util/flowcontrol/throttle_test.go | 177 ++ .../pkg/util/integer/integer_test.go | 244 +++ .../pkg}/util/testing/fake_handler_test.go | 0 staging/src/k8s.io/client-go/rest/request.go | 62 +- .../src/k8s.io/client-go/rest/request_test.go | 27 + 40 files changed, 894 insertions(+), 5942 deletions(-) delete mode 100644 pkg/client/restclient/BUILD delete mode 100755 pkg/client/restclient/OWNERS delete mode 100644 pkg/client/restclient/client.go delete mode 100644 pkg/client/restclient/client_test.go delete mode 100644 pkg/client/restclient/config.go delete mode 100644 pkg/client/restclient/config_test.go delete mode 100644 pkg/client/restclient/plugin.go delete mode 100644 pkg/client/restclient/plugin_test.go delete mode 100644 pkg/client/restclient/request.go delete mode 100755 pkg/client/restclient/request_test.go delete mode 100644 pkg/client/restclient/transport.go delete mode 100644 pkg/client/restclient/url_utils.go delete mode 100644 pkg/client/restclient/url_utils_test.go delete mode 100644 pkg/client/restclient/urlbackoff.go delete mode 100644 pkg/client/restclient/urlbackoff_test.go delete mode 100644 pkg/client/restclient/versions.go delete mode 100644 pkg/util/cert/BUILD delete mode 100644 pkg/util/cert/cert.go delete mode 100644 pkg/util/cert/csr.go delete mode 100644 pkg/util/cert/io.go delete mode 100644 pkg/util/cert/pem.go delete mode 100644 pkg/util/testing/BUILD delete mode 100644 pkg/util/testing/fake_handler.go delete mode 100644 pkg/util/testing/tmpdir.go rename {pkg => staging/src/k8s.io/client-go/pkg}/util/cert/csr_test.go (100%) rename {pkg => staging/src/k8s.io/client-go/pkg}/util/cert/testdata/dontUseThisKey.pem (100%) rename {pkg => staging/src/k8s.io/client-go/pkg}/util/cert/triple/BUILD (100%) rename {pkg => staging/src/k8s.io/client-go/pkg}/util/cert/triple/triple.go (100%) create mode 100644 staging/src/k8s.io/client-go/pkg/util/clock/clock_test.go create mode 100644 staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff_test.go create mode 100644 staging/src/k8s.io/client-go/pkg/util/flowcontrol/throttle_test.go create mode 100644 staging/src/k8s.io/client-go/pkg/util/integer/integer_test.go rename {pkg => staging/src/k8s.io/client-go/pkg}/util/testing/fake_handler_test.go (100%) diff --git a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go index fdd4f2daa7b..e39137141db 100644 --- a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go +++ b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go @@ -60,7 +60,7 @@ func (g *genFakeForGroup) Imports(c *generator.Context) (imports []string) { func (g *genFakeForGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") const pkgTestingCore = "k8s.io/kubernetes/pkg/client/testing/core" - const pkgRESTClient = "k8s.io/kubernetes/pkg/client/restclient" + const pkgRESTClient = "k8s.io/client-go/rest" m := map[string]interface{}{ "group": g.group, "GroupVersion": namer.IC(g.group) + namer.IC(g.version), diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go b/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go index 7b790459431..f4309498db0 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go @@ -73,7 +73,7 @@ func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Wr // perhaps we can adapt the go2ild framework to this kind of usage. sw := generator.NewSnippetWriter(w, c, "$", "$") const pkgDiscovery = "k8s.io/kubernetes/pkg/client/typed/discovery" - const pkgRESTClient = "k8s.io/kubernetes/pkg/client/restclient" + const pkgRESTClient = "k8s.io/client-go/rest" allGroups := clientgentypes.ToGroupVersionPackages(g.groups) diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_group.go b/cmd/libs/go2idl/client-gen/generators/generator_for_group.go index 7dabf1eabe9..158ab9dbbc9 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_group.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_group.go @@ -57,7 +57,7 @@ func (g *genGroup) Imports(c *generator.Context) (imports []string) { func (g *genGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") - const pkgRESTClient = "k8s.io/kubernetes/pkg/client/restclient" + const pkgRESTClient = "k8s.io/client-go/rest" const pkgAPI = "k8s.io/kubernetes/pkg/api" const pkgSerializer = "k8s.io/apimachinery/pkg/runtime/serializer" const pkgUnversioned = "k8s.io/kubernetes/pkg/api/unversioned" diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_type.go b/cmd/libs/go2idl/client-gen/generators/generator_for_type.go index 4963cd54f98..fb3414f9877 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_type.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_type.go @@ -84,7 +84,7 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "Group": namer.IC(g.group), "GroupVersion": namer.IC(g.group) + namer.IC(g.version), "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), - "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/client/restclient", Name: "Interface"}), + "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), "apiParameterCodec": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ParameterCodec"}), "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), "namespaced": namespaced, diff --git a/pkg/client/restclient/BUILD b/pkg/client/restclient/BUILD deleted file mode 100644 index 90ad1ecfc04..00000000000 --- a/pkg/client/restclient/BUILD +++ /dev/null @@ -1,100 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "client.go", - "config.go", - "plugin.go", - "request.go", - "transport.go", - "url_utils.go", - "urlbackoff.go", - "versions.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/api/validation/path:go_default_library", - "//pkg/client/metrics:go_default_library", - "//pkg/util/cert:go_default_library", - "//pkg/version:go_default_library", - "//vendor:github.com/golang/glog", - "//vendor:k8s.io/apimachinery/pkg/api/errors", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/fields", - "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "//vendor:k8s.io/apimachinery/pkg/types", - "//vendor:k8s.io/apimachinery/pkg/util/net", - "//vendor:k8s.io/apimachinery/pkg/util/sets", - "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/client-go/pkg/util/flowcontrol", - "//vendor:k8s.io/client-go/rest/watch", - "//vendor:k8s.io/client-go/tools/clientcmd/api", - "//vendor:k8s.io/client-go/transport", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "client_test.go", - "config_test.go", - "plugin_test.go", - "request_test.go", - "url_utils_test.go", - "urlbackoff_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/api/testapi:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/util/httpstream:go_default_library", - "//pkg/util/intstr:go_default_library", - "//pkg/util/testing:go_default_library", - "//vendor:github.com/google/gofuzz", - "//vendor:k8s.io/apimachinery/pkg/api/errors", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "//vendor:k8s.io/apimachinery/pkg/types", - "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/client-go/pkg/util/clock", - "//vendor:k8s.io/client-go/pkg/util/flowcontrol", - "//vendor:k8s.io/client-go/rest/watch", - "//vendor:k8s.io/client-go/tools/clientcmd/api", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/restclient/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/restclient/OWNERS b/pkg/client/restclient/OWNERS deleted file mode 100755 index 8d97da007d4..00000000000 --- a/pkg/client/restclient/OWNERS +++ /dev/null @@ -1,24 +0,0 @@ -reviewers: -- thockin -- smarterclayton -- caesarxuchao -- wojtek-t -- deads2k -- brendandburns -- liggitt -- nikhiljindal -- gmarek -- erictune -- sttts -- luxas -- dims -- errordeveloper -- hongchaodeng -- krousey -- resouer -- cjcullen -- rmmh -- lixiaobing10051267 -- asalkeld -- juanvallejo -- lojies diff --git a/pkg/client/restclient/client.go b/pkg/client/restclient/client.go deleted file mode 100644 index 141e08e92b9..00000000000 --- a/pkg/client/restclient/client.go +++ /dev/null @@ -1,258 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "mime" - "net/http" - "net/url" - "os" - "strconv" - "strings" - "time" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/pkg/util/flowcontrol" -) - -const ( - // Environment variables: Note that the duration should be long enough that the backoff - // persists for some reasonable time (i.e. 120 seconds). The typical base might be "1". - envBackoffBase = "KUBE_CLIENT_BACKOFF_BASE" - envBackoffDuration = "KUBE_CLIENT_BACKOFF_DURATION" -) - -// Interface captures the set of operations for generically interacting with Kubernetes REST apis. -type Interface interface { - GetRateLimiter() flowcontrol.RateLimiter - Verb(verb string) *Request - Post() *Request - Put() *Request - Patch(pt types.PatchType) *Request - Get() *Request - Delete() *Request - APIVersion() schema.GroupVersion -} - -// RESTClient imposes common Kubernetes API conventions on a set of resource paths. -// The baseURL is expected to point to an HTTP or HTTPS path that is the parent -// of one or more resources. The server should return a decodable API resource -// object, or an api.Status object which contains information about the reason for -// any failure. -// -// Most consumers should use client.New() to get a Kubernetes API client. -type RESTClient struct { - // base is the root URL for all invocations of the client - base *url.URL - // versionedAPIPath is a path segment connecting the base URL to the resource root - versionedAPIPath string - - // contentConfig is the information used to communicate with the server. - contentConfig ContentConfig - - // serializers contain all serializers for underlying content type. - serializers Serializers - - // creates BackoffManager that is passed to requests. - createBackoffMgr func() BackoffManager - - // TODO extract this into a wrapper interface via the RESTClient interface in kubectl. - Throttle flowcontrol.RateLimiter - - // Set specific behavior of the client. If not set http.DefaultClient will be used. - Client *http.Client -} - -type Serializers struct { - Encoder runtime.Encoder - Decoder runtime.Decoder - StreamingSerializer runtime.Serializer - Framer runtime.Framer - RenegotiatedDecoder func(contentType string, params map[string]string) (runtime.Decoder, error) -} - -// NewRESTClient creates a new RESTClient. This client performs generic REST functions -// such as Get, Put, Post, and Delete on specified paths. Codec controls encoding and -// decoding of responses from the server. -func NewRESTClient(baseURL *url.URL, versionedAPIPath string, config ContentConfig, maxQPS float32, maxBurst int, rateLimiter flowcontrol.RateLimiter, client *http.Client) (*RESTClient, error) { - base := *baseURL - if !strings.HasSuffix(base.Path, "/") { - base.Path += "/" - } - base.RawQuery = "" - base.Fragment = "" - - if config.GroupVersion == nil { - config.GroupVersion = &schema.GroupVersion{} - } - if len(config.ContentType) == 0 { - config.ContentType = "application/json" - } - serializers, err := createSerializers(config) - if err != nil { - return nil, err - } - - var throttle flowcontrol.RateLimiter - if maxQPS > 0 && rateLimiter == nil { - throttle = flowcontrol.NewTokenBucketRateLimiter(maxQPS, maxBurst) - } else if rateLimiter != nil { - throttle = rateLimiter - } - return &RESTClient{ - base: &base, - versionedAPIPath: versionedAPIPath, - contentConfig: config, - serializers: *serializers, - createBackoffMgr: readExpBackoffConfig, - Throttle: throttle, - Client: client, - }, nil -} - -// GetRateLimiter returns rate limier for a given client, or nil if it's called on a nil client -func (c *RESTClient) GetRateLimiter() flowcontrol.RateLimiter { - if c == nil { - return nil - } - return c.Throttle -} - -// readExpBackoffConfig handles the internal logic of determining what the -// backoff policy is. By default if no information is available, NoBackoff. -// TODO Generalize this see #17727 . -func readExpBackoffConfig() BackoffManager { - backoffBase := os.Getenv(envBackoffBase) - backoffDuration := os.Getenv(envBackoffDuration) - - backoffBaseInt, errBase := strconv.ParseInt(backoffBase, 10, 64) - backoffDurationInt, errDuration := strconv.ParseInt(backoffDuration, 10, 64) - if errBase != nil || errDuration != nil { - return &NoBackoff{} - } - return &URLBackoff{ - Backoff: flowcontrol.NewBackOff( - time.Duration(backoffBaseInt)*time.Second, - time.Duration(backoffDurationInt)*time.Second)} -} - -// createSerializers creates all necessary serializers for given contentType. -// TODO: the negotiated serializer passed to this method should probably return -// serializers that control decoding and versioning without this package -// being aware of the types. Depends on whether RESTClient must deal with -// generic infrastructure. -func createSerializers(config ContentConfig) (*Serializers, error) { - mediaTypes := config.NegotiatedSerializer.SupportedMediaTypes() - contentType := config.ContentType - mediaType, _, err := mime.ParseMediaType(contentType) - if err != nil { - return nil, fmt.Errorf("the content type specified in the client configuration is not recognized: %v", err) - } - info, ok := runtime.SerializerInfoForMediaType(mediaTypes, mediaType) - if !ok { - if len(contentType) != 0 || len(mediaTypes) == 0 { - return nil, fmt.Errorf("no serializers registered for %s", contentType) - } - info = mediaTypes[0] - } - - internalGV := schema.GroupVersions{ - { - Group: config.GroupVersion.Group, - Version: runtime.APIVersionInternal, - }, - // always include the legacy group as a decoding target to handle non-error `Status` return types - { - Group: "", - Version: runtime.APIVersionInternal, - }, - } - - s := &Serializers{ - Encoder: config.NegotiatedSerializer.EncoderForVersion(info.Serializer, *config.GroupVersion), - Decoder: config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV), - - RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) { - info, ok := runtime.SerializerInfoForMediaType(mediaTypes, contentType) - if !ok { - return nil, fmt.Errorf("serializer for %s not registered", contentType) - } - return config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV), nil - }, - } - if info.StreamSerializer != nil { - s.StreamingSerializer = info.StreamSerializer.Serializer - s.Framer = info.StreamSerializer.Framer - } - - return s, nil -} - -// Verb begins a request with a verb (GET, POST, PUT, DELETE). -// -// Example usage of RESTClient's request building interface: -// c, err := NewRESTClient(...) -// if err != nil { ... } -// resp, err := c.Verb("GET"). -// Path("pods"). -// SelectorParam("labels", "area=staging"). -// Timeout(10*time.Second). -// Do() -// if err != nil { ... } -// list, ok := resp.(*api.PodList) -// -func (c *RESTClient) Verb(verb string) *Request { - backoff := c.createBackoffMgr() - - if c.Client == nil { - return NewRequest(nil, verb, c.base, c.versionedAPIPath, c.contentConfig, c.serializers, backoff, c.Throttle) - } - return NewRequest(c.Client, verb, c.base, c.versionedAPIPath, c.contentConfig, c.serializers, backoff, c.Throttle) -} - -// Post begins a POST request. Short for c.Verb("POST"). -func (c *RESTClient) Post() *Request { - return c.Verb("POST") -} - -// Put begins a PUT request. Short for c.Verb("PUT"). -func (c *RESTClient) Put() *Request { - return c.Verb("PUT") -} - -// Patch begins a PATCH request. Short for c.Verb("Patch"). -func (c *RESTClient) Patch(pt types.PatchType) *Request { - return c.Verb("PATCH").SetHeader("Content-Type", string(pt)) -} - -// Get begins a GET request. Short for c.Verb("GET"). -func (c *RESTClient) Get() *Request { - return c.Verb("GET") -} - -// Delete begins a DELETE request. Short for c.Verb("DELETE"). -func (c *RESTClient) Delete() *Request { - return c.Verb("DELETE") -} - -// APIVersion returns the APIVersion this RESTClient is expected to use. -func (c *RESTClient) APIVersion() schema.GroupVersion { - return *c.contentConfig.GroupVersion -} diff --git a/pkg/client/restclient/client_test.go b/pkg/client/restclient/client_test.go deleted file mode 100644 index 11d019d9fc6..00000000000 --- a/pkg/client/restclient/client_test.go +++ /dev/null @@ -1,340 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "net/http" - "net/http/httptest" - "net/url" - "os" - "reflect" - "testing" - "time" - - "fmt" - - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/testapi" - utiltesting "k8s.io/kubernetes/pkg/util/testing" -) - -type TestParam struct { - actualError error - expectingError bool - actualCreated bool - expCreated bool - expStatus *metav1.Status - testBody bool - testBodyErrorIsNotNil bool -} - -// TestSerializer makes sure that you're always able to decode an unversioned API object -func TestSerializer(t *testing.T) { - contentConfig := ContentConfig{ - ContentType: "application/json", - GroupVersion: &schema.GroupVersion{Group: "other", Version: runtime.APIVersionInternal}, - NegotiatedSerializer: api.Codecs, - } - - serializer, err := createSerializers(contentConfig) - if err != nil { - t.Fatal(err) - } - // bytes based on actual return from API server when encoding an "unversioned" object - obj, err := runtime.Decode(serializer.Decoder, []byte(`{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success"}`)) - t.Log(obj) - if err != nil { - t.Fatal(err) - } -} - -func TestDoRequestSuccess(t *testing.T) { - testServer, fakeHandler, status := testServerEnv(t, 200) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - body, err := c.Get().Prefix("test").Do().Raw() - - testParam := TestParam{actualError: err, expectingError: false, expCreated: true, - expStatus: status, testBody: true, testBodyErrorIsNotNil: false} - validate(testParam, t, body, fakeHandler) -} - -func TestDoRequestFailed(t *testing.T) { - status := &metav1.Status{ - Code: http.StatusNotFound, - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonNotFound, - Message: " \"\" not found", - Details: &metav1.StatusDetails{}, - } - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 404, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - err = c.Get().Do().Error() - if err == nil { - t.Errorf("unexpected non-error") - } - ss, ok := err.(errors.APIStatus) - if !ok { - t.Errorf("unexpected error type %v", err) - } - actual := ss.Status() - if !reflect.DeepEqual(status, &actual) { - t.Errorf("Unexpected mis-match: %s", diff.ObjectReflectDiff(status, &actual)) - } -} - -func TestDoRawRequestFailed(t *testing.T) { - status := &metav1.Status{ - Code: http.StatusNotFound, - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonNotFound, - Message: "the server could not find the requested resource", - Details: &metav1.StatusDetails{ - Causes: []metav1.StatusCause{ - {Type: metav1.CauseTypeUnexpectedServerResponse, Message: "unknown"}, - }, - }, - } - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 404, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - body, err := c.Get().Do().Raw() - - if err == nil || body == nil { - t.Errorf("unexpected non-error: %#v", body) - } - ss, ok := err.(errors.APIStatus) - if !ok { - t.Errorf("unexpected error type %v", err) - } - actual := ss.Status() - if !reflect.DeepEqual(status, &actual) { - t.Errorf("Unexpected mis-match: %s", diff.ObjectReflectDiff(status, &actual)) - } -} - -func TestDoRequestCreated(t *testing.T) { - testServer, fakeHandler, status := testServerEnv(t, 201) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - - testParam := TestParam{actualError: err, expectingError: false, expCreated: true, - expStatus: status, testBody: false} - validate(testParam, t, body, fakeHandler) -} - -func TestDoRequestNotCreated(t *testing.T) { - testServer, fakeHandler, expectedStatus := testServerEnv(t, 202) - defer testServer.Close() - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - testParam := TestParam{actualError: err, expectingError: false, expCreated: false, - expStatus: expectedStatus, testBody: false} - validate(testParam, t, body, fakeHandler) -} - -func TestDoRequestAcceptedNoContentReturned(t *testing.T) { - testServer, fakeHandler, _ := testServerEnv(t, 204) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - testParam := TestParam{actualError: err, expectingError: false, expCreated: false, - testBody: false} - validate(testParam, t, body, fakeHandler) -} - -func TestBadRequest(t *testing.T) { - testServer, fakeHandler, _ := testServerEnv(t, 400) - defer testServer.Close() - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - testParam := TestParam{actualError: err, expectingError: true, expCreated: false, - testBody: true} - validate(testParam, t, body, fakeHandler) -} - -func validate(testParam TestParam, t *testing.T, body []byte, fakeHandler *utiltesting.FakeHandler) { - switch { - case testParam.expectingError && testParam.actualError == nil: - t.Errorf("Expected error") - case !testParam.expectingError && testParam.actualError != nil: - t.Error(testParam.actualError) - } - if !testParam.expCreated { - if testParam.actualCreated { - t.Errorf("Expected object not to be created") - } - } - statusOut, err := runtime.Decode(testapi.Default.Codec(), body) - if testParam.testBody { - if testParam.testBodyErrorIsNotNil { - if err == nil { - t.Errorf("Expected Error") - } - } - } - - if testParam.expStatus != nil { - if !reflect.DeepEqual(testParam.expStatus, statusOut) { - t.Errorf("Unexpected mis-match. Expected %#v. Saw %#v", testParam.expStatus, statusOut) - } - } - fakeHandler.ValidateRequest(t, "/"+api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()+"/test", "GET", nil) - -} - -func TestHttpMethods(t *testing.T) { - testServer, _, _ := testServerEnv(t, 200) - defer testServer.Close() - c, _ := restClient(testServer) - - request := c.Post() - if request == nil { - t.Errorf("Post : Object returned should not be nil") - } - - request = c.Get() - if request == nil { - t.Errorf("Get: Object returned should not be nil") - } - - request = c.Put() - if request == nil { - t.Errorf("Put : Object returned should not be nil") - } - - request = c.Delete() - if request == nil { - t.Errorf("Delete : Object returned should not be nil") - } - - request = c.Patch(types.JSONPatchType) - if request == nil { - t.Errorf("Patch : Object returned should not be nil") - } -} - -func TestCreateBackoffManager(t *testing.T) { - - theUrl, _ := url.Parse("http://localhost") - - // 1 second base backoff + duration of 2 seconds -> exponential backoff for requests. - os.Setenv(envBackoffBase, "1") - os.Setenv(envBackoffDuration, "2") - backoff := readExpBackoffConfig() - backoff.UpdateBackoff(theUrl, nil, 500) - backoff.UpdateBackoff(theUrl, nil, 500) - if backoff.CalculateBackoff(theUrl)/time.Second != 2 { - t.Errorf("Backoff env not working.") - } - - // 0 duration -> no backoff. - os.Setenv(envBackoffBase, "1") - os.Setenv(envBackoffDuration, "0") - backoff.UpdateBackoff(theUrl, nil, 500) - backoff.UpdateBackoff(theUrl, nil, 500) - backoff = readExpBackoffConfig() - if backoff.CalculateBackoff(theUrl)/time.Second != 0 { - t.Errorf("Zero backoff duration, but backoff still occuring.") - } - - // No env -> No backoff. - os.Setenv(envBackoffBase, "") - os.Setenv(envBackoffDuration, "") - backoff = readExpBackoffConfig() - backoff.UpdateBackoff(theUrl, nil, 500) - backoff.UpdateBackoff(theUrl, nil, 500) - if backoff.CalculateBackoff(theUrl)/time.Second != 0 { - t.Errorf("Backoff should have been 0.") - } - -} - -func testServerEnv(t *testing.T, statusCode int) (*httptest.Server, *utiltesting.FakeHandler, *metav1.Status) { - status := &metav1.Status{Status: fmt.Sprintf("%s", metav1.StatusSuccess)} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: statusCode, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - return testServer, &fakeHandler, status -} - -func restClient(testServer *httptest.Server) (*RESTClient, error) { - c, err := RESTClientFor(&Config{ - Host: testServer.URL, - ContentConfig: ContentConfig{ - GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion, - NegotiatedSerializer: testapi.Default.NegotiatedSerializer(), - }, - Username: "user", - Password: "pass", - }) - return c, err -} diff --git a/pkg/client/restclient/config.go b/pkg/client/restclient/config.go deleted file mode 100644 index 1e6a992df16..00000000000 --- a/pkg/client/restclient/config.go +++ /dev/null @@ -1,380 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "io/ioutil" - "net" - "net/http" - "os" - "path" - gruntime "runtime" - "strings" - "time" - - "github.com/golang/glog" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/pkg/util/flowcontrol" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/kubernetes/pkg/api" - certutil "k8s.io/kubernetes/pkg/util/cert" - "k8s.io/kubernetes/pkg/version" -) - -const ( - DefaultQPS float32 = 5.0 - DefaultBurst int = 10 -) - -// Config holds the common attributes that can be passed to a Kubernetes client on -// initialization. -type Config struct { - // Host must be a host string, a host:port pair, or a URL to the base of the apiserver. - // If a URL is given then the (optional) Path of that URL represents a prefix that must - // be appended to all request URIs used to access the apiserver. This allows a frontend - // proxy to easily relocate all of the apiserver endpoints. - Host string - // APIPath is a sub-path that points to an API root. - APIPath string - // Prefix is the sub path of the server. If not specified, the client will set - // a default value. Use "/" to indicate the server root should be used - Prefix string - - // ContentConfig contains settings that affect how objects are transformed when - // sent to the server. - ContentConfig - - // Server requires Basic authentication - Username string - Password string - - // Server requires Bearer authentication. This client will not attempt to use - // refresh tokens for an OAuth2 flow. - // TODO: demonstrate an OAuth2 compatible client. - BearerToken string - - // Impersonate is the configuration that RESTClient will use for impersonation. - Impersonate ImpersonationConfig - - // Server requires plugin-specified authentication. - AuthProvider *clientcmdapi.AuthProviderConfig - - // Callback to persist config for AuthProvider. - AuthConfigPersister AuthProviderConfigPersister - - // TLSClientConfig contains settings to enable transport layer security - TLSClientConfig - - // Server should be accessed without verifying the TLS - // certificate. For testing only. - Insecure bool - - // UserAgent is an optional field that specifies the caller of this request. - UserAgent string - - // Transport may be used for custom HTTP behavior. This attribute may not - // be specified with the TLS client certificate options. Use WrapTransport - // for most client level operations. - Transport http.RoundTripper - // WrapTransport will be invoked for custom HTTP behavior after the underlying - // transport is initialized (either the transport created from TLSClientConfig, - // Transport, or http.DefaultTransport). The config may layer other RoundTrippers - // on top of the returned RoundTripper. - WrapTransport func(rt http.RoundTripper) http.RoundTripper - - // QPS indicates the maximum QPS to the master from this client. - // If it's zero, the created RESTClient will use DefaultQPS: 5 - QPS float32 - - // Maximum burst for throttle. - // If it's zero, the created RESTClient will use DefaultBurst: 10. - Burst int - - // Rate limiter for limiting connections to the master from this client. If present overwrites QPS/Burst - RateLimiter flowcontrol.RateLimiter - - // The maximum length of time to wait before giving up on a server request. A value of zero means no timeout. - Timeout time.Duration - - // Version forces a specific version to be used (if registered) - // Do we need this? - // Version string -} - -// ImpersonationConfig has all the available impersonation options -type ImpersonationConfig struct { - // UserName is the username to impersonate on each request. - UserName string - // Groups are the groups to impersonate on each request. - Groups []string - // Extra is a free-form field which can be used to link some authentication information - // to authorization information. This field allows you to impersonate it. - Extra map[string][]string -} - -// TLSClientConfig contains settings to enable transport layer security -type TLSClientConfig struct { - // Server requires TLS client certificate authentication - CertFile string - // Server requires TLS client certificate authentication - KeyFile string - // Trusted root certificates for server - CAFile string - - // CertData holds PEM-encoded bytes (typically read from a client certificate file). - // CertData takes precedence over CertFile - CertData []byte - // KeyData holds PEM-encoded bytes (typically read from a client certificate key file). - // KeyData takes precedence over KeyFile - KeyData []byte - // CAData holds PEM-encoded bytes (typically read from a root certificates bundle). - // CAData takes precedence over CAFile - CAData []byte -} - -type ContentConfig struct { - // AcceptContentTypes specifies the types the client will accept and is optional. - // If not set, ContentType will be used to define the Accept header - AcceptContentTypes string - // ContentType specifies the wire format used to communicate with the server. - // This value will be set as the Accept header on requests made to the server, and - // as the default content type on any object sent to the server. If not set, - // "application/json" is used. - ContentType string - // GroupVersion is the API version to talk to. Must be provided when initializing - // a RESTClient directly. When initializing a Client, will be set with the default - // code version. - GroupVersion *schema.GroupVersion - // NegotiatedSerializer is used for obtaining encoders and decoders for multiple - // supported media types. - NegotiatedSerializer runtime.NegotiatedSerializer -} - -// RESTClientFor returns a RESTClient that satisfies the requested attributes on a client Config -// object. Note that a RESTClient may require fields that are optional when initializing a Client. -// A RESTClient created by this method is generic - it expects to operate on an API that follows -// the Kubernetes conventions, but may not be the Kubernetes API. -func RESTClientFor(config *Config) (*RESTClient, error) { - if config.GroupVersion == nil { - return nil, fmt.Errorf("GroupVersion is required when initializing a RESTClient") - } - if config.NegotiatedSerializer == nil { - return nil, fmt.Errorf("NegotiatedSerializer is required when initializing a RESTClient") - } - qps := config.QPS - if config.QPS == 0.0 { - qps = DefaultQPS - } - burst := config.Burst - if config.Burst == 0 { - burst = DefaultBurst - } - - baseURL, versionedAPIPath, err := defaultServerUrlFor(config) - if err != nil { - return nil, err - } - - transport, err := TransportFor(config) - if err != nil { - return nil, err - } - - var httpClient *http.Client - if transport != http.DefaultTransport { - httpClient = &http.Client{Transport: transport} - if config.Timeout > 0 { - httpClient.Timeout = config.Timeout - } - } - - return NewRESTClient(baseURL, versionedAPIPath, config.ContentConfig, qps, burst, config.RateLimiter, httpClient) -} - -// UnversionedRESTClientFor is the same as RESTClientFor, except that it allows -// the config.Version to be empty. -func UnversionedRESTClientFor(config *Config) (*RESTClient, error) { - if config.NegotiatedSerializer == nil { - return nil, fmt.Errorf("NeogitatedSerializer is required when initializing a RESTClient") - } - - baseURL, versionedAPIPath, err := defaultServerUrlFor(config) - if err != nil { - return nil, err - } - - transport, err := TransportFor(config) - if err != nil { - return nil, err - } - - var httpClient *http.Client - if transport != http.DefaultTransport { - httpClient = &http.Client{Transport: transport} - if config.Timeout > 0 { - httpClient.Timeout = config.Timeout - } - } - - versionConfig := config.ContentConfig - if versionConfig.GroupVersion == nil { - v := metav1.SchemeGroupVersion - versionConfig.GroupVersion = &v - } - - return NewRESTClient(baseURL, versionedAPIPath, versionConfig, config.QPS, config.Burst, config.RateLimiter, httpClient) -} - -// SetKubernetesDefaults sets default values on the provided client config for accessing the -// Kubernetes API or returns an error if any of the defaults are impossible or invalid. -func SetKubernetesDefaults(config *Config) error { - if len(config.UserAgent) == 0 { - config.UserAgent = DefaultKubernetesUserAgent() - } - return nil -} - -// DefaultKubernetesUserAgent returns the default user agent that clients can use. -func DefaultKubernetesUserAgent() string { - commit := version.Get().GitCommit - if len(commit) > 7 { - commit = commit[:7] - } - if len(commit) == 0 { - commit = "unknown" - } - version := version.Get().GitVersion - seg := strings.SplitN(version, "-", 2) - version = seg[0] - return fmt.Sprintf("%s/%s (%s/%s) kubernetes/%s", path.Base(os.Args[0]), version, gruntime.GOOS, gruntime.GOARCH, commit) -} - -// InClusterConfig returns a config object which uses the service account -// kubernetes gives to pods. It's intended for clients that expect to be -// running inside a pod running on kubernetes. It will return an error if -// called from a process not running in a kubernetes environment. -func InClusterConfig() (*Config, error) { - host, port := os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT") - if len(host) == 0 || len(port) == 0 { - return nil, fmt.Errorf("unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined") - } - - token, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/" + api.ServiceAccountTokenKey) - if err != nil { - return nil, err - } - tlsClientConfig := TLSClientConfig{} - rootCAFile := "/var/run/secrets/kubernetes.io/serviceaccount/" + api.ServiceAccountRootCAKey - if _, err := certutil.NewPool(rootCAFile); err != nil { - glog.Errorf("Expected to load root CA config from %s, but got err: %v", rootCAFile, err) - } else { - tlsClientConfig.CAFile = rootCAFile - } - - return &Config{ - // TODO: switch to using cluster DNS. - Host: "https://" + net.JoinHostPort(host, port), - BearerToken: string(token), - TLSClientConfig: tlsClientConfig, - }, nil -} - -// IsConfigTransportTLS returns true if and only if the provided -// config will result in a protected connection to the server when it -// is passed to restclient.RESTClientFor(). Use to determine when to -// send credentials over the wire. -// -// Note: the Insecure flag is ignored when testing for this value, so MITM attacks are -// still possible. -func IsConfigTransportTLS(config Config) bool { - baseURL, _, err := defaultServerUrlFor(&config) - if err != nil { - return false - } - return baseURL.Scheme == "https" -} - -// LoadTLSFiles copies the data from the CertFile, KeyFile, and CAFile fields into the CertData, -// KeyData, and CAFile fields, or returns an error. If no error is returned, all three fields are -// either populated or were empty to start. -func LoadTLSFiles(c *Config) error { - var err error - c.CAData, err = dataFromSliceOrFile(c.CAData, c.CAFile) - if err != nil { - return err - } - - c.CertData, err = dataFromSliceOrFile(c.CertData, c.CertFile) - if err != nil { - return err - } - - c.KeyData, err = dataFromSliceOrFile(c.KeyData, c.KeyFile) - if err != nil { - return err - } - return nil -} - -// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file, -// or an error if an error occurred reading the file -func dataFromSliceOrFile(data []byte, file string) ([]byte, error) { - if len(data) > 0 { - return data, nil - } - if len(file) > 0 { - fileData, err := ioutil.ReadFile(file) - if err != nil { - return []byte{}, err - } - return fileData, nil - } - return nil, nil -} - -func AddUserAgent(config *Config, userAgent string) *Config { - fullUserAgent := DefaultKubernetesUserAgent() + "/" + userAgent - config.UserAgent = fullUserAgent - return config -} - -// AnonymousClientConfig returns a copy of the given config with all user credentials (cert/key, bearer token, and username/password) removed -func AnonymousClientConfig(config *Config) *Config { - // copy only known safe fields - return &Config{ - Host: config.Host, - APIPath: config.APIPath, - Prefix: config.Prefix, - ContentConfig: config.ContentConfig, - TLSClientConfig: TLSClientConfig{ - CAFile: config.TLSClientConfig.CAFile, - CAData: config.TLSClientConfig.CAData, - }, - RateLimiter: config.RateLimiter, - Insecure: config.Insecure, - UserAgent: config.UserAgent, - Transport: config.Transport, - WrapTransport: config.WrapTransport, - QPS: config.QPS, - Burst: config.Burst, - Timeout: config.Timeout, - } -} diff --git a/pkg/client/restclient/config_test.go b/pkg/client/restclient/config_test.go deleted file mode 100644 index 5cdb36b67f3..00000000000 --- a/pkg/client/restclient/config_test.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "io" - "net/http" - "reflect" - "strings" - "testing" - - fuzz "github.com/google/gofuzz" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/client-go/pkg/util/flowcontrol" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/testapi" -) - -func TestIsConfigTransportTLS(t *testing.T) { - testCases := []struct { - Config *Config - TransportTLS bool - }{ - { - Config: &Config{}, - TransportTLS: false, - }, - { - Config: &Config{ - Host: "https://localhost", - }, - TransportTLS: true, - }, - { - Config: &Config{ - Host: "localhost", - TLSClientConfig: TLSClientConfig{ - CertFile: "foo", - }, - }, - TransportTLS: true, - }, - { - Config: &Config{ - Host: "///:://localhost", - TLSClientConfig: TLSClientConfig{ - CertFile: "foo", - }, - }, - TransportTLS: false, - }, - { - Config: &Config{ - Host: "1.2.3.4:567", - Insecure: true, - }, - TransportTLS: true, - }, - } - for _, testCase := range testCases { - if err := SetKubernetesDefaults(testCase.Config); err != nil { - t.Errorf("setting defaults failed for %#v: %v", testCase.Config, err) - continue - } - useTLS := IsConfigTransportTLS(*testCase.Config) - if testCase.TransportTLS != useTLS { - t.Errorf("expected %v for %#v", testCase.TransportTLS, testCase.Config) - } - } -} - -func TestSetKubernetesDefaultsUserAgent(t *testing.T) { - config := &Config{} - if err := SetKubernetesDefaults(config); err != nil { - t.Errorf("unexpected error: %v", err) - } - if !strings.Contains(config.UserAgent, "kubernetes/") { - t.Errorf("no user agent set: %#v", config) - } -} - -func TestRESTClientRequires(t *testing.T) { - if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{NegotiatedSerializer: testapi.Default.NegotiatedSerializer()}}); err == nil { - t.Errorf("unexpected non-error") - } - if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion}}); err == nil { - t.Errorf("unexpected non-error") - } - if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion, NegotiatedSerializer: testapi.Default.NegotiatedSerializer()}}); err != nil { - t.Errorf("unexpected error: %v", err) - } -} - -type fakeLimiter struct { - FakeSaturation float64 - FakeQPS float32 -} - -func (t *fakeLimiter) TryAccept() bool { - return true -} - -func (t *fakeLimiter) Saturation() float64 { - return t.FakeSaturation -} - -func (t *fakeLimiter) QPS() float32 { - return t.FakeQPS -} - -func (t *fakeLimiter) Stop() {} - -func (t *fakeLimiter) Accept() {} - -type fakeCodec struct{} - -func (c *fakeCodec) Decode([]byte, *schema.GroupVersionKind, runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - return nil, nil, nil -} - -func (c *fakeCodec) Encode(obj runtime.Object, stream io.Writer) error { - return nil -} - -type fakeRoundTripper struct{} - -func (r *fakeRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { - return nil, nil -} - -var fakeWrapperFunc = func(http.RoundTripper) http.RoundTripper { - return &fakeRoundTripper{} -} - -type fakeNegotiatedSerializer struct{} - -func (n *fakeNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { - return nil -} - -func (n *fakeNegotiatedSerializer) EncoderForVersion(serializer runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { - return &fakeCodec{} -} - -func (n *fakeNegotiatedSerializer) DecoderToVersion(serializer runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { - return &fakeCodec{} -} - -func TestAnonymousConfig(t *testing.T) { - f := fuzz.New().NilChance(0.0).NumElements(1, 1) - f.Funcs( - func(r *runtime.Codec, f fuzz.Continue) { - codec := &fakeCodec{} - f.Fuzz(codec) - *r = codec - }, - func(r *http.RoundTripper, f fuzz.Continue) { - roundTripper := &fakeRoundTripper{} - f.Fuzz(roundTripper) - *r = roundTripper - }, - func(fn *func(http.RoundTripper) http.RoundTripper, f fuzz.Continue) { - *fn = fakeWrapperFunc - }, - func(r *runtime.NegotiatedSerializer, f fuzz.Continue) { - serializer := &fakeNegotiatedSerializer{} - f.Fuzz(serializer) - *r = serializer - }, - func(r *flowcontrol.RateLimiter, f fuzz.Continue) { - limiter := &fakeLimiter{} - f.Fuzz(limiter) - *r = limiter - }, - // Authentication does not require fuzzer - func(r *AuthProviderConfigPersister, f fuzz.Continue) {}, - func(r *clientcmdapi.AuthProviderConfig, f fuzz.Continue) { - r.Config = map[string]string{} - }, - ) - for i := 0; i < 20; i++ { - original := &Config{} - f.Fuzz(original) - actual := AnonymousClientConfig(original) - expected := *original - - // this is the list of known security related fields, add to this list if a new field - // is added to Config, update AnonymousClientConfig to preserve the field otherwise. - expected.Impersonate = ImpersonationConfig{} - expected.BearerToken = "" - expected.Username = "" - expected.Password = "" - expected.AuthProvider = nil - expected.AuthConfigPersister = nil - expected.TLSClientConfig.CertData = nil - expected.TLSClientConfig.CertFile = "" - expected.TLSClientConfig.KeyData = nil - expected.TLSClientConfig.KeyFile = "" - - // The DeepEqual cannot handle the func comparison, so we just verify if the - // function return the expected object. - if actual.WrapTransport == nil || !reflect.DeepEqual(expected.WrapTransport(nil), &fakeRoundTripper{}) { - t.Fatalf("AnonymousClientConfig dropped the WrapTransport field") - } else { - actual.WrapTransport = nil - expected.WrapTransport = nil - } - - if !reflect.DeepEqual(*actual, expected) { - t.Fatalf("AnonymousClientConfig dropped unexpected fields, identify whether they are security related or not: %s", diff.ObjectGoPrintDiff(expected, actual)) - } - } -} diff --git a/pkg/client/restclient/plugin.go b/pkg/client/restclient/plugin.go deleted file mode 100644 index f4978810bc3..00000000000 --- a/pkg/client/restclient/plugin.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "net/http" - "sync" - - "github.com/golang/glog" - - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" -) - -type AuthProvider interface { - // WrapTransport allows the plugin to create a modified RoundTripper that - // attaches authorization headers (or other info) to requests. - WrapTransport(http.RoundTripper) http.RoundTripper - // Login allows the plugin to initialize its configuration. It must not - // require direct user interaction. - Login() error -} - -// Factory generates an AuthProvider plugin. -// clusterAddress is the address of the current cluster. -// config is the initial configuration for this plugin. -// persister allows the plugin to save updated configuration. -type Factory func(clusterAddress string, config map[string]string, persister AuthProviderConfigPersister) (AuthProvider, error) - -// AuthProviderConfigPersister allows a plugin to persist configuration info -// for just itself. -type AuthProviderConfigPersister interface { - Persist(map[string]string) error -} - -// All registered auth provider plugins. -var pluginsLock sync.Mutex -var plugins = make(map[string]Factory) - -func RegisterAuthProviderPlugin(name string, plugin Factory) error { - pluginsLock.Lock() - defer pluginsLock.Unlock() - if _, found := plugins[name]; found { - return fmt.Errorf("Auth Provider Plugin %q was registered twice", name) - } - glog.V(4).Infof("Registered Auth Provider Plugin %q", name) - plugins[name] = plugin - return nil -} - -func GetAuthProvider(clusterAddress string, apc *clientcmdapi.AuthProviderConfig, persister AuthProviderConfigPersister) (AuthProvider, error) { - pluginsLock.Lock() - defer pluginsLock.Unlock() - p, ok := plugins[apc.Name] - if !ok { - return nil, fmt.Errorf("No Auth Provider found for name %q", apc.Name) - } - return p(clusterAddress, apc.Config, persister) -} diff --git a/pkg/client/restclient/plugin_test.go b/pkg/client/restclient/plugin_test.go deleted file mode 100644 index bb7c06d9163..00000000000 --- a/pkg/client/restclient/plugin_test.go +++ /dev/null @@ -1,311 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "net/http" - "reflect" - "strconv" - "testing" - - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" -) - -func TestAuthPluginWrapTransport(t *testing.T) { - if err := RegisterAuthProviderPlugin("pluginA", pluginAProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginA: %v", err) - } - if err := RegisterAuthProviderPlugin("pluginB", pluginBProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginB: %v", err) - } - if err := RegisterAuthProviderPlugin("pluginFail", pluginFailProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginFail: %v", err) - } - testCases := []struct { - useWrapTransport bool - plugin string - expectErr bool - expectPluginA bool - expectPluginB bool - }{ - {false, "", false, false, false}, - {false, "pluginA", false, true, false}, - {false, "pluginB", false, false, true}, - {false, "pluginFail", true, false, false}, - {false, "pluginUnknown", true, false, false}, - } - for i, tc := range testCases { - c := Config{} - if tc.useWrapTransport { - // Specify an existing WrapTransport in the config to make sure that - // plugins play nicely. - c.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { - return &wrapTransport{rt} - } - } - if len(tc.plugin) != 0 { - c.AuthProvider = &clientcmdapi.AuthProviderConfig{Name: tc.plugin} - } - tConfig, err := c.TransportConfig() - if err != nil { - // Unknown/bad plugins are expected to fail here. - if !tc.expectErr { - t.Errorf("%d. Did not expect errors loading Auth Plugin: %q. Got: %v", i, tc.plugin, err) - } - continue - } - var fullyWrappedTransport http.RoundTripper - fullyWrappedTransport = &emptyTransport{} - if tConfig.WrapTransport != nil { - fullyWrappedTransport = tConfig.WrapTransport(&emptyTransport{}) - } - res, err := fullyWrappedTransport.RoundTrip(&http.Request{}) - if err != nil { - t.Errorf("%d. Unexpected error in RoundTrip: %v", i, err) - continue - } - hasWrapTransport := res.Header.Get("wrapTransport") == "Y" - hasPluginA := res.Header.Get("pluginA") == "Y" - hasPluginB := res.Header.Get("pluginB") == "Y" - if hasWrapTransport != tc.useWrapTransport { - t.Errorf("%d. Expected Existing config.WrapTransport: %t; Got: %t", i, tc.useWrapTransport, hasWrapTransport) - } - if hasPluginA != tc.expectPluginA { - t.Errorf("%d. Expected Plugin A: %t; Got: %t", i, tc.expectPluginA, hasPluginA) - } - if hasPluginB != tc.expectPluginB { - t.Errorf("%d. Expected Plugin B: %t; Got: %t", i, tc.expectPluginB, hasPluginB) - } - } -} - -func TestAuthPluginPersist(t *testing.T) { - // register pluginA by a different name so we don't collide across tests. - if err := RegisterAuthProviderPlugin("pluginA2", pluginAProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginA: %v", err) - } - if err := RegisterAuthProviderPlugin("pluginPersist", pluginPersistProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginPersist: %v", err) - } - fooBarConfig := map[string]string{"foo": "bar"} - testCases := []struct { - plugin string - startingConfig map[string]string - expectedConfigAfterLogin map[string]string - expectedConfigAfterRoundTrip map[string]string - }{ - // non-persisting plugins should work fine without modifying config. - {"pluginA2", map[string]string{}, map[string]string{}, map[string]string{}}, - {"pluginA2", fooBarConfig, fooBarConfig, fooBarConfig}, - // plugins that persist config should be able to persist when they want. - { - "pluginPersist", - map[string]string{}, - map[string]string{ - "login": "Y", - }, - map[string]string{ - "login": "Y", - "roundTrips": "1", - }, - }, - { - "pluginPersist", - map[string]string{ - "login": "Y", - "roundTrips": "123", - }, - map[string]string{ - "login": "Y", - "roundTrips": "123", - }, - map[string]string{ - "login": "Y", - "roundTrips": "124", - }, - }, - } - for i, tc := range testCases { - cfg := &clientcmdapi.AuthProviderConfig{ - Name: tc.plugin, - Config: tc.startingConfig, - } - persister := &inMemoryPersister{make(map[string]string)} - persister.Persist(tc.startingConfig) - plugin, err := GetAuthProvider("127.0.0.1", cfg, persister) - if err != nil { - t.Errorf("%d. Unexpected error: failed to get plugin %q: %v", i, tc.plugin, err) - } - if err := plugin.Login(); err != nil { - t.Errorf("%d. Unexpected error calling Login() w/ plugin %q: %v", i, tc.plugin, err) - } - // Make sure the plugin persisted what we expect after Login(). - if !reflect.DeepEqual(persister.savedConfig, tc.expectedConfigAfterLogin) { - t.Errorf("%d. Unexpected persisted config after calling %s.Login(): \nGot:\n%v\nExpected:\n%v", - i, tc.plugin, persister.savedConfig, tc.expectedConfigAfterLogin) - } - if _, err := plugin.WrapTransport(&emptyTransport{}).RoundTrip(&http.Request{}); err != nil { - t.Errorf("%d. Unexpected error round-tripping w/ plugin %q: %v", i, tc.plugin, err) - } - // Make sure the plugin persisted what we expect after RoundTrip(). - if !reflect.DeepEqual(persister.savedConfig, tc.expectedConfigAfterRoundTrip) { - t.Errorf("%d. Unexpected persisted config after calling %s.WrapTransport.RoundTrip(): \nGot:\n%v\nExpected:\n%v", - i, tc.plugin, persister.savedConfig, tc.expectedConfigAfterLogin) - } - } - -} - -// emptyTransport provides an empty http.Response with an initialized header -// to allow wrapping RoundTrippers to set header values. -type emptyTransport struct{} - -func (*emptyTransport) RoundTrip(req *http.Request) (*http.Response, error) { - res := &http.Response{ - Header: make(map[string][]string), - } - return res, nil -} - -// wrapTransport sets "wrapTransport" = "Y" on the response. -type wrapTransport struct { - rt http.RoundTripper -} - -func (w *wrapTransport) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := w.rt.RoundTrip(req) - if err != nil { - return nil, err - } - res.Header.Add("wrapTransport", "Y") - return res, nil -} - -// wrapTransportA sets "pluginA" = "Y" on the response. -type wrapTransportA struct { - rt http.RoundTripper -} - -func (w *wrapTransportA) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := w.rt.RoundTrip(req) - if err != nil { - return nil, err - } - res.Header.Add("pluginA", "Y") - return res, nil -} - -type pluginA struct{} - -func (*pluginA) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &wrapTransportA{rt} -} - -func (*pluginA) Login() error { return nil } - -func pluginAProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { - return &pluginA{}, nil -} - -// wrapTransportB sets "pluginB" = "Y" on the response. -type wrapTransportB struct { - rt http.RoundTripper -} - -func (w *wrapTransportB) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := w.rt.RoundTrip(req) - if err != nil { - return nil, err - } - res.Header.Add("pluginB", "Y") - return res, nil -} - -type pluginB struct{} - -func (*pluginB) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &wrapTransportB{rt} -} - -func (*pluginB) Login() error { return nil } - -func pluginBProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { - return &pluginB{}, nil -} - -// pluginFailProvider simulates a registered AuthPlugin that fails to load. -func pluginFailProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { - return nil, fmt.Errorf("Failed to load AuthProvider") -} - -type inMemoryPersister struct { - savedConfig map[string]string -} - -func (i *inMemoryPersister) Persist(config map[string]string) error { - i.savedConfig = make(map[string]string) - for k, v := range config { - i.savedConfig[k] = v - } - return nil -} - -// wrapTransportPersist increments the "roundTrips" entry from the config when -// roundTrip is called. -type wrapTransportPersist struct { - rt http.RoundTripper - config map[string]string - persister AuthProviderConfigPersister -} - -func (w *wrapTransportPersist) RoundTrip(req *http.Request) (*http.Response, error) { - roundTrips := 0 - if rtVal, ok := w.config["roundTrips"]; ok { - var err error - roundTrips, err = strconv.Atoi(rtVal) - if err != nil { - return nil, err - } - } - roundTrips++ - w.config["roundTrips"] = fmt.Sprintf("%d", roundTrips) - if err := w.persister.Persist(w.config); err != nil { - return nil, err - } - return w.rt.RoundTrip(req) -} - -type pluginPersist struct { - config map[string]string - persister AuthProviderConfigPersister -} - -func (p *pluginPersist) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &wrapTransportPersist{rt, p.config, p.persister} -} - -// Login sets the config entry "login" to "Y". -func (p *pluginPersist) Login() error { - p.config["login"] = "Y" - p.persister.Persist(p.config) - return nil -} - -func pluginPersistProvider(_ string, config map[string]string, persister AuthProviderConfigPersister) (AuthProvider, error) { - return &pluginPersist{config, persister}, nil -} diff --git a/pkg/client/restclient/request.go b/pkg/client/restclient/request.go deleted file mode 100644 index 48878b4a686..00000000000 --- a/pkg/client/restclient/request.go +++ /dev/null @@ -1,1200 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "bytes" - "context" - "encoding/hex" - "fmt" - "io" - "io/ioutil" - "mime" - "net/http" - "net/url" - "path" - "reflect" - "strconv" - "strings" - "time" - - "github.com/golang/glog" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/util/net" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/pkg/util/flowcontrol" - restclientwatch "k8s.io/client-go/rest/watch" - "k8s.io/kubernetes/pkg/api/v1" - pathvalidation "k8s.io/kubernetes/pkg/api/validation/path" - "k8s.io/kubernetes/pkg/client/metrics" -) - -var ( - // specialParams lists parameters that are handled specially and which users of Request - // are therefore not allowed to set manually. - specialParams = sets.NewString("timeout") - - // longThrottleLatency defines threshold for logging requests. All requests being - // throttle for more than longThrottleLatency will be logged. - longThrottleLatency = 50 * time.Millisecond -) - -// HTTPClient is an interface for testing a request object. -type HTTPClient interface { - Do(req *http.Request) (*http.Response, error) -} - -// ResponseWrapper is an interface for getting a response. -// The response may be either accessed as a raw data (the whole output is put into memory) or as a stream. -type ResponseWrapper interface { - DoRaw() ([]byte, error) - Stream() (io.ReadCloser, error) -} - -// RequestConstructionError is returned when there's an error assembling a request. -type RequestConstructionError struct { - Err error -} - -// Error returns a textual description of 'r'. -func (r *RequestConstructionError) Error() string { - return fmt.Sprintf("request construction error: '%v'", r.Err) -} - -// Request allows for building up a request to a server in a chained fashion. -// Any errors are stored until the end of your call, so you only have to -// check once. -type Request struct { - // required - client HTTPClient - verb string - - baseURL *url.URL - content ContentConfig - serializers Serializers - - // generic components accessible via method setters - pathPrefix string - subpath string - params url.Values - headers http.Header - - // structural elements of the request that are part of the Kubernetes API conventions - namespace string - namespaceSet bool - resource string - resourceName string - subresource string - timeout time.Duration - - // output - err error - body io.Reader - - // This is only used for per-request timeouts, deadlines, and cancellations. - ctx context.Context - - backoffMgr BackoffManager - throttle flowcontrol.RateLimiter -} - -// NewRequest creates a new request helper object for accessing runtime.Objects on a server. -func NewRequest(client HTTPClient, verb string, baseURL *url.URL, versionedAPIPath string, content ContentConfig, serializers Serializers, backoff BackoffManager, throttle flowcontrol.RateLimiter) *Request { - if backoff == nil { - glog.V(2).Infof("Not implementing request backoff strategy.") - backoff = &NoBackoff{} - } - - pathPrefix := "/" - if baseURL != nil { - pathPrefix = path.Join(pathPrefix, baseURL.Path) - } - r := &Request{ - client: client, - verb: verb, - baseURL: baseURL, - pathPrefix: path.Join(pathPrefix, versionedAPIPath), - content: content, - serializers: serializers, - backoffMgr: backoff, - throttle: throttle, - } - switch { - case len(content.AcceptContentTypes) > 0: - r.SetHeader("Accept", content.AcceptContentTypes) - case len(content.ContentType) > 0: - r.SetHeader("Accept", content.ContentType+", */*") - } - return r -} - -// Prefix adds segments to the relative beginning to the request path. These -// items will be placed before the optional Namespace, Resource, or Name sections. -// Setting AbsPath will clear any previously set Prefix segments -func (r *Request) Prefix(segments ...string) *Request { - if r.err != nil { - return r - } - r.pathPrefix = path.Join(r.pathPrefix, path.Join(segments...)) - return r -} - -// Suffix appends segments to the end of the path. These items will be placed after the prefix and optional -// Namespace, Resource, or Name sections. -func (r *Request) Suffix(segments ...string) *Request { - if r.err != nil { - return r - } - r.subpath = path.Join(r.subpath, path.Join(segments...)) - return r -} - -// Resource sets the resource to access (/[ns//]) -func (r *Request) Resource(resource string) *Request { - if r.err != nil { - return r - } - if len(r.resource) != 0 { - r.err = fmt.Errorf("resource already set to %q, cannot change to %q", r.resource, resource) - return r - } - if msgs := pathvalidation.IsValidPathSegmentName(resource); len(msgs) != 0 { - r.err = fmt.Errorf("invalid resource %q: %v", resource, msgs) - return r - } - r.resource = resource - return r -} - -// SubResource sets a sub-resource path which can be multiple segments segment after the resource -// name but before the suffix. -func (r *Request) SubResource(subresources ...string) *Request { - if r.err != nil { - return r - } - subresource := path.Join(subresources...) - if len(r.subresource) != 0 { - r.err = fmt.Errorf("subresource already set to %q, cannot change to %q", r.resource, subresource) - return r - } - for _, s := range subresources { - if msgs := pathvalidation.IsValidPathSegmentName(s); len(msgs) != 0 { - r.err = fmt.Errorf("invalid subresource %q: %v", s, msgs) - return r - } - } - r.subresource = subresource - return r -} - -// Name sets the name of a resource to access (/[ns//]) -func (r *Request) Name(resourceName string) *Request { - if r.err != nil { - return r - } - if len(resourceName) == 0 { - r.err = fmt.Errorf("resource name may not be empty") - return r - } - if len(r.resourceName) != 0 { - r.err = fmt.Errorf("resource name already set to %q, cannot change to %q", r.resourceName, resourceName) - return r - } - if msgs := pathvalidation.IsValidPathSegmentName(resourceName); len(msgs) != 0 { - r.err = fmt.Errorf("invalid resource name %q: %v", resourceName, msgs) - return r - } - r.resourceName = resourceName - return r -} - -// Namespace applies the namespace scope to a request (/[ns//]) -func (r *Request) Namespace(namespace string) *Request { - if r.err != nil { - return r - } - if r.namespaceSet { - r.err = fmt.Errorf("namespace already set to %q, cannot change to %q", r.namespace, namespace) - return r - } - if msgs := pathvalidation.IsValidPathSegmentName(namespace); len(msgs) != 0 { - r.err = fmt.Errorf("invalid namespace %q: %v", namespace, msgs) - return r - } - r.namespaceSet = true - r.namespace = namespace - return r -} - -// NamespaceIfScoped is a convenience function to set a namespace if scoped is true -func (r *Request) NamespaceIfScoped(namespace string, scoped bool) *Request { - if scoped { - return r.Namespace(namespace) - } - return r -} - -// AbsPath overwrites an existing path with the segments provided. Trailing slashes are preserved -// when a single segment is passed. -func (r *Request) AbsPath(segments ...string) *Request { - if r.err != nil { - return r - } - r.pathPrefix = path.Join(r.baseURL.Path, path.Join(segments...)) - if len(segments) == 1 && (len(r.baseURL.Path) > 1 || len(segments[0]) > 1) && strings.HasSuffix(segments[0], "/") { - // preserve any trailing slashes for legacy behavior - r.pathPrefix += "/" - } - return r -} - -// RequestURI overwrites existing path and parameters with the value of the provided server relative -// URI. Some parameters (those in specialParameters) cannot be overwritten. -func (r *Request) RequestURI(uri string) *Request { - if r.err != nil { - return r - } - locator, err := url.Parse(uri) - if err != nil { - r.err = err - return r - } - r.pathPrefix = locator.Path - if len(locator.Query()) > 0 { - if r.params == nil { - r.params = make(url.Values) - } - for k, v := range locator.Query() { - r.params[k] = v - } - } - return r -} - -const ( - // A constant that clients can use to refer in a field selector to the object name field. - // Will be automatically emitted as the correct name for the API version. - nodeUnschedulable = "spec.unschedulable" - objectNameField = "metadata.name" - podHost = "spec.nodeName" - podStatus = "status.phase" - secretType = "type" - - eventReason = "reason" - eventSource = "source" - eventType = "type" - eventInvolvedKind = "involvedObject.kind" - eventInvolvedNamespace = "involvedObject.namespace" - eventInvolvedName = "involvedObject.name" - eventInvolvedUID = "involvedObject.uid" - eventInvolvedAPIVersion = "involvedObject.apiVersion" - eventInvolvedResourceVersion = "involvedObject.resourceVersion" - eventInvolvedFieldPath = "involvedObject.fieldPath" -) - -type clientFieldNameToAPIVersionFieldName map[string]string - -func (c clientFieldNameToAPIVersionFieldName) filterField(field, value string) (newField, newValue string, err error) { - newFieldName, ok := c[field] - if !ok { - return "", "", fmt.Errorf("%v - %v - no field mapping defined", field, value) - } - return newFieldName, value, nil -} - -type resourceTypeToFieldMapping map[string]clientFieldNameToAPIVersionFieldName - -func (r resourceTypeToFieldMapping) filterField(resourceType, field, value string) (newField, newValue string, err error) { - fMapping, ok := r[resourceType] - if !ok { - return "", "", fmt.Errorf("%v - %v - %v - no field mapping defined", resourceType, field, value) - } - return fMapping.filterField(field, value) -} - -type versionToResourceToFieldMapping map[schema.GroupVersion]resourceTypeToFieldMapping - -// filterField transforms the given field/value selector for the given groupVersion and resource -func (v versionToResourceToFieldMapping) filterField(groupVersion *schema.GroupVersion, resourceType, field, value string) (newField, newValue string, err error) { - rMapping, ok := v[*groupVersion] - if !ok { - // no groupVersion overrides registered, default to identity mapping - return field, value, nil - } - newField, newValue, err = rMapping.filterField(resourceType, field, value) - if err != nil { - // no groupVersionResource overrides registered, default to identity mapping - return field, value, nil - } - return newField, newValue, nil -} - -var fieldMappings = versionToResourceToFieldMapping{ - v1.SchemeGroupVersion: resourceTypeToFieldMapping{ - "nodes": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - nodeUnschedulable: nodeUnschedulable, - }, - "pods": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - podHost: podHost, - podStatus: podStatus, - }, - "secrets": clientFieldNameToAPIVersionFieldName{ - secretType: secretType, - }, - "serviceAccounts": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - }, - "endpoints": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - }, - "events": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - eventReason: eventReason, - eventSource: eventSource, - eventType: eventType, - eventInvolvedKind: eventInvolvedKind, - eventInvolvedNamespace: eventInvolvedNamespace, - eventInvolvedName: eventInvolvedName, - eventInvolvedUID: eventInvolvedUID, - eventInvolvedAPIVersion: eventInvolvedAPIVersion, - eventInvolvedResourceVersion: eventInvolvedResourceVersion, - eventInvolvedFieldPath: eventInvolvedFieldPath, - }, - }, -} - -// FieldsSelectorParam adds the given selector as a query parameter with the name paramName. -func (r *Request) FieldsSelectorParam(s fields.Selector) *Request { - if r.err != nil { - return r - } - if s == nil { - return r - } - if s.Empty() { - return r - } - s2, err := s.Transform(func(field, value string) (newField, newValue string, err error) { - return fieldMappings.filterField(r.content.GroupVersion, r.resource, field, value) - }) - if err != nil { - r.err = err - return r - } - return r.setParam(metav1.FieldSelectorQueryParam(r.content.GroupVersion.String()), s2.String()) -} - -// LabelsSelectorParam adds the given selector as a query parameter -func (r *Request) LabelsSelectorParam(s labels.Selector) *Request { - if r.err != nil { - return r - } - if s == nil { - return r - } - if s.Empty() { - return r - } - return r.setParam(metav1.LabelSelectorQueryParam(r.content.GroupVersion.String()), s.String()) -} - -// UintParam creates a query parameter with the given value. -func (r *Request) UintParam(paramName string, u uint64) *Request { - if r.err != nil { - return r - } - return r.setParam(paramName, strconv.FormatUint(u, 10)) -} - -// Param creates a query parameter with the given string value. -func (r *Request) Param(paramName, s string) *Request { - if r.err != nil { - return r - } - return r.setParam(paramName, s) -} - -// VersionedParams will take the provided object, serialize it to a map[string][]string using the -// implicit RESTClient API version and the default parameter codec, and then add those as parameters -// to the request. Use this to provide versioned query parameters from client libraries. -func (r *Request) VersionedParams(obj runtime.Object, codec runtime.ParameterCodec) *Request { - if r.err != nil { - return r - } - params, err := codec.EncodeParameters(obj, *r.content.GroupVersion) - if err != nil { - r.err = err - return r - } - for k, v := range params { - for _, value := range v { - // TODO: Move it to setParam method, once we get rid of - // FieldSelectorParam & LabelSelectorParam methods. - if k == metav1.LabelSelectorQueryParam(r.content.GroupVersion.String()) && value == "" { - // Don't set an empty selector for backward compatibility. - // Since there is no way to get the difference between empty - // and unspecified string, we don't set it to avoid having - // labelSelector= param in every request. - continue - } - if k == metav1.FieldSelectorQueryParam(r.content.GroupVersion.String()) { - if len(value) == 0 { - // Don't set an empty selector for backward compatibility. - // Since there is no way to get the difference between empty - // and unspecified string, we don't set it to avoid having - // fieldSelector= param in every request. - continue - } - // TODO: Filtering should be handled somewhere else. - selector, err := fields.ParseSelector(value) - if err != nil { - r.err = fmt.Errorf("unparsable field selector: %v", err) - return r - } - filteredSelector, err := selector.Transform( - func(field, value string) (newField, newValue string, err error) { - return fieldMappings.filterField(r.content.GroupVersion, r.resource, field, value) - }) - if err != nil { - r.err = fmt.Errorf("untransformable field selector: %v", err) - return r - } - value = filteredSelector.String() - } - - r.setParam(k, value) - } - } - return r -} - -func (r *Request) setParam(paramName, value string) *Request { - if specialParams.Has(paramName) { - r.err = fmt.Errorf("must set %v through the corresponding function, not directly.", paramName) - return r - } - if r.params == nil { - r.params = make(url.Values) - } - r.params[paramName] = append(r.params[paramName], value) - return r -} - -func (r *Request) SetHeader(key, value string) *Request { - if r.headers == nil { - r.headers = http.Header{} - } - r.headers.Set(key, value) - return r -} - -// Timeout makes the request use the given duration as a timeout. Sets the "timeout" -// parameter. -func (r *Request) Timeout(d time.Duration) *Request { - if r.err != nil { - return r - } - r.timeout = d - return r -} - -// Body makes the request use obj as the body. Optional. -// If obj is a string, try to read a file of that name. -// If obj is a []byte, send it directly. -// If obj is an io.Reader, use it directly. -// If obj is a runtime.Object, marshal it correctly, and set Content-Type header. -// If obj is a runtime.Object and nil, do nothing. -// Otherwise, set an error. -func (r *Request) Body(obj interface{}) *Request { - if r.err != nil { - return r - } - switch t := obj.(type) { - case string: - data, err := ioutil.ReadFile(t) - if err != nil { - r.err = err - return r - } - glogBody("Request Body", data) - r.body = bytes.NewReader(data) - case []byte: - glogBody("Request Body", t) - r.body = bytes.NewReader(t) - case io.Reader: - r.body = t - case runtime.Object: - // callers may pass typed interface pointers, therefore we must check nil with reflection - if reflect.ValueOf(t).IsNil() { - return r - } - data, err := runtime.Encode(r.serializers.Encoder, t) - if err != nil { - r.err = err - return r - } - glogBody("Request Body", data) - r.body = bytes.NewReader(data) - r.SetHeader("Content-Type", r.content.ContentType) - default: - r.err = fmt.Errorf("unknown type used for body: %+v", obj) - } - return r -} - -// Context adds a context to the request. Contexts are only used for -// timeouts, deadlines, and cancellations. -func (r *Request) Context(ctx context.Context) *Request { - r.ctx = ctx - return r -} - -// URL returns the current working URL. -func (r *Request) URL() *url.URL { - p := r.pathPrefix - if r.namespaceSet && len(r.namespace) > 0 { - p = path.Join(p, "namespaces", r.namespace) - } - if len(r.resource) != 0 { - p = path.Join(p, strings.ToLower(r.resource)) - } - // Join trims trailing slashes, so preserve r.pathPrefix's trailing slash for backwards compatibility if nothing was changed - if len(r.resourceName) != 0 || len(r.subpath) != 0 || len(r.subresource) != 0 { - p = path.Join(p, r.resourceName, r.subresource, r.subpath) - } - - finalURL := &url.URL{} - if r.baseURL != nil { - *finalURL = *r.baseURL - } - finalURL.Path = p - - query := url.Values{} - for key, values := range r.params { - for _, value := range values { - query.Add(key, value) - } - } - - // timeout is handled specially here. - if r.timeout != 0 { - query.Set("timeout", r.timeout.String()) - } - finalURL.RawQuery = query.Encode() - return finalURL -} - -// finalURLTemplate is similar to URL(), but will make all specific parameter values equal -// - instead of name or namespace, "{name}" and "{namespace}" will be used, and all query -// parameters will be reset. This creates a copy of the request so as not to change the -// underyling object. This means some useful request info (like the types of field -// selectors in use) will be lost. -// TODO: preserve field selector keys -func (r Request) finalURLTemplate() url.URL { - if len(r.resourceName) != 0 { - r.resourceName = "{name}" - } - if r.namespaceSet && len(r.namespace) != 0 { - r.namespace = "{namespace}" - } - newParams := url.Values{} - v := []string{"{value}"} - for k := range r.params { - newParams[k] = v - } - r.params = newParams - url := r.URL() - return *url -} - -func (r *Request) tryThrottle() { - now := time.Now() - if r.throttle != nil { - r.throttle.Accept() - } - if latency := time.Since(now); latency > longThrottleLatency { - glog.V(4).Infof("Throttling request took %v, request: %s:%s", latency, r.verb, r.URL().String()) - } -} - -// Watch attempts to begin watching the requested location. -// Returns a watch.Interface, or an error. -func (r *Request) Watch() (watch.Interface, error) { - // We specifically don't want to rate limit watches, so we - // don't use r.throttle here. - if r.err != nil { - return nil, r.err - } - if r.serializers.Framer == nil { - return nil, fmt.Errorf("watching resources is not possible with this client (content-type: %s)", r.content.ContentType) - } - - url := r.URL().String() - req, err := http.NewRequest(r.verb, url, r.body) - if err != nil { - return nil, err - } - if r.ctx != nil { - req = req.WithContext(r.ctx) - } - req.Header = r.headers - client := r.client - if client == nil { - client = http.DefaultClient - } - r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL())) - resp, err := client.Do(req) - updateURLMetrics(r, resp, err) - if r.baseURL != nil { - if err != nil { - r.backoffMgr.UpdateBackoff(r.baseURL, err, 0) - } else { - r.backoffMgr.UpdateBackoff(r.baseURL, err, resp.StatusCode) - } - } - if err != nil { - // The watch stream mechanism handles many common partial data errors, so closed - // connections can be retried in many cases. - if net.IsProbableEOF(err) { - return watch.NewEmptyWatch(), nil - } - return nil, err - } - if resp.StatusCode != http.StatusOK { - defer resp.Body.Close() - if result := r.transformResponse(resp, req); result.err != nil { - return nil, result.err - } - return nil, fmt.Errorf("for request '%+v', got status: %v", url, resp.StatusCode) - } - framer := r.serializers.Framer.NewFrameReader(resp.Body) - decoder := streaming.NewDecoder(framer, r.serializers.StreamingSerializer) - return watch.NewStreamWatcher(restclientwatch.NewDecoder(decoder, r.serializers.Decoder)), nil -} - -// updateURLMetrics is a convenience function for pushing metrics. -// It also handles corner cases for incomplete/invalid request data. -func updateURLMetrics(req *Request, resp *http.Response, err error) { - url := "none" - if req.baseURL != nil { - url = req.baseURL.Host - } - - // Errors can be arbitrary strings. Unbound label cardinality is not suitable for a metric - // system so we just report them as ``. - if err != nil { - metrics.RequestResult.Increment("", req.verb, url) - } else { - //Metrics for failure codes - metrics.RequestResult.Increment(strconv.Itoa(resp.StatusCode), req.verb, url) - } -} - -// Stream formats and executes the request, and offers streaming of the response. -// Returns io.ReadCloser which could be used for streaming of the response, or an error -// Any non-2xx http status code causes an error. If we get a non-2xx code, we try to convert the body into an APIStatus object. -// If we can, we return that as an error. Otherwise, we create an error that lists the http status and the content of the response. -func (r *Request) Stream() (io.ReadCloser, error) { - if r.err != nil { - return nil, r.err - } - - r.tryThrottle() - - url := r.URL().String() - req, err := http.NewRequest(r.verb, url, nil) - if err != nil { - return nil, err - } - if r.ctx != nil { - req = req.WithContext(r.ctx) - } - req.Header = r.headers - client := r.client - if client == nil { - client = http.DefaultClient - } - r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL())) - resp, err := client.Do(req) - updateURLMetrics(r, resp, err) - if r.baseURL != nil { - if err != nil { - r.backoffMgr.UpdateBackoff(r.URL(), err, 0) - } else { - r.backoffMgr.UpdateBackoff(r.URL(), err, resp.StatusCode) - } - } - if err != nil { - return nil, err - } - - switch { - case (resp.StatusCode >= 200) && (resp.StatusCode < 300): - return resp.Body, nil - - default: - // ensure we close the body before returning the error - defer resp.Body.Close() - - result := r.transformResponse(resp, req) - err := result.Error() - if err == nil { - err = fmt.Errorf("%d while accessing %v: %s", result.statusCode, url, string(result.body)) - } - return nil, err - } -} - -// request connects to the server and invokes the provided function when a server response is -// received. It handles retry behavior and up front validation of requests. It will invoke -// fn at most once. It will return an error if a problem occurred prior to connecting to the -// server - the provided function is responsible for handling server errors. -func (r *Request) request(fn func(*http.Request, *http.Response)) error { - //Metrics for total request latency - start := time.Now() - defer func() { - metrics.RequestLatency.Observe(r.verb, r.finalURLTemplate(), time.Since(start)) - }() - - if r.err != nil { - glog.V(4).Infof("Error in request: %v", r.err) - return r.err - } - - // TODO: added to catch programmer errors (invoking operations with an object with an empty namespace) - if (r.verb == "GET" || r.verb == "PUT" || r.verb == "DELETE") && r.namespaceSet && len(r.resourceName) > 0 && len(r.namespace) == 0 { - return fmt.Errorf("an empty namespace may not be set when a resource name is provided") - } - if (r.verb == "POST") && r.namespaceSet && len(r.namespace) == 0 { - return fmt.Errorf("an empty namespace may not be set during creation") - } - - client := r.client - if client == nil { - client = http.DefaultClient - } - - // Right now we make about ten retry attempts if we get a Retry-After response. - // TODO: Change to a timeout based approach. - maxRetries := 10 - retries := 0 - for { - url := r.URL().String() - req, err := http.NewRequest(r.verb, url, r.body) - if err != nil { - return err - } - if r.ctx != nil { - req = req.WithContext(r.ctx) - } - req.Header = r.headers - - r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL())) - if retries > 0 { - // We are retrying the request that we already send to apiserver - // at least once before. - // This request should also be throttled with the client-internal throttler. - r.tryThrottle() - } - resp, err := client.Do(req) - updateURLMetrics(r, resp, err) - if err != nil { - r.backoffMgr.UpdateBackoff(r.URL(), err, 0) - } else { - r.backoffMgr.UpdateBackoff(r.URL(), err, resp.StatusCode) - } - if err != nil { - // "Connection reset by peer" is usually a transient error. - // Thus in case of "GET" operations, we simply retry it. - // We are not automatically retrying "write" operations, as - // they are not idempotent. - if !net.IsConnectionReset(err) || r.verb != "GET" { - return err - } - // For the purpose of retry, we set the artificial "retry-after" response. - // TODO: Should we clean the original response if it exists? - resp = &http.Response{ - StatusCode: http.StatusInternalServerError, - Header: http.Header{"Retry-After": []string{"1"}}, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - } - } - - done := func() bool { - // Ensure the response body is fully read and closed - // before we reconnect, so that we reuse the same TCP - // connection. - defer func() { - const maxBodySlurpSize = 2 << 10 - if resp.ContentLength <= maxBodySlurpSize { - io.Copy(ioutil.Discard, &io.LimitedReader{R: resp.Body, N: maxBodySlurpSize}) - } - resp.Body.Close() - }() - - retries++ - if seconds, wait := checkWait(resp); wait && retries < maxRetries { - if seeker, ok := r.body.(io.Seeker); ok && r.body != nil { - _, err := seeker.Seek(0, 0) - if err != nil { - glog.V(4).Infof("Could not retry request, can't Seek() back to beginning of body for %T", r.body) - fn(req, resp) - return true - } - } - - glog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", seconds, retries, url) - r.backoffMgr.Sleep(time.Duration(seconds) * time.Second) - return false - } - fn(req, resp) - return true - }() - if done { - return nil - } - } -} - -// Do formats and executes the request. Returns a Result object for easy response -// processing. -// -// Error type: -// * If the request can't be constructed, or an error happened earlier while building its -// arguments: *RequestConstructionError -// * If the server responds with a status: *errors.StatusError or *errors.UnexpectedObjectError -// * http.Client.Do errors are returned directly. -func (r *Request) Do() Result { - r.tryThrottle() - - var result Result - err := r.request(func(req *http.Request, resp *http.Response) { - result = r.transformResponse(resp, req) - }) - if err != nil { - return Result{err: err} - } - return result -} - -// DoRaw executes the request but does not process the response body. -func (r *Request) DoRaw() ([]byte, error) { - r.tryThrottle() - - var result Result - err := r.request(func(req *http.Request, resp *http.Response) { - result.body, result.err = ioutil.ReadAll(resp.Body) - glogBody("Response Body", result.body) - if resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent { - result.err = r.transformUnstructuredResponseError(resp, req, result.body) - } - }) - if err != nil { - return nil, err - } - return result.body, result.err -} - -// transformResponse converts an API response into a structured API object -func (r *Request) transformResponse(resp *http.Response, req *http.Request) Result { - var body []byte - if resp.Body != nil { - if data, err := ioutil.ReadAll(resp.Body); err == nil { - body = data - } - } - - glogBody("Response Body", body) - - // verify the content type is accurate - contentType := resp.Header.Get("Content-Type") - decoder := r.serializers.Decoder - if len(contentType) > 0 && (decoder == nil || (len(r.content.ContentType) > 0 && contentType != r.content.ContentType)) { - mediaType, params, err := mime.ParseMediaType(contentType) - if err != nil { - return Result{err: errors.NewInternalError(err)} - } - decoder, err = r.serializers.RenegotiatedDecoder(mediaType, params) - if err != nil { - // if we fail to negotiate a decoder, treat this as an unstructured error - switch { - case resp.StatusCode == http.StatusSwitchingProtocols: - // no-op, we've been upgraded - case resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent: - return Result{err: r.transformUnstructuredResponseError(resp, req, body)} - } - return Result{ - body: body, - contentType: contentType, - statusCode: resp.StatusCode, - } - } - } - - switch { - case resp.StatusCode == http.StatusSwitchingProtocols: - // no-op, we've been upgraded - case resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent: - // calculate an unstructured error from the response which the Result object may use if the caller - // did not return a structured error. - retryAfter, _ := retryAfterSeconds(resp) - err := r.newUnstructuredResponseError(body, isTextResponse(resp), resp.StatusCode, req.Method, retryAfter) - return Result{ - body: body, - contentType: contentType, - statusCode: resp.StatusCode, - decoder: decoder, - err: err, - } - } - - return Result{ - body: body, - contentType: contentType, - statusCode: resp.StatusCode, - decoder: decoder, - } -} - -// glogBody logs a body output that could be either JSON or protobuf. It explicitly guards against -// allocating a new string for the body output unless necessary. Uses a simple heuristic to determine -// whether the body is printable. -func glogBody(prefix string, body []byte) { - if glog.V(8) { - if bytes.IndexFunc(body, func(r rune) bool { - return r < 0x0a - }) != -1 { - glog.Infof("%s:\n%s", prefix, hex.Dump(body)) - } else { - glog.Infof("%s: %s", prefix, string(body)) - } - } -} - -// maxUnstructuredResponseTextBytes is an upper bound on how much output to include in the unstructured error. -const maxUnstructuredResponseTextBytes = 2048 - -// transformUnstructuredResponseError handles an error from the server that is not in a structured form. -// It is expected to transform any response that is not recognizable as a clear server sent error from the -// K8S API using the information provided with the request. In practice, HTTP proxies and client libraries -// introduce a level of uncertainty to the responses returned by servers that in common use result in -// unexpected responses. The rough structure is: -// -// 1. Assume the server sends you something sane - JSON + well defined error objects + proper codes -// - this is the happy path -// - when you get this output, trust what the server sends -// 2. Guard against empty fields / bodies in received JSON and attempt to cull sufficient info from them to -// generate a reasonable facsimile of the original failure. -// - Be sure to use a distinct error type or flag that allows a client to distinguish between this and error 1 above -// 3. Handle true disconnect failures / completely malformed data by moving up to a more generic client error -// 4. Distinguish between various connection failures like SSL certificates, timeouts, proxy errors, unexpected -// initial contact, the presence of mismatched body contents from posted content types -// - Give these a separate distinct error type and capture as much as possible of the original message -// -// TODO: introduce transformation of generic http.Client.Do() errors that separates 4. -func (r *Request) transformUnstructuredResponseError(resp *http.Response, req *http.Request, body []byte) error { - if body == nil && resp.Body != nil { - if data, err := ioutil.ReadAll(&io.LimitedReader{R: resp.Body, N: maxUnstructuredResponseTextBytes}); err == nil { - body = data - } - } - retryAfter, _ := retryAfterSeconds(resp) - return r.newUnstructuredResponseError(body, isTextResponse(resp), resp.StatusCode, req.Method, retryAfter) -} - -// newUnstructuredResponseError instantiates the appropriate generic error for the provided input. It also logs the body. -func (r *Request) newUnstructuredResponseError(body []byte, isTextResponse bool, statusCode int, method string, retryAfter int) error { - // cap the amount of output we create - if len(body) > maxUnstructuredResponseTextBytes { - body = body[:maxUnstructuredResponseTextBytes] - } - - message := "unknown" - if isTextResponse { - message = strings.TrimSpace(string(body)) - } - return errors.NewGenericServerResponse( - statusCode, - method, - schema.GroupResource{ - Group: r.content.GroupVersion.Group, - Resource: r.resource, - }, - r.resourceName, - message, - retryAfter, - true, - ) -} - -// isTextResponse returns true if the response appears to be a textual media type. -func isTextResponse(resp *http.Response) bool { - contentType := resp.Header.Get("Content-Type") - if len(contentType) == 0 { - return true - } - media, _, err := mime.ParseMediaType(contentType) - if err != nil { - return false - } - return strings.HasPrefix(media, "text/") -} - -// checkWait returns true along with a number of seconds if the server instructed us to wait -// before retrying. -func checkWait(resp *http.Response) (int, bool) { - switch r := resp.StatusCode; { - // any 500 error code and 429 can trigger a wait - case r == errors.StatusTooManyRequests, r >= 500: - default: - return 0, false - } - i, ok := retryAfterSeconds(resp) - return i, ok -} - -// retryAfterSeconds returns the value of the Retry-After header and true, or 0 and false if -// the header was missing or not a valid number. -func retryAfterSeconds(resp *http.Response) (int, bool) { - if h := resp.Header.Get("Retry-After"); len(h) > 0 { - if i, err := strconv.Atoi(h); err == nil { - return i, true - } - } - return 0, false -} - -// Result contains the result of calling Request.Do(). -type Result struct { - body []byte - contentType string - err error - statusCode int - - decoder runtime.Decoder -} - -// Raw returns the raw result. -func (r Result) Raw() ([]byte, error) { - return r.body, r.err -} - -// Get returns the result as an object, which means it passes through the decoder. -// If the returned object is of type Status and has .Status != StatusSuccess, the -// additional information in Status will be used to enrich the error. -func (r Result) Get() (runtime.Object, error) { - if r.err != nil { - // Check whether the result has a Status object in the body and prefer that. - return nil, r.Error() - } - if r.decoder == nil { - return nil, fmt.Errorf("serializer for %s doesn't exist", r.contentType) - } - - // decode, but if the result is Status return that as an error instead. - out, _, err := r.decoder.Decode(r.body, nil, nil) - if err != nil { - return nil, err - } - switch t := out.(type) { - case *metav1.Status: - // any status besides StatusSuccess is considered an error. - if t.Status != metav1.StatusSuccess { - return nil, errors.FromObject(t) - } - } - return out, nil -} - -// StatusCode returns the HTTP status code of the request. (Only valid if no -// error was returned.) -func (r Result) StatusCode(statusCode *int) Result { - *statusCode = r.statusCode - return r -} - -// Into stores the result into obj, if possible. If obj is nil it is ignored. -// If the returned object is of type Status and has .Status != StatusSuccess, the -// additional information in Status will be used to enrich the error. -func (r Result) Into(obj runtime.Object) error { - if r.err != nil { - // Check whether the result has a Status object in the body and prefer that. - return r.Error() - } - if r.decoder == nil { - return fmt.Errorf("serializer for %s doesn't exist", r.contentType) - } - - out, _, err := r.decoder.Decode(r.body, nil, obj) - if err != nil || out == obj { - return err - } - // if a different object is returned, see if it is Status and avoid double decoding - // the object. - switch t := out.(type) { - case *metav1.Status: - // any status besides StatusSuccess is considered an error. - if t.Status != metav1.StatusSuccess { - return errors.FromObject(t) - } - } - return nil -} - -// WasCreated updates the provided bool pointer to whether the server returned -// 201 created or a different response. -func (r Result) WasCreated(wasCreated *bool) Result { - *wasCreated = r.statusCode == http.StatusCreated - return r -} - -// Error returns the error executing the request, nil if no error occurred. -// If the returned object is of type Status and has Status != StatusSuccess, the -// additional information in Status will be used to enrich the error. -// See the Request.Do() comment for what errors you might get. -func (r Result) Error() error { - // if we have received an unexpected server error, and we have a body and decoder, we can try to extract - // a Status object. - if r.err == nil || !errors.IsUnexpectedServerError(r.err) || len(r.body) == 0 || r.decoder == nil { - return r.err - } - - // attempt to convert the body into a Status object - // to be backwards compatible with old servers that do not return a version, default to "v1" - out, _, err := r.decoder.Decode(r.body, &schema.GroupVersionKind{Version: "v1"}, nil) - if err != nil { - glog.V(5).Infof("body was not decodable (unable to check for Status): %v", err) - return r.err - } - switch t := out.(type) { - case *metav1.Status: - // because we default the kind, we *must* check for StatusFailure - if t.Status == metav1.StatusFailure { - return errors.FromObject(t) - } - } - return r.err -} diff --git a/pkg/client/restclient/request_test.go b/pkg/client/restclient/request_test.go deleted file mode 100755 index 3a94ce03026..00000000000 --- a/pkg/client/restclient/request_test.go +++ /dev/null @@ -1,1710 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "bytes" - "context" - "errors" - "fmt" - "io" - "io/ioutil" - "net" - "net/http" - "net/http/httptest" - "net/url" - "os" - "reflect" - "strings" - "syscall" - "testing" - "time" - - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/pkg/util/clock" - "k8s.io/client-go/pkg/util/flowcontrol" - restclientwatch "k8s.io/client-go/rest/watch" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/util/httpstream" - "k8s.io/kubernetes/pkg/util/intstr" - utiltesting "k8s.io/kubernetes/pkg/util/testing" -) - -func TestNewRequestSetsAccept(t *testing.T) { - r := NewRequest(nil, "get", &url.URL{Path: "/path/"}, "", ContentConfig{}, Serializers{}, nil, nil) - if r.headers.Get("Accept") != "" { - t.Errorf("unexpected headers: %#v", r.headers) - } - r = NewRequest(nil, "get", &url.URL{Path: "/path/"}, "", ContentConfig{ContentType: "application/other"}, Serializers{}, nil, nil) - if r.headers.Get("Accept") != "application/other, */*" { - t.Errorf("unexpected headers: %#v", r.headers) - } -} - -type clientFunc func(req *http.Request) (*http.Response, error) - -func (f clientFunc) Do(req *http.Request) (*http.Response, error) { - return f(req) -} - -func TestRequestSetsHeaders(t *testing.T) { - server := clientFunc(func(req *http.Request) (*http.Response, error) { - if req.Header.Get("Accept") != "application/other, */*" { - t.Errorf("unexpected headers: %#v", req.Header) - } - return &http.Response{ - StatusCode: http.StatusForbidden, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - }) - config := defaultContentConfig() - config.ContentType = "application/other" - serializers := defaultSerializers() - r := NewRequest(server, "get", &url.URL{Path: "/path"}, "", config, serializers, nil, nil) - - // Check if all "issue" methods are setting headers. - _ = r.Do() - _, _ = r.Watch() - _, _ = r.Stream() -} - -func TestRequestWithErrorWontChange(t *testing.T) { - original := Request{ - err: errors.New("test"), - content: ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion}, - } - r := original - changed := r.Param("foo", "bar"). - LabelsSelectorParam(labels.Set{"a": "b"}.AsSelector()). - UintParam("uint", 1). - AbsPath("/abs"). - Prefix("test"). - Suffix("testing"). - Namespace("new"). - Resource("foos"). - Name("bars"). - Body("foo"). - Timeout(time.Millisecond) - if changed != &r { - t.Errorf("returned request should point to the same object") - } - if !reflect.DeepEqual(changed, &original) { - t.Errorf("expected %#v, got %#v", &original, changed) - } -} - -func TestRequestPreservesBaseTrailingSlash(t *testing.T) { - r := &Request{baseURL: &url.URL{}, pathPrefix: "/path/"} - if s := r.URL().String(); s != "/path/" { - t.Errorf("trailing slash should be preserved: %s", s) - } -} - -func TestRequestAbsPathPreservesTrailingSlash(t *testing.T) { - r := (&Request{baseURL: &url.URL{}}).AbsPath("/foo/") - if s := r.URL().String(); s != "/foo/" { - t.Errorf("trailing slash should be preserved: %s", s) - } - - r = (&Request{baseURL: &url.URL{}}).AbsPath("/foo/") - if s := r.URL().String(); s != "/foo/" { - t.Errorf("trailing slash should be preserved: %s", s) - } -} - -func TestRequestAbsPathJoins(t *testing.T) { - r := (&Request{baseURL: &url.URL{}}).AbsPath("foo/bar", "baz") - if s := r.URL().String(); s != "foo/bar/baz" { - t.Errorf("trailing slash should be preserved: %s", s) - } -} - -func TestRequestSetsNamespace(t *testing.T) { - r := (&Request{ - baseURL: &url.URL{ - Path: "/", - }, - }).Namespace("foo") - if r.namespace == "" { - t.Errorf("namespace should be set: %#v", r) - } - - if s := r.URL().String(); s != "namespaces/foo" { - t.Errorf("namespace should be in path: %s", s) - } -} - -func TestRequestOrdersNamespaceInPath(t *testing.T) { - r := (&Request{ - baseURL: &url.URL{}, - pathPrefix: "/test/", - }).Name("bar").Resource("baz").Namespace("foo") - if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar" { - t.Errorf("namespace should be in order in path: %s", s) - } -} - -func TestRequestOrdersSubResource(t *testing.T) { - r := (&Request{ - baseURL: &url.URL{}, - pathPrefix: "/test/", - }).Name("bar").Resource("baz").Namespace("foo").Suffix("test").SubResource("a", "b") - if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar/a/b/test" { - t.Errorf("namespace should be in order in path: %s", s) - } -} - -func TestRequestSetTwiceError(t *testing.T) { - if (&Request{}).Name("bar").Name("baz").err == nil { - t.Errorf("setting name twice should result in error") - } - if (&Request{}).Namespace("bar").Namespace("baz").err == nil { - t.Errorf("setting namespace twice should result in error") - } - if (&Request{}).Resource("bar").Resource("baz").err == nil { - t.Errorf("setting resource twice should result in error") - } - if (&Request{}).SubResource("bar").SubResource("baz").err == nil { - t.Errorf("setting subresource twice should result in error") - } -} - -func TestInvalidSegments(t *testing.T) { - invalidSegments := []string{".", "..", "test/segment", "test%2bsegment"} - setters := map[string]func(string, *Request){ - "namespace": func(s string, r *Request) { r.Namespace(s) }, - "resource": func(s string, r *Request) { r.Resource(s) }, - "name": func(s string, r *Request) { r.Name(s) }, - "subresource": func(s string, r *Request) { r.SubResource(s) }, - } - for _, invalidSegment := range invalidSegments { - for setterName, setter := range setters { - r := &Request{} - setter(invalidSegment, r) - if r.err == nil { - t.Errorf("%s: %s: expected error, got none", setterName, invalidSegment) - } - } - } -} - -func TestRequestParam(t *testing.T) { - r := (&Request{}).Param("foo", "a") - if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}}) { - t.Errorf("should have set a param: %#v", r) - } - - r.Param("bar", "1") - r.Param("bar", "2") - if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}, "bar": []string{"1", "2"}}) { - t.Errorf("should have set a param: %#v", r) - } -} - -func TestRequestVersionedParams(t *testing.T) { - r := (&Request{content: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}}).Param("foo", "a") - if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}}) { - t.Errorf("should have set a param: %#v", r) - } - r.VersionedParams(&api.PodLogOptions{Follow: true, Container: "bar"}, api.ParameterCodec) - - if !reflect.DeepEqual(r.params, url.Values{ - "foo": []string{"a"}, - "container": []string{"bar"}, - "follow": []string{"true"}, - }) { - t.Errorf("should have set a param: %#v", r) - } -} - -func TestRequestVersionedParamsFromListOptions(t *testing.T) { - r := &Request{content: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}} - r.VersionedParams(&api.ListOptions{ResourceVersion: "1"}, api.ParameterCodec) - if !reflect.DeepEqual(r.params, url.Values{ - "resourceVersion": []string{"1"}, - }) { - t.Errorf("should have set a param: %#v", r) - } - - var timeout int64 = 10 - r.VersionedParams(&api.ListOptions{ResourceVersion: "2", TimeoutSeconds: &timeout}, api.ParameterCodec) - if !reflect.DeepEqual(r.params, url.Values{ - "resourceVersion": []string{"1", "2"}, - "timeoutSeconds": []string{"10"}, - }) { - t.Errorf("should have set a param: %#v", r) - } -} - -func TestRequestURI(t *testing.T) { - r := (&Request{}).Param("foo", "a") - r.Prefix("other") - r.RequestURI("/test?foo=b&a=b&c=1&c=2") - if r.pathPrefix != "/test" { - t.Errorf("path is wrong: %#v", r) - } - if !reflect.DeepEqual(r.params, url.Values{"a": []string{"b"}, "foo": []string{"b"}, "c": []string{"1", "2"}}) { - t.Errorf("should have set a param: %#v", r) - } -} - -type NotAnAPIObject struct{} - -func (obj NotAnAPIObject) GroupVersionKind() *schema.GroupVersionKind { return nil } -func (obj NotAnAPIObject) SetGroupVersionKind(gvk *schema.GroupVersionKind) {} - -func defaultContentConfig() ContentConfig { - return ContentConfig{ - GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion, - NegotiatedSerializer: testapi.Default.NegotiatedSerializer(), - } -} - -func defaultSerializers() Serializers { - return Serializers{ - Encoder: testapi.Default.Codec(), - Decoder: testapi.Default.Codec(), - StreamingSerializer: testapi.Default.Codec(), - Framer: runtime.DefaultFramer, - RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) { - return testapi.Default.Codec(), nil - }, - } -} - -func TestRequestBody(t *testing.T) { - // test unknown type - r := (&Request{}).Body([]string{"test"}) - if r.err == nil || r.body != nil { - t.Errorf("should have set err and left body nil: %#v", r) - } - - // test error set when failing to read file - f, err := ioutil.TempFile("", "test") - if err != nil { - t.Fatalf("unable to create temp file") - } - defer f.Close() - os.Remove(f.Name()) - r = (&Request{}).Body(f.Name()) - if r.err == nil || r.body != nil { - t.Errorf("should have set err and left body nil: %#v", r) - } - - // test unencodable api object - r = (&Request{content: defaultContentConfig()}).Body(&NotAnAPIObject{}) - if r.err == nil || r.body != nil { - t.Errorf("should have set err and left body nil: %#v", r) - } -} - -func TestResultIntoWithErrReturnsErr(t *testing.T) { - res := Result{err: errors.New("test")} - if err := res.Into(&api.Pod{}); err != res.err { - t.Errorf("should have returned exact error from result") - } -} - -func TestURLTemplate(t *testing.T) { - uri, _ := url.Parse("http://localhost") - r := NewRequest(nil, "POST", uri, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil) - r.Prefix("pre1").Resource("r1").Namespace("ns").Name("nm").Param("p0", "v0") - full := r.URL() - if full.String() != "http://localhost/pre1/namespaces/ns/r1/nm?p0=v0" { - t.Errorf("unexpected initial URL: %s", full) - } - actualURL := r.finalURLTemplate() - actual := actualURL.String() - expected := "http://localhost/pre1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D?p0=%7Bvalue%7D" - if actual != expected { - t.Errorf("unexpected URL template: %s %s", actual, expected) - } - if r.URL().String() != full.String() { - t.Errorf("creating URL template changed request: %s -> %s", full.String(), r.URL().String()) - } -} - -func TestTransformResponse(t *testing.T) { - invalid := []byte("aaaaa") - uri, _ := url.Parse("http://localhost") - testCases := []struct { - Response *http.Response - Data []byte - Created bool - Error bool - ErrFn func(err error) bool - }{ - {Response: &http.Response{StatusCode: 200}, Data: []byte{}}, - {Response: &http.Response{StatusCode: 201}, Data: []byte{}, Created: true}, - {Response: &http.Response{StatusCode: 199}, Error: true}, - {Response: &http.Response{StatusCode: 500}, Error: true}, - {Response: &http.Response{StatusCode: 422}, Error: true}, - {Response: &http.Response{StatusCode: 409}, Error: true}, - {Response: &http.Response{StatusCode: 404}, Error: true}, - {Response: &http.Response{StatusCode: 401}, Error: true}, - { - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"application/json"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) - }, - }, - { - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"text/any"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Error: true, - ErrFn: func(err error) bool { - return strings.Contains(err.Error(), "server has asked for the client to provide") && apierrors.IsUnauthorized(err) - }, - }, - {Response: &http.Response{StatusCode: 403}, Error: true}, - {Response: &http.Response{StatusCode: 200, Body: ioutil.NopCloser(bytes.NewReader(invalid))}, Data: invalid}, - {Response: &http.Response{StatusCode: 200, Body: ioutil.NopCloser(bytes.NewReader(invalid))}, Data: invalid}, - } - for i, test := range testCases { - r := NewRequest(nil, "", uri, "", defaultContentConfig(), defaultSerializers(), nil, nil) - if test.Response.Body == nil { - test.Response.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) - } - result := r.transformResponse(test.Response, &http.Request{}) - response, created, err := result.body, result.statusCode == http.StatusCreated, result.err - hasErr := err != nil - if hasErr != test.Error { - t.Errorf("%d: unexpected error: %t %v", i, test.Error, err) - } else if hasErr && test.Response.StatusCode > 399 { - status, ok := err.(apierrors.APIStatus) - if !ok { - t.Errorf("%d: response should have been transformable into APIStatus: %v", i, err) - continue - } - if int(status.Status().Code) != test.Response.StatusCode { - t.Errorf("%d: status code did not match response: %#v", i, status.Status()) - } - } - if test.ErrFn != nil && !test.ErrFn(err) { - t.Errorf("%d: error function did not match: %v", i, err) - } - if !(test.Data == nil && response == nil) && !api.Semantic.DeepDerivative(test.Data, response) { - t.Errorf("%d: unexpected response: %#v %#v", i, test.Data, response) - } - if test.Created != created { - t.Errorf("%d: expected created %t, got %t", i, test.Created, created) - } - } -} - -type renegotiator struct { - called bool - contentType string - params map[string]string - decoder runtime.Decoder - err error -} - -func (r *renegotiator) invoke(contentType string, params map[string]string) (runtime.Decoder, error) { - r.called = true - r.contentType = contentType - r.params = params - return r.decoder, r.err -} - -func TestTransformResponseNegotiate(t *testing.T) { - invalid := []byte("aaaaa") - uri, _ := url.Parse("http://localhost") - testCases := []struct { - Response *http.Response - Data []byte - Created bool - Error bool - ErrFn func(err error) bool - - ContentType string - Called bool - ExpectContentType string - Decoder runtime.Decoder - NegotiateErr error - }{ - { - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"application/json"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) - }, - }, - { - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"application/protobuf"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: testapi.Default.Codec(), - - Called: true, - ExpectContentType: "application/protobuf", - - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) - }, - }, - { - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 500, - Header: http.Header{"Content-Type": []string{"application/,others"}}, - }, - Decoder: testapi.Default.Codec(), - - Error: true, - ErrFn: func(err error) bool { - return err.Error() == "Internal error occurred: mime: expected token after slash" && err.(apierrors.APIStatus).Status().Code == 500 - }, - }, - { - // no negotiation when no content type specified - Response: &http.Response{ - StatusCode: 200, - Header: http.Header{"Content-Type": []string{"text/any"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: testapi.Default.Codec(), - }, - { - // no negotiation when no response content type specified - ContentType: "text/any", - Response: &http.Response{ - StatusCode: 200, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: testapi.Default.Codec(), - }, - { - // unrecognized content type is not handled - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 404, - Header: http.Header{"Content-Type": []string{"application/unrecognized"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: testapi.Default.Codec(), - - NegotiateErr: fmt.Errorf("aaaa"), - Called: true, - ExpectContentType: "application/unrecognized", - - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsNotFound(err) - }, - }, - } - for i, test := range testCases { - serializers := defaultSerializers() - negotiator := &renegotiator{ - decoder: test.Decoder, - err: test.NegotiateErr, - } - serializers.RenegotiatedDecoder = negotiator.invoke - contentConfig := defaultContentConfig() - contentConfig.ContentType = test.ContentType - r := NewRequest(nil, "", uri, "", contentConfig, serializers, nil, nil) - if test.Response.Body == nil { - test.Response.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) - } - result := r.transformResponse(test.Response, &http.Request{}) - _, err := result.body, result.err - hasErr := err != nil - if hasErr != test.Error { - t.Errorf("%d: unexpected error: %t %v", i, test.Error, err) - continue - } else if hasErr && test.Response.StatusCode > 399 { - status, ok := err.(apierrors.APIStatus) - if !ok { - t.Errorf("%d: response should have been transformable into APIStatus: %v", i, err) - continue - } - if int(status.Status().Code) != test.Response.StatusCode { - t.Errorf("%d: status code did not match response: %#v", i, status.Status()) - } - } - if test.ErrFn != nil && !test.ErrFn(err) { - t.Errorf("%d: error function did not match: %v", i, err) - } - if negotiator.called != test.Called { - t.Errorf("%d: negotiator called %t != %t", i, negotiator.called, test.Called) - } - if !test.Called { - continue - } - if negotiator.contentType != test.ExpectContentType { - t.Errorf("%d: unexpected content type: %s", i, negotiator.contentType) - } - } -} - -func TestTransformUnstructuredError(t *testing.T) { - testCases := []struct { - Req *http.Request - Res *http.Response - - Resource string - Name string - - ErrFn func(error) bool - Transformed error - }{ - { - Resource: "foo", - Name: "bar", - Req: &http.Request{ - Method: "POST", - }, - Res: &http.Response{ - StatusCode: http.StatusConflict, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsAlreadyExists, - }, - { - Resource: "foo", - Name: "bar", - Req: &http.Request{ - Method: "PUT", - }, - Res: &http.Response{ - StatusCode: http.StatusConflict, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsConflict, - }, - { - Resource: "foo", - Name: "bar", - Req: &http.Request{}, - Res: &http.Response{ - StatusCode: http.StatusNotFound, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsNotFound, - }, - { - Req: &http.Request{}, - Res: &http.Response{ - StatusCode: http.StatusBadRequest, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsBadRequest, - }, - { - // status in response overrides transformed result - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","status":"Failure","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - Transformed: &apierrors.StatusError{ - ErrStatus: metav1.Status{Status: metav1.StatusFailure, Code: http.StatusNotFound}, - }, - }, - { - // successful status is ignored - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","status":"Success","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - }, - { - // empty object does not change result - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{}`)))}, - ErrFn: apierrors.IsBadRequest, - }, - { - // we default apiVersion for backwards compatibility with old clients - // TODO: potentially remove in 1.7 - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","status":"Failure","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - Transformed: &apierrors.StatusError{ - ErrStatus: metav1.Status{Status: metav1.StatusFailure, Code: http.StatusNotFound}, - }, - }, - { - // we do not default kind - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"status":"Failure","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - }, - } - - for i, testCase := range testCases { - r := &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(), - resourceName: testCase.Name, - resource: testCase.Resource, - } - result := r.transformResponse(testCase.Res, testCase.Req) - err := result.err - if !testCase.ErrFn(err) { - t.Errorf("unexpected error: %v", err) - continue - } - if !apierrors.IsUnexpectedServerError(err) { - t.Errorf("%d: unexpected error type: %v", i, err) - } - if len(testCase.Name) != 0 && !strings.Contains(err.Error(), testCase.Name) { - t.Errorf("unexpected error string: %s", err) - } - if len(testCase.Resource) != 0 && !strings.Contains(err.Error(), testCase.Resource) { - t.Errorf("unexpected error string: %s", err) - } - - // verify Error() properly transforms the error - transformed := result.Error() - expect := testCase.Transformed - if expect == nil { - expect = err - } - if !reflect.DeepEqual(expect, transformed) { - t.Errorf("%d: unexpected Error(): %s", i, diff.ObjectReflectDiff(expect, transformed)) - } - - // verify result.Get properly transforms the error - if _, err := result.Get(); !reflect.DeepEqual(expect, err) { - t.Errorf("%d: unexpected error on Get(): %s", i, diff.ObjectReflectDiff(expect, err)) - } - - // verify result.Into properly handles the error - if err := result.Into(&api.Pod{}); !reflect.DeepEqual(expect, err) { - t.Errorf("%d: unexpected error on Into(): %s", i, diff.ObjectReflectDiff(expect, err)) - } - - // verify result.Raw leaves the error in the untransformed state - if _, err := result.Raw(); !reflect.DeepEqual(result.err, err) { - t.Errorf("%d: unexpected error on Raw(): %s", i, diff.ObjectReflectDiff(expect, err)) - } - } -} - -func TestRequestWatch(t *testing.T) { - testCases := []struct { - Request *Request - Err bool - ErrFn func(error) bool - Empty bool - }{ - { - Request: &Request{err: errors.New("bail")}, - Err: true, - }, - { - Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("err") - }), - baseURL: &url.URL{}, - }, - Err: true, - }, - { - Request: &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusForbidden, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - }), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - return apierrors.IsForbidden(err) - }, - }, - { - Request: &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusUnauthorized, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - }), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - return apierrors.IsUnauthorized(err) - }, - }, - { - Request: &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusUnauthorized, - Body: ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &metav1.Status{ - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonUnauthorized, - })))), - }, nil - }), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - return apierrors.IsUnauthorized(err) - }, - }, - { - Request: &Request{ - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, io.EOF - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - { - Request: &Request{ - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, &url.Error{Err: io.EOF} - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - { - Request: &Request{ - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("http: can't write HTTP request on broken connection") - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - { - Request: &Request{ - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("foo: connection reset by peer") - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - } - for i, testCase := range testCases { - t.Logf("testcase %v", testCase.Request) - testCase.Request.backoffMgr = &NoBackoff{} - watch, err := testCase.Request.Watch() - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) - continue - } - if testCase.ErrFn != nil && !testCase.ErrFn(err) { - t.Errorf("%d: error not valid: %v", i, err) - } - if hasErr && watch != nil { - t.Errorf("%d: watch should be nil when error is returned", i) - continue - } - if testCase.Empty { - _, ok := <-watch.ResultChan() - if ok { - t.Errorf("%d: expected the watch to be empty: %#v", i, watch) - } - } - } -} - -func TestRequestStream(t *testing.T) { - testCases := []struct { - Request *Request - Err bool - ErrFn func(error) bool - }{ - { - Request: &Request{err: errors.New("bail")}, - Err: true, - }, - { - Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("err") - }), - baseURL: &url.URL{}, - }, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusUnauthorized, - Body: ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &metav1.Status{ - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonUnauthorized, - })))), - }, nil - }), - content: defaultContentConfig(), - serializers: defaultSerializers(), - baseURL: &url.URL{}, - }, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusBadRequest, - Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]","reason":"BadRequest","code":400}`))), - }, nil - }), - content: defaultContentConfig(), - serializers: defaultSerializers(), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - if err.Error() == "a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]" { - return true - } - return false - }, - }, - } - for i, testCase := range testCases { - testCase.Request.backoffMgr = &NoBackoff{} - body, err := testCase.Request.Stream() - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) - } - if hasErr && body != nil { - t.Errorf("%d: body should be nil when error is returned", i) - } - - if hasErr { - if testCase.ErrFn != nil && !testCase.ErrFn(err) { - t.Errorf("unexpected error: %v", err) - } - } - } -} - -type fakeUpgradeConnection struct{} - -func (c *fakeUpgradeConnection) CreateStream(headers http.Header) (httpstream.Stream, error) { - return nil, nil -} -func (c *fakeUpgradeConnection) Close() error { - return nil -} -func (c *fakeUpgradeConnection) CloseChan() <-chan bool { - return make(chan bool) -} -func (c *fakeUpgradeConnection) SetIdleTimeout(timeout time.Duration) { -} - -type fakeUpgradeRoundTripper struct { - req *http.Request - conn httpstream.Connection -} - -func (f *fakeUpgradeRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - f.req = req - b := []byte{} - body := ioutil.NopCloser(bytes.NewReader(b)) - resp := &http.Response{ - StatusCode: 101, - Body: body, - } - return resp, nil -} - -func (f *fakeUpgradeRoundTripper) NewConnection(resp *http.Response) (httpstream.Connection, error) { - return f.conn, nil -} - -func TestRequestDo(t *testing.T) { - testCases := []struct { - Request *Request - Err bool - }{ - { - Request: &Request{err: errors.New("bail")}, - Err: true, - }, - { - Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("err") - }), - baseURL: &url.URL{}, - }, - Err: true, - }, - } - for i, testCase := range testCases { - testCase.Request.backoffMgr = &NoBackoff{} - body, err := testCase.Request.Do().Raw() - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) - } - if hasErr && body != nil { - t.Errorf("%d: body should be nil when error is returned", i) - } - } -} - -func TestDoRequestNewWay(t *testing.T) { - reqBody := "request body" - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - obj, err := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(reqBody)). - Do().Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - requestURL := testapi.Default.ResourcePathWithPrefix("foo/bar", "", "", "baz") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &reqBody) -} - -// This test assumes that the client implementation backs off exponentially, for an individual request. -func TestBackoffLifecycle(t *testing.T) { - count := 0 - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - count++ - t.Logf("Attempt %d", count) - if count == 5 || count == 9 { - w.WriteHeader(http.StatusOK) - return - } else { - w.WriteHeader(http.StatusGatewayTimeout) - return - } - })) - defer testServer.Close() - c := testRESTClient(t, testServer) - - // Test backoff recovery and increase. This correlates to the constants - // which are used in the server implementation returning StatusOK above. - seconds := []int{0, 1, 2, 4, 8, 0, 1, 2, 4, 0} - request := c.Verb("POST").Prefix("backofftest").Suffix("abc") - clock := clock.FakeClock{} - request.backoffMgr = &URLBackoff{ - // Use a fake backoff here to avoid flakes and speed the test up. - Backoff: flowcontrol.NewFakeBackOff( - time.Duration(1)*time.Second, - time.Duration(200)*time.Second, - &clock, - )} - - for _, sec := range seconds { - thisBackoff := request.backoffMgr.CalculateBackoff(request.URL()) - t.Logf("Current backoff %v", thisBackoff) - if thisBackoff != time.Duration(sec)*time.Second { - t.Errorf("Backoff is %v instead of %v", thisBackoff, sec) - } - now := clock.Now() - request.DoRaw() - elapsed := clock.Since(now) - if clock.Since(now) != thisBackoff { - t.Errorf("CalculatedBackoff not honored by clock: Expected time of %v, but got %v ", thisBackoff, elapsed) - } - } -} - -type testBackoffManager struct { - sleeps []time.Duration -} - -func (b *testBackoffManager) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { -} - -func (b *testBackoffManager) CalculateBackoff(actualUrl *url.URL) time.Duration { - return time.Duration(0) -} - -func (b *testBackoffManager) Sleep(d time.Duration) { - b.sleeps = append(b.sleeps, d) -} - -func TestCheckRetryClosesBody(t *testing.T) { - count := 0 - ch := make(chan struct{}) - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - count++ - t.Logf("attempt %d", count) - if count >= 5 { - w.WriteHeader(http.StatusOK) - close(ch) - return - } - w.Header().Set("Retry-After", "1") - http.Error(w, "Too many requests, please try again later.", apierrors.StatusTooManyRequests) - })) - defer testServer.Close() - - backoffMgr := &testBackoffManager{} - expectedSleeps := []time.Duration{0, time.Second, 0, time.Second, 0, time.Second, 0, time.Second, 0} - - c := testRESTClient(t, testServer) - c.createBackoffMgr = func() BackoffManager { return backoffMgr } - _, err := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(strings.Repeat("abcd", 1000))). - DoRaw() - if err != nil { - t.Fatalf("Unexpected error: %v %#v", err, err) - } - <-ch - if count != 5 { - t.Errorf("unexpected retries: %d", count) - } - if !reflect.DeepEqual(backoffMgr.sleeps, expectedSleeps) { - t.Errorf("unexpected sleeps, expected: %v, got: %v", expectedSleeps, backoffMgr.sleeps) - } -} - -func TestConnectionResetByPeerIsRetried(t *testing.T) { - count := 0 - backoff := &testBackoffManager{} - req := &Request{ - verb: "GET", - client: clientFunc(func(req *http.Request) (*http.Response, error) { - count++ - if count >= 3 { - return &http.Response{ - StatusCode: 200, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - } - return nil, &net.OpError{Err: syscall.ECONNRESET} - }), - backoffMgr: backoff, - } - // We expect two retries of "connection reset by peer" and the success. - _, err := req.Do().Raw() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - // We have a sleep before each retry (including the initial one) and for - // every "retry-after" call - thus 5 together. - if len(backoff.sleeps) != 5 { - t.Errorf("Expected 5 retries, got: %d", len(backoff.sleeps)) - } -} - -func TestCheckRetryHandles429And5xx(t *testing.T) { - count := 0 - ch := make(chan struct{}) - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - data, err := ioutil.ReadAll(req.Body) - if err != nil { - t.Fatalf("unable to read request body: %v", err) - } - if !bytes.Equal(data, []byte(strings.Repeat("abcd", 1000))) { - t.Fatalf("retry did not send a complete body: %s", data) - } - t.Logf("attempt %d", count) - if count >= 4 { - w.WriteHeader(http.StatusOK) - close(ch) - return - } - w.Header().Set("Retry-After", "0") - w.WriteHeader([]int{apierrors.StatusTooManyRequests, 500, 501, 504}[count]) - count++ - })) - defer testServer.Close() - - c := testRESTClient(t, testServer) - _, err := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(strings.Repeat("abcd", 1000))). - DoRaw() - if err != nil { - t.Fatalf("Unexpected error: %v %#v", err, err) - } - <-ch - if count != 4 { - t.Errorf("unexpected retries: %d", count) - } -} - -func BenchmarkCheckRetryClosesBody(b *testing.B) { - count := 0 - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - count++ - if count%3 == 0 { - w.WriteHeader(http.StatusOK) - return - } - w.Header().Set("Retry-After", "0") - w.WriteHeader(apierrors.StatusTooManyRequests) - })) - defer testServer.Close() - - c := testRESTClient(b, testServer) - r := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(strings.Repeat("abcd", 1000))) - - for i := 0; i < b.N; i++ { - if _, err := r.DoRaw(); err != nil { - b.Fatalf("Unexpected error: %v %#v", err, err) - } - } -} - -func TestDoRequestNewWayReader(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - reqBodyExpected, _ := runtime.Encode(testapi.Default.Codec(), reqObj) - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - obj, err := c.Verb("POST"). - Resource("bar"). - Name("baz"). - Prefix("foo"). - LabelsSelectorParam(labels.Set{"name": "foo"}.AsSelector()). - Timeout(time.Second). - Body(bytes.NewBuffer(reqBodyExpected)). - Do().Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - tmpStr := string(reqBodyExpected) - requestURL := testapi.Default.ResourcePathWithPrefix("foo", "bar", "", "baz") - requestURL += "?" + metav1.LabelSelectorQueryParam(api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()) + "=name%3Dfoo&timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) -} - -func TestDoRequestNewWayObj(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - reqBodyExpected, _ := runtime.Encode(testapi.Default.Codec(), reqObj) - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - obj, err := c.Verb("POST"). - Suffix("baz"). - Name("bar"). - Resource("foo"). - LabelsSelectorParam(labels.Set{"name": "foo"}.AsSelector()). - Timeout(time.Second). - Body(reqObj). - Do().Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - tmpStr := string(reqBodyExpected) - requestURL := testapi.Default.ResourcePath("foo", "", "bar/baz") - requestURL += "?" + metav1.LabelSelectorQueryParam(api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()) + "=name%3Dfoo&timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) -} - -func TestDoRequestNewWayFile(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - reqBodyExpected, err := runtime.Encode(testapi.Default.Codec(), reqObj) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - file, err := ioutil.TempFile("", "foo") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - defer file.Close() - defer os.Remove(file.Name()) - - _, err = file.Write(reqBodyExpected) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - wasCreated := true - obj, err := c.Verb("POST"). - Prefix("foo/bar", "baz"). - Timeout(time.Second). - Body(file.Name()). - Do().WasCreated(&wasCreated).Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - if wasCreated { - t.Errorf("expected object was created") - } - tmpStr := string(reqBodyExpected) - requestURL := testapi.Default.ResourcePathWithPrefix("foo/bar/baz", "", "", "") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) -} - -func TestWasCreated(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - reqBodyExpected, err := runtime.Encode(testapi.Default.Codec(), reqObj) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 201, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - wasCreated := false - obj, err := c.Verb("PUT"). - Prefix("foo/bar", "baz"). - Timeout(time.Second). - Body(reqBodyExpected). - Do().WasCreated(&wasCreated).Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - if !wasCreated { - t.Errorf("Expected object was created") - } - - tmpStr := string(reqBodyExpected) - requestURL := testapi.Default.ResourcePathWithPrefix("foo/bar/baz", "", "", "") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "PUT", &tmpStr) -} - -func TestVerbs(t *testing.T) { - c := testRESTClient(t, nil) - if r := c.Post(); r.verb != "POST" { - t.Errorf("Post verb is wrong") - } - if r := c.Put(); r.verb != "PUT" { - t.Errorf("Put verb is wrong") - } - if r := c.Get(); r.verb != "GET" { - t.Errorf("Get verb is wrong") - } - if r := c.Delete(); r.verb != "DELETE" { - t.Errorf("Delete verb is wrong") - } -} - -func TestAbsPath(t *testing.T) { - for i, tc := range []struct { - configPrefix string - resourcePrefix string - absPath string - wantsAbsPath string - }{ - {"/", "", "", "/"}, - {"", "", "/", "/"}, - {"", "", "/api", "/api"}, - {"", "", "/api/", "/api/"}, - {"", "", "/apis", "/apis"}, - {"", "/foo", "/bar/foo", "/bar/foo"}, - {"", "/api/foo/123", "/bar/foo", "/bar/foo"}, - {"/p1", "", "", "/p1"}, - {"/p1", "", "/", "/p1/"}, - {"/p1", "", "/api", "/p1/api"}, - {"/p1", "", "/apis", "/p1/apis"}, - {"/p1", "/r1", "/apis", "/p1/apis"}, - {"/p1", "/api/r1", "/apis", "/p1/apis"}, - {"/p1/api/p2", "", "", "/p1/api/p2"}, - {"/p1/api/p2", "", "/", "/p1/api/p2/"}, - {"/p1/api/p2", "", "/api", "/p1/api/p2/api"}, - {"/p1/api/p2", "", "/api/", "/p1/api/p2/api/"}, - {"/p1/api/p2", "/r1", "/api/", "/p1/api/p2/api/"}, - {"/p1/api/p2", "/api/r1", "/api/", "/p1/api/p2/api/"}, - } { - u, _ := url.Parse("http://localhost:123" + tc.configPrefix) - r := NewRequest(nil, "POST", u, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil).Prefix(tc.resourcePrefix).AbsPath(tc.absPath) - if r.pathPrefix != tc.wantsAbsPath { - t.Errorf("test case %d failed, unexpected path: %q, expected %q", i, r.pathPrefix, tc.wantsAbsPath) - } - } -} - -func TestUintParam(t *testing.T) { - table := []struct { - name string - testVal uint64 - expectStr string - }{ - {"foo", 31415, "http://localhost?foo=31415"}, - {"bar", 42, "http://localhost?bar=42"}, - {"baz", 0, "http://localhost?baz=0"}, - } - - for _, item := range table { - u, _ := url.Parse("http://localhost") - r := NewRequest(nil, "GET", u, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil).AbsPath("").UintParam(item.name, item.testVal) - if e, a := item.expectStr, r.URL().String(); e != a { - t.Errorf("expected %v, got %v", e, a) - } - } -} - -func TestUnacceptableParamNames(t *testing.T) { - table := []struct { - name string - testVal string - expectSuccess bool - }{ - {"timeout", "42", false}, - } - - for _, item := range table { - c := testRESTClient(t, nil) - r := c.Get().setParam(item.name, item.testVal) - if e, a := item.expectSuccess, r.err == nil; e != a { - t.Errorf("expected %v, got %v (%v)", e, a, r.err) - } - } -} - -func TestBody(t *testing.T) { - const data = "test payload" - - obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - bodyExpected, _ := runtime.Encode(testapi.Default.Codec(), obj) - - f, err := ioutil.TempFile("", "test_body") - if err != nil { - t.Fatalf("TempFile error: %v", err) - } - if _, err := f.WriteString(data); err != nil { - t.Fatalf("TempFile.WriteString error: %v", err) - } - f.Close() - defer os.Remove(f.Name()) - - var nilObject *api.DeleteOptions - typedObject := interface{}(nilObject) - c := testRESTClient(t, nil) - tests := []struct { - input interface{} - expected string - headers map[string]string - }{ - {[]byte(data), data, nil}, - {f.Name(), data, nil}, - {strings.NewReader(data), data, nil}, - {obj, string(bodyExpected), map[string]string{"Content-Type": "application/json"}}, - {typedObject, "", nil}, - } - for i, tt := range tests { - r := c.Post().Body(tt.input) - if r.err != nil { - t.Errorf("%d: r.Body(%#v) error: %v", i, tt, r.err) - continue - } - if tt.headers != nil { - for k, v := range tt.headers { - if r.headers.Get(k) != v { - t.Errorf("%d: r.headers[%q] = %q; want %q", i, k, v, v) - } - } - } - - if r.body == nil { - if len(tt.expected) != 0 { - t.Errorf("%d: r.body = %q; want %q", i, r.body, tt.expected) - } - continue - } - buf := make([]byte, len(tt.expected)) - if _, err := r.body.Read(buf); err != nil { - t.Errorf("%d: r.body.Read error: %v", i, err) - continue - } - body := string(buf) - if body != tt.expected { - t.Errorf("%d: r.body = %q; want %q", i, body, tt.expected) - } - } -} - -func TestWatch(t *testing.T) { - var table = []struct { - t watch.EventType - obj runtime.Object - }{ - {watch.Added, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "first"}}}, - {watch.Modified, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "second"}}}, - {watch.Deleted, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "last"}}}, - } - - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - flusher, ok := w.(http.Flusher) - if !ok { - panic("need flusher!") - } - - w.Header().Set("Transfer-Encoding", "chunked") - w.WriteHeader(http.StatusOK) - flusher.Flush() - - encoder := restclientwatch.NewEncoder(streaming.NewEncoder(w, testapi.Default.Codec()), testapi.Default.Codec()) - for _, item := range table { - if err := encoder.Encode(&watch.Event{Type: item.t, Object: item.obj}); err != nil { - panic(err) - } - flusher.Flush() - } - })) - defer testServer.Close() - - s := testRESTClient(t, testServer) - watching, err := s.Get().Prefix("path/to/watch/thing").Watch() - if err != nil { - t.Fatalf("Unexpected error") - } - - for _, item := range table { - got, ok := <-watching.ResultChan() - if !ok { - t.Fatalf("Unexpected early close") - } - if e, a := item.t, got.Type; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - if e, a := item.obj, got.Object; !api.Semantic.DeepDerivative(e, a) { - t.Errorf("Expected %v, got %v", e, a) - } - } - - _, ok := <-watching.ResultChan() - if ok { - t.Fatal("Unexpected non-close") - } -} - -func TestStream(t *testing.T) { - expectedBody := "expected body" - - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - flusher, ok := w.(http.Flusher) - if !ok { - panic("need flusher!") - } - w.Header().Set("Transfer-Encoding", "chunked") - w.WriteHeader(http.StatusOK) - w.Write([]byte(expectedBody)) - flusher.Flush() - })) - defer testServer.Close() - - s := testRESTClient(t, testServer) - readCloser, err := s.Get().Prefix("path/to/stream/thing").Stream() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - defer readCloser.Close() - buf := new(bytes.Buffer) - buf.ReadFrom(readCloser) - resultBody := buf.String() - - if expectedBody != resultBody { - t.Errorf("Expected %s, got %s", expectedBody, resultBody) - } -} - -func testRESTClient(t testing.TB, srv *httptest.Server) *RESTClient { - baseURL, _ := url.Parse("http://localhost") - if srv != nil { - var err error - baseURL, err = url.Parse(srv.URL) - if err != nil { - t.Fatalf("failed to parse test URL: %v", err) - } - } - versionedAPIPath := testapi.Default.ResourcePath("", "", "") - client, err := NewRESTClient(baseURL, versionedAPIPath, defaultContentConfig(), 0, 0, nil, nil) - if err != nil { - t.Fatalf("failed to create a client: %v", err) - } - return client -} - -func TestDoContext(t *testing.T) { - receivedCh := make(chan struct{}) - block := make(chan struct{}) - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - close(receivedCh) - <-block - w.WriteHeader(http.StatusOK) - })) - defer testServer.Close() - defer close(block) - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - go func() { - <-receivedCh - cancel() - }() - - c := testRESTClient(t, testServer) - _, err := c.Verb("GET"). - Context(ctx). - Prefix("foo"). - DoRaw() - if err == nil { - t.Fatal("Expected context cancellation error") - } -} diff --git a/pkg/client/restclient/transport.go b/pkg/client/restclient/transport.go deleted file mode 100644 index 0b4f5b6cbbd..00000000000 --- a/pkg/client/restclient/transport.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "crypto/tls" - "net/http" - - "k8s.io/client-go/transport" -) - -// 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(config *Config) (*tls.Config, error) { - cfg, err := config.TransportConfig() - if err != nil { - return nil, err - } - return transport.TLSConfigFor(cfg) -} - -// TransportFor returns an http.RoundTripper that will provide the authentication -// or transport level security defined by the provided Config. Will return the -// default http.DefaultTransport if no special case behavior is needed. -func TransportFor(config *Config) (http.RoundTripper, error) { - cfg, err := config.TransportConfig() - if err != nil { - return nil, err - } - return transport.New(cfg) -} - -// HTTPWrappersForConfig wraps a round tripper with any relevant layered behavior from the -// config. Exposed to allow more clients that need HTTP-like behavior but then must hijack -// the underlying connection (like WebSocket or HTTP2 clients). Pure HTTP clients should use -// the higher level TransportFor or RESTClientFor methods. -func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) { - cfg, err := config.TransportConfig() - if err != nil { - return nil, err - } - return transport.HTTPWrappersForConfig(cfg, rt) -} - -// TransportConfig converts a client config to an appropriate transport config. -func (c *Config) TransportConfig() (*transport.Config, error) { - wt := c.WrapTransport - if c.AuthProvider != nil { - provider, err := GetAuthProvider(c.Host, c.AuthProvider, c.AuthConfigPersister) - if err != nil { - return nil, err - } - if wt != nil { - previousWT := wt - wt = func(rt http.RoundTripper) http.RoundTripper { - return provider.WrapTransport(previousWT(rt)) - } - } else { - wt = provider.WrapTransport - } - } - return &transport.Config{ - UserAgent: c.UserAgent, - Transport: c.Transport, - WrapTransport: wt, - TLS: transport.TLSConfig{ - CAFile: c.CAFile, - CAData: c.CAData, - CertFile: c.CertFile, - CertData: c.CertData, - KeyFile: c.KeyFile, - KeyData: c.KeyData, - Insecure: c.Insecure, - }, - Username: c.Username, - Password: c.Password, - BearerToken: c.BearerToken, - Impersonate: transport.ImpersonationConfig{ - UserName: c.Impersonate.UserName, - Groups: c.Impersonate.Groups, - Extra: c.Impersonate.Extra, - }, - }, nil -} diff --git a/pkg/client/restclient/url_utils.go b/pkg/client/restclient/url_utils.go deleted file mode 100644 index dba06136339..00000000000 --- a/pkg/client/restclient/url_utils.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "net/url" - "path" - - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// DefaultServerURL converts a host, host:port, or URL string to the default base server API path -// to use with a Client at a given API version following the standard conventions for a -// Kubernetes API. -func DefaultServerURL(host, apiPath string, groupVersion schema.GroupVersion, defaultTLS bool) (*url.URL, string, error) { - if host == "" { - return nil, "", fmt.Errorf("host must be a URL or a host:port pair") - } - base := host - hostURL, err := url.Parse(base) - if err != nil || hostURL.Scheme == "" || hostURL.Host == "" { - scheme := "http://" - if defaultTLS { - scheme = "https://" - } - hostURL, err = url.Parse(scheme + base) - if err != nil { - return nil, "", err - } - if hostURL.Path != "" && hostURL.Path != "/" { - return nil, "", fmt.Errorf("host must be a URL or a host:port pair: %q", base) - } - } - - // hostURL.Path is optional; a non-empty Path is treated as a prefix that is to be applied to - // all URIs used to access the host. this is useful when there's a proxy in front of the - // apiserver that has relocated the apiserver endpoints, forwarding all requests from, for - // example, /a/b/c to the apiserver. in this case the Path should be /a/b/c. - // - // if running without a frontend proxy (that changes the location of the apiserver), then - // hostURL.Path should be blank. - // - // versionedAPIPath, a path relative to baseURL.Path, points to a versioned API base - versionedAPIPath := path.Join("/", apiPath) - - // Add the version to the end of the path - if len(groupVersion.Group) > 0 { - versionedAPIPath = path.Join(versionedAPIPath, groupVersion.Group, groupVersion.Version) - - } else { - versionedAPIPath = path.Join(versionedAPIPath, groupVersion.Version) - - } - - return hostURL, versionedAPIPath, nil -} - -// defaultServerUrlFor is shared between IsConfigTransportTLS and RESTClientFor. It -// requires Host and Version to be set prior to being called. -func defaultServerUrlFor(config *Config) (*url.URL, string, error) { - // TODO: move the default to secure when the apiserver supports TLS by default - // config.Insecure is taken to mean "I want HTTPS but don't bother checking the certs against a CA." - hasCA := len(config.CAFile) != 0 || len(config.CAData) != 0 - hasCert := len(config.CertFile) != 0 || len(config.CertData) != 0 - defaultTLS := hasCA || hasCert || config.Insecure - host := config.Host - if host == "" { - host = "localhost" - } - - if config.GroupVersion != nil { - return DefaultServerURL(host, config.APIPath, *config.GroupVersion, defaultTLS) - } - return DefaultServerURL(host, config.APIPath, schema.GroupVersion{}, defaultTLS) -} diff --git a/pkg/client/restclient/url_utils_test.go b/pkg/client/restclient/url_utils_test.go deleted file mode 100644 index fa99f72e5e5..00000000000 --- a/pkg/client/restclient/url_utils_test.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "path" - "testing" - - "k8s.io/kubernetes/pkg/api" -) - -func TestValidatesHostParameter(t *testing.T) { - testCases := []struct { - Host string - APIPath string - - URL string - Err bool - }{ - {"127.0.0.1", "", "http://127.0.0.1/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"127.0.0.1:8080", "", "http://127.0.0.1:8080/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"foo.bar.com", "", "http://foo.bar.com/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"http://host/prefix", "", "http://host/prefix/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"http://host", "", "http://host/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"http://host", "/", "http://host/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"http://host", "/other", "http://host/other/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"host/server", "", "", true}, - } - for i, testCase := range testCases { - u, versionedAPIPath, err := DefaultServerURL(testCase.Host, testCase.APIPath, api.Registry.GroupOrDie(api.GroupName).GroupVersion, false) - switch { - case err == nil && testCase.Err: - t.Errorf("expected error but was nil") - continue - case err != nil && !testCase.Err: - t.Errorf("unexpected error %v", err) - continue - case err != nil: - continue - } - u.Path = path.Join(u.Path, versionedAPIPath) - if e, a := testCase.URL, u.String(); e != a { - t.Errorf("%d: expected host %s, got %s", i, e, a) - continue - } - } -} diff --git a/pkg/client/restclient/urlbackoff.go b/pkg/client/restclient/urlbackoff.go deleted file mode 100644 index 246c70acc9d..00000000000 --- a/pkg/client/restclient/urlbackoff.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "net/url" - "time" - - "github.com/golang/glog" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/util/flowcontrol" -) - -// Set of resp. Codes that we backoff for. -// In general these should be errors that indicate a server is overloaded. -// These shouldn't be configured by any user, we set them based on conventions -// described in -var serverIsOverloadedSet = sets.NewInt(429) -var maxResponseCode = 499 - -type BackoffManager interface { - UpdateBackoff(actualUrl *url.URL, err error, responseCode int) - CalculateBackoff(actualUrl *url.URL) time.Duration - Sleep(d time.Duration) -} - -// URLBackoff struct implements the semantics on top of Backoff which -// we need for URL specific exponential backoff. -type URLBackoff struct { - // Uses backoff as underlying implementation. - Backoff *flowcontrol.Backoff -} - -// NoBackoff is a stub implementation, can be used for mocking or else as a default. -type NoBackoff struct { -} - -func (n *NoBackoff) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { - // do nothing. -} - -func (n *NoBackoff) CalculateBackoff(actualUrl *url.URL) time.Duration { - return 0 * time.Second -} - -func (n *NoBackoff) Sleep(d time.Duration) { - time.Sleep(d) -} - -// Disable makes the backoff trivial, i.e., sets it to zero. This might be used -// by tests which want to run 1000s of mock requests without slowing down. -func (b *URLBackoff) Disable() { - glog.V(4).Infof("Disabling backoff strategy") - b.Backoff = flowcontrol.NewBackOff(0*time.Second, 0*time.Second) -} - -// baseUrlKey returns the key which urls will be mapped to. -// For example, 127.0.0.1:8080/api/v2/abcde -> 127.0.0.1:8080. -func (b *URLBackoff) baseUrlKey(rawurl *url.URL) string { - // Simple implementation for now, just the host. - // We may backoff specific paths (i.e. "pods") differentially - // in the future. - host, err := url.Parse(rawurl.String()) - if err != nil { - glog.V(4).Infof("Error extracting url: %v", rawurl) - panic("bad url!") - } - return host.Host -} - -// UpdateBackoff updates backoff metadata -func (b *URLBackoff) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { - // range for retry counts that we store is [0,13] - if responseCode > maxResponseCode || serverIsOverloadedSet.Has(responseCode) { - b.Backoff.Next(b.baseUrlKey(actualUrl), b.Backoff.Clock.Now()) - return - } else if responseCode >= 300 || err != nil { - glog.V(4).Infof("Client is returning errors: code %v, error %v", responseCode, err) - } - - //If we got this far, there is no backoff required for this URL anymore. - b.Backoff.Reset(b.baseUrlKey(actualUrl)) -} - -// CalculateBackoff takes a url and back's off exponentially, -// based on its knowledge of existing failures. -func (b *URLBackoff) CalculateBackoff(actualUrl *url.URL) time.Duration { - return b.Backoff.Get(b.baseUrlKey(actualUrl)) -} - -func (b *URLBackoff) Sleep(d time.Duration) { - b.Backoff.Clock.Sleep(d) -} diff --git a/pkg/client/restclient/urlbackoff_test.go b/pkg/client/restclient/urlbackoff_test.go deleted file mode 100644 index 0c4d9638166..00000000000 --- a/pkg/client/restclient/urlbackoff_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "net/url" - "testing" - "time" - - "k8s.io/client-go/pkg/util/flowcontrol" -) - -func parse(raw string) *url.URL { - theUrl, _ := url.Parse(raw) - return theUrl -} - -func TestURLBackoffFunctionalityCollisions(t *testing.T) { - myBackoff := &URLBackoff{ - Backoff: flowcontrol.NewBackOff(1*time.Second, 60*time.Second), - } - - // Add some noise and make sure backoff for a clean URL is zero. - myBackoff.UpdateBackoff(parse("http://100.200.300.400:8080"), nil, 500) - - myBackoff.UpdateBackoff(parse("http://1.2.3.4:8080"), nil, 500) - - if myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) > 0 { - t.Errorf("URLs are colliding in the backoff map!") - } -} - -// TestURLBackoffFunctionality generally tests the URLBackoff wrapper. We avoid duplicating tests from backoff and request. -func TestURLBackoffFunctionality(t *testing.T) { - myBackoff := &URLBackoff{ - Backoff: flowcontrol.NewBackOff(1*time.Second, 60*time.Second), - } - - // Now test that backoff increases, then recovers. - // 200 and 300 should both result in clearing the backoff. - // all others like 429 should result in increased backoff. - seconds := []int{0, - 1, 2, 4, 8, 0, - 1, 2} - returnCodes := []int{ - 429, 500, 501, 502, 300, - 500, 501, 502, - } - - if len(seconds) != len(returnCodes) { - t.Fatalf("responseCode to backoff arrays should be the same length... sanity check failed.") - } - - for i, sec := range seconds { - backoffSec := myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) - if backoffSec < time.Duration(sec)*time.Second || backoffSec > time.Duration(sec+5)*time.Second { - t.Errorf("Backoff out of range %v: %v %v", i, sec, backoffSec) - } - myBackoff.UpdateBackoff(parse("http://1.2.3.4:100/responseCodeForFuncTest"), nil, returnCodes[i]) - } - - if myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) == 0 { - t.Errorf("The final return code %v should have resulted in a backoff ! ", returnCodes[7]) - } -} diff --git a/pkg/client/restclient/versions.go b/pkg/client/restclient/versions.go deleted file mode 100644 index 55b2ca08d93..00000000000 --- a/pkg/client/restclient/versions.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "encoding/json" - "fmt" - "net/http" - "path" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const ( - legacyAPIPath = "/api" - defaultAPIPath = "/apis" -) - -// TODO: Is this obsoleted by the discovery client? - -// ServerAPIVersions returns the GroupVersions supported by the API server. -// It creates a RESTClient based on the passed in config, but it doesn't rely -// on the Version and Codec of the config, because it uses AbsPath and -// takes the raw response. -func ServerAPIVersions(c *Config) (groupVersions []string, err error) { - transport, err := TransportFor(c) - if err != nil { - return nil, err - } - client := http.Client{Transport: transport} - - configCopy := *c - configCopy.GroupVersion = nil - configCopy.APIPath = "" - baseURL, _, err := defaultServerUrlFor(&configCopy) - if err != nil { - return nil, err - } - // Get the groupVersions exposed at /api - originalPath := baseURL.Path - baseURL.Path = path.Join(originalPath, legacyAPIPath) - resp, err := client.Get(baseURL.String()) - if err != nil { - return nil, err - } - var v metav1.APIVersions - defer resp.Body.Close() - err = json.NewDecoder(resp.Body).Decode(&v) - if err != nil { - return nil, fmt.Errorf("unexpected error: %v", err) - } - - groupVersions = append(groupVersions, v.Versions...) - // Get the groupVersions exposed at /apis - baseURL.Path = path.Join(originalPath, defaultAPIPath) - resp2, err := client.Get(baseURL.String()) - if err != nil { - return nil, err - } - var apiGroupList metav1.APIGroupList - defer resp2.Body.Close() - err = json.NewDecoder(resp2.Body).Decode(&apiGroupList) - if err != nil { - return nil, fmt.Errorf("unexpected error: %v", err) - } - - for _, g := range apiGroupList.Groups { - for _, gv := range g.Versions { - groupVersions = append(groupVersions, gv.GroupVersion) - } - } - - return groupVersions, nil -} diff --git a/pkg/util/cert/BUILD b/pkg/util/cert/BUILD deleted file mode 100644 index 30a8d2ca7f7..00000000000 --- a/pkg/util/cert/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "cert.go", - "csr.go", - "io.go", - "pem.go", - ], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["csr_test.go"], - data = [ - "testdata/dontUseThisKey.pem", - ], - library = ":go_default_library", - tags = ["automanaged"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/util/cert/triple:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/util/cert/cert.go b/pkg/util/cert/cert.go deleted file mode 100644 index 05664c927be..00000000000 --- a/pkg/util/cert/cert.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cert - -import ( - "bytes" - "crypto/ecdsa" - "crypto/elliptic" - cryptorand "crypto/rand" - "crypto/rsa" - "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" - "fmt" - "math" - "math/big" - "net" - "time" -) - -const ( - rsaKeySize = 2048 - duration365d = time.Hour * 24 * 365 -) - -// Config containes the basic fields required for creating a certificate -type Config struct { - CommonName string - Organization []string - AltNames AltNames -} - -// AltNames contains the domain names and IP addresses that will be added -// to the API Server's x509 certificate SubAltNames field. The values will -// be passed directly to the x509.Certificate object. -type AltNames struct { - DNSNames []string - IPs []net.IP -} - -// NewPrivateKey creates an RSA private key -func NewPrivateKey() (*rsa.PrivateKey, error) { - return rsa.GenerateKey(cryptorand.Reader, rsaKeySize) -} - -// NewSelfSignedCACert creates a CA certificate -func NewSelfSignedCACert(cfg Config, key *rsa.PrivateKey) (*x509.Certificate, error) { - now := time.Now() - tmpl := x509.Certificate{ - SerialNumber: new(big.Int).SetInt64(0), - Subject: pkix.Name{ - CommonName: cfg.CommonName, - Organization: cfg.Organization, - }, - NotBefore: now.UTC(), - NotAfter: now.Add(duration365d * 10).UTC(), - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, - BasicConstraintsValid: true, - IsCA: true, - } - - certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &tmpl, &tmpl, key.Public(), key) - if err != nil { - return nil, err - } - return x509.ParseCertificate(certDERBytes) -} - -// NewSignedCert creates a signed certificate using the given CA certificate and key -func NewSignedCert(cfg Config, key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey) (*x509.Certificate, error) { - serial, err := cryptorand.Int(cryptorand.Reader, new(big.Int).SetInt64(math.MaxInt64)) - if err != nil { - return nil, err - } - - certTmpl := x509.Certificate{ - Subject: pkix.Name{ - CommonName: cfg.CommonName, - Organization: cfg.Organization, - }, - DNSNames: cfg.AltNames.DNSNames, - IPAddresses: cfg.AltNames.IPs, - SerialNumber: serial, - NotBefore: caCert.NotBefore, - NotAfter: time.Now().Add(duration365d).UTC(), - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth}, - } - certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &certTmpl, caCert, key.Public(), caKey) - if err != nil { - return nil, err - } - return x509.ParseCertificate(certDERBytes) -} - -// MakeEllipticPrivateKeyPEM creates an ECDSA private key -func MakeEllipticPrivateKeyPEM() ([]byte, error) { - privateKey, err := ecdsa.GenerateKey(elliptic.P256(), cryptorand.Reader) - if err != nil { - return nil, err - } - - derBytes, err := x509.MarshalECPrivateKey(privateKey) - if err != nil { - return nil, err - } - - privateKeyPemBlock := &pem.Block{ - Type: "EC PRIVATE KEY", - Bytes: derBytes, - } - return pem.EncodeToMemory(privateKeyPemBlock), nil -} - -// GenerateSelfSignedCertKey creates a self-signed certificate and key for the given host. -// Host may be an IP or a DNS name -// You may also specify additional subject alt names (either ip or dns names) for the certificate -func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error) { - priv, err := rsa.GenerateKey(cryptorand.Reader, 2048) - if err != nil { - return nil, nil, err - } - - template := x509.Certificate{ - SerialNumber: big.NewInt(1), - Subject: pkix.Name{ - CommonName: fmt.Sprintf("%s@%d", host, time.Now().Unix()), - }, - NotBefore: time.Now(), - NotAfter: time.Now().Add(time.Hour * 24 * 365), - - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, - BasicConstraintsValid: true, - IsCA: true, - } - - if ip := net.ParseIP(host); ip != nil { - template.IPAddresses = append(template.IPAddresses, ip) - } else { - template.DNSNames = append(template.DNSNames, host) - } - - template.IPAddresses = append(template.IPAddresses, alternateIPs...) - template.DNSNames = append(template.DNSNames, alternateDNS...) - - derBytes, err := x509.CreateCertificate(cryptorand.Reader, &template, &template, &priv.PublicKey, priv) - if err != nil { - return nil, nil, err - } - - // Generate cert - certBuffer := bytes.Buffer{} - if err := pem.Encode(&certBuffer, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil { - return nil, nil, err - } - - // Generate key - keyBuffer := bytes.Buffer{} - if err := pem.Encode(&keyBuffer, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)}); err != nil { - return nil, nil, err - } - - return certBuffer.Bytes(), keyBuffer.Bytes(), nil -} - -// FormatBytesCert receives byte array certificate and formats in human-readable format -func FormatBytesCert(cert []byte) (string, error) { - block, _ := pem.Decode(cert) - c, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return "", fmt.Errorf("failed to parse certificate [%v]", err) - } - return FormatCert(c), nil -} - -// FormatCert receives certificate and formats in human-readable format -func FormatCert(c *x509.Certificate) string { - var ips []string - for _, ip := range c.IPAddresses { - ips = append(ips, ip.String()) - } - altNames := append(ips, c.DNSNames...) - res := fmt.Sprintf( - "Issuer: CN=%s | Subject: CN=%s | CA: %t\n", - c.Issuer.CommonName, c.Subject.CommonName, c.IsCA, - ) - res += fmt.Sprintf("Not before: %s Not After: %s", c.NotBefore, c.NotAfter) - if len(altNames) > 0 { - res += fmt.Sprintf("\nAlternate Names: %v", altNames) - } - return res -} diff --git a/pkg/util/cert/csr.go b/pkg/util/cert/csr.go deleted file mode 100644 index b20bb849bd0..00000000000 --- a/pkg/util/cert/csr.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cert - -import ( - cryptorand "crypto/rand" - "crypto/rsa" - "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" - "net" -) - -// MakeCSR generates a PEM-encoded CSR using the supplied private key, subject, and SANs. -// All key types that are implemented via crypto.Signer are supported (This includes *rsa.PrivateKey and *ecdsa.PrivateKey.) -func MakeCSR(privateKey interface{}, subject *pkix.Name, dnsSANs []string, ipSANs []net.IP) (csr []byte, err error) { - // Customize the signature for RSA keys, depending on the key size - var sigType x509.SignatureAlgorithm - if privateKey, ok := privateKey.(*rsa.PrivateKey); ok { - keySize := privateKey.N.BitLen() - switch { - case keySize >= 4096: - sigType = x509.SHA512WithRSA - case keySize >= 3072: - sigType = x509.SHA384WithRSA - default: - sigType = x509.SHA256WithRSA - } - } - - template := &x509.CertificateRequest{ - Subject: *subject, - SignatureAlgorithm: sigType, - DNSNames: dnsSANs, - IPAddresses: ipSANs, - } - - csr, err = x509.CreateCertificateRequest(cryptorand.Reader, template, privateKey) - if err != nil { - return nil, err - } - - csrPemBlock := &pem.Block{ - Type: "CERTIFICATE REQUEST", - Bytes: csr, - } - - return pem.EncodeToMemory(csrPemBlock), nil -} diff --git a/pkg/util/cert/io.go b/pkg/util/cert/io.go deleted file mode 100644 index c2bde8efdd0..00000000000 --- a/pkg/util/cert/io.go +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cert - -import ( - "crypto/x509" - "fmt" - "io/ioutil" - "os" - "path/filepath" -) - -// CanReadCertAndKey returns true if the certificate and key files already exists, -// otherwise returns false. If lost one of cert and key, returns error. -func CanReadCertAndKey(certPath, keyPath string) (bool, error) { - certReadable := canReadFile(certPath) - keyReadable := canReadFile(keyPath) - - if certReadable == false && keyReadable == false { - return false, nil - } - - if certReadable == false { - return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", certPath) - } - - if keyReadable == false { - return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", keyPath) - } - - return true, nil -} - -// If the file represented by path exists and -// readable, returns true otherwise returns false. -func canReadFile(path string) bool { - f, err := os.Open(path) - if err != nil { - return false - } - - defer f.Close() - - return true -} - -// WriteCert writes the pem-encoded certificate data to certPath. -// The certificate file will be created with file mode 0644. -// If the certificate file already exists, it will be overwritten. -// The parent directory of the certPath will be created as needed with file mode 0755. -func WriteCert(certPath string, data []byte) error { - if err := os.MkdirAll(filepath.Dir(certPath), os.FileMode(0755)); err != nil { - return err - } - if err := ioutil.WriteFile(certPath, data, os.FileMode(0644)); err != nil { - return err - } - return nil -} - -// WriteKey writes the pem-encoded key data to keyPath. -// The key file will be created with file mode 0600. -// If the key file already exists, it will be overwritten. -// The parent directory of the keyPath will be created as needed with file mode 0755. -func WriteKey(keyPath string, data []byte) error { - if err := os.MkdirAll(filepath.Dir(keyPath), os.FileMode(0755)); err != nil { - return err - } - if err := ioutil.WriteFile(keyPath, data, os.FileMode(0600)); err != nil { - return err - } - return nil -} - -// NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file. -// Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates -func NewPool(filename string) (*x509.CertPool, error) { - certs, err := CertsFromFile(filename) - if err != nil { - return nil, err - } - pool := x509.NewCertPool() - for _, cert := range certs { - pool.AddCert(cert) - } - return pool, nil -} - -// CertsFromFile returns the x509.Certificates contained in the given PEM-encoded file. -// Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates -func CertsFromFile(file string) ([]*x509.Certificate, error) { - pemBlock, err := ioutil.ReadFile(file) - if err != nil { - return nil, err - } - certs, err := ParseCertsPEM(pemBlock) - if err != nil { - return nil, fmt.Errorf("error reading %s: %s", file, err) - } - return certs, nil -} - -// PrivateKeyFromFile returns the private key in rsa.PrivateKey or ecdsa.PrivateKey format from a given PEM-encoded file. -// Returns an error if the file could not be read or if the private key could not be parsed. -func PrivateKeyFromFile(file string) (interface{}, error) { - pemBlock, err := ioutil.ReadFile(file) - if err != nil { - return nil, err - } - key, err := ParsePrivateKeyPEM(pemBlock) - if err != nil { - return nil, fmt.Errorf("error reading %s: %v", file, err) - } - return key, nil -} diff --git a/pkg/util/cert/pem.go b/pkg/util/cert/pem.go deleted file mode 100644 index 59e602d2f1c..00000000000 --- a/pkg/util/cert/pem.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cert - -import ( - "crypto/rsa" - "crypto/x509" - "encoding/pem" - "errors" - "fmt" -) - -// EncodePublicKeyPEM returns PEM-endcode public data -func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error) { - der, err := x509.MarshalPKIXPublicKey(key) - if err != nil { - return []byte{}, err - } - block := pem.Block{ - Type: "PUBLIC KEY", - Bytes: der, - } - return pem.EncodeToMemory(&block), nil -} - -// EncodePrivateKeyPEM returns PEM-encoded private key data -func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte { - block := pem.Block{ - Type: "RSA PRIVATE KEY", - Bytes: x509.MarshalPKCS1PrivateKey(key), - } - return pem.EncodeToMemory(&block) -} - -// EncodeCertPEM returns PEM-endcoded certificate data -func EncodeCertPEM(cert *x509.Certificate) []byte { - block := pem.Block{ - Type: "CERTIFICATE", - Bytes: cert.Raw, - } - return pem.EncodeToMemory(&block) -} - -// ParsePrivateKeyPEM returns a private key parsed from a PEM block in the supplied data. -// Recognizes PEM blocks for "EC PRIVATE KEY" and "RSA PRIVATE KEY" -func ParsePrivateKeyPEM(keyData []byte) (interface{}, error) { - for { - var privateKeyPemBlock *pem.Block - privateKeyPemBlock, keyData = pem.Decode(keyData) - if privateKeyPemBlock == nil { - // we read all the PEM blocks and didn't recognize one - return nil, fmt.Errorf("no private key PEM block found") - } - - switch privateKeyPemBlock.Type { - case "EC PRIVATE KEY": - return x509.ParseECPrivateKey(privateKeyPemBlock.Bytes) - case "RSA PRIVATE KEY": - return x509.ParsePKCS1PrivateKey(privateKeyPemBlock.Bytes) - } - } -} - -// ParseCertsPEM returns the x509.Certificates contained in the given PEM-encoded byte array -// Returns an error if a certificate could not be parsed, or if the data does not contain any certificates -func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error) { - ok := false - certs := []*x509.Certificate{} - for len(pemCerts) > 0 { - var block *pem.Block - block, pemCerts = pem.Decode(pemCerts) - if block == nil { - break - } - // Only use PEM "CERTIFICATE" blocks without extra headers - if block.Type != "CERTIFICATE" || len(block.Headers) != 0 { - continue - } - - cert, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return certs, err - } - - certs = append(certs, cert) - ok = true - } - - if !ok { - return certs, errors.New("could not read any certificates") - } - return certs, nil -} diff --git a/pkg/util/testing/BUILD b/pkg/util/testing/BUILD deleted file mode 100644 index ea8679ada66..00000000000 --- a/pkg/util/testing/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "fake_handler.go", - "tmpdir.go", - ], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["fake_handler_test.go"], - library = ":go_default_library", - tags = ["automanaged"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/util/testing/fake_handler.go b/pkg/util/testing/fake_handler.go deleted file mode 100644 index 6790cfd8ce0..00000000000 --- a/pkg/util/testing/fake_handler.go +++ /dev/null @@ -1,139 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testing - -import ( - "io/ioutil" - "net/http" - "net/url" - "reflect" - "sync" -) - -// TestInterface is a simple interface providing Errorf, to make injection for -// testing easier (insert 'yo dawg' meme here). -type TestInterface interface { - Errorf(format string, args ...interface{}) - Logf(format string, args ...interface{}) -} - -// LogInterface is a simple interface to allow injection of Logf to report serving errors. -type LogInterface interface { - Logf(format string, args ...interface{}) -} - -// FakeHandler is to assist in testing HTTP requests. Notice that FakeHandler is -// not thread safe and you must not direct traffic to except for the request -// you want to test. You can do this by hiding it in an http.ServeMux. -type FakeHandler struct { - RequestReceived *http.Request - RequestBody string - StatusCode int - ResponseBody string - // For logging - you can use a *testing.T - // This will keep log messages associated with the test. - T LogInterface - - // Enforce "only one use" constraint. - lock sync.Mutex - requestCount int - hasBeenChecked bool - - SkipRequestFn func(verb string, url url.URL) bool -} - -func (f *FakeHandler) SetResponseBody(responseBody string) { - f.lock.Lock() - defer f.lock.Unlock() - f.ResponseBody = responseBody -} - -func (f *FakeHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.SkipRequestFn != nil && f.SkipRequestFn(request.Method, *request.URL) { - response.Header().Set("Content-Type", "application/json") - response.WriteHeader(f.StatusCode) - response.Write([]byte(f.ResponseBody)) - return - } - - f.requestCount++ - if f.hasBeenChecked { - panic("got request after having been validated") - } - - f.RequestReceived = request - response.Header().Set("Content-Type", "application/json") - response.WriteHeader(f.StatusCode) - response.Write([]byte(f.ResponseBody)) - - bodyReceived, err := ioutil.ReadAll(request.Body) - if err != nil && f.T != nil { - f.T.Logf("Received read error: %v", err) - } - f.RequestBody = string(bodyReceived) - if f.T != nil { - f.T.Logf("request body: %s", f.RequestBody) - } -} - -func (f *FakeHandler) ValidateRequestCount(t TestInterface, count int) bool { - ok := true - f.lock.Lock() - defer f.lock.Unlock() - if f.requestCount != count { - ok = false - t.Errorf("Expected %d call, but got %d. Only the last call is recorded and checked.", count, f.requestCount) - } - f.hasBeenChecked = true - return ok -} - -// ValidateRequest verifies that FakeHandler received a request with expected path, method, and body. -func (f *FakeHandler) ValidateRequest(t TestInterface, expectedPath, expectedMethod string, body *string) { - f.lock.Lock() - defer f.lock.Unlock() - if f.requestCount != 1 { - t.Logf("Expected 1 call, but got %v. Only the last call is recorded and checked.", f.requestCount) - } - f.hasBeenChecked = true - - expectURL, err := url.Parse(expectedPath) - if err != nil { - t.Errorf("Couldn't parse %v as a URL.", expectedPath) - } - if f.RequestReceived == nil { - t.Errorf("Unexpected nil request received for %s", expectedPath) - return - } - if f.RequestReceived.URL.Path != expectURL.Path { - t.Errorf("Unexpected request path for request %#v, received: %q, expected: %q", f.RequestReceived, f.RequestReceived.URL.Path, expectURL.Path) - } - if e, a := expectURL.Query(), f.RequestReceived.URL.Query(); !reflect.DeepEqual(e, a) { - t.Errorf("Unexpected query for request %#v, received: %q, expected: %q", f.RequestReceived, a, e) - } - if f.RequestReceived.Method != expectedMethod { - t.Errorf("Unexpected method: %q, expected: %q", f.RequestReceived.Method, expectedMethod) - } - if body != nil { - if *body != f.RequestBody { - t.Errorf("Received body:\n%s\n Doesn't match expected body:\n%s", f.RequestBody, *body) - } - } -} diff --git a/pkg/util/testing/tmpdir.go b/pkg/util/testing/tmpdir.go deleted file mode 100644 index 3b2d885fce3..00000000000 --- a/pkg/util/testing/tmpdir.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testing - -import ( - "io/ioutil" - "os" -) - -// MkTmpdir creates a temporary directory based upon the prefix passed in. -// If successful, it returns the temporary directory path. The directory can be -// deleted with a call to "os.RemoveAll(...)". -// In case of error, it'll return an empty string and the error. -func MkTmpdir(prefix string) (string, error) { - tmpDir, err := ioutil.TempDir(os.TempDir(), prefix) - if err != nil { - return "", err - } - return tmpDir, nil -} - -// MkTmpdir does the same work as "MkTmpdir", except in case of -// errors, it'll trigger a panic. -func MkTmpdirOrDie(prefix string) string { - tmpDir, err := MkTmpdir(prefix) - if err != nil { - panic(err) - } - return tmpDir -} diff --git a/staging/copy.sh b/staging/copy.sh index a06a91d5afa..73c6913404a 100755 --- a/staging/copy.sh +++ b/staging/copy.sh @@ -70,11 +70,16 @@ function save() { # save everything for which the staging directory is the source of truth save "transport" +save "tools/metrics" save "tools/clientcmd/api" -save "rest/watch" +save "rest" +# remove the rest/fake until we're authoritative for it (need to update for registry) +rm -rf ${CLIENT_REPO_TEMP}/rest/fake +save "pkg/util/cert" save "pkg/util/clock" -save "pkg/util/integer" save "pkg/util/flowcontrol" +save "pkg/util/integer" +save "pkg/util/testing" @@ -90,7 +95,7 @@ mkcp "/pkg/client/record" "/pkg/client" mkcp "/pkg/client/cache" "/pkg/client" # TODO: make this test file not depending on pkg/client/unversioned rm "${CLIENT_REPO_TEMP}"/pkg/client/cache/listwatch_test.go -mkcp "/pkg/client/restclient" "/pkg/client" +mkcp "/pkg/client/restclient/fake" "/pkg/client/restclient" mkcp "/pkg/client/testing" "/pkg/client" # remove this test because it imports the internal clientset rm "${CLIENT_REPO_TEMP}"/pkg/client/testing/core/fake_test.go @@ -147,8 +152,6 @@ find "${CLIENT_REPO_TEMP}"/pkg/client/record -type f -name "*.go" -print0 | xarg # gofmt the changed files echo "rewrite conflicting Prometheus registration" -sed -i "s/request_latency_microseconds/request_latency_microseconds_copy/g" "${CLIENT_REPO_TEMP}"/pkg/client/metrics/metrics.go -sed -i "s/request_status_codes/request_status_codes_copy/g" "${CLIENT_REPO_TEMP}"/pkg/client/metrics/metrics.go sed -i "s/kubernetes_build_info/kubernetes_build_info_copy/g" "${CLIENT_REPO_TEMP}"/pkg/version/version.go echo "rewrite proto names in proto.RegisterType" @@ -191,12 +194,11 @@ mvfolder "pkg/client/clientset_generated/${CLIENTSET}" kubernetes mvfolder pkg/client/typed/discovery discovery mvfolder pkg/client/typed/dynamic dynamic mvfolder pkg/client/record tools/record -mvfolder pkg/client/restclient rest +mvfolder pkg/client/restclient/fake rest/fake mvfolder pkg/client/cache tools/cache mvfolder pkg/client/unversioned/auth tools/auth mvfolder pkg/client/unversioned/clientcmd tools/clientcmd mvfolder pkg/client/unversioned/portforward tools/portforward -mvfolder pkg/client/metrics tools/metrics mvfolder pkg/client/testing/core testing mvfolder pkg/client/testing/cache tools/cache/testing mvfolder cmd/kubeadm/app/apis/kubeadm pkg/apis/kubeadm diff --git a/pkg/util/cert/csr_test.go b/staging/src/k8s.io/client-go/pkg/util/cert/csr_test.go similarity index 100% rename from pkg/util/cert/csr_test.go rename to staging/src/k8s.io/client-go/pkg/util/cert/csr_test.go diff --git a/pkg/util/cert/testdata/dontUseThisKey.pem b/staging/src/k8s.io/client-go/pkg/util/cert/testdata/dontUseThisKey.pem similarity index 100% rename from pkg/util/cert/testdata/dontUseThisKey.pem rename to staging/src/k8s.io/client-go/pkg/util/cert/testdata/dontUseThisKey.pem diff --git a/pkg/util/cert/triple/BUILD b/staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD similarity index 100% rename from pkg/util/cert/triple/BUILD rename to staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD diff --git a/pkg/util/cert/triple/triple.go b/staging/src/k8s.io/client-go/pkg/util/cert/triple/triple.go similarity index 100% rename from pkg/util/cert/triple/triple.go rename to staging/src/k8s.io/client-go/pkg/util/cert/triple/triple.go diff --git a/staging/src/k8s.io/client-go/pkg/util/clock/clock_test.go b/staging/src/k8s.io/client-go/pkg/util/clock/clock_test.go new file mode 100644 index 00000000000..27d34605f50 --- /dev/null +++ b/staging/src/k8s.io/client-go/pkg/util/clock/clock_test.go @@ -0,0 +1,184 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clock + +import ( + "testing" + "time" +) + +func TestFakeClock(t *testing.T) { + startTime := time.Now() + tc := NewFakeClock(startTime) + tc.Step(time.Second) + now := tc.Now() + if now.Sub(startTime) != time.Second { + t.Errorf("input: %s now=%s gap=%s expected=%s", startTime, now, now.Sub(startTime), time.Second) + } + + tt := tc.Now() + tc.SetTime(tt.Add(time.Hour)) + if tc.Now().Sub(tt) != time.Hour { + t.Errorf("input: %s now=%s gap=%s expected=%s", tt, tc.Now(), tc.Now().Sub(tt), time.Hour) + } +} + +func TestFakeClockSleep(t *testing.T) { + startTime := time.Now() + tc := NewFakeClock(startTime) + tc.Sleep(time.Duration(1) * time.Hour) + now := tc.Now() + if now.Sub(startTime) != time.Hour { + t.Errorf("Fake sleep failed, expected time to advance by one hour, instead, its %v", now.Sub(startTime)) + } +} + +func TestFakeAfter(t *testing.T) { + tc := NewFakeClock(time.Now()) + if tc.HasWaiters() { + t.Errorf("unexpected waiter?") + } + oneSec := tc.After(time.Second) + if !tc.HasWaiters() { + t.Errorf("unexpected lack of waiter?") + } + + oneOhOneSec := tc.After(time.Second + time.Millisecond) + twoSec := tc.After(2 * time.Second) + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(999 * time.Millisecond) + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(time.Millisecond) + select { + case <-oneSec: + // Expected! + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } + tc.Step(time.Millisecond) + select { + case <-oneSec: + // should not double-trigger! + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + // Expected! + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } +} + +func TestFakeTick(t *testing.T) { + tc := NewFakeClock(time.Now()) + if tc.HasWaiters() { + t.Errorf("unexpected waiter?") + } + oneSec := tc.Tick(time.Second) + if !tc.HasWaiters() { + t.Errorf("unexpected lack of waiter?") + } + + oneOhOneSec := tc.Tick(time.Second + time.Millisecond) + twoSec := tc.Tick(2 * time.Second) + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(999 * time.Millisecond) // t=.999 + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(time.Millisecond) // t=1.000 + select { + case <-oneSec: + // Expected! + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } + tc.Step(time.Millisecond) // t=1.001 + select { + case <-oneSec: + // should not double-trigger! + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + // Expected! + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } + + tc.Step(time.Second) // t=2.001 + tc.Step(time.Second) // t=3.001 + tc.Step(time.Second) // t=4.001 + tc.Step(time.Second) // t=5.001 + + // The one second ticker should not accumulate ticks + accumulatedTicks := 0 + drained := false + for !drained { + select { + case <-oneSec: + accumulatedTicks++ + default: + drained = true + } + } + if accumulatedTicks != 1 { + t.Errorf("unexpected number of accumulated ticks: %d", accumulatedTicks) + } +} diff --git a/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff_test.go b/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff_test.go new file mode 100644 index 00000000000..df663221d82 --- /dev/null +++ b/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff_test.go @@ -0,0 +1,195 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package flowcontrol + +import ( + "testing" + "time" + + "k8s.io/kubernetes/pkg/util/clock" +) + +func TestSlowBackoff(t *testing.T) { + id := "_idSlow" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := 50 * step + + b := NewFakeBackOff(step, maxDuration, tc) + cases := []time.Duration{0, 1, 2, 4, 8, 16, 32, 50, 50, 50} + for ix, c := range cases { + tc.Step(step) + w := b.Get(id) + if w != c*step { + t.Errorf("input: '%d': expected %s, got %s", ix, c*step, w) + } + b.Next(id, tc.Now()) + } + + //Now confirm that the Reset cancels backoff. + b.Next(id, tc.Now()) + b.Reset(id) + if b.Get(id) != 0 { + t.Errorf("Reset didn't clear the backoff.") + } + +} + +func TestBackoffReset(t *testing.T) { + id := "_idReset" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := step * 5 + b := NewFakeBackOff(step, maxDuration, tc) + startTime := tc.Now() + + // get to backoff = maxDuration + for i := 0; i <= int(maxDuration/step); i++ { + tc.Step(step) + b.Next(id, tc.Now()) + } + + // backoff should be capped at maxDuration + if !b.IsInBackOffSince(id, tc.Now()) { + t.Errorf("expected to be in Backoff got %s", b.Get(id)) + } + + lastUpdate := tc.Now() + tc.Step(2*maxDuration + step) // time += 11s, 11 > 2*maxDuration + if b.IsInBackOffSince(id, lastUpdate) { + t.Errorf("expected to not be in Backoff after reset (start=%s, now=%s, lastUpdate=%s), got %s", startTime, tc.Now(), lastUpdate, b.Get(id)) + } +} + +func TestBackoffHightWaterMark(t *testing.T) { + id := "_idHiWaterMark" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := 5 * step + b := NewFakeBackOff(step, maxDuration, tc) + + // get to backoff = maxDuration + for i := 0; i <= int(maxDuration/step); i++ { + tc.Step(step) + b.Next(id, tc.Now()) + } + + // backoff high watermark expires after 2*maxDuration + tc.Step(maxDuration + step) + b.Next(id, tc.Now()) + + if b.Get(id) != maxDuration { + t.Errorf("expected Backoff to stay at high watermark %s got %s", maxDuration, b.Get(id)) + } +} + +func TestBackoffGC(t *testing.T) { + id := "_idGC" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := 5 * step + + b := NewFakeBackOff(step, maxDuration, tc) + + for i := 0; i <= int(maxDuration/step); i++ { + tc.Step(step) + b.Next(id, tc.Now()) + } + lastUpdate := tc.Now() + tc.Step(maxDuration + step) + b.GC() + _, found := b.perItemBackoff[id] + if !found { + t.Errorf("expected GC to skip entry, elapsed time=%s maxDuration=%s", tc.Now().Sub(lastUpdate), maxDuration) + } + + tc.Step(maxDuration + step) + b.GC() + r, found := b.perItemBackoff[id] + if found { + t.Errorf("expected GC of entry after %s got entry %v", tc.Now().Sub(lastUpdate), r) + } +} + +func TestIsInBackOffSinceUpdate(t *testing.T) { + id := "_idIsInBackOffSinceUpdate" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := 10 * step + b := NewFakeBackOff(step, maxDuration, tc) + startTime := tc.Now() + + cases := []struct { + tick time.Duration + inBackOff bool + value int + }{ + {tick: 0, inBackOff: false, value: 0}, + {tick: 1, inBackOff: false, value: 1}, + {tick: 2, inBackOff: true, value: 2}, + {tick: 3, inBackOff: false, value: 2}, + {tick: 4, inBackOff: true, value: 4}, + {tick: 5, inBackOff: true, value: 4}, + {tick: 6, inBackOff: true, value: 4}, + {tick: 7, inBackOff: false, value: 4}, + {tick: 8, inBackOff: true, value: 8}, + {tick: 9, inBackOff: true, value: 8}, + {tick: 10, inBackOff: true, value: 8}, + {tick: 11, inBackOff: true, value: 8}, + {tick: 12, inBackOff: true, value: 8}, + {tick: 13, inBackOff: true, value: 8}, + {tick: 14, inBackOff: true, value: 8}, + {tick: 15, inBackOff: false, value: 8}, + {tick: 16, inBackOff: true, value: 10}, + {tick: 17, inBackOff: true, value: 10}, + {tick: 18, inBackOff: true, value: 10}, + {tick: 19, inBackOff: true, value: 10}, + {tick: 20, inBackOff: true, value: 10}, + {tick: 21, inBackOff: true, value: 10}, + {tick: 22, inBackOff: true, value: 10}, + {tick: 23, inBackOff: true, value: 10}, + {tick: 24, inBackOff: true, value: 10}, + {tick: 25, inBackOff: false, value: 10}, + {tick: 26, inBackOff: true, value: 10}, + {tick: 27, inBackOff: true, value: 10}, + {tick: 28, inBackOff: true, value: 10}, + {tick: 29, inBackOff: true, value: 10}, + {tick: 30, inBackOff: true, value: 10}, + {tick: 31, inBackOff: true, value: 10}, + {tick: 32, inBackOff: true, value: 10}, + {tick: 33, inBackOff: true, value: 10}, + {tick: 34, inBackOff: true, value: 10}, + {tick: 35, inBackOff: false, value: 10}, + {tick: 56, inBackOff: false, value: 0}, + {tick: 57, inBackOff: false, value: 1}, + } + + for _, c := range cases { + tc.SetTime(startTime.Add(c.tick * step)) + if c.inBackOff != b.IsInBackOffSinceUpdate(id, tc.Now()) { + t.Errorf("expected IsInBackOffSinceUpdate %v got %v at tick %s", c.inBackOff, b.IsInBackOffSinceUpdate(id, tc.Now()), c.tick*step) + } + + if c.inBackOff && (time.Duration(c.value)*step != b.Get(id)) { + t.Errorf("expected backoff value=%s got %s at tick %s", time.Duration(c.value)*step, b.Get(id), c.tick*step) + } + + if !c.inBackOff { + b.Next(id, tc.Now()) + } + } +} diff --git a/staging/src/k8s.io/client-go/pkg/util/flowcontrol/throttle_test.go b/staging/src/k8s.io/client-go/pkg/util/flowcontrol/throttle_test.go new file mode 100644 index 00000000000..642020fe4b1 --- /dev/null +++ b/staging/src/k8s.io/client-go/pkg/util/flowcontrol/throttle_test.go @@ -0,0 +1,177 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package flowcontrol + +import ( + "math" + "sync" + "testing" + "time" +) + +func TestMultithreadedThrottling(t *testing.T) { + // Bucket with 100QPS and no burst + r := NewTokenBucketRateLimiter(100, 1) + + // channel to collect 100 tokens + taken := make(chan bool, 100) + + // Set up goroutines to hammer the throttler + startCh := make(chan bool) + endCh := make(chan bool) + for i := 0; i < 10; i++ { + go func() { + // wait for the starting signal + <-startCh + for { + // get a token + r.Accept() + select { + // try to add it to the taken channel + case taken <- true: + continue + // if taken is full, notify and return + default: + endCh <- true + return + } + } + }() + } + + // record wall time + startTime := time.Now() + // take the initial capacity so all tokens are the result of refill + r.Accept() + // start the thundering herd + close(startCh) + // wait for the first signal that we collected 100 tokens + <-endCh + // record wall time + endTime := time.Now() + + // tolerate a 1% clock change because these things happen + if duration := endTime.Sub(startTime); duration < (time.Second * 99 / 100) { + // We shouldn't be able to get 100 tokens out of the bucket in less than 1 second of wall clock time, no matter what + t.Errorf("Expected it to take at least 1 second to get 100 tokens, took %v", duration) + } else { + t.Logf("Took %v to get 100 tokens", duration) + } +} + +func TestBasicThrottle(t *testing.T) { + r := NewTokenBucketRateLimiter(1, 3) + for i := 0; i < 3; i++ { + if !r.TryAccept() { + t.Error("unexpected false accept") + } + } + if r.TryAccept() { + t.Error("unexpected true accept") + } +} + +func TestIncrementThrottle(t *testing.T) { + r := NewTokenBucketRateLimiter(1, 1) + if !r.TryAccept() { + t.Error("unexpected false accept") + } + if r.TryAccept() { + t.Error("unexpected true accept") + } + + // Allow to refill + time.Sleep(2 * time.Second) + + if !r.TryAccept() { + t.Error("unexpected false accept") + } +} + +func TestThrottle(t *testing.T) { + r := NewTokenBucketRateLimiter(10, 5) + + // Should consume 5 tokens immediately, then + // the remaining 11 should take at least 1 second (0.1s each) + expectedFinish := time.Now().Add(time.Second * 1) + for i := 0; i < 16; i++ { + r.Accept() + } + if time.Now().Before(expectedFinish) { + t.Error("rate limit was not respected, finished too early") + } +} + +func TestRateLimiterSaturation(t *testing.T) { + const e = 0.000001 + tests := []struct { + capacity int + take int + + expectedSaturation float64 + }{ + {1, 1, 1}, + {10, 3, 0.3}, + } + for i, tt := range tests { + rl := NewTokenBucketRateLimiter(1, tt.capacity) + for i := 0; i < tt.take; i++ { + rl.Accept() + } + if math.Abs(rl.Saturation()-tt.expectedSaturation) > e { + t.Fatalf("#%d: Saturation rate difference isn't within tolerable range\n want=%f, get=%f", + i, tt.expectedSaturation, rl.Saturation()) + } + } +} + +func TestAlwaysFake(t *testing.T) { + rl := NewFakeAlwaysRateLimiter() + if !rl.TryAccept() { + t.Error("TryAccept in AlwaysFake should return true.") + } + // If this will block the test will timeout + rl.Accept() +} + +func TestNeverFake(t *testing.T) { + rl := NewFakeNeverRateLimiter() + if rl.TryAccept() { + t.Error("TryAccept in NeverFake should return false.") + } + + finished := false + wg := sync.WaitGroup{} + wg.Add(1) + go func() { + rl.Accept() + finished = true + wg.Done() + }() + + // Wait some time to make sure it never finished. + time.Sleep(time.Second) + if finished { + t.Error("Accept should block forever in NeverFake.") + } + + rl.Stop() + wg.Wait() + if !finished { + t.Error("Stop should make Accept unblock in NeverFake.") + } +} diff --git a/staging/src/k8s.io/client-go/pkg/util/integer/integer_test.go b/staging/src/k8s.io/client-go/pkg/util/integer/integer_test.go new file mode 100644 index 00000000000..e9f586888c1 --- /dev/null +++ b/staging/src/k8s.io/client-go/pkg/util/integer/integer_test.go @@ -0,0 +1,244 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package integer + +import "testing" + +func TestIntMax(t *testing.T) { + tests := []struct { + nums []int + expectedMax int + }{ + { + nums: []int{-1, 0}, + expectedMax: 0, + }, + { + nums: []int{-1, -2}, + expectedMax: -1, + }, + { + nums: []int{0, 1}, + expectedMax: 1, + }, + { + nums: []int{1, 2}, + expectedMax: 2, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if max := IntMax(test.nums[0], test.nums[1]); max != test.expectedMax { + t.Errorf("expected %v, got %v", test.expectedMax, max) + } + } +} + +func TestIntMin(t *testing.T) { + tests := []struct { + nums []int + expectedMin int + }{ + { + nums: []int{-1, 0}, + expectedMin: -1, + }, + { + nums: []int{-1, -2}, + expectedMin: -2, + }, + { + nums: []int{0, 1}, + expectedMin: 0, + }, + { + nums: []int{1, 2}, + expectedMin: 1, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if min := IntMin(test.nums[0], test.nums[1]); min != test.expectedMin { + t.Errorf("expected %v, got %v", test.expectedMin, min) + } + } +} + +func TestInt32Max(t *testing.T) { + tests := []struct { + nums []int32 + expectedMax int32 + }{ + { + nums: []int32{-1, 0}, + expectedMax: 0, + }, + { + nums: []int32{-1, -2}, + expectedMax: -1, + }, + { + nums: []int32{0, 1}, + expectedMax: 1, + }, + { + nums: []int32{1, 2}, + expectedMax: 2, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if max := Int32Max(test.nums[0], test.nums[1]); max != test.expectedMax { + t.Errorf("expected %v, got %v", test.expectedMax, max) + } + } +} + +func TestInt32Min(t *testing.T) { + tests := []struct { + nums []int32 + expectedMin int32 + }{ + { + nums: []int32{-1, 0}, + expectedMin: -1, + }, + { + nums: []int32{-1, -2}, + expectedMin: -2, + }, + { + nums: []int32{0, 1}, + expectedMin: 0, + }, + { + nums: []int32{1, 2}, + expectedMin: 1, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if min := Int32Min(test.nums[0], test.nums[1]); min != test.expectedMin { + t.Errorf("expected %v, got %v", test.expectedMin, min) + } + } +} + +func TestInt64Max(t *testing.T) { + tests := []struct { + nums []int64 + expectedMax int64 + }{ + { + nums: []int64{-1, 0}, + expectedMax: 0, + }, + { + nums: []int64{-1, -2}, + expectedMax: -1, + }, + { + nums: []int64{0, 1}, + expectedMax: 1, + }, + { + nums: []int64{1, 2}, + expectedMax: 2, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if max := Int64Max(test.nums[0], test.nums[1]); max != test.expectedMax { + t.Errorf("expected %v, got %v", test.expectedMax, max) + } + } +} + +func TestInt64Min(t *testing.T) { + tests := []struct { + nums []int64 + expectedMin int64 + }{ + { + nums: []int64{-1, 0}, + expectedMin: -1, + }, + { + nums: []int64{-1, -2}, + expectedMin: -2, + }, + { + nums: []int64{0, 1}, + expectedMin: 0, + }, + { + nums: []int64{1, 2}, + expectedMin: 1, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if min := Int64Min(test.nums[0], test.nums[1]); min != test.expectedMin { + t.Errorf("expected %v, got %v", test.expectedMin, min) + } + } +} + +func TestRoundToInt32(t *testing.T) { + tests := []struct { + num float64 + exp int32 + }{ + { + num: 5.5, + exp: 6, + }, + { + num: -3.7, + exp: -4, + }, + { + num: 3.49, + exp: 3, + }, + { + num: -7.9, + exp: -8, + }, + { + num: -4.499999, + exp: -4, + }, + { + num: 0, + exp: 0, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if got := RoundToInt32(test.num); got != test.exp { + t.Errorf("expected %d, got %d", test.exp, got) + } + } +} diff --git a/pkg/util/testing/fake_handler_test.go b/staging/src/k8s.io/client-go/pkg/util/testing/fake_handler_test.go similarity index 100% rename from pkg/util/testing/fake_handler_test.go rename to staging/src/k8s.io/client-go/pkg/util/testing/fake_handler_test.go diff --git a/staging/src/k8s.io/client-go/rest/request.go b/staging/src/k8s.io/client-go/rest/request.go index 166366618a3..875dd6c7f3f 100644 --- a/staging/src/k8s.io/client-go/rest/request.go +++ b/staging/src/k8s.io/client-go/rest/request.go @@ -44,7 +44,6 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api/v1" - pathvalidation "k8s.io/client-go/pkg/api/validation/path" "k8s.io/client-go/pkg/util/flowcontrol" restclientwatch "k8s.io/client-go/rest/watch" "k8s.io/client-go/tools/metrics" @@ -179,7 +178,7 @@ func (r *Request) Resource(resource string) *Request { r.err = fmt.Errorf("resource already set to %q, cannot change to %q", r.resource, resource) return r } - if msgs := pathvalidation.IsValidPathSegmentName(resource); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(resource); len(msgs) != 0 { r.err = fmt.Errorf("invalid resource %q: %v", resource, msgs) return r } @@ -199,7 +198,7 @@ func (r *Request) SubResource(subresources ...string) *Request { return r } for _, s := range subresources { - if msgs := pathvalidation.IsValidPathSegmentName(s); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(s); len(msgs) != 0 { r.err = fmt.Errorf("invalid subresource %q: %v", s, msgs) return r } @@ -221,7 +220,7 @@ func (r *Request) Name(resourceName string) *Request { r.err = fmt.Errorf("resource name already set to %q, cannot change to %q", r.resourceName, resourceName) return r } - if msgs := pathvalidation.IsValidPathSegmentName(resourceName); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(resourceName); len(msgs) != 0 { r.err = fmt.Errorf("invalid resource name %q: %v", resourceName, msgs) return r } @@ -238,7 +237,7 @@ func (r *Request) Namespace(namespace string) *Request { r.err = fmt.Errorf("namespace already set to %q, cannot change to %q", r.namespace, namespace) return r } - if msgs := pathvalidation.IsValidPathSegmentName(namespace); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(namespace); len(msgs) != 0 { r.err = fmt.Errorf("invalid namespace %q: %v", namespace, msgs) return r } @@ -760,10 +759,11 @@ func (r *Request) Stream() (io.ReadCloser, error) { defer resp.Body.Close() result := r.transformResponse(resp, req) - if result.err != nil { - return nil, result.err + err := result.Error() + if err == nil { + err = fmt.Errorf("%d while accessing %v: %s", result.statusCode, url, string(result.body)) } - return nil, fmt.Errorf("%d while accessing %v: %s", result.statusCode, url, string(result.body)) + return nil, err } } @@ -1197,3 +1197,49 @@ func (r Result) Error() error { } return r.err } + +// NameMayNotBe specifies strings that cannot be used as names specified as path segments (like the REST API or etcd store) +var NameMayNotBe = []string{".", ".."} + +// NameMayNotContain specifies substrings that cannot be used in names specified as path segments (like the REST API or etcd store) +var NameMayNotContain = []string{"/", "%"} + +// IsValidPathSegmentName validates the name can be safely encoded as a path segment +func IsValidPathSegmentName(name string) []string { + for _, illegalName := range NameMayNotBe { + if name == illegalName { + return []string{fmt.Sprintf(`may not be '%s'`, illegalName)} + } + } + + var errors []string + for _, illegalContent := range NameMayNotContain { + if strings.Contains(name, illegalContent) { + errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) + } + } + + return errors +} + +// IsValidPathSegmentPrefix validates the name can be used as a prefix for a name which will be encoded as a path segment +// It does not check for exact matches with disallowed names, since an arbitrary suffix might make the name valid +func IsValidPathSegmentPrefix(name string) []string { + var errors []string + for _, illegalContent := range NameMayNotContain { + if strings.Contains(name, illegalContent) { + errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) + } + } + + return errors +} + +// ValidatePathSegmentName validates the name can be safely encoded as a path segment +func ValidatePathSegmentName(name string, prefix bool) []string { + if prefix { + return IsValidPathSegmentPrefix(name) + } else { + return IsValidPathSegmentName(name) + } +} diff --git a/staging/src/k8s.io/client-go/rest/request_test.go b/staging/src/k8s.io/client-go/rest/request_test.go index 05e9276b4a9..223dc783472 100755 --- a/staging/src/k8s.io/client-go/rest/request_test.go +++ b/staging/src/k8s.io/client-go/rest/request_test.go @@ -868,6 +868,7 @@ func TestRequestStream(t *testing.T) { testCases := []struct { Request *Request Err bool + ErrFn func(error) bool }{ { Request: &Request{err: errors.New("bail")}, @@ -903,6 +904,26 @@ func TestRequestStream(t *testing.T) { }, Err: true, }, + { + Request: &Request{ + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: http.StatusBadRequest, + Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]","reason":"BadRequest","code":400}`))), + }, nil + }), + content: defaultContentConfig(), + serializers: defaultSerializers(), + baseURL: &url.URL{}, + }, + Err: true, + ErrFn: func(err error) bool { + if err.Error() == "a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]" { + return true + } + return false + }, + }, } for i, testCase := range testCases { testCase.Request.backoffMgr = &NoBackoff{} @@ -914,6 +935,12 @@ func TestRequestStream(t *testing.T) { if hasErr && body != nil { t.Errorf("%d: body should be nil when error is returned", i) } + + if hasErr { + if testCase.ErrFn != nil && !testCase.ErrFn(err) { + t.Errorf("unexpected error: %v", err) + } + } } } From c587b8a21eb5000795b48ce16315e627e95bf094 Mon Sep 17 00:00:00 2001 From: deads2k Date: Thu, 19 Jan 2017 13:24:01 -0500 Subject: [PATCH 3/7] re-run client-gen --- cmd/cloud-controller-manager/app/BUILD | 1 - cmd/kube-aggregator/pkg/apiserver/BUILD | 1 - .../clientset_generated/clientset/BUILD | 2 +- .../clientset/clientset.go | 8 ++-- .../typed/apiregistration/v1alpha1/BUILD | 2 +- .../v1alpha1/apiregistration_client.go | 20 ++++----- .../apiregistration/v1alpha1/apiservice.go | 4 +- .../typed/apiregistration/v1alpha1/fake/BUILD | 2 +- .../fake/fake_apiregistration_client.go | 6 +-- .../internalclientset/BUILD | 2 +- .../internalclientset/clientset.go | 8 ++-- .../apiregistration/internalversion/BUILD | 2 +- .../internalversion/apiregistration_client.go | 20 ++++----- .../internalversion/apiservice.go | 4 +- .../internalversion/fake/BUILD | 2 +- .../fake/fake_apiregistration_client.go | 6 +-- cmd/kube-aggregator/pkg/cmd/server/BUILD | 1 - cmd/kube-controller-manager/app/BUILD | 1 - cmd/kubeadm/app/node/BUILD | 1 - cmd/kubelet/app/BUILD | 2 - cmd/kubemark/BUILD | 1 - .../test_internalclientset/BUILD | 7 +-- .../test_internalclientset/clientset.go | 8 ++-- .../typed/testgroup/internalversion/BUILD | 2 +- .../testgroup/internalversion/fake/BUILD | 2 +- .../fake/fake_testgroup_client.go | 6 +-- .../internalversion/testgroup_client.go | 20 ++++----- .../testgroup/internalversion/testtype.go | 4 +- .../federation_clientset/BUILD | 2 +- .../federation_clientset/clientset.go | 8 ++-- .../federation_clientset/typed/batch/v1/BUILD | 2 +- .../typed/batch/v1/batch_client.go | 20 ++++----- .../typed/batch/v1/fake/BUILD | 2 +- .../typed/batch/v1/fake/fake_batch_client.go | 6 +-- .../typed/batch/v1/job.go | 4 +- .../federation_clientset/typed/core/v1/BUILD | 2 +- .../typed/core/v1/configmap.go | 4 +- .../typed/core/v1/core_client.go | 20 ++++----- .../typed/core/v1/event.go | 4 +- .../typed/core/v1/fake/BUILD | 2 +- .../typed/core/v1/fake/fake_core_client.go | 6 +-- .../typed/core/v1/namespace.go | 4 +- .../typed/core/v1/secret.go | 4 +- .../typed/core/v1/service.go | 4 +- .../typed/extensions/v1beta1/BUILD | 2 +- .../typed/extensions/v1beta1/daemonset.go | 4 +- .../typed/extensions/v1beta1/deployment.go | 4 +- .../extensions/v1beta1/extensions_client.go | 20 ++++----- .../typed/extensions/v1beta1/fake/BUILD | 2 +- .../v1beta1/fake/fake_extensions_client.go | 6 +-- .../typed/extensions/v1beta1/ingress.go | 4 +- .../typed/extensions/v1beta1/replicaset.go | 4 +- .../typed/federation/v1beta1/BUILD | 2 +- .../typed/federation/v1beta1/cluster.go | 4 +- .../typed/federation/v1beta1/fake/BUILD | 2 +- .../v1beta1/fake/fake_federation_client.go | 6 +-- .../federation/v1beta1/federation_client.go | 20 ++++----- .../federation_internalclientset/BUILD | 2 +- .../federation_internalclientset/clientset.go | 8 ++-- .../typed/batch/internalversion/BUILD | 2 +- .../batch/internalversion/batch_client.go | 20 ++++----- .../typed/batch/internalversion/fake/BUILD | 2 +- .../internalversion/fake/fake_batch_client.go | 6 +-- .../typed/batch/internalversion/job.go | 4 +- .../typed/core/internalversion/BUILD | 2 +- .../typed/core/internalversion/configmap.go | 4 +- .../typed/core/internalversion/core_client.go | 20 ++++----- .../typed/core/internalversion/event.go | 4 +- .../typed/core/internalversion/fake/BUILD | 2 +- .../internalversion/fake/fake_core_client.go | 6 +-- .../typed/core/internalversion/namespace.go | 4 +- .../typed/core/internalversion/secret.go | 4 +- .../typed/core/internalversion/service.go | 4 +- .../typed/extensions/internalversion/BUILD | 2 +- .../extensions/internalversion/daemonset.go | 4 +- .../extensions/internalversion/deployment.go | 4 +- .../internalversion/extensions_client.go | 20 ++++----- .../extensions/internalversion/fake/BUILD | 2 +- .../fake/fake_extensions_client.go | 6 +-- .../extensions/internalversion/ingress.go | 4 +- .../extensions/internalversion/replicaset.go | 4 +- .../typed/federation/internalversion/BUILD | 2 +- .../federation/internalversion/cluster.go | 4 +- .../federation/internalversion/fake/BUILD | 2 +- .../fake/fake_federation_client.go | 6 +-- .../internalversion/federation_client.go | 20 ++++----- .../federation-controller-manager/app/BUILD | 1 - .../pkg/federation-controller/cluster/BUILD | 2 - .../pkg/federation-controller/service/BUILD | 1 - .../pkg/federation-controller/util/BUILD | 1 - federation/pkg/kubefed/testing/BUILD | 1 - pkg/BUILD | 2 +- pkg/client/cache/BUILD | 2 - .../clientset_generated/clientset/BUILD | 2 +- .../clientset/clientset.go | 8 ++-- .../clientset/typed/apps/v1beta1/BUILD | 2 +- .../typed/apps/v1beta1/apps_client.go | 20 ++++----- .../clientset/typed/apps/v1beta1/fake/BUILD | 2 +- .../apps/v1beta1/fake/fake_apps_client.go | 6 +-- .../typed/apps/v1beta1/statefulset.go | 4 +- .../typed/authentication/v1beta1/BUILD | 2 +- .../v1beta1/authentication_client.go | 20 ++++----- .../typed/authentication/v1beta1/fake/BUILD | 2 +- .../fake/fake_authentication_client.go | 6 +-- .../authentication/v1beta1/tokenreview.go | 4 +- .../typed/authorization/v1beta1/BUILD | 2 +- .../v1beta1/authorization_client.go | 20 ++++----- .../typed/authorization/v1beta1/fake/BUILD | 2 +- .../v1beta1/fake/fake_authorization_client.go | 6 +-- .../v1beta1/localsubjectaccessreview.go | 4 +- .../v1beta1/selfsubjectaccessreview.go | 4 +- .../v1beta1/subjectaccessreview.go | 4 +- .../clientset/typed/autoscaling/v1/BUILD | 2 +- .../autoscaling/v1/autoscaling_client.go | 20 ++++----- .../clientset/typed/autoscaling/v1/fake/BUILD | 2 +- .../v1/fake/fake_autoscaling_client.go | 6 +-- .../autoscaling/v1/horizontalpodautoscaler.go | 4 +- .../clientset/typed/batch/v1/BUILD | 2 +- .../clientset/typed/batch/v1/batch_client.go | 20 ++++----- .../clientset/typed/batch/v1/fake/BUILD | 2 +- .../typed/batch/v1/fake/fake_batch_client.go | 6 +-- .../clientset/typed/batch/v1/job.go | 4 +- .../clientset/typed/batch/v2alpha1/BUILD | 2 +- .../typed/batch/v2alpha1/batch_client.go | 20 ++++----- .../clientset/typed/batch/v2alpha1/cronjob.go | 4 +- .../clientset/typed/batch/v2alpha1/fake/BUILD | 2 +- .../batch/v2alpha1/fake/fake_batch_client.go | 6 +-- .../clientset/typed/batch/v2alpha1/job.go | 4 +- .../v1beta1/certificates_client.go | 20 ++++----- .../v1beta1/certificatesigningrequest.go | 4 +- .../v1beta1/fake/fake_certificates_client.go | 6 +-- .../clientset/typed/core/v1/BUILD | 2 +- .../typed/core/v1/componentstatus.go | 4 +- .../clientset/typed/core/v1/configmap.go | 4 +- .../clientset/typed/core/v1/core_client.go | 20 ++++----- .../clientset/typed/core/v1/endpoints.go | 4 +- .../clientset/typed/core/v1/event.go | 4 +- .../clientset/typed/core/v1/fake/BUILD | 2 +- .../typed/core/v1/fake/fake_core_client.go | 6 +-- .../clientset/typed/core/v1/limitrange.go | 4 +- .../clientset/typed/core/v1/namespace.go | 4 +- .../clientset/typed/core/v1/node.go | 4 +- .../typed/core/v1/persistentvolume.go | 4 +- .../typed/core/v1/persistentvolumeclaim.go | 4 +- .../clientset/typed/core/v1/pod.go | 4 +- .../clientset/typed/core/v1/podtemplate.go | 4 +- .../typed/core/v1/replicationcontroller.go | 4 +- .../clientset/typed/core/v1/resourcequota.go | 4 +- .../clientset/typed/core/v1/secret.go | 4 +- .../clientset/typed/core/v1/service.go | 4 +- .../clientset/typed/core/v1/serviceaccount.go | 4 +- .../clientset/typed/extensions/v1beta1/BUILD | 2 +- .../typed/extensions/v1beta1/daemonset.go | 4 +- .../typed/extensions/v1beta1/deployment.go | 4 +- .../extensions/v1beta1/extensions_client.go | 20 ++++----- .../typed/extensions/v1beta1/fake/BUILD | 2 +- .../v1beta1/fake/fake_extensions_client.go | 6 +-- .../typed/extensions/v1beta1/ingress.go | 4 +- .../extensions/v1beta1/podsecuritypolicy.go | 4 +- .../typed/extensions/v1beta1/replicaset.go | 4 +- .../typed/extensions/v1beta1/scale.go | 4 +- .../extensions/v1beta1/thirdpartyresource.go | 4 +- .../clientset/typed/policy/v1alpha1/BUILD | 1 - .../typed/policy/v1alpha1/fake/BUILD | 1 - .../clientset/typed/policy/v1beta1/BUILD | 2 +- .../typed/policy/v1beta1/eviction.go | 4 +- .../clientset/typed/policy/v1beta1/fake/BUILD | 2 +- .../policy/v1beta1/fake/fake_policy_client.go | 6 +-- .../policy/v1beta1/poddisruptionbudget.go | 4 +- .../typed/policy/v1beta1/policy_client.go | 20 ++++----- .../clientset/typed/rbac/v1alpha1/BUILD | 2 +- .../typed/rbac/v1alpha1/clusterrole.go | 4 +- .../typed/rbac/v1alpha1/clusterrolebinding.go | 4 +- .../clientset/typed/rbac/v1alpha1/fake/BUILD | 2 +- .../rbac/v1alpha1/fake/fake_rbac_client.go | 6 +-- .../typed/rbac/v1alpha1/rbac_client.go | 20 ++++----- .../clientset/typed/rbac/v1alpha1/role.go | 4 +- .../typed/rbac/v1alpha1/rolebinding.go | 4 +- .../clientset/typed/rbac/v1beta1/BUILD | 2 +- .../typed/rbac/v1beta1/clusterrole.go | 4 +- .../typed/rbac/v1beta1/clusterrolebinding.go | 4 +- .../clientset/typed/rbac/v1beta1/fake/BUILD | 2 +- .../rbac/v1beta1/fake/fake_rbac_client.go | 6 +-- .../typed/rbac/v1beta1/rbac_client.go | 20 ++++----- .../clientset/typed/rbac/v1beta1/role.go | 4 +- .../typed/rbac/v1beta1/rolebinding.go | 4 +- .../clientset/typed/storage/v1beta1/BUILD | 2 +- .../typed/storage/v1beta1/fake/BUILD | 2 +- .../v1beta1/fake/fake_storage_client.go | 6 +-- .../typed/storage/v1beta1/storage_client.go | 20 ++++----- .../typed/storage/v1beta1/storageclass.go | 4 +- .../internalclientset/BUILD | 2 +- .../internalclientset/clientset.go | 8 ++-- .../typed/apps/internalversion/BUILD | 2 +- .../typed/apps/internalversion/apps_client.go | 20 ++++----- .../typed/apps/internalversion/fake/BUILD | 2 +- .../internalversion/fake/fake_apps_client.go | 6 +-- .../typed/apps/internalversion/statefulset.go | 4 +- .../authentication/internalversion/BUILD | 2 +- .../internalversion/authentication_client.go | 20 ++++----- .../authentication/internalversion/fake/BUILD | 2 +- .../fake/fake_authentication_client.go | 6 +-- .../internalversion/tokenreview.go | 4 +- .../typed/authorization/internalversion/BUILD | 2 +- .../internalversion/authorization_client.go | 20 ++++----- .../authorization/internalversion/fake/BUILD | 2 +- .../fake/fake_authorization_client.go | 6 +-- .../localsubjectaccessreview.go | 4 +- .../selfsubjectaccessreview.go | 4 +- .../internalversion/subjectaccessreview.go | 4 +- .../typed/autoscaling/internalversion/BUILD | 2 +- .../internalversion/autoscaling_client.go | 20 ++++----- .../autoscaling/internalversion/fake/BUILD | 2 +- .../fake/fake_autoscaling_client.go | 6 +-- .../horizontalpodautoscaler.go | 4 +- .../typed/batch/internalversion/BUILD | 2 +- .../batch/internalversion/batch_client.go | 20 ++++----- .../typed/batch/internalversion/cronjob.go | 4 +- .../typed/batch/internalversion/fake/BUILD | 2 +- .../internalversion/fake/fake_batch_client.go | 6 +-- .../typed/batch/internalversion/job.go | 4 +- .../typed/certificates/internalversion/BUILD | 2 +- .../internalversion/certificates_client.go | 20 ++++----- .../certificatesigningrequest.go | 4 +- .../certificates/internalversion/fake/BUILD | 2 +- .../fake/fake_certificates_client.go | 6 +-- .../typed/core/internalversion/BUILD | 2 +- .../core/internalversion/componentstatus.go | 4 +- .../typed/core/internalversion/configmap.go | 4 +- .../typed/core/internalversion/core_client.go | 20 ++++----- .../typed/core/internalversion/endpoints.go | 4 +- .../typed/core/internalversion/event.go | 4 +- .../typed/core/internalversion/fake/BUILD | 2 +- .../internalversion/fake/fake_core_client.go | 6 +-- .../typed/core/internalversion/limitrange.go | 4 +- .../typed/core/internalversion/namespace.go | 4 +- .../typed/core/internalversion/node.go | 4 +- .../core/internalversion/persistentvolume.go | 4 +- .../internalversion/persistentvolumeclaim.go | 4 +- .../typed/core/internalversion/pod.go | 4 +- .../typed/core/internalversion/podtemplate.go | 4 +- .../internalversion/replicationcontroller.go | 4 +- .../core/internalversion/resourcequota.go | 4 +- .../typed/core/internalversion/secret.go | 4 +- .../typed/core/internalversion/service.go | 4 +- .../core/internalversion/serviceaccount.go | 4 +- .../typed/extensions/internalversion/BUILD | 2 +- .../extensions/internalversion/daemonset.go | 4 +- .../extensions/internalversion/deployment.go | 4 +- .../internalversion/extensions_client.go | 20 ++++----- .../extensions/internalversion/fake/BUILD | 2 +- .../fake/fake_extensions_client.go | 6 +-- .../extensions/internalversion/ingress.go | 4 +- .../internalversion/networkpolicy.go | 4 +- .../internalversion/podsecuritypolicy.go | 4 +- .../extensions/internalversion/replicaset.go | 4 +- .../typed/extensions/internalversion/scale.go | 4 +- .../internalversion/thirdpartyresource.go | 4 +- .../typed/policy/internalversion/BUILD | 2 +- .../typed/policy/internalversion/eviction.go | 4 +- .../typed/policy/internalversion/fake/BUILD | 2 +- .../fake/fake_policy_client.go | 6 +-- .../internalversion/poddisruptionbudget.go | 4 +- .../policy/internalversion/policy_client.go | 20 ++++----- .../typed/rbac/internalversion/BUILD | 2 +- .../typed/rbac/internalversion/clusterrole.go | 4 +- .../internalversion/clusterrolebinding.go | 4 +- .../typed/rbac/internalversion/fake/BUILD | 2 +- .../internalversion/fake/fake_rbac_client.go | 6 +-- .../typed/rbac/internalversion/rbac_client.go | 20 ++++----- .../typed/rbac/internalversion/role.go | 4 +- .../typed/rbac/internalversion/rolebinding.go | 4 +- .../typed/storage/internalversion/BUILD | 2 +- .../typed/storage/internalversion/fake/BUILD | 2 +- .../fake/fake_storage_client.go | 6 +-- .../storage/internalversion/storage_client.go | 20 ++++----- .../storage/internalversion/storageclass.go | 4 +- pkg/client/record/BUILD | 2 - pkg/client/restclient/fake/BUILD | 1 - pkg/client/testing/core/BUILD | 1 - pkg/client/typed/discovery/BUILD | 3 -- pkg/client/typed/discovery/fake/BUILD | 1 - pkg/client/typed/dynamic/BUILD | 2 - pkg/client/unversioned/BUILD | 2 - pkg/client/unversioned/auth/BUILD | 1 - pkg/client/unversioned/clientcmd/BUILD | 2 - pkg/client/unversioned/portforward/BUILD | 1 - pkg/client/unversioned/remotecommand/BUILD | 2 - .../unversioned/testclient/simple/BUILD | 1 - pkg/controller/BUILD | 2 - pkg/controller/endpoint/BUILD | 1 - pkg/controller/garbagecollector/BUILD | 1 - pkg/controller/job/BUILD | 1 - pkg/controller/namespace/BUILD | 1 - pkg/controller/podautoscaler/BUILD | 1 - pkg/controller/podautoscaler/metrics/BUILD | 1 - pkg/controller/replicaset/BUILD | 1 - pkg/controller/replication/BUILD | 1 - pkg/controller/statefulset/BUILD | 1 - pkg/genericapiserver/server/BUILD | 1 - pkg/kubectl/BUILD | 2 - pkg/kubectl/cmd/BUILD | 2 - pkg/kubectl/cmd/set/BUILD | 1 - pkg/kubectl/cmd/testing/BUILD | 1 - pkg/kubectl/cmd/util/BUILD | 2 - pkg/kubectl/resource/BUILD | 1 - pkg/kubelet/client/BUILD | 6 +-- pkg/kubelet/server/streaming/BUILD | 1 - pkg/master/BUILD | 1 - pkg/registry/core/rest/BUILD | 1 - plugin/cmd/kube-scheduler/app/BUILD | 1 - plugin/pkg/admission/initialresources/BUILD | 1 - plugin/pkg/client/auth/gcp/BUILD | 1 - plugin/pkg/client/auth/oidc/BUILD | 1 - plugin/pkg/scheduler/BUILD | 1 - .../algorithmprovider/defaults/BUILD | 1 - plugin/pkg/scheduler/api/BUILD | 1 - plugin/pkg/scheduler/api/v1/BUILD | 1 - plugin/pkg/scheduler/factory/BUILD | 1 - test/e2e/BUILD | 1 - test/e2e/framework/BUILD | 1 - test/e2e_federation/BUILD | 1 - test/e2e_federation/framework/BUILD | 1 - test/e2e_node/services/BUILD | 1 - test/images/clusterapi-tester/BUILD | 1 - test/images/network-tester/BUILD | 1 - test/integration/framework/BUILD | 1 - test/integration/objectmeta/BUILD | 1 - test/integration/scheduler_perf/BUILD | 1 - test/soak/cauldron/BUILD | 1 - test/soak/serve_hostnames/BUILD | 1 - vendor/BUILD | 43 ++++++++++--------- 332 files changed, 802 insertions(+), 888 deletions(-) diff --git a/cmd/cloud-controller-manager/app/BUILD b/cmd/cloud-controller-manager/app/BUILD index a85501cf251..144f9b6a480 100644 --- a/cmd/cloud-controller-manager/app/BUILD +++ b/cmd/cloud-controller-manager/app/BUILD @@ -19,7 +19,6 @@ go_library( "//pkg/client/leaderelection:go_default_library", "//pkg/client/leaderelection/resourcelock:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/controller:go_default_library", diff --git a/cmd/kube-aggregator/pkg/apiserver/BUILD b/cmd/kube-aggregator/pkg/apiserver/BUILD index 60cf011a64c..251fc8d30cf 100644 --- a/cmd/kube-aggregator/pkg/apiserver/BUILD +++ b/cmd/kube-aggregator/pkg/apiserver/BUILD @@ -55,7 +55,6 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated:go_default_library", "//pkg/client/listers/core/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/controller:go_default_library", "//pkg/genericapiserver/endpoints/filters:go_default_library", "//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library", diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD index 548c6c62d46..6363bcdbb21 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD @@ -16,11 +16,11 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go index bf9bf30fffd..a5780014f2a 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go @@ -19,8 +19,8 @@ package clientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + rest "k8s.io/client-go/rest" v1alpha1apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) @@ -65,7 +65,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -87,7 +87,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.ApiregistrationV1alpha1Client = v1alpha1apiregistration.NewForConfigOrDie(c) @@ -96,7 +96,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.ApiregistrationV1alpha1Client = v1alpha1apiregistration.New(c) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/BUILD b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/BUILD index 791d15f9617..407f8b4b1ec 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/BUILD +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/BUILD @@ -20,12 +20,12 @@ go_library( "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiregistration_client.go b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiregistration_client.go index b4b98713fd4..743e260393a 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiregistration_client.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiregistration_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ApiregistrationV1alpha1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface APIServicesGetter } // ApiregistrationV1alpha1Client is used to interact with features provided by the apiregistration.k8s.io group. type ApiregistrationV1alpha1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ApiregistrationV1alpha1Client) APIServices() APIServiceInterface { @@ -39,12 +39,12 @@ func (c *ApiregistrationV1alpha1Client) APIServices() APIServiceInterface { } // NewForConfig creates a new ApiregistrationV1alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*ApiregistrationV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*ApiregistrationV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*ApiregistrationV1alpha1Client, error) // NewForConfigOrDie creates a new ApiregistrationV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ApiregistrationV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ApiregistrationV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *ApiregistrationV1alpha1Client { } // New creates a new ApiregistrationV1alpha1Client for the given RESTClient. -func New(c restclient.Interface) *ApiregistrationV1alpha1Client { +func New(c rest.Interface) *ApiregistrationV1alpha1Client { return &ApiregistrationV1alpha1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("apiregistration.k8s.io/v1alpha1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ApiregistrationV1alpha1Client) RESTClient() restclient.Interface { +func (c *ApiregistrationV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiservice.go b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiservice.go index 9adb99eacbd..b45e93ebc19 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiservice.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiservice.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // APIServicesGetter has a method to return a APIServiceInterface. @@ -48,7 +48,7 @@ type APIServiceInterface interface { // aPIServices implements APIServiceInterface type aPIServices struct { - client restclient.Interface + client rest.Interface } // newAPIServices returns a APIServices diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/BUILD b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/BUILD index 3d020fdeea4..db6c47e82a2 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/BUILD +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", "//cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiregistration_client.go b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiregistration_client.go index d4a242fbf92..48040a273dc 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiregistration_client.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiregistration_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeApiregistrationV1alpha1) APIServices() v1alpha1.APIServiceInterface // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeApiregistrationV1alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeApiregistrationV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD index 9fa54a70803..abeea15fcd7 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD @@ -16,11 +16,11 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go index b4eaefcd501..93c3c1e06c4 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go @@ -19,8 +19,8 @@ package internalclientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + rest "k8s.io/client-go/rest" internalversionapiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) @@ -54,7 +54,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -76,7 +76,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.ApiregistrationClient = internalversionapiregistration.NewForConfigOrDie(c) @@ -85,7 +85,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.ApiregistrationClient = internalversionapiregistration.New(c) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/BUILD b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/BUILD index 4ecd93ba773..76b6bd31129 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/BUILD +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/BUILD @@ -19,10 +19,10 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiregistration_client.go b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiregistration_client.go index c936c16c035..f4a65d36faf 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiregistration_client.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiregistration_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ApiregistrationInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface APIServicesGetter } // ApiregistrationClient is used to interact with features provided by the apiregistration.k8s.io group. type ApiregistrationClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ApiregistrationClient) APIServices() APIServiceInterface { @@ -36,12 +36,12 @@ func (c *ApiregistrationClient) APIServices() APIServiceInterface { } // NewForConfig creates a new ApiregistrationClient for the given config. -func NewForConfig(c *restclient.Config) (*ApiregistrationClient, error) { +func NewForConfig(c *rest.Config) (*ApiregistrationClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*ApiregistrationClient, error) { // NewForConfigOrDie creates a new ApiregistrationClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ApiregistrationClient { +func NewForConfigOrDie(c *rest.Config) *ApiregistrationClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *ApiregistrationClient { } // New creates a new ApiregistrationClient for the given RESTClient. -func New(c restclient.Interface) *ApiregistrationClient { +func New(c rest.Interface) *ApiregistrationClient { return &ApiregistrationClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if apiregistration group is not registered, return an error g, err := api.Registry.Group("apiregistration.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ApiregistrationClient) RESTClient() restclient.Interface { +func (c *ApiregistrationClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiservice.go b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiservice.go index 8e985c7c77d..db4417e8f56 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiservice.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiservice.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // APIServicesGetter has a method to return a APIServiceInterface. @@ -47,7 +47,7 @@ type APIServiceInterface interface { // aPIServices implements APIServiceInterface type aPIServices struct { - client restclient.Interface + client rest.Interface } // newAPIServices returns a APIServices diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/BUILD b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/BUILD index e13d64bb86d..dba4c18da7d 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/BUILD +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiregistration_client.go b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiregistration_client.go index 887fb550a92..4d9020e8beb 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiregistration_client.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiregistration_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeApiregistration) APIServices() internalversion.APIServiceInterface // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeApiregistration) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeApiregistration) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/cmd/kube-aggregator/pkg/cmd/server/BUILD b/cmd/kube-aggregator/pkg/cmd/server/BUILD index 46738be82b4..cc2b9c027d0 100644 --- a/cmd/kube-aggregator/pkg/cmd/server/BUILD +++ b/cmd/kube-aggregator/pkg/cmd/server/BUILD @@ -17,7 +17,6 @@ go_library( "//cmd/kube-aggregator/pkg/legacy:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/genericapiserver/server:go_default_library", diff --git a/cmd/kube-controller-manager/app/BUILD b/cmd/kube-controller-manager/app/BUILD index c1827500f2c..fc00043bbb1 100644 --- a/cmd/kube-controller-manager/app/BUILD +++ b/cmd/kube-controller-manager/app/BUILD @@ -34,7 +34,6 @@ go_library( "//pkg/client/leaderelection:go_default_library", "//pkg/client/leaderelection/resourcelock:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", diff --git a/cmd/kubeadm/app/node/BUILD b/cmd/kubeadm/app/node/BUILD index 667aacbd852..53ccb872b47 100644 --- a/cmd/kubeadm/app/node/BUILD +++ b/cmd/kubeadm/app/node/BUILD @@ -45,7 +45,6 @@ go_test( deps = [ "//cmd/kubeadm/app/apis/kubeadm:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/version", diff --git a/cmd/kubelet/app/BUILD b/cmd/kubelet/app/BUILD index 42064fc22fb..e038171f0a9 100644 --- a/cmd/kubelet/app/BUILD +++ b/cmd/kubelet/app/BUILD @@ -17,7 +17,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", "//pkg/kubelet:go_default_library", "//pkg/util/config:go_default_library", "//vendor:k8s.io/apimachinery/pkg/util/diff", @@ -47,7 +46,6 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/auth:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/cloudprovider:go_default_library", diff --git a/cmd/kubemark/BUILD b/cmd/kubemark/BUILD index 287d3d70473..74069eef202 100644 --- a/cmd/kubemark/BUILD +++ b/cmd/kubemark/BUILD @@ -24,7 +24,6 @@ go_library( "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/metrics/prometheus:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/kubelet/cadvisor/testing:go_default_library", "//pkg/kubelet/cm:go_default_library", diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD index f9b085a23cc..532392b91eb 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD @@ -17,11 +17,11 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", ], ) @@ -30,10 +30,7 @@ go_test( srcs = ["clientset_test.go"], library = ":go_default_library", tags = ["automanaged"], - deps = [ - "//pkg/client/restclient:go_default_library", - "//vendor:k8s.io/client-go/pkg/util/flowcontrol", - ], + deps = ["//vendor:k8s.io/client-go/pkg/util/flowcontrol"], ) filegroup( diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go index 8486aa869a9..a5fffeda583 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go @@ -19,8 +19,8 @@ package test_internalclientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + rest "k8s.io/client-go/rest" internalversiontestgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) @@ -54,7 +54,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -76,7 +76,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.TestgroupClient = internalversiontestgroup.NewForConfigOrDie(c) @@ -85,7 +85,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.TestgroupClient = internalversiontestgroup.New(c) diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/BUILD b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/BUILD index 532b5270fce..7c883a18500 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/BUILD +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/BUILD @@ -19,10 +19,10 @@ go_library( deps = [ "//cmd/libs/go2idl/client-gen/test_apis/testgroup:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/BUILD b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/BUILD index 96128169dca..9db0cfdde83 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/BUILD +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//cmd/libs/go2idl/client-gen/test_apis/testgroup:go_default_library", "//cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testgroup_client.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testgroup_client.go index 7dbd02423b7..63669d98d37 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testgroup_client.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testgroup_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeTestgroup) TestTypes(namespace string) internalversion.TestTypeInte // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeTestgroup) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeTestgroup) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testgroup_client.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testgroup_client.go index 730ae66c483..bb2855b51cf 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testgroup_client.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testgroup_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type TestgroupInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface TestTypesGetter } // TestgroupClient is used to interact with features provided by the testgroup.k8s.io group. type TestgroupClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *TestgroupClient) TestTypes(namespace string) TestTypeInterface { @@ -36,12 +36,12 @@ func (c *TestgroupClient) TestTypes(namespace string) TestTypeInterface { } // NewForConfig creates a new TestgroupClient for the given config. -func NewForConfig(c *restclient.Config) (*TestgroupClient, error) { +func NewForConfig(c *rest.Config) (*TestgroupClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*TestgroupClient, error) { // NewForConfigOrDie creates a new TestgroupClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *TestgroupClient { +func NewForConfigOrDie(c *rest.Config) *TestgroupClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *TestgroupClient { } // New creates a new TestgroupClient for the given RESTClient. -func New(c restclient.Interface) *TestgroupClient { +func New(c rest.Interface) *TestgroupClient { return &TestgroupClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if testgroup group is not registered, return an error g, err := api.Registry.Group("testgroup.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *TestgroupClient) RESTClient() restclient.Interface { +func (c *TestgroupClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testtype.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testtype.go index f2258bbcb0a..519e165ba77 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testtype.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testtype.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" testgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // TestTypesGetter has a method to return a TestTypeInterface. @@ -47,7 +47,7 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/BUILD b/federation/client/clientset_generated/federation_clientset/BUILD index a9cb8d00a82..1b9427befd1 100644 --- a/federation/client/clientset_generated/federation_clientset/BUILD +++ b/federation/client/clientset_generated/federation_clientset/BUILD @@ -21,11 +21,11 @@ go_library( "//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/clientset.go b/federation/client/clientset_generated/federation_clientset/clientset.go index 569efda9f05..8b396416547 100644 --- a/federation/client/clientset_generated/federation_clientset/clientset.go +++ b/federation/client/clientset_generated/federation_clientset/clientset.go @@ -19,11 +19,11 @@ package federation_clientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + rest "k8s.io/client-go/rest" v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1" v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1" v1beta1extensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1" v1beta1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) @@ -131,7 +131,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -165,7 +165,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.CoreV1Client = v1core.NewForConfigOrDie(c) cs.BatchV1Client = v1batch.NewForConfigOrDie(c) @@ -177,7 +177,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.CoreV1Client = v1core.New(c) cs.BatchV1Client = v1batch.New(c) diff --git a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/BUILD b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/BUILD index a2b1b7189b0..282bc89931e 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/BUILD +++ b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/BUILD @@ -20,12 +20,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/batch_client.go b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/batch_client.go index def6f1e39a8..2c1dba16582 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/batch_client.go +++ b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/batch_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface JobsGetter } // BatchV1Client is used to interact with features provided by the batch group. type BatchV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchV1Client) Jobs(namespace string) JobInterface { @@ -39,12 +39,12 @@ func (c *BatchV1Client) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchV1Client for the given config. -func NewForConfig(c *restclient.Config) (*BatchV1Client, error) { +func NewForConfig(c *rest.Config) (*BatchV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*BatchV1Client, error) { // NewForConfigOrDie creates a new BatchV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchV1Client { +func NewForConfigOrDie(c *rest.Config) *BatchV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchV1Client { } // New creates a new BatchV1Client for the given RESTClient. -func New(c restclient.Interface) *BatchV1Client { +func New(c rest.Interface) *BatchV1Client { return &BatchV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("batch/v1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchV1Client) RESTClient() restclient.Interface { +func (c *BatchV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/BUILD b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/BUILD index c31e6de0885..62ba2c18f1a 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/BUILD +++ b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_batch_client.go b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_batch_client.go index 0e3ac228d8c..6cdcb989e4d 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_batch_client.go +++ b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeBatchV1) Jobs(namespace string) v1.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatchV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatchV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/job.go b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/job.go index 2d1e34259c6..67ff9f03e0c 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/batch/v1/job.go +++ b/federation/client/clientset_generated/federation_clientset/typed/batch/v1/job.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" api_v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/apis/batch/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -48,7 +48,7 @@ type JobInterface interface { // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/typed/core/v1/BUILD b/federation/client/clientset_generated/federation_clientset/typed/core/v1/BUILD index f507f279785..65a5de4c82a 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/core/v1/BUILD +++ b/federation/client/clientset_generated/federation_clientset/typed/core/v1/BUILD @@ -24,12 +24,12 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/typed/core/v1/configmap.go b/federation/client/clientset_generated/federation_clientset/typed/core/v1/configmap.go index b4f846eca1e..01de98954e6 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/core/v1/configmap.go +++ b/federation/client/clientset_generated/federation_clientset/typed/core/v1/configmap.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -46,7 +46,7 @@ type ConfigMapInterface interface { // configMaps implements ConfigMapInterface type configMaps struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/typed/core/v1/core_client.go b/federation/client/clientset_generated/federation_clientset/typed/core/v1/core_client.go index 93245f8bdd5..ad08c466c65 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/core/v1/core_client.go +++ b/federation/client/clientset_generated/federation_clientset/typed/core/v1/core_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CoreV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ConfigMapsGetter EventsGetter NamespacesGetter @@ -35,7 +35,7 @@ type CoreV1Interface interface { // CoreV1Client is used to interact with features provided by the group. type CoreV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CoreV1Client) ConfigMaps(namespace string) ConfigMapInterface { @@ -59,12 +59,12 @@ func (c *CoreV1Client) Services(namespace string) ServiceInterface { } // NewForConfig creates a new CoreV1Client for the given config. -func NewForConfig(c *restclient.Config) (*CoreV1Client, error) { +func NewForConfig(c *rest.Config) (*CoreV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -73,7 +73,7 @@ func NewForConfig(c *restclient.Config) (*CoreV1Client, error) { // NewForConfigOrDie creates a new CoreV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CoreV1Client { +func NewForConfigOrDie(c *rest.Config) *CoreV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -82,11 +82,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreV1Client { } // New creates a new CoreV1Client for the given RESTClient. -func New(c restclient.Interface) *CoreV1Client { +func New(c rest.Interface) *CoreV1Client { return &CoreV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("/v1") if err != nil { return err @@ -97,7 +97,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/api" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -109,7 +109,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoreV1Client) RESTClient() restclient.Interface { +func (c *CoreV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/federation/client/clientset_generated/federation_clientset/typed/core/v1/event.go b/federation/client/clientset_generated/federation_clientset/typed/core/v1/event.go index 040e1b68d08..7ee9a35f173 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/core/v1/event.go +++ b/federation/client/clientset_generated/federation_clientset/typed/core/v1/event.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EventsGetter has a method to return a EventInterface. @@ -46,7 +46,7 @@ type EventInterface interface { // events implements EventInterface type events struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/BUILD b/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/BUILD index 7e3a80e0874..5b30c920062 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/BUILD +++ b/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/BUILD @@ -23,13 +23,13 @@ go_library( deps = [ "//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_core_client.go b/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_core_client.go index 3fcd8b59015..a95b91b69df 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_core_client.go +++ b/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_core_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -48,7 +48,7 @@ func (c *FakeCoreV1) Services(namespace string) v1.ServiceInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCoreV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCoreV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/federation/client/clientset_generated/federation_clientset/typed/core/v1/namespace.go b/federation/client/clientset_generated/federation_clientset/typed/core/v1/namespace.go index 0a01c78f2c3..6fc64ff4e7b 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/core/v1/namespace.go +++ b/federation/client/clientset_generated/federation_clientset/typed/core/v1/namespace.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -47,7 +47,7 @@ type NamespaceInterface interface { // namespaces implements NamespaceInterface type namespaces struct { - client restclient.Interface + client rest.Interface } // newNamespaces returns a Namespaces diff --git a/federation/client/clientset_generated/federation_clientset/typed/core/v1/secret.go b/federation/client/clientset_generated/federation_clientset/typed/core/v1/secret.go index 298ca343e04..0ba9ba8bfbe 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/core/v1/secret.go +++ b/federation/client/clientset_generated/federation_clientset/typed/core/v1/secret.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // SecretsGetter has a method to return a SecretInterface. @@ -46,7 +46,7 @@ type SecretInterface interface { // secrets implements SecretInterface type secrets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/typed/core/v1/service.go b/federation/client/clientset_generated/federation_clientset/typed/core/v1/service.go index 660d1a632c1..99c6d3f7a72 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/core/v1/service.go +++ b/federation/client/clientset_generated/federation_clientset/typed/core/v1/service.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServicesGetter has a method to return a ServiceInterface. @@ -47,7 +47,7 @@ type ServiceInterface interface { // services implements ServiceInterface type services struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/BUILD b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/BUILD index 7683fbc1440..a5eb4d13591 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/BUILD +++ b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/BUILD @@ -24,12 +24,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/daemonset.go b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/daemonset.go index aaebd1e9681..cdc71b8b55f 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/daemonset.go +++ b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/daemonset.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -48,7 +48,7 @@ type DaemonSetInterface interface { // daemonSets implements DaemonSetInterface type daemonSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/deployment.go b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/deployment.go index 2987c87651e..1060d60ecae 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/deployment.go +++ b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/deployment.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -48,7 +48,7 @@ type DeploymentInterface interface { // deployments implements DeploymentInterface type deployments struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/extensions_client.go b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/extensions_client.go index 5994f8bf6f6..893c8d2a7f9 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/extensions_client.go +++ b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/extensions_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ExtensionsV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface DaemonSetsGetter DeploymentsGetter IngressesGetter @@ -34,7 +34,7 @@ type ExtensionsV1beta1Interface interface { // ExtensionsV1beta1Client is used to interact with features provided by the extensions group. type ExtensionsV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface { @@ -54,12 +54,12 @@ func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterf } // NewForConfig creates a new ExtensionsV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -68,7 +68,7 @@ func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) { // NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -77,11 +77,11 @@ func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client { } // New creates a new ExtensionsV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *ExtensionsV1beta1Client { +func New(c rest.Interface) *ExtensionsV1beta1Client { return &ExtensionsV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("extensions/v1beta1") if err != nil { return err @@ -92,7 +92,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -104,7 +104,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ExtensionsV1beta1Client) RESTClient() restclient.Interface { +func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/BUILD b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/BUILD index 6bfeca5d7eb..2ae42206705 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/BUILD +++ b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/BUILD @@ -23,13 +23,13 @@ go_library( "//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go index e42de1f6fa6..3442070b7b3 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go +++ b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -44,7 +44,7 @@ func (c *FakeExtensionsV1beta1) ReplicaSets(namespace string) v1beta1.ReplicaSet // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeExtensionsV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeExtensionsV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/ingress.go b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/ingress.go index ced46ccb88f..aaa1494699a 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/ingress.go +++ b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/ingress.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // IngressesGetter has a method to return a IngressInterface. @@ -48,7 +48,7 @@ type IngressInterface interface { // ingresses implements IngressInterface type ingresses struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/replicaset.go b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/replicaset.go index 7b1ca121ae9..3bc699ff35f 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/replicaset.go +++ b/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/replicaset.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -48,7 +48,7 @@ type ReplicaSetInterface interface { // replicaSets implements ReplicaSetInterface type replicaSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/BUILD b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/BUILD index 79c265485e7..06393d66485 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/BUILD +++ b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/BUILD @@ -20,12 +20,12 @@ go_library( "//federation/apis/federation/v1beta1:go_default_library", "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/cluster.go b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/cluster.go index 9be7265a889..87c83d16d59 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/cluster.go +++ b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/cluster.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClustersGetter has a method to return a ClusterInterface. @@ -48,7 +48,7 @@ type ClusterInterface interface { // clusters implements ClusterInterface type clusters struct { - client restclient.Interface + client rest.Interface } // newClusters returns a Clusters diff --git a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/BUILD b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/BUILD index 765ac8b4519..27ed2571983 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/BUILD +++ b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//federation/apis/federation/v1beta1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_federation_client.go b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_federation_client.go index 4d74cade450..1128a199ba5 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_federation_client.go +++ b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_federation_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeFederationV1beta1) Clusters() v1beta1.ClusterInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeFederationV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeFederationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/federation_client.go b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/federation_client.go index db28a80c43b..b51bfda2230 100644 --- a/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/federation_client.go +++ b/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/federation_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type FederationV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ClustersGetter } // FederationV1beta1Client is used to interact with features provided by the federation group. type FederationV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *FederationV1beta1Client) Clusters() ClusterInterface { @@ -39,12 +39,12 @@ func (c *FederationV1beta1Client) Clusters() ClusterInterface { } // NewForConfig creates a new FederationV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*FederationV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*FederationV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*FederationV1beta1Client, error) { // NewForConfigOrDie creates a new FederationV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *FederationV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *FederationV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *FederationV1beta1Client { } // New creates a new FederationV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *FederationV1beta1Client { +func New(c rest.Interface) *FederationV1beta1Client { return &FederationV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("federation/v1beta1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FederationV1beta1Client) RESTClient() restclient.Interface { +func (c *FederationV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/federation/client/clientset_generated/federation_internalclientset/BUILD b/federation/client/clientset_generated/federation_internalclientset/BUILD index 8c602ac66af..f5fdbb9f457 100644 --- a/federation/client/clientset_generated/federation_internalclientset/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/BUILD @@ -21,11 +21,11 @@ go_library( "//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/clientset.go b/federation/client/clientset_generated/federation_internalclientset/clientset.go index 59040401cd2..384279514bb 100644 --- a/federation/client/clientset_generated/federation_internalclientset/clientset.go +++ b/federation/client/clientset_generated/federation_internalclientset/clientset.go @@ -19,11 +19,11 @@ package federation_internalclientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + rest "k8s.io/client-go/rest" internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion" internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion" internalversionextensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion" internalversionfederation "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) @@ -90,7 +90,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -124,7 +124,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.CoreClient = internalversioncore.NewForConfigOrDie(c) cs.BatchClient = internalversionbatch.NewForConfigOrDie(c) @@ -136,7 +136,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.CoreClient = internalversioncore.New(c) cs.BatchClient = internalversionbatch.New(c) diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/BUILD b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/BUILD index c0ed263d6d7..c71f24eeed0 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/BUILD @@ -19,10 +19,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/batch_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/batch_client.go index 94887790670..613297f3c8f 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/batch_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/batch_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface JobsGetter } // BatchClient is used to interact with features provided by the batch group. type BatchClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchClient) Jobs(namespace string) JobInterface { @@ -36,12 +36,12 @@ func (c *BatchClient) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchClient for the given config. -func NewForConfig(c *restclient.Config) (*BatchClient, error) { +func NewForConfig(c *rest.Config) (*BatchClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*BatchClient, error) { // NewForConfigOrDie creates a new BatchClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchClient { +func NewForConfigOrDie(c *rest.Config) *BatchClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchClient { } // New creates a new BatchClient for the given RESTClient. -func New(c restclient.Interface) *BatchClient { +func New(c rest.Interface) *BatchClient { return &BatchClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if batch group is not registered, return an error g, err := api.Registry.Group("batch") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchClient) RESTClient() restclient.Interface { +func (c *BatchClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/BUILD b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/BUILD index 748e7e303a1..43eafb26dd7 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library", "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_batch_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_batch_client.go index 8484b5a6445..a5d989d3ed4 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_batch_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeBatch) Jobs(namespace string) internalversion.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatch) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatch) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/job.go b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/job.go index 9e24c6436d9..53fea7e6041 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/job.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/job.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" batch "k8s.io/kubernetes/pkg/apis/batch" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -47,7 +47,7 @@ type JobInterface interface { // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/BUILD b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/BUILD index 8b8d6acff7d..50951d4a44b 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/BUILD @@ -23,10 +23,10 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/configmap.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/configmap.go index 5d2f111e4a0..cc5accb295e 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/configmap.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/configmap.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -45,7 +45,7 @@ type ConfigMapInterface interface { // configMaps implements ConfigMapInterface type configMaps struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/core_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/core_client.go index e4b87f95977..ea41ad9d7c9 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/core_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/core_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CoreInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ConfigMapsGetter EventsGetter NamespacesGetter @@ -32,7 +32,7 @@ type CoreInterface interface { // CoreClient is used to interact with features provided by the group. type CoreClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CoreClient) ConfigMaps(namespace string) ConfigMapInterface { @@ -56,12 +56,12 @@ func (c *CoreClient) Services(namespace string) ServiceInterface { } // NewForConfig creates a new CoreClient for the given config. -func NewForConfig(c *restclient.Config) (*CoreClient, error) { +func NewForConfig(c *rest.Config) (*CoreClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -70,7 +70,7 @@ func NewForConfig(c *restclient.Config) (*CoreClient, error) { // NewForConfigOrDie creates a new CoreClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CoreClient { +func NewForConfigOrDie(c *rest.Config) *CoreClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -79,11 +79,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreClient { } // New creates a new CoreClient for the given RESTClient. -func New(c restclient.Interface) *CoreClient { +func New(c rest.Interface) *CoreClient { return &CoreClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if core group is not registered, return an error g, err := api.Registry.Group("") if err != nil { @@ -91,7 +91,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/api" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -110,7 +110,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoreClient) RESTClient() restclient.Interface { +func (c *CoreClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/event.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/event.go index d8f20e2710f..bbb6a398436 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/event.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/event.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EventsGetter has a method to return a EventInterface. @@ -45,7 +45,7 @@ type EventInterface interface { // events implements EventInterface type events struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/BUILD b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/BUILD index 6c73f3e49f7..78547efd511 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/BUILD @@ -23,13 +23,13 @@ go_library( deps = [ "//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_core_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_core_client.go index 31264b0fd3d..a19f8d86d2d 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_core_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_core_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -48,7 +48,7 @@ func (c *FakeCore) Services(namespace string) internalversion.ServiceInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCore) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCore) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/namespace.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/namespace.go index 3c33dc4457b..7cec0560ca8 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/namespace.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/namespace.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -46,7 +46,7 @@ type NamespaceInterface interface { // namespaces implements NamespaceInterface type namespaces struct { - client restclient.Interface + client rest.Interface } // newNamespaces returns a Namespaces diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/secret.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/secret.go index 5707ff1f708..29902d461fc 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/secret.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/secret.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // SecretsGetter has a method to return a SecretInterface. @@ -45,7 +45,7 @@ type SecretInterface interface { // secrets implements SecretInterface type secrets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/service.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/service.go index abfe3bea064..c83fbd95ebc 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/service.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/service.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServicesGetter has a method to return a ServiceInterface. @@ -46,7 +46,7 @@ type ServiceInterface interface { // services implements ServiceInterface type services struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/BUILD b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/BUILD index c3f1c2ae64b..bf69571a108 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/BUILD @@ -22,10 +22,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/daemonset.go b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/daemonset.go index 98f6c2e3274..c6ab08f065f 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/daemonset.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/daemonset.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -47,7 +47,7 @@ type DaemonSetInterface interface { // daemonSets implements DaemonSetInterface type daemonSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/deployment.go b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/deployment.go index 0426b40c63b..d48ea580518 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/deployment.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/deployment.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -47,7 +47,7 @@ type DeploymentInterface interface { // deployments implements DeploymentInterface type deployments struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/extensions_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/extensions_client.go index 86065d6c18c..9f37c172c82 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/extensions_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/extensions_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ExtensionsInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface DaemonSetsGetter DeploymentsGetter IngressesGetter @@ -31,7 +31,7 @@ type ExtensionsInterface interface { // ExtensionsClient is used to interact with features provided by the extensions group. type ExtensionsClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface { @@ -51,12 +51,12 @@ func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface { } // NewForConfig creates a new ExtensionsClient for the given config. -func NewForConfig(c *restclient.Config) (*ExtensionsClient, error) { +func NewForConfig(c *rest.Config) (*ExtensionsClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -65,7 +65,7 @@ func NewForConfig(c *restclient.Config) (*ExtensionsClient, error) { // NewForConfigOrDie creates a new ExtensionsClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ExtensionsClient { +func NewForConfigOrDie(c *rest.Config) *ExtensionsClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -74,11 +74,11 @@ func NewForConfigOrDie(c *restclient.Config) *ExtensionsClient { } // New creates a new ExtensionsClient for the given RESTClient. -func New(c restclient.Interface) *ExtensionsClient { +func New(c rest.Interface) *ExtensionsClient { return &ExtensionsClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if extensions group is not registered, return an error g, err := api.Registry.Group("extensions") if err != nil { @@ -86,7 +86,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -105,7 +105,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ExtensionsClient) RESTClient() restclient.Interface { +func (c *ExtensionsClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/BUILD b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/BUILD index 1ba5f3a94b6..9ca83120098 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/BUILD @@ -22,13 +22,13 @@ go_library( "//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:go_default_library", "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go index 2267ec5cd29..23ac7065c35 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -44,7 +44,7 @@ func (c *FakeExtensions) ReplicaSets(namespace string) internalversion.ReplicaSe // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeExtensions) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeExtensions) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/ingress.go b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/ingress.go index bd99ec11eaa..b026e2e33a1 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/ingress.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/ingress.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // IngressesGetter has a method to return a IngressInterface. @@ -47,7 +47,7 @@ type IngressInterface interface { // ingresses implements IngressInterface type ingresses struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/replicaset.go b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/replicaset.go index 1410821881a..5de36beb0f5 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/replicaset.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/replicaset.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -47,7 +47,7 @@ type ReplicaSetInterface interface { // replicaSets implements ReplicaSetInterface type replicaSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/BUILD b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/BUILD index 25fb103f149..2a4c6bcad47 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/BUILD @@ -19,10 +19,10 @@ go_library( deps = [ "//federation/apis/federation:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/cluster.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/cluster.go index 5c5359acf94..8530d867513 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/cluster.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/cluster.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" federation "k8s.io/kubernetes/federation/apis/federation" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClustersGetter has a method to return a ClusterInterface. @@ -47,7 +47,7 @@ type ClusterInterface interface { // clusters implements ClusterInterface type clusters struct { - client restclient.Interface + client rest.Interface } // newClusters returns a Clusters diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/BUILD b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/BUILD index c23291596d8..61e1ef15b22 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//federation/apis/federation:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_federation_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_federation_client.go index 6e96cdf911b..0bd29d43988 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_federation_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_federation_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeFederation) Clusters() internalversion.ClusterInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeFederation) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeFederation) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/federation_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/federation_client.go index 17367d12448..e9108f0f7fe 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/federation_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/federation_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type FederationInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ClustersGetter } // FederationClient is used to interact with features provided by the federation group. type FederationClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *FederationClient) Clusters() ClusterInterface { @@ -36,12 +36,12 @@ func (c *FederationClient) Clusters() ClusterInterface { } // NewForConfig creates a new FederationClient for the given config. -func NewForConfig(c *restclient.Config) (*FederationClient, error) { +func NewForConfig(c *rest.Config) (*FederationClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*FederationClient, error) { // NewForConfigOrDie creates a new FederationClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *FederationClient { +func NewForConfigOrDie(c *rest.Config) *FederationClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *FederationClient { } // New creates a new FederationClient for the given RESTClient. -func New(c restclient.Interface) *FederationClient { +func New(c rest.Interface) *FederationClient { return &FederationClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if federation group is not registered, return an error g, err := api.Registry.Group("federation") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FederationClient) RESTClient() restclient.Interface { +func (c *FederationClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/federation/cmd/federation-controller-manager/app/BUILD b/federation/cmd/federation-controller-manager/app/BUILD index 53f1f8896e1..25597707e34 100644 --- a/federation/cmd/federation-controller-manager/app/BUILD +++ b/federation/cmd/federation-controller-manager/app/BUILD @@ -32,7 +32,6 @@ go_library( "//federation/pkg/federation-controller/secret:go_default_library", "//federation/pkg/federation-controller/service:go_default_library", "//federation/pkg/federation-controller/util:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/util/config:go_default_library", diff --git a/federation/pkg/federation-controller/cluster/BUILD b/federation/pkg/federation-controller/cluster/BUILD index f294ff6f7b2..bb27fe5ce74 100644 --- a/federation/pkg/federation-controller/cluster/BUILD +++ b/federation/pkg/federation-controller/cluster/BUILD @@ -25,7 +25,6 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/controller:go_default_library", "//vendor:github.com/golang/glog", @@ -49,7 +48,6 @@ go_test( "//federation/pkg/federation-controller/util:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", diff --git a/federation/pkg/federation-controller/service/BUILD b/federation/pkg/federation-controller/service/BUILD index 66546b61217..ec67967a13a 100644 --- a/federation/pkg/federation-controller/service/BUILD +++ b/federation/pkg/federation-controller/service/BUILD @@ -32,7 +32,6 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/workqueue:go_default_library", "//vendor:github.com/golang/glog", diff --git a/federation/pkg/federation-controller/util/BUILD b/federation/pkg/federation-controller/util/BUILD index e2a8b023b41..c13628b29f4 100644 --- a/federation/pkg/federation-controller/util/BUILD +++ b/federation/pkg/federation-controller/util/BUILD @@ -33,7 +33,6 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/controller/deployment/util:go_default_library", "//vendor:github.com/golang/glog", diff --git a/federation/pkg/kubefed/testing/BUILD b/federation/pkg/kubefed/testing/BUILD index e60a19adf77..b7286b31235 100644 --- a/federation/pkg/kubefed/testing/BUILD +++ b/federation/pkg/kubefed/testing/BUILD @@ -15,7 +15,6 @@ go_library( "//federation/client/clientset_generated/federation_clientset:go_default_library", "//federation/pkg/kubefed/util:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/pkg/BUILD b/pkg/BUILD index ec71dac3bc2..917e6bbb100 100644 --- a/pkg/BUILD +++ b/pkg/BUILD @@ -69,7 +69,7 @@ filegroup( "//pkg/client/listers/storage/v1beta1:all-srcs", "//pkg/client/metrics:all-srcs", "//pkg/client/record:all-srcs", - "//pkg/client/restclient:all-srcs", + "//pkg/client/restclient/fake:all-srcs", "//pkg/client/retry:all-srcs", "//pkg/client/testdata:all-srcs", "//pkg/client/testing/cache:all-srcs", diff --git a/pkg/client/cache/BUILD b/pkg/client/cache/BUILD index 0663658c904..18e535f5065 100644 --- a/pkg/client/cache/BUILD +++ b/pkg/client/cache/BUILD @@ -43,7 +43,6 @@ go_library( "//pkg/apis/rbac:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", @@ -85,7 +84,6 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/cache:go_default_library", "//pkg/util/testing:go_default_library", "//vendor:github.com/google/gofuzz", diff --git a/pkg/client/clientset_generated/clientset/BUILD b/pkg/client/clientset_generated/clientset/BUILD index 94fe428f3b5..9675803ac42 100644 --- a/pkg/client/clientset_generated/clientset/BUILD +++ b/pkg/client/clientset_generated/clientset/BUILD @@ -41,11 +41,11 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/clientset.go b/pkg/client/clientset_generated/clientset/clientset.go index 0647ac733cb..b3a6a4ba8de 100644 --- a/pkg/client/clientset_generated/clientset/clientset.go +++ b/pkg/client/clientset_generated/clientset/clientset.go @@ -19,6 +19,7 @@ package clientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + rest "k8s.io/client-go/rest" v1beta1apps "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1" v1beta1authentication "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1" v1beta1authorization "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1" @@ -32,7 +33,6 @@ import ( v1alpha1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1" v1beta1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1" v1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) @@ -309,7 +309,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -379,7 +379,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.CoreV1Client = v1core.NewForConfigOrDie(c) cs.AppsV1beta1Client = v1beta1apps.NewForConfigOrDie(c) @@ -400,7 +400,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.CoreV1Client = v1core.New(c) cs.AppsV1beta1Client = v1beta1apps.New(c) diff --git a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/BUILD b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/BUILD index 1b95744f466..60366d1fe41 100644 --- a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/BUILD @@ -20,12 +20,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go index 535dae43d91..e84cddeab25 100644 --- a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go +++ b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AppsV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface StatefulSetsGetter } // AppsV1beta1Client is used to interact with features provided by the apps group. type AppsV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface { @@ -39,12 +39,12 @@ func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface } // NewForConfig creates a new AppsV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*AppsV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*AppsV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*AppsV1beta1Client, error) { // NewForConfigOrDie creates a new AppsV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AppsV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *AppsV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *AppsV1beta1Client { } // New creates a new AppsV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *AppsV1beta1Client { +func New(c rest.Interface) *AppsV1beta1Client { return &AppsV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("apps/v1beta1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AppsV1beta1Client) RESTClient() restclient.Interface { +func (c *AppsV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/BUILD index 7b84e8295d9..400c7fa31d8 100644 --- a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/apps/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_apps_client.go b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_apps_client.go index 815cbc8b92b..ae22f079ba1 100644 --- a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_apps_client.go +++ b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_apps_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAppsV1beta1) StatefulSets(namespace string) v1beta1.StatefulSetInte // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAppsV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAppsV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go index 88e7ff9f04b..2278785716c 100644 --- a/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go +++ b/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // StatefulSetsGetter has a method to return a StatefulSetInterface. @@ -48,7 +48,7 @@ type StatefulSetInterface interface { // statefulSets implements StatefulSetInterface type statefulSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/BUILD b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/BUILD index 96b33eecf8f..06e0edd0185 100644 --- a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/BUILD @@ -20,9 +20,9 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authentication/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go index bb60779a708..b4107ae6290 100644 --- a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go +++ b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AuthenticationV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface TokenReviewsGetter } // AuthenticationV1beta1Client is used to interact with features provided by the authentication.k8s.io group. type AuthenticationV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface { @@ -39,12 +39,12 @@ func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface { } // NewForConfig creates a new AuthenticationV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*AuthenticationV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*AuthenticationV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*AuthenticationV1beta1Client, error) { // NewForConfigOrDie creates a new AuthenticationV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AuthenticationV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *AuthenticationV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthenticationV1beta1Client { } // New creates a new AuthenticationV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *AuthenticationV1beta1Client { +func New(c rest.Interface) *AuthenticationV1beta1Client { return &AuthenticationV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("authentication.k8s.io/v1beta1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AuthenticationV1beta1Client) RESTClient() restclient.Interface { +func (c *AuthenticationV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/BUILD index 241141bb1f3..02d4e95b345 100644 --- a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/BUILD @@ -19,8 +19,8 @@ go_library( deps = [ "//pkg/apis/authentication/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/authentication/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/fake_authentication_client.go b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/fake_authentication_client.go index 61ed5c9f468..460d7dd8eb6 100644 --- a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/fake_authentication_client.go +++ b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/fake_authentication_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAuthenticationV1beta1) TokenReviews() v1beta1.TokenReviewInterface // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAuthenticationV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAuthenticationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go index 584713f5f36..7f9f1e9fa08 100644 --- a/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go +++ b/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // TokenReviewsGetter has a method to return a TokenReviewInterface. @@ -33,7 +33,7 @@ type TokenReviewInterface interface { // tokenReviews implements TokenReviewInterface type tokenReviews struct { - client restclient.Interface + client rest.Interface } // newTokenReviews returns a TokenReviews diff --git a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/BUILD b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/BUILD index 9b89c253dc8..17adcb15c32 100644 --- a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/BUILD @@ -24,9 +24,9 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authorization/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go index 0768137d019..57c8cdb4603 100644 --- a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go +++ b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AuthorizationV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface LocalSubjectAccessReviewsGetter SelfSubjectAccessReviewsGetter SubjectAccessReviewsGetter @@ -33,7 +33,7 @@ type AuthorizationV1beta1Interface interface { // AuthorizationV1beta1Client is used to interact with features provided by the authorization.k8s.io group. type AuthorizationV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AuthorizationV1beta1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { @@ -49,12 +49,12 @@ func (c *AuthorizationV1beta1Client) SubjectAccessReviews() SubjectAccessReviewI } // NewForConfig creates a new AuthorizationV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*AuthorizationV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*AuthorizationV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -63,7 +63,7 @@ func NewForConfig(c *restclient.Config) (*AuthorizationV1beta1Client, error) { // NewForConfigOrDie creates a new AuthorizationV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AuthorizationV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *AuthorizationV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -72,11 +72,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthorizationV1beta1Client { } // New creates a new AuthorizationV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *AuthorizationV1beta1Client { +func New(c rest.Interface) *AuthorizationV1beta1Client { return &AuthorizationV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("authorization.k8s.io/v1beta1") if err != nil { return err @@ -87,7 +87,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -99,7 +99,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AuthorizationV1beta1Client) RESTClient() restclient.Interface { +func (c *AuthorizationV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/BUILD index 684ecb635b7..7c92cf62d42 100644 --- a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/BUILD @@ -24,8 +24,8 @@ go_library( deps = [ "//pkg/apis/authorization/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/authorization/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/fake_authorization_client.go b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/fake_authorization_client.go index b15f516114f..b528ba04027 100644 --- a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/fake_authorization_client.go +++ b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/fake_authorization_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -40,7 +40,7 @@ func (c *FakeAuthorizationV1beta1) SubjectAccessReviews() v1beta1.SubjectAccessR // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAuthorizationV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAuthorizationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go index f9209a94fb7..9b8e1034193 100644 --- a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go +++ b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type LocalSubjectAccessReviewInterface interface { // localSubjectAccessReviews implements LocalSubjectAccessReviewInterface type localSubjectAccessReviews struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go index 571bb294025..1ef3e49afea 100644 --- a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go +++ b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type SelfSubjectAccessReviewInterface interface { // selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface type selfSubjectAccessReviews struct { - client restclient.Interface + client rest.Interface } // newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews diff --git a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go index 22e7ea00264..cd60e9df6be 100644 --- a/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go +++ b/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type SubjectAccessReviewInterface interface { // subjectAccessReviews implements SubjectAccessReviewInterface type subjectAccessReviews struct { - client restclient.Interface + client rest.Interface } // newSubjectAccessReviews returns a SubjectAccessReviews diff --git a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/BUILD b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/BUILD index 4c1297a17dd..f30f36bd9e8 100644 --- a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/BUILD @@ -20,12 +20,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go index d0aaf869b7c..0b501982096 100644 --- a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go +++ b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AutoscalingV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface HorizontalPodAutoscalersGetter } // AutoscalingV1Client is used to interact with features provided by the autoscaling group. type AutoscalingV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { @@ -39,12 +39,12 @@ func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) Horizon } // NewForConfig creates a new AutoscalingV1Client for the given config. -func NewForConfig(c *restclient.Config) (*AutoscalingV1Client, error) { +func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*AutoscalingV1Client, error) { // NewForConfigOrDie creates a new AutoscalingV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AutoscalingV1Client { +func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *AutoscalingV1Client { } // New creates a new AutoscalingV1Client for the given RESTClient. -func New(c restclient.Interface) *AutoscalingV1Client { +func New(c rest.Interface) *AutoscalingV1Client { return &AutoscalingV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("autoscaling/v1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AutoscalingV1Client) RESTClient() restclient.Interface { +func (c *AutoscalingV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/BUILD index c56c104fc6c..79e0b9f1e50 100644 --- a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/autoscaling/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go index 6db35b011ed..13fef5bd898 100644 --- a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go +++ b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAutoscalingV1) HorizontalPodAutoscalers(namespace string) v1.Horizo // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAutoscalingV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAutoscalingV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go index ba59773c1b7..7a268a04c87 100644 --- a/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" api_v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. @@ -48,7 +48,7 @@ type HorizontalPodAutoscalerInterface interface { // horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface type horizontalPodAutoscalers struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v1/BUILD b/pkg/client/clientset_generated/clientset/typed/batch/v1/BUILD index 90c93e2bd4b..fb28af8f491 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/batch/v1/BUILD @@ -20,12 +20,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go b/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go index def6f1e39a8..2c1dba16582 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go +++ b/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface JobsGetter } // BatchV1Client is used to interact with features provided by the batch group. type BatchV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchV1Client) Jobs(namespace string) JobInterface { @@ -39,12 +39,12 @@ func (c *BatchV1Client) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchV1Client for the given config. -func NewForConfig(c *restclient.Config) (*BatchV1Client, error) { +func NewForConfig(c *rest.Config) (*BatchV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*BatchV1Client, error) { // NewForConfigOrDie creates a new BatchV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchV1Client { +func NewForConfigOrDie(c *rest.Config) *BatchV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchV1Client { } // New creates a new BatchV1Client for the given RESTClient. -func New(c restclient.Interface) *BatchV1Client { +func New(c rest.Interface) *BatchV1Client { return &BatchV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("batch/v1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchV1Client) RESTClient() restclient.Interface { +func (c *BatchV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/BUILD index b73bc75538a..ba3eb2a67c5 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/batch/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_batch_client.go b/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_batch_client.go index b764cddff72..ae9b99f4738 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_batch_client.go +++ b/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeBatchV1) Jobs(namespace string) v1.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatchV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatchV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go b/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go index 2d1e34259c6..67ff9f03e0c 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go +++ b/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" api_v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/apis/batch/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -48,7 +48,7 @@ type JobInterface interface { // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/BUILD b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/BUILD index 489630384f0..5038df6bca4 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/BUILD @@ -21,12 +21,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go index 044517c2959..9757b4f7465 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go +++ b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go @@ -20,19 +20,19 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchV2alpha1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface CronJobsGetter JobsGetter } // BatchV2alpha1Client is used to interact with features provided by the batch group. type BatchV2alpha1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface { @@ -44,12 +44,12 @@ func (c *BatchV2alpha1Client) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchV2alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*BatchV2alpha1Client, error) { +func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -58,7 +58,7 @@ func NewForConfig(c *restclient.Config) (*BatchV2alpha1Client, error) { // NewForConfigOrDie creates a new BatchV2alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchV2alpha1Client { +func NewForConfigOrDie(c *rest.Config) *BatchV2alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -67,11 +67,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchV2alpha1Client { } // New creates a new BatchV2alpha1Client for the given RESTClient. -func New(c restclient.Interface) *BatchV2alpha1Client { +func New(c rest.Interface) *BatchV2alpha1Client { return &BatchV2alpha1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("batch/v2alpha1") if err != nil { return err @@ -82,7 +82,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -94,7 +94,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchV2alpha1Client) RESTClient() restclient.Interface { +func (c *BatchV2alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go index 94cabc41227..f2d40b3ab93 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go +++ b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // CronJobsGetter has a method to return a CronJobInterface. @@ -48,7 +48,7 @@ type CronJobInterface interface { // cronJobs implements CronJobInterface type cronJobs struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/BUILD index ae9e78a3a57..b205355a361 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/BUILD @@ -20,13 +20,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_batch_client.go b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_batch_client.go index 3e2a1f6f329..aff53da59a7 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_batch_client.go +++ b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v2alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -36,7 +36,7 @@ func (c *FakeBatchV2alpha1) Jobs(namespace string) v2alpha1.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatchV2alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatchV2alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/job.go b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/job.go index 55f10be88ba..cc92b55a6ec 100644 --- a/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/job.go +++ b/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/job.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -48,7 +48,7 @@ type JobInterface interface { // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go index d449b83a51d..27f77d35184 100644 --- a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go +++ b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CertificatesV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface CertificateSigningRequestsGetter } // CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group. type CertificatesV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSigningRequestInterface { @@ -39,12 +39,12 @@ func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSign } // NewForConfig creates a new CertificatesV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*CertificatesV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*CertificatesV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*CertificatesV1beta1Client, error) { // NewForConfigOrDie creates a new CertificatesV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CertificatesV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *CertificatesV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *CertificatesV1beta1Client { } // New creates a new CertificatesV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *CertificatesV1beta1Client { +func New(c rest.Interface) *CertificatesV1beta1Client { return &CertificatesV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("certificates.k8s.io/v1beta1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CertificatesV1beta1Client) RESTClient() restclient.Interface { +func (c *CertificatesV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go index 78b643ff4c9..418be1b2637 100644 --- a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go +++ b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. @@ -48,7 +48,7 @@ type CertificateSigningRequestInterface interface { // certificateSigningRequests implements CertificateSigningRequestInterface type certificateSigningRequests struct { - client restclient.Interface + client rest.Interface } // newCertificateSigningRequests returns a CertificateSigningRequests diff --git a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificates_client.go b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificates_client.go index 95546ab73ba..a8877370ab7 100644 --- a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificates_client.go +++ b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificates_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeCertificatesV1beta1) CertificateSigningRequests() v1beta1.Certifica // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCertificatesV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCertificatesV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/BUILD b/pkg/client/clientset_generated/clientset/typed/core/v1/BUILD index 46270b10477..3b71b94c3b5 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/BUILD @@ -40,7 +40,6 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", @@ -49,6 +48,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go b/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go index 034ded8f079..f3858d92796 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ComponentStatusesGetter has a method to return a ComponentStatusInterface. @@ -46,7 +46,7 @@ type ComponentStatusInterface interface { // componentStatuses implements ComponentStatusInterface type componentStatuses struct { - client restclient.Interface + client rest.Interface } // newComponentStatuses returns a ComponentStatuses diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go b/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go index b4f846eca1e..01de98954e6 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -46,7 +46,7 @@ type ConfigMapInterface interface { // configMaps implements ConfigMapInterface type configMaps struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go b/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go index ecb0454820d..0bd232da3f2 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CoreV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ComponentStatusesGetter ConfigMapsGetter EndpointsGetter @@ -46,7 +46,7 @@ type CoreV1Interface interface { // CoreV1Client is used to interact with features provided by the group. type CoreV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CoreV1Client) ComponentStatuses() ComponentStatusInterface { @@ -114,12 +114,12 @@ func (c *CoreV1Client) ServiceAccounts(namespace string) ServiceAccountInterface } // NewForConfig creates a new CoreV1Client for the given config. -func NewForConfig(c *restclient.Config) (*CoreV1Client, error) { +func NewForConfig(c *rest.Config) (*CoreV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -128,7 +128,7 @@ func NewForConfig(c *restclient.Config) (*CoreV1Client, error) { // NewForConfigOrDie creates a new CoreV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CoreV1Client { +func NewForConfigOrDie(c *rest.Config) *CoreV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -137,11 +137,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreV1Client { } // New creates a new CoreV1Client for the given RESTClient. -func New(c restclient.Interface) *CoreV1Client { +func New(c rest.Interface) *CoreV1Client { return &CoreV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("/v1") if err != nil { return err @@ -152,7 +152,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/api" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -164,7 +164,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoreV1Client) RESTClient() restclient.Interface { +func (c *CoreV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go b/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go index 685658b7071..4e688a32e8c 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EndpointsGetter has a method to return a EndpointsInterface. @@ -46,7 +46,7 @@ type EndpointsInterface interface { // endpoints implements EndpointsInterface type endpoints struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/event.go b/pkg/client/clientset_generated/clientset/typed/core/v1/event.go index 040e1b68d08..7ee9a35f173 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/event.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/event.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EventsGetter has a method to return a EventInterface. @@ -46,7 +46,7 @@ type EventInterface interface { // events implements EventInterface type events struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/core/v1/fake/BUILD index 04017267d8c..f94c0f481f3 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/fake/BUILD @@ -40,7 +40,6 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/fields", @@ -49,6 +48,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_core_client.go b/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_core_client.go index fcf04dfe1d1..98fd03a0c97 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_core_client.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_core_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -92,7 +92,7 @@ func (c *FakeCoreV1) ServiceAccounts(namespace string) v1.ServiceAccountInterfac // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCoreV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCoreV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go b/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go index 1e7e2122360..0e007cbcb27 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // LimitRangesGetter has a method to return a LimitRangeInterface. @@ -46,7 +46,7 @@ type LimitRangeInterface interface { // limitRanges implements LimitRangeInterface type limitRanges struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go b/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go index 0a01c78f2c3..6fc64ff4e7b 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -47,7 +47,7 @@ type NamespaceInterface interface { // namespaces implements NamespaceInterface type namespaces struct { - client restclient.Interface + client rest.Interface } // newNamespaces returns a Namespaces diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/node.go b/pkg/client/clientset_generated/clientset/typed/core/v1/node.go index 096d220c7ff..38d47ae9ac7 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/node.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/node.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NodesGetter has a method to return a NodeInterface. @@ -47,7 +47,7 @@ type NodeInterface interface { // nodes implements NodeInterface type nodes struct { - client restclient.Interface + client rest.Interface } // newNodes returns a Nodes diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go b/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go index 319ebada29a..4e75654a4bc 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PersistentVolumesGetter has a method to return a PersistentVolumeInterface. @@ -47,7 +47,7 @@ type PersistentVolumeInterface interface { // persistentVolumes implements PersistentVolumeInterface type persistentVolumes struct { - client restclient.Interface + client rest.Interface } // newPersistentVolumes returns a PersistentVolumes diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go b/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go index a8b4375ac33..4cdc98eb172 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface. @@ -47,7 +47,7 @@ type PersistentVolumeClaimInterface interface { // persistentVolumeClaims implements PersistentVolumeClaimInterface type persistentVolumeClaims struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go b/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go index 74e7b2f1b24..8a1d5e9f03b 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodsGetter has a method to return a PodInterface. @@ -47,7 +47,7 @@ type PodInterface interface { // pods implements PodInterface type pods struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go b/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go index 79110c21dc5..d8763eaaa0e 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodTemplatesGetter has a method to return a PodTemplateInterface. @@ -46,7 +46,7 @@ type PodTemplateInterface interface { // podTemplates implements PodTemplateInterface type podTemplates struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go b/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go index a8ba8605db1..d6f3101dc8e 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicationControllersGetter has a method to return a ReplicationControllerInterface. @@ -47,7 +47,7 @@ type ReplicationControllerInterface interface { // replicationControllers implements ReplicationControllerInterface type replicationControllers struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go b/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go index ada814db377..675a0c357b5 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ResourceQuotasGetter has a method to return a ResourceQuotaInterface. @@ -47,7 +47,7 @@ type ResourceQuotaInterface interface { // resourceQuotas implements ResourceQuotaInterface type resourceQuotas struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go b/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go index 298ca343e04..0ba9ba8bfbe 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // SecretsGetter has a method to return a SecretInterface. @@ -46,7 +46,7 @@ type SecretInterface interface { // secrets implements SecretInterface type secrets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/service.go b/pkg/client/clientset_generated/clientset/typed/core/v1/service.go index 660d1a632c1..99c6d3f7a72 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/service.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/service.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServicesGetter has a method to return a ServiceInterface. @@ -47,7 +47,7 @@ type ServiceInterface interface { // services implements ServiceInterface type services struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go b/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go index 00eab9c960e..f47e4eec48e 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go @@ -20,9 +20,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServiceAccountsGetter has a method to return a ServiceAccountInterface. @@ -46,7 +46,7 @@ type ServiceAccountInterface interface { // serviceAccounts implements ServiceAccountInterface type serviceAccounts struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/BUILD b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/BUILD index 35be8f5f107..ecf3d3fbce3 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/BUILD @@ -28,13 +28,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go index aaebd1e9681..cdc71b8b55f 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -48,7 +48,7 @@ type DaemonSetInterface interface { // daemonSets implements DaemonSetInterface type daemonSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go index 2987c87651e..1060d60ecae 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -48,7 +48,7 @@ type DeploymentInterface interface { // deployments implements DeploymentInterface type deployments struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go index 646cd504765..d646e5a1b85 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ExtensionsV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface DaemonSetsGetter DeploymentsGetter IngressesGetter @@ -37,7 +37,7 @@ type ExtensionsV1beta1Interface interface { // ExtensionsV1beta1Client is used to interact with features provided by the extensions group. type ExtensionsV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface { @@ -69,12 +69,12 @@ func (c *ExtensionsV1beta1Client) ThirdPartyResources() ThirdPartyResourceInterf } // NewForConfig creates a new ExtensionsV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -83,7 +83,7 @@ func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) { // NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -92,11 +92,11 @@ func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client { } // New creates a new ExtensionsV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *ExtensionsV1beta1Client { +func New(c rest.Interface) *ExtensionsV1beta1Client { return &ExtensionsV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("extensions/v1beta1") if err != nil { return err @@ -107,7 +107,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -119,7 +119,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ExtensionsV1beta1Client) RESTClient() restclient.Interface { +func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/BUILD index f1c96dd3761..f9c967251fb 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/BUILD @@ -27,13 +27,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go index a6e5207c164..84749284c2e 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -56,7 +56,7 @@ func (c *FakeExtensionsV1beta1) ThirdPartyResources() v1beta1.ThirdPartyResource // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeExtensionsV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeExtensionsV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go index ced46ccb88f..aaa1494699a 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // IngressesGetter has a method to return a IngressInterface. @@ -48,7 +48,7 @@ type IngressInterface interface { // ingresses implements IngressInterface type ingresses struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go index ba24ee53935..918aec4549f 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface. @@ -47,7 +47,7 @@ type PodSecurityPolicyInterface interface { // podSecurityPolicies implements PodSecurityPolicyInterface type podSecurityPolicies struct { - client restclient.Interface + client rest.Interface } // newPodSecurityPolicies returns a PodSecurityPolicies diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go index 7b1ca121ae9..3bc699ff35f 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -48,7 +48,7 @@ type ReplicaSetInterface interface { // replicaSets implements ReplicaSetInterface type replicaSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go index 3900aaa048f..733012adee1 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // ScalesGetter has a method to return a ScaleInterface. @@ -33,7 +33,7 @@ type ScaleInterface interface { // scales implements ScaleInterface type scales struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go index 2c8bb8b14b2..cee01c6b11a 100644 --- a/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go +++ b/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface. @@ -47,7 +47,7 @@ type ThirdPartyResourceInterface interface { // thirdPartyResources implements ThirdPartyResourceInterface type thirdPartyResources struct { - client restclient.Interface + client rest.Interface } // newThirdPartyResources returns a ThirdPartyResources diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD index a873b7693dc..20539557167 100644 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD @@ -20,7 +20,6 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD index 0ec6dc865b1..3b05acf9dae 100644 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD @@ -19,7 +19,6 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1alpha1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/policy/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/BUILD b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/BUILD index bea4dfbfafc..965539cf801 100644 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/BUILD @@ -22,12 +22,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go index 3137a97a732..9c4133e3695 100644 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go +++ b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // EvictionsGetter has a method to return a EvictionInterface. @@ -33,7 +33,7 @@ type EvictionInterface interface { // evictions implements EvictionInterface type evictions struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/BUILD index d8fc74b1a29..f5b6c7557b5 100644 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/BUILD @@ -21,13 +21,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_policy_client.go b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_policy_client.go index 36fa3becb1e..d25b1753b19 100644 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_policy_client.go +++ b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_policy_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -36,7 +36,7 @@ func (c *FakePolicyV1beta1) PodDisruptionBudgets(namespace string) v1beta1.PodDi // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakePolicyV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakePolicyV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go index a4b605ed174..ffa09bd6742 100644 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go +++ b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. @@ -48,7 +48,7 @@ type PodDisruptionBudgetInterface interface { // podDisruptionBudgets implements PodDisruptionBudgetInterface type podDisruptionBudgets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go index a501ea13d32..c542fcfed82 100644 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go +++ b/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go @@ -20,19 +20,19 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type PolicyV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface EvictionsGetter PodDisruptionBudgetsGetter } // PolicyV1beta1Client is used to interact with features provided by the policy group. type PolicyV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *PolicyV1beta1Client) Evictions(namespace string) EvictionInterface { @@ -44,12 +44,12 @@ func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisrupti } // NewForConfig creates a new PolicyV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*PolicyV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -58,7 +58,7 @@ func NewForConfig(c *restclient.Config) (*PolicyV1beta1Client, error) { // NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *PolicyV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -67,11 +67,11 @@ func NewForConfigOrDie(c *restclient.Config) *PolicyV1beta1Client { } // New creates a new PolicyV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *PolicyV1beta1Client { +func New(c rest.Interface) *PolicyV1beta1Client { return &PolicyV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("policy/v1beta1") if err != nil { return err @@ -82,7 +82,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -94,7 +94,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *PolicyV1beta1Client) RESTClient() restclient.Interface { +func (c *PolicyV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/BUILD b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/BUILD index 21e3197e295..b3bbd26a713 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/BUILD @@ -23,12 +23,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go index 8f90298d919..4247ade5236 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRolesGetter has a method to return a ClusterRoleInterface. @@ -47,7 +47,7 @@ type ClusterRoleInterface interface { // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - client restclient.Interface + client rest.Interface } // newClusterRoles returns a ClusterRoles diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go index 5eb312658da..315b8810dfe 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. @@ -47,7 +47,7 @@ type ClusterRoleBindingInterface interface { // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - client restclient.Interface + client rest.Interface } // newClusterRoleBindings returns a ClusterRoleBindings diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/BUILD index cf2f704099d..23186e71f66 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/BUILD @@ -22,13 +22,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rbac_client.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rbac_client.go index 1b370bfd44e..5216e04bbd3 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rbac_client.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rbac_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -44,7 +44,7 @@ func (c *FakeRbacV1alpha1) RoleBindings(namespace string) v1alpha1.RoleBindingIn // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeRbacV1alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeRbacV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go index 52bf74a08c0..42f077ca276 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type RbacV1alpha1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ClusterRolesGetter ClusterRoleBindingsGetter RolesGetter @@ -34,7 +34,7 @@ type RbacV1alpha1Interface interface { // RbacV1alpha1Client is used to interact with features provided by the rbac.authorization.k8s.io group. type RbacV1alpha1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *RbacV1alpha1Client) ClusterRoles() ClusterRoleInterface { @@ -54,12 +54,12 @@ func (c *RbacV1alpha1Client) RoleBindings(namespace string) RoleBindingInterface } // NewForConfig creates a new RbacV1alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*RbacV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*RbacV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -68,7 +68,7 @@ func NewForConfig(c *restclient.Config) (*RbacV1alpha1Client, error) { // NewForConfigOrDie creates a new RbacV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *RbacV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *RbacV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -77,11 +77,11 @@ func NewForConfigOrDie(c *restclient.Config) *RbacV1alpha1Client { } // New creates a new RbacV1alpha1Client for the given RESTClient. -func New(c restclient.Interface) *RbacV1alpha1Client { +func New(c rest.Interface) *RbacV1alpha1Client { return &RbacV1alpha1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("rbac.authorization.k8s.io/v1alpha1") if err != nil { return err @@ -92,7 +92,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -104,7 +104,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *RbacV1alpha1Client) RESTClient() restclient.Interface { +func (c *RbacV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go index e16b3097ce7..b7c47fff729 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RolesGetter has a method to return a RoleInterface. @@ -47,7 +47,7 @@ type RoleInterface interface { // roles implements RoleInterface type roles struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go index 06ad70bea3a..d181b021e4c 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RoleBindingsGetter has a method to return a RoleBindingInterface. @@ -47,7 +47,7 @@ type RoleBindingInterface interface { // roleBindings implements RoleBindingInterface type roleBindings struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/BUILD b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/BUILD index 5966b6b7b33..af79b688197 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/BUILD @@ -23,12 +23,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/rbac/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go index 90804b8ed51..41aef63d146 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRolesGetter has a method to return a ClusterRoleInterface. @@ -47,7 +47,7 @@ type ClusterRoleInterface interface { // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - client restclient.Interface + client rest.Interface } // newClusterRoles returns a ClusterRoles diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go index 8cb4c4683f2..6229b8e93d6 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. @@ -47,7 +47,7 @@ type ClusterRoleBindingInterface interface { // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - client restclient.Interface + client rest.Interface } // newClusterRoleBindings returns a ClusterRoleBindings diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/BUILD index f28839868e5..fc0b18e0c99 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/BUILD @@ -22,13 +22,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/rbac/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rbac_client.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rbac_client.go index e84c89d59f1..2ce1900f6b1 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rbac_client.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rbac_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -44,7 +44,7 @@ func (c *FakeRbacV1beta1) RoleBindings(namespace string) v1beta1.RoleBindingInte // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeRbacV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeRbacV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go index 11dbb3d5cd6..dbce6708541 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type RbacV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ClusterRolesGetter ClusterRoleBindingsGetter RolesGetter @@ -34,7 +34,7 @@ type RbacV1beta1Interface interface { // RbacV1beta1Client is used to interact with features provided by the rbac.authorization.k8s.io group. type RbacV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *RbacV1beta1Client) ClusterRoles() ClusterRoleInterface { @@ -54,12 +54,12 @@ func (c *RbacV1beta1Client) RoleBindings(namespace string) RoleBindingInterface } // NewForConfig creates a new RbacV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*RbacV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*RbacV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -68,7 +68,7 @@ func NewForConfig(c *restclient.Config) (*RbacV1beta1Client, error) { // NewForConfigOrDie creates a new RbacV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *RbacV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *RbacV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -77,11 +77,11 @@ func NewForConfigOrDie(c *restclient.Config) *RbacV1beta1Client { } // New creates a new RbacV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *RbacV1beta1Client { +func New(c rest.Interface) *RbacV1beta1Client { return &RbacV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("rbac.authorization.k8s.io/v1beta1") if err != nil { return err @@ -92,7 +92,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -104,7 +104,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *RbacV1beta1Client) RESTClient() restclient.Interface { +func (c *RbacV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go index 8da6501e73a..958516dffe8 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RolesGetter has a method to return a RoleInterface. @@ -47,7 +47,7 @@ type RoleInterface interface { // roles implements RoleInterface type roles struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go index 6cfeee95c19..ce490766c6a 100644 --- a/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go +++ b/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RoleBindingsGetter has a method to return a RoleBindingInterface. @@ -47,7 +47,7 @@ type RoleBindingInterface interface { // roleBindings implements RoleBindingInterface type roleBindings struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/BUILD b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/BUILD index f14f88cd6b3..a8dbf061762 100644 --- a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/BUILD @@ -20,12 +20,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/BUILD index d2119655d3f..0fc26bd69a5 100644 --- a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storage_client.go b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storage_client.go index 83394b201d8..ac58580602f 100644 --- a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storage_client.go +++ b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storage_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeStorageV1beta1) StorageClasses() v1beta1.StorageClassInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeStorageV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeStorageV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go index 142c14a9285..fa29839bd94 100644 --- a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go +++ b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type StorageV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface StorageClassesGetter } // StorageV1beta1Client is used to interact with features provided by the storage.k8s.io group. type StorageV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *StorageV1beta1Client) StorageClasses() StorageClassInterface { @@ -39,12 +39,12 @@ func (c *StorageV1beta1Client) StorageClasses() StorageClassInterface { } // NewForConfig creates a new StorageV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*StorageV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*StorageV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*StorageV1beta1Client, error) { // NewForConfigOrDie creates a new StorageV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *StorageV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *StorageV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *StorageV1beta1Client { } // New creates a new StorageV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *StorageV1beta1Client { +func New(c rest.Interface) *StorageV1beta1Client { return &StorageV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("storage.k8s.io/v1beta1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *StorageV1beta1Client) RESTClient() restclient.Interface { +func (c *StorageV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go index 64f716aa136..92a85300462 100644 --- a/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go +++ b/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go @@ -20,10 +20,10 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // StorageClassesGetter has a method to return a StorageClassInterface. @@ -47,7 +47,7 @@ type StorageClassInterface interface { // storageClasses implements StorageClassInterface type storageClasses struct { - client restclient.Interface + client rest.Interface } // newStorageClasses returns a StorageClasses diff --git a/pkg/client/clientset_generated/internalclientset/BUILD b/pkg/client/clientset_generated/internalclientset/BUILD index 7446d5cf627..0639817e75b 100644 --- a/pkg/client/clientset_generated/internalclientset/BUILD +++ b/pkg/client/clientset_generated/internalclientset/BUILD @@ -40,11 +40,11 @@ go_library( "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/clientset.go b/pkg/client/clientset_generated/internalclientset/clientset.go index 91aa5ebef23..ee063c51511 100644 --- a/pkg/client/clientset_generated/internalclientset/clientset.go +++ b/pkg/client/clientset_generated/internalclientset/clientset.go @@ -19,6 +19,7 @@ package internalclientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + rest "k8s.io/client-go/rest" internalversionapps "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion" internalversionauthentication "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion" internalversionauthorization "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion" @@ -30,7 +31,6 @@ import ( internalversionpolicy "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" internalversionrbac "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" internalversionstorage "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) @@ -174,7 +174,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -236,7 +236,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.CoreClient = internalversioncore.NewForConfigOrDie(c) cs.AppsClient = internalversionapps.NewForConfigOrDie(c) @@ -255,7 +255,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.CoreClient = internalversioncore.New(c) cs.AppsClient = internalversionapps.New(c) diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD index 6da44f64831..a8f6c124d91 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD @@ -19,10 +19,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/apps:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go index c5fa3524ae6..df9653ad461 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AppsInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface StatefulSetsGetter } // AppsClient is used to interact with features provided by the apps group. type AppsClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AppsClient) StatefulSets(namespace string) StatefulSetInterface { @@ -36,12 +36,12 @@ func (c *AppsClient) StatefulSets(namespace string) StatefulSetInterface { } // NewForConfig creates a new AppsClient for the given config. -func NewForConfig(c *restclient.Config) (*AppsClient, error) { +func NewForConfig(c *rest.Config) (*AppsClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*AppsClient, error) { // NewForConfigOrDie creates a new AppsClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AppsClient { +func NewForConfigOrDie(c *rest.Config) *AppsClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *AppsClient { } // New creates a new AppsClient for the given RESTClient. -func New(c restclient.Interface) *AppsClient { +func New(c rest.Interface) *AppsClient { return &AppsClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if apps group is not registered, return an error g, err := api.Registry.Group("apps") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AppsClient) RESTClient() restclient.Interface { +func (c *AppsClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD index 544f04e203e..96d2da3425b 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/apps:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go index 9b1f71c1cb6..69f39aea960 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeApps) StatefulSets(namespace string) internalversion.StatefulSetInt // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeApps) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeApps) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go index 77b92a9ed01..8947ee661cd 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" apps "k8s.io/kubernetes/pkg/apis/apps" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // StatefulSetsGetter has a method to return a StatefulSetInterface. @@ -47,7 +47,7 @@ type StatefulSetInterface interface { // statefulSets implements StatefulSetInterface type statefulSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD index 93c17e89f93..89dbc89116e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD @@ -20,7 +20,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authentication:go_default_library", - "//pkg/client/restclient:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go index ff45ce11eef..ea971cd67a0 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AuthenticationInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface TokenReviewsGetter } // AuthenticationClient is used to interact with features provided by the authentication.k8s.io group. type AuthenticationClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AuthenticationClient) TokenReviews() TokenReviewInterface { @@ -36,12 +36,12 @@ func (c *AuthenticationClient) TokenReviews() TokenReviewInterface { } // NewForConfig creates a new AuthenticationClient for the given config. -func NewForConfig(c *restclient.Config) (*AuthenticationClient, error) { +func NewForConfig(c *rest.Config) (*AuthenticationClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*AuthenticationClient, error) { // NewForConfigOrDie creates a new AuthenticationClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AuthenticationClient { +func NewForConfigOrDie(c *rest.Config) *AuthenticationClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthenticationClient { } // New creates a new AuthenticationClient for the given RESTClient. -func New(c restclient.Interface) *AuthenticationClient { +func New(c rest.Interface) *AuthenticationClient { return &AuthenticationClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if authentication group is not registered, return an error g, err := api.Registry.Group("authentication.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AuthenticationClient) RESTClient() restclient.Interface { +func (c *AuthenticationClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD index 96f1434863e..fce2c0e7eaf 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD @@ -20,8 +20,8 @@ go_library( deps = [ "//pkg/apis/authentication:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go index 20f3330eba0..93da718a487 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAuthentication) TokenReviews() internalversion.TokenReviewInterface // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAuthentication) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAuthentication) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go index d6cbc51f795..c0880edb874 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go +++ b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // TokenReviewsGetter has a method to return a TokenReviewInterface. @@ -33,7 +33,7 @@ type TokenReviewInterface interface { // tokenReviews implements TokenReviewInterface type tokenReviews struct { - client restclient.Interface + client rest.Interface } // newTokenReviews returns a TokenReviews diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD index cccce09ff19..7701656a15c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD @@ -24,7 +24,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authorization:go_default_library", - "//pkg/client/restclient:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go index fdda05a6db9..9bbd05411c7 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AuthorizationInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface LocalSubjectAccessReviewsGetter SelfSubjectAccessReviewsGetter SubjectAccessReviewsGetter @@ -30,7 +30,7 @@ type AuthorizationInterface interface { // AuthorizationClient is used to interact with features provided by the authorization.k8s.io group. type AuthorizationClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AuthorizationClient) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { @@ -46,12 +46,12 @@ func (c *AuthorizationClient) SubjectAccessReviews() SubjectAccessReviewInterfac } // NewForConfig creates a new AuthorizationClient for the given config. -func NewForConfig(c *restclient.Config) (*AuthorizationClient, error) { +func NewForConfig(c *rest.Config) (*AuthorizationClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -60,7 +60,7 @@ func NewForConfig(c *restclient.Config) (*AuthorizationClient, error) { // NewForConfigOrDie creates a new AuthorizationClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AuthorizationClient { +func NewForConfigOrDie(c *rest.Config) *AuthorizationClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -69,11 +69,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthorizationClient { } // New creates a new AuthorizationClient for the given RESTClient. -func New(c restclient.Interface) *AuthorizationClient { +func New(c rest.Interface) *AuthorizationClient { return &AuthorizationClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if authorization group is not registered, return an error g, err := api.Registry.Group("authorization.k8s.io") if err != nil { @@ -81,7 +81,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -100,7 +100,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AuthorizationClient) RESTClient() restclient.Interface { +func (c *AuthorizationClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD index 704513ac517..4f3bd44ca23 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD @@ -24,8 +24,8 @@ go_library( deps = [ "//pkg/apis/authorization:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go index 5c34558d387..4c32605ceba 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -40,7 +40,7 @@ func (c *FakeAuthorization) SubjectAccessReviews() internalversion.SubjectAccess // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAuthorization) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAuthorization) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go index cc5805657a5..bf02fad768f 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go +++ b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type LocalSubjectAccessReviewInterface interface { // localSubjectAccessReviews implements LocalSubjectAccessReviewInterface type localSubjectAccessReviews struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go index 961e37c8c0a..cb19357c487 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go +++ b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type SelfSubjectAccessReviewInterface interface { // selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface type selfSubjectAccessReviews struct { - client restclient.Interface + client rest.Interface } // newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go index e11f0162382..456b469b196 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go +++ b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type SubjectAccessReviewInterface interface { // subjectAccessReviews implements SubjectAccessReviewInterface type subjectAccessReviews struct { - client restclient.Interface + client rest.Interface } // newSubjectAccessReviews returns a SubjectAccessReviews diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD index b1d2c37cf55..d5f2d174d6e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD @@ -19,10 +19,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go index 0384256c989..325e11ba020 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AutoscalingInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface HorizontalPodAutoscalersGetter } // AutoscalingClient is used to interact with features provided by the autoscaling group. type AutoscalingClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { @@ -36,12 +36,12 @@ func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) Horizonta } // NewForConfig creates a new AutoscalingClient for the given config. -func NewForConfig(c *restclient.Config) (*AutoscalingClient, error) { +func NewForConfig(c *rest.Config) (*AutoscalingClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*AutoscalingClient, error) { // NewForConfigOrDie creates a new AutoscalingClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AutoscalingClient { +func NewForConfigOrDie(c *rest.Config) *AutoscalingClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *AutoscalingClient { } // New creates a new AutoscalingClient for the given RESTClient. -func New(c restclient.Interface) *AutoscalingClient { +func New(c rest.Interface) *AutoscalingClient { return &AutoscalingClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if autoscaling group is not registered, return an error g, err := api.Registry.Group("autoscaling") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AutoscalingClient) RESTClient() restclient.Interface { +func (c *AutoscalingClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD index 5ffcf7d7752..0a47501863e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go index 07e962152fa..e427da90bc8 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAutoscaling) HorizontalPodAutoscalers(namespace string) internalver // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAutoscaling) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAutoscaling) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go index 572586f03ab..74bf1376e97 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. @@ -47,7 +47,7 @@ type HorizontalPodAutoscalerInterface interface { // horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface type horizontalPodAutoscalers struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD index e8275ed3102..ddad5320472 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD @@ -20,10 +20,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go index 6b3525b3efe..90866b44fbe 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go @@ -17,19 +17,19 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface CronJobsGetter JobsGetter } // BatchClient is used to interact with features provided by the batch group. type BatchClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchClient) CronJobs(namespace string) CronJobInterface { @@ -41,12 +41,12 @@ func (c *BatchClient) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchClient for the given config. -func NewForConfig(c *restclient.Config) (*BatchClient, error) { +func NewForConfig(c *rest.Config) (*BatchClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -55,7 +55,7 @@ func NewForConfig(c *restclient.Config) (*BatchClient, error) { // NewForConfigOrDie creates a new BatchClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchClient { +func NewForConfigOrDie(c *rest.Config) *BatchClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -64,11 +64,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchClient { } // New creates a new BatchClient for the given RESTClient. -func New(c restclient.Interface) *BatchClient { +func New(c rest.Interface) *BatchClient { return &BatchClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if batch group is not registered, return an error g, err := api.Registry.Group("batch") if err != nil { @@ -76,7 +76,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -95,7 +95,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchClient) RESTClient() restclient.Interface { +func (c *BatchClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go index 81a92a3433b..89ebf2efd93 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" batch "k8s.io/kubernetes/pkg/apis/batch" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // CronJobsGetter has a method to return a CronJobInterface. @@ -47,7 +47,7 @@ type CronJobInterface interface { // cronJobs implements CronJobInterface type cronJobs struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD index 799768c2b77..e2a3ba8382a 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD @@ -20,13 +20,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go index 8adbdac56c3..a1ad34c6dc8 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -36,7 +36,7 @@ func (c *FakeBatch) Jobs(namespace string) internalversion.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatch) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatch) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go index 9e24c6436d9..53fea7e6041 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" batch "k8s.io/kubernetes/pkg/apis/batch" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -47,7 +47,7 @@ type JobInterface interface { // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD index f5e210ab215..baf0d8510d8 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD @@ -20,10 +20,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/certificates:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go index 7814661579e..692461bc691 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CertificatesInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface CertificateSigningRequestsGetter } // CertificatesClient is used to interact with features provided by the certificates.k8s.io group. type CertificatesClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequestInterface { @@ -36,12 +36,12 @@ func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequ } // NewForConfig creates a new CertificatesClient for the given config. -func NewForConfig(c *restclient.Config) (*CertificatesClient, error) { +func NewForConfig(c *rest.Config) (*CertificatesClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*CertificatesClient, error) { // NewForConfigOrDie creates a new CertificatesClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CertificatesClient { +func NewForConfigOrDie(c *rest.Config) *CertificatesClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *CertificatesClient { } // New creates a new CertificatesClient for the given RESTClient. -func New(c restclient.Interface) *CertificatesClient { +func New(c rest.Interface) *CertificatesClient { return &CertificatesClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if certificates group is not registered, return an error g, err := api.Registry.Group("certificates.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CertificatesClient) RESTClient() restclient.Interface { +func (c *CertificatesClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go index e7b61c25000..6cb7d2622ec 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" certificates "k8s.io/kubernetes/pkg/apis/certificates" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. @@ -47,7 +47,7 @@ type CertificateSigningRequestInterface interface { // certificateSigningRequests implements CertificateSigningRequestInterface type certificateSigningRequests struct { - client restclient.Interface + client rest.Interface } // newCertificateSigningRequests returns a CertificateSigningRequests diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD index 482cb960be1..2414e401750 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD @@ -20,13 +20,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go index 9ea0c45c9c4..dfb1a2d8f91 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeCertificates) CertificateSigningRequests() internalversion.Certific // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCertificates) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCertificates) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD index b897830eeda..cbde75b71ae 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD @@ -39,13 +39,13 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go index 5f6761f2e9c..da735d62703 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ComponentStatusesGetter has a method to return a ComponentStatusInterface. @@ -45,7 +45,7 @@ type ComponentStatusInterface interface { // componentStatuses implements ComponentStatusInterface type componentStatuses struct { - client restclient.Interface + client rest.Interface } // newComponentStatuses returns a ComponentStatuses diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go index 5d2f111e4a0..cc5accb295e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -45,7 +45,7 @@ type ConfigMapInterface interface { // configMaps implements ConfigMapInterface type configMaps struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go index 39fe89d6557..b20f00053dd 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CoreInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ComponentStatusesGetter ConfigMapsGetter EndpointsGetter @@ -43,7 +43,7 @@ type CoreInterface interface { // CoreClient is used to interact with features provided by the group. type CoreClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CoreClient) ComponentStatuses() ComponentStatusInterface { @@ -111,12 +111,12 @@ func (c *CoreClient) ServiceAccounts(namespace string) ServiceAccountInterface { } // NewForConfig creates a new CoreClient for the given config. -func NewForConfig(c *restclient.Config) (*CoreClient, error) { +func NewForConfig(c *rest.Config) (*CoreClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -125,7 +125,7 @@ func NewForConfig(c *restclient.Config) (*CoreClient, error) { // NewForConfigOrDie creates a new CoreClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CoreClient { +func NewForConfigOrDie(c *rest.Config) *CoreClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -134,11 +134,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreClient { } // New creates a new CoreClient for the given RESTClient. -func New(c restclient.Interface) *CoreClient { +func New(c rest.Interface) *CoreClient { return &CoreClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if core group is not registered, return an error g, err := api.Registry.Group("") if err != nil { @@ -146,7 +146,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/api" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -165,7 +165,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoreClient) RESTClient() restclient.Interface { +func (c *CoreClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go index df77d46c4b7..eb5134b2b89 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EndpointsGetter has a method to return a EndpointsInterface. @@ -45,7 +45,7 @@ type EndpointsInterface interface { // endpoints implements EndpointsInterface type endpoints struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go index d8f20e2710f..bbb6a398436 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EventsGetter has a method to return a EventInterface. @@ -45,7 +45,7 @@ type EventInterface interface { // events implements EventInterface type events struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD index bbdfd0793be..03d34850a68 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD @@ -38,7 +38,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/fields", @@ -47,6 +46,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go index 10f001b43f7..da9719b5fe1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -92,7 +92,7 @@ func (c *FakeCore) ServiceAccounts(namespace string) internalversion.ServiceAcco // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCore) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCore) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go index 0481ce46d49..8b30bbb6e0b 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // LimitRangesGetter has a method to return a LimitRangeInterface. @@ -45,7 +45,7 @@ type LimitRangeInterface interface { // limitRanges implements LimitRangeInterface type limitRanges struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go index 3c33dc4457b..7cec0560ca8 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -46,7 +46,7 @@ type NamespaceInterface interface { // namespaces implements NamespaceInterface type namespaces struct { - client restclient.Interface + client rest.Interface } // newNamespaces returns a Namespaces diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go index e02210d6e40..4ee65b2ca1f 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NodesGetter has a method to return a NodeInterface. @@ -46,7 +46,7 @@ type NodeInterface interface { // nodes implements NodeInterface type nodes struct { - client restclient.Interface + client rest.Interface } // newNodes returns a Nodes diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go index 72876d1a0ac..88c73082759 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PersistentVolumesGetter has a method to return a PersistentVolumeInterface. @@ -46,7 +46,7 @@ type PersistentVolumeInterface interface { // persistentVolumes implements PersistentVolumeInterface type persistentVolumes struct { - client restclient.Interface + client rest.Interface } // newPersistentVolumes returns a PersistentVolumes diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go index 66e2d8e11e8..85ad719e65b 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface. @@ -46,7 +46,7 @@ type PersistentVolumeClaimInterface interface { // persistentVolumeClaims implements PersistentVolumeClaimInterface type persistentVolumeClaims struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go index ebdf0fca2c0..5e0dce9d385 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodsGetter has a method to return a PodInterface. @@ -46,7 +46,7 @@ type PodInterface interface { // pods implements PodInterface type pods struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go index 0c15928200e..066f157d099 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodTemplatesGetter has a method to return a PodTemplateInterface. @@ -45,7 +45,7 @@ type PodTemplateInterface interface { // podTemplates implements PodTemplateInterface type podTemplates struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go index 717bf349215..5c5f7e4524e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicationControllersGetter has a method to return a ReplicationControllerInterface. @@ -46,7 +46,7 @@ type ReplicationControllerInterface interface { // replicationControllers implements ReplicationControllerInterface type replicationControllers struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go index 1ed3f99824e..24cc8bae505 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ResourceQuotasGetter has a method to return a ResourceQuotaInterface. @@ -46,7 +46,7 @@ type ResourceQuotaInterface interface { // resourceQuotas implements ResourceQuotaInterface type resourceQuotas struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go index 5707ff1f708..29902d461fc 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // SecretsGetter has a method to return a SecretInterface. @@ -45,7 +45,7 @@ type SecretInterface interface { // secrets implements SecretInterface type secrets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go index abfe3bea064..c83fbd95ebc 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServicesGetter has a method to return a ServiceInterface. @@ -46,7 +46,7 @@ type ServiceInterface interface { // services implements ServiceInterface type services struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go index c99a5523fba..9690913b716 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServiceAccountsGetter has a method to return a ServiceAccountInterface. @@ -45,7 +45,7 @@ type ServiceAccountInterface interface { // serviceAccounts implements ServiceAccountInterface type serviceAccounts struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD index d5fd52fa0c5..a9795f2eff1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD @@ -28,12 +28,12 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/daemonset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/daemonset.go index 98f6c2e3274..c6ab08f065f 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/daemonset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/daemonset.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -47,7 +47,7 @@ type DaemonSetInterface interface { // daemonSets implements DaemonSetInterface type daemonSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go index 0426b40c63b..d48ea580518 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -47,7 +47,7 @@ type DeploymentInterface interface { // deployments implements DeploymentInterface type deployments struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go index b3448f7d522..31a0fddeffc 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ExtensionsInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface DaemonSetsGetter DeploymentsGetter IngressesGetter @@ -35,7 +35,7 @@ type ExtensionsInterface interface { // ExtensionsClient is used to interact with features provided by the extensions group. type ExtensionsClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface { @@ -71,12 +71,12 @@ func (c *ExtensionsClient) ThirdPartyResources() ThirdPartyResourceInterface { } // NewForConfig creates a new ExtensionsClient for the given config. -func NewForConfig(c *restclient.Config) (*ExtensionsClient, error) { +func NewForConfig(c *rest.Config) (*ExtensionsClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -85,7 +85,7 @@ func NewForConfig(c *restclient.Config) (*ExtensionsClient, error) { // NewForConfigOrDie creates a new ExtensionsClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ExtensionsClient { +func NewForConfigOrDie(c *rest.Config) *ExtensionsClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -94,11 +94,11 @@ func NewForConfigOrDie(c *restclient.Config) *ExtensionsClient { } // New creates a new ExtensionsClient for the given RESTClient. -func New(c restclient.Interface) *ExtensionsClient { +func New(c rest.Interface) *ExtensionsClient { return &ExtensionsClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if extensions group is not registered, return an error g, err := api.Registry.Group("extensions") if err != nil { @@ -106,7 +106,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -125,7 +125,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ExtensionsClient) RESTClient() restclient.Interface { +func (c *ExtensionsClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD index 97279a0925e..44925be2689 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD @@ -28,13 +28,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go index d2805ef00c7..b8577c43c75 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -60,7 +60,7 @@ func (c *FakeExtensions) ThirdPartyResources() internalversion.ThirdPartyResourc // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeExtensions) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeExtensions) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/ingress.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/ingress.go index bd99ec11eaa..b026e2e33a1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/ingress.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/ingress.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // IngressesGetter has a method to return a IngressInterface. @@ -47,7 +47,7 @@ type IngressInterface interface { // ingresses implements IngressInterface type ingresses struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/networkpolicy.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/networkpolicy.go index de6d7c4b7e2..ef939abbbfe 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/networkpolicy.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/networkpolicy.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NetworkPoliciesGetter has a method to return a NetworkPolicyInterface. @@ -46,7 +46,7 @@ type NetworkPolicyInterface interface { // networkPolicies implements NetworkPolicyInterface type networkPolicies struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/podsecuritypolicy.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/podsecuritypolicy.go index 4d284722d58..8670364377d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/podsecuritypolicy.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/podsecuritypolicy.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface. @@ -46,7 +46,7 @@ type PodSecurityPolicyInterface interface { // podSecurityPolicies implements PodSecurityPolicyInterface type podSecurityPolicies struct { - client restclient.Interface + client rest.Interface } // newPodSecurityPolicies returns a PodSecurityPolicies diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go index 1410821881a..5de36beb0f5 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -47,7 +47,7 @@ type ReplicaSetInterface interface { // replicaSets implements ReplicaSetInterface type replicaSets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go index 892a07e37b8..ad1d91b015b 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // ScalesGetter has a method to return a ScaleInterface. @@ -33,7 +33,7 @@ type ScaleInterface interface { // scales implements ScaleInterface type scales struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/thirdpartyresource.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/thirdpartyresource.go index 3746fe0b38f..66777e7be07 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/thirdpartyresource.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/thirdpartyresource.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface. @@ -46,7 +46,7 @@ type ThirdPartyResourceInterface interface { // thirdPartyResources implements ThirdPartyResourceInterface type thirdPartyResources struct { - client restclient.Interface + client rest.Interface } // newThirdPartyResources returns a ThirdPartyResources diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD index 8db66b7a1f5..d7b69bf29fe 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD @@ -21,10 +21,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/policy:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go index 012a67e1675..a43dabbb19d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go +++ b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // EvictionsGetter has a method to return a EvictionInterface. @@ -33,7 +33,7 @@ type EvictionInterface interface { // evictions implements EvictionInterface type evictions struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD index c60b6d6ab01..b8f32b8bd74 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD @@ -21,13 +21,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go index d8dd4c722fa..7f8a472b69c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -36,7 +36,7 @@ func (c *FakePolicy) PodDisruptionBudgets(namespace string) internalversion.PodD // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakePolicy) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakePolicy) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go index 80c5e220bb9..967b64c97b8 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go +++ b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" policy "k8s.io/kubernetes/pkg/apis/policy" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. @@ -47,7 +47,7 @@ type PodDisruptionBudgetInterface interface { // podDisruptionBudgets implements PodDisruptionBudgetInterface type podDisruptionBudgets struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go index dab1b40e3e6..7a0e00735f6 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go @@ -17,19 +17,19 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type PolicyInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface EvictionsGetter PodDisruptionBudgetsGetter } // PolicyClient is used to interact with features provided by the policy group. type PolicyClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *PolicyClient) Evictions(namespace string) EvictionInterface { @@ -41,12 +41,12 @@ func (c *PolicyClient) PodDisruptionBudgets(namespace string) PodDisruptionBudge } // NewForConfig creates a new PolicyClient for the given config. -func NewForConfig(c *restclient.Config) (*PolicyClient, error) { +func NewForConfig(c *rest.Config) (*PolicyClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -55,7 +55,7 @@ func NewForConfig(c *restclient.Config) (*PolicyClient, error) { // NewForConfigOrDie creates a new PolicyClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *PolicyClient { +func NewForConfigOrDie(c *rest.Config) *PolicyClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -64,11 +64,11 @@ func NewForConfigOrDie(c *restclient.Config) *PolicyClient { } // New creates a new PolicyClient for the given RESTClient. -func New(c restclient.Interface) *PolicyClient { +func New(c rest.Interface) *PolicyClient { return &PolicyClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if policy group is not registered, return an error g, err := api.Registry.Group("policy") if err != nil { @@ -76,7 +76,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -95,7 +95,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *PolicyClient) RESTClient() restclient.Interface { +func (c *PolicyClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD index 176758bbe74..34142c085fe 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD @@ -22,10 +22,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go index 72afc5ca036..f573151d1df 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRolesGetter has a method to return a ClusterRoleInterface. @@ -46,7 +46,7 @@ type ClusterRoleInterface interface { // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - client restclient.Interface + client rest.Interface } // newClusterRoles returns a ClusterRoles diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go index 9493d239a7c..01d425d32de 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. @@ -46,7 +46,7 @@ type ClusterRoleBindingInterface interface { // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - client restclient.Interface + client rest.Interface } // newClusterRoleBindings returns a ClusterRoleBindings diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD index d31b435a967..6d1c20aee42 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD @@ -22,13 +22,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go index a17bbf1fc3d..0e94ed91fcb 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -44,7 +44,7 @@ func (c *FakeRbac) RoleBindings(namespace string) internalversion.RoleBindingInt // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeRbac) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeRbac) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go index 25a6f01eb8e..c5f6244bad1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type RbacInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ClusterRolesGetter ClusterRoleBindingsGetter RolesGetter @@ -31,7 +31,7 @@ type RbacInterface interface { // RbacClient is used to interact with features provided by the rbac.authorization.k8s.io group. type RbacClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *RbacClient) ClusterRoles() ClusterRoleInterface { @@ -51,12 +51,12 @@ func (c *RbacClient) RoleBindings(namespace string) RoleBindingInterface { } // NewForConfig creates a new RbacClient for the given config. -func NewForConfig(c *restclient.Config) (*RbacClient, error) { +func NewForConfig(c *rest.Config) (*RbacClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -65,7 +65,7 @@ func NewForConfig(c *restclient.Config) (*RbacClient, error) { // NewForConfigOrDie creates a new RbacClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *RbacClient { +func NewForConfigOrDie(c *rest.Config) *RbacClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -74,11 +74,11 @@ func NewForConfigOrDie(c *restclient.Config) *RbacClient { } // New creates a new RbacClient for the given RESTClient. -func New(c restclient.Interface) *RbacClient { +func New(c rest.Interface) *RbacClient { return &RbacClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if rbac group is not registered, return an error g, err := api.Registry.Group("rbac.authorization.k8s.io") if err != nil { @@ -86,7 +86,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -105,7 +105,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *RbacClient) RESTClient() restclient.Interface { +func (c *RbacClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go index c423d9385da..a395b16bf11 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RolesGetter has a method to return a RoleInterface. @@ -46,7 +46,7 @@ type RoleInterface interface { // roles implements RoleInterface type roles struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go index 5b80b1a9ce7..b8ab5e7a542 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RoleBindingsGetter has a method to return a RoleBindingInterface. @@ -46,7 +46,7 @@ type RoleBindingInterface interface { // roleBindings implements RoleBindingInterface type roleBindings struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD index 8a26ad90e05..34ccef189b6 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD @@ -19,10 +19,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD index dc5054863d7..42b99661f7c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go index e954f152993..7abe6f4f9b1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeStorage) StorageClasses() internalversion.StorageClassInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeStorage) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeStorage) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go index c96e84e2f00..2b4a06a449d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type StorageInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface StorageClassesGetter } // StorageClient is used to interact with features provided by the storage.k8s.io group. type StorageClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *StorageClient) StorageClasses() StorageClassInterface { @@ -36,12 +36,12 @@ func (c *StorageClient) StorageClasses() StorageClassInterface { } // NewForConfig creates a new StorageClient for the given config. -func NewForConfig(c *restclient.Config) (*StorageClient, error) { +func NewForConfig(c *rest.Config) (*StorageClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*StorageClient, error) { // NewForConfigOrDie creates a new StorageClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *StorageClient { +func NewForConfigOrDie(c *rest.Config) *StorageClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *StorageClient { } // New creates a new StorageClient for the given RESTClient. -func New(c restclient.Interface) *StorageClient { +func New(c rest.Interface) *StorageClient { return &StorageClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if storage group is not registered, return an error g, err := api.Registry.Group("storage.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *StorageClient) RESTClient() restclient.Interface { +func (c *StorageClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go index fb5260bdae4..ab5c6189582 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go +++ b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" storage "k8s.io/kubernetes/pkg/apis/storage" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // StorageClassesGetter has a method to return a StorageClassInterface. @@ -46,7 +46,7 @@ type StorageClassInterface interface { // storageClasses implements StorageClassInterface type storageClasses struct { - client restclient.Interface + client rest.Interface } // newStorageClasses returns a StorageClasses diff --git a/pkg/client/record/BUILD b/pkg/client/record/BUILD index 9f2dca8de82..4e6d1779a3a 100644 --- a/pkg/client/record/BUILD +++ b/pkg/client/record/BUILD @@ -19,7 +19,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util/strategicpatch:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/golang/groupcache/lru", @@ -44,7 +43,6 @@ go_test( deps = [ "//pkg/api/install:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util/strategicpatch:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", diff --git a/pkg/client/restclient/fake/BUILD b/pkg/client/restclient/fake/BUILD index 324f19efc67..6c4c2e8cc8e 100644 --- a/pkg/client/restclient/fake/BUILD +++ b/pkg/client/restclient/fake/BUILD @@ -14,7 +14,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", diff --git a/pkg/client/testing/core/BUILD b/pkg/client/testing/core/BUILD index 1847b2d2f41..9e6b75ed4d7 100644 --- a/pkg/client/testing/core/BUILD +++ b/pkg/client/testing/core/BUILD @@ -19,7 +19,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/version:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", diff --git a/pkg/client/typed/discovery/BUILD b/pkg/client/typed/discovery/BUILD index 088997062f5..dd9e7e96643 100644 --- a/pkg/client/typed/discovery/BUILD +++ b/pkg/client/typed/discovery/BUILD @@ -20,7 +20,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/version:go_default_library", "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/emicklei/go-restful/swagger", @@ -47,7 +46,6 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//vendor:github.com/emicklei/go-restful/swagger", "//vendor:github.com/stretchr/testify/assert", @@ -66,7 +64,6 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", diff --git a/pkg/client/typed/discovery/fake/BUILD b/pkg/client/typed/discovery/fake/BUILD index 25898989978..9d7817e8874 100644 --- a/pkg/client/typed/discovery/fake/BUILD +++ b/pkg/client/typed/discovery/fake/BUILD @@ -13,7 +13,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/version:go_default_library", "//vendor:github.com/emicklei/go-restful/swagger", diff --git a/pkg/client/typed/dynamic/BUILD b/pkg/client/typed/dynamic/BUILD index d88846e2e85..52027c59adf 100644 --- a/pkg/client/typed/dynamic/BUILD +++ b/pkg/client/typed/dynamic/BUILD @@ -19,7 +19,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", @@ -43,7 +42,6 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/pkg/client/unversioned/BUILD b/pkg/client/unversioned/BUILD index 574745ea395..868b5128a8a 100644 --- a/pkg/client/unversioned/BUILD +++ b/pkg/client/unversioned/BUILD @@ -24,7 +24,6 @@ go_library( "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//plugin/pkg/client/auth:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", @@ -42,7 +41,6 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/pkg/client/unversioned/auth/BUILD b/pkg/client/unversioned/auth/BUILD index fca21776113..b5006486719 100644 --- a/pkg/client/unversioned/auth/BUILD +++ b/pkg/client/unversioned/auth/BUILD @@ -12,7 +12,6 @@ go_library( name = "go_default_library", srcs = ["clientauth.go"], tags = ["automanaged"], - deps = ["//pkg/client/restclient:go_default_library"], ) go_test( diff --git a/pkg/client/unversioned/clientcmd/BUILD b/pkg/client/unversioned/clientcmd/BUILD index 324f62aedc1..695370947af 100644 --- a/pkg/client/unversioned/clientcmd/BUILD +++ b/pkg/client/unversioned/clientcmd/BUILD @@ -24,7 +24,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/auth:go_default_library", "//pkg/util/homedir:go_default_library", "//vendor:github.com/golang/glog", @@ -51,7 +50,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", "//vendor:github.com/ghodss/yaml", "//vendor:github.com/imdario/mergo", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/pkg/client/unversioned/portforward/BUILD b/pkg/client/unversioned/portforward/BUILD index 29cafd31d1d..f96dab6e15a 100644 --- a/pkg/client/unversioned/portforward/BUILD +++ b/pkg/client/unversioned/portforward/BUILD @@ -29,7 +29,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/remotecommand:go_default_library", "//pkg/kubelet/server/portforward:go_default_library", "//pkg/util/httpstream:go_default_library", diff --git a/pkg/client/unversioned/remotecommand/BUILD b/pkg/client/unversioned/remotecommand/BUILD index 7cdd440e724..7992f3ecef0 100644 --- a/pkg/client/unversioned/remotecommand/BUILD +++ b/pkg/client/unversioned/remotecommand/BUILD @@ -22,7 +22,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/httpstream:go_default_library", @@ -47,7 +46,6 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/util/httpstream:go_default_library", "//pkg/util/term:go_default_library", diff --git a/pkg/client/unversioned/testclient/simple/BUILD b/pkg/client/unversioned/testclient/simple/BUILD index 2dc10e1e45e..dfe8ab291ad 100644 --- a/pkg/client/unversioned/testclient/simple/BUILD +++ b/pkg/client/unversioned/testclient/simple/BUILD @@ -15,7 +15,6 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/fields", diff --git a/pkg/controller/BUILD b/pkg/controller/BUILD index 5a9af17bd98..e0525262b38 100644 --- a/pkg/controller/BUILD +++ b/pkg/controller/BUILD @@ -27,7 +27,6 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/serviceaccount:go_default_library", "//pkg/util/hash:go_default_library", "//vendor:github.com/golang/glog", @@ -60,7 +59,6 @@ go_test( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/securitycontext:go_default_library", "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", diff --git a/pkg/controller/endpoint/BUILD b/pkg/controller/endpoint/BUILD index 806803573c2..46f0029ce4c 100644 --- a/pkg/controller/endpoint/BUILD +++ b/pkg/controller/endpoint/BUILD @@ -49,7 +49,6 @@ go_test( "//pkg/api/v1/endpoints:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/util/testing:go_default_library", diff --git a/pkg/controller/garbagecollector/BUILD b/pkg/controller/garbagecollector/BUILD index c80addae2af..f1167070709 100644 --- a/pkg/controller/garbagecollector/BUILD +++ b/pkg/controller/garbagecollector/BUILD @@ -52,7 +52,6 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/install:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/controller/garbagecollector/metaonly:go_default_library", "//pkg/util/workqueue:go_default_library", diff --git a/pkg/controller/job/BUILD b/pkg/controller/job/BUILD index b613f51d7c8..5252747ba71 100644 --- a/pkg/controller/job/BUILD +++ b/pkg/controller/job/BUILD @@ -51,7 +51,6 @@ go_test( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", diff --git a/pkg/controller/namespace/BUILD b/pkg/controller/namespace/BUILD index b9e6e96933a..58adf5973e3 100644 --- a/pkg/controller/namespace/BUILD +++ b/pkg/controller/namespace/BUILD @@ -48,7 +48,6 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/typed/dynamic:go_default_library", diff --git a/pkg/controller/podautoscaler/BUILD b/pkg/controller/podautoscaler/BUILD index b6034cb19ca..cfb17821e64 100644 --- a/pkg/controller/podautoscaler/BUILD +++ b/pkg/controller/podautoscaler/BUILD @@ -54,7 +54,6 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller/podautoscaler/metrics:go_default_library", "//vendor:github.com/stretchr/testify/assert", diff --git a/pkg/controller/podautoscaler/metrics/BUILD b/pkg/controller/podautoscaler/metrics/BUILD index 06e019aa87b..a3a2fac0995 100644 --- a/pkg/controller/podautoscaler/metrics/BUILD +++ b/pkg/controller/podautoscaler/metrics/BUILD @@ -36,7 +36,6 @@ go_test( "//pkg/api/unversioned:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", diff --git a/pkg/controller/replicaset/BUILD b/pkg/controller/replicaset/BUILD index 0510d6b8385..1e2e5791791 100644 --- a/pkg/controller/replicaset/BUILD +++ b/pkg/controller/replicaset/BUILD @@ -53,7 +53,6 @@ go_test( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", diff --git a/pkg/controller/replication/BUILD b/pkg/controller/replication/BUILD index 0aa420b8fe2..6b9777dc740 100644 --- a/pkg/controller/replication/BUILD +++ b/pkg/controller/replication/BUILD @@ -50,7 +50,6 @@ go_test( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", diff --git a/pkg/controller/statefulset/BUILD b/pkg/controller/statefulset/BUILD index 566676670b0..5c4d8453739 100644 --- a/pkg/controller/statefulset/BUILD +++ b/pkg/controller/statefulset/BUILD @@ -66,7 +66,6 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/apps/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/testing:go_default_library", diff --git a/pkg/genericapiserver/server/BUILD b/pkg/genericapiserver/server/BUILD index 1e8bc26af7a..7950a9e0f52 100644 --- a/pkg/genericapiserver/server/BUILD +++ b/pkg/genericapiserver/server/BUILD @@ -67,7 +67,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/genericapiserver/authenticator:go_default_library", "//pkg/genericapiserver/authorizer:go_default_library", "//pkg/genericapiserver/endpoints:go_default_library", diff --git a/pkg/kubectl/BUILD b/pkg/kubectl/BUILD index b5f3d8ce271..9ad7bb3225c 100644 --- a/pkg/kubectl/BUILD +++ b/pkg/kubectl/BUILD @@ -78,7 +78,6 @@ go_library( "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/retry:go_default_library", "//pkg/client/unversioned:go_default_library", "//pkg/controller/deployment/util:go_default_library", @@ -165,7 +164,6 @@ go_test( "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller/deployment/util:go_default_library", diff --git a/pkg/kubectl/cmd/BUILD b/pkg/kubectl/cmd/BUILD index 0bcb68dce2e..3b9d065320a 100644 --- a/pkg/kubectl/cmd/BUILD +++ b/pkg/kubectl/cmd/BUILD @@ -72,7 +72,6 @@ go_library( "//pkg/apis/policy:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/unversioned:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", @@ -181,7 +180,6 @@ go_test( "//pkg/apis/batch:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/policy:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/kubectl:go_default_library", diff --git a/pkg/kubectl/cmd/set/BUILD b/pkg/kubectl/cmd/set/BUILD index 0b1cbd753f5..f37be78d1a7 100644 --- a/pkg/kubectl/cmd/set/BUILD +++ b/pkg/kubectl/cmd/set/BUILD @@ -52,7 +52,6 @@ go_test( "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/kubectl/cmd/testing:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", diff --git a/pkg/kubectl/cmd/testing/BUILD b/pkg/kubectl/cmd/testing/BUILD index 86d1bca40b2..df0a55b8dcf 100644 --- a/pkg/kubectl/cmd/testing/BUILD +++ b/pkg/kubectl/cmd/testing/BUILD @@ -17,7 +17,6 @@ go_library( "//pkg/api/testapi:go_default_library", "//pkg/api/validation:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/kubectl:go_default_library", diff --git a/pkg/kubectl/cmd/util/BUILD b/pkg/kubectl/cmd/util/BUILD index fce01360ab4..5277257ec05 100644 --- a/pkg/kubectl/cmd/util/BUILD +++ b/pkg/kubectl/cmd/util/BUILD @@ -34,7 +34,6 @@ go_library( "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/client/unversioned:go_default_library", @@ -88,7 +87,6 @@ go_test( "//pkg/api/validation:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/client/typed/discovery:go_default_library", diff --git a/pkg/kubectl/resource/BUILD b/pkg/kubectl/resource/BUILD index ceadd120fec..b25d27b79b6 100644 --- a/pkg/kubectl/resource/BUILD +++ b/pkg/kubectl/resource/BUILD @@ -25,7 +25,6 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:github.com/golang/glog", "//vendor:golang.org/x/text/encoding/unicode", "//vendor:golang.org/x/text/transform", diff --git a/pkg/kubelet/client/BUILD b/pkg/kubelet/client/BUILD index d6b57b7b651..6a8a33ba16a 100644 --- a/pkg/kubelet/client/BUILD +++ b/pkg/kubelet/client/BUILD @@ -14,7 +14,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util/node:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", @@ -31,10 +30,7 @@ go_test( tags = [ "automanaged", ], - deps = [ - "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - ], + deps = ["//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library"], ) filegroup( diff --git a/pkg/kubelet/server/streaming/BUILD b/pkg/kubelet/server/streaming/BUILD index 06a95fe96a9..16a59cf2152 100644 --- a/pkg/kubelet/server/streaming/BUILD +++ b/pkg/kubelet/server/streaming/BUILD @@ -38,7 +38,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/remotecommand:go_default_library", "//pkg/kubelet/api/v1alpha1/runtime:go_default_library", "//pkg/kubelet/server/portforward:go_default_library", diff --git a/pkg/master/BUILD b/pkg/master/BUILD index 763433e2dcd..8c1bbcb2b20 100644 --- a/pkg/master/BUILD +++ b/pkg/master/BUILD @@ -113,7 +113,6 @@ go_test( "//pkg/apis/rbac:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/generated/openapi:go_default_library", "//pkg/genericapiserver/server:go_default_library", diff --git a/pkg/registry/core/rest/BUILD b/pkg/registry/core/rest/BUILD index eab805776a5..0decae1776f 100644 --- a/pkg/registry/core/rest/BUILD +++ b/pkg/registry/core/rest/BUILD @@ -26,7 +26,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/genericapiserver/server:go_default_library", diff --git a/plugin/cmd/kube-scheduler/app/BUILD b/plugin/cmd/kube-scheduler/app/BUILD index 32cdca5332c..9973dcbd820 100644 --- a/plugin/cmd/kube-scheduler/app/BUILD +++ b/plugin/cmd/kube-scheduler/app/BUILD @@ -18,7 +18,6 @@ go_library( "//pkg/client/leaderelection:go_default_library", "//pkg/client/leaderelection/resourcelock:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/util/configz:go_default_library", "//plugin/cmd/kube-scheduler/app/options:go_default_library", diff --git a/plugin/pkg/admission/initialresources/BUILD b/plugin/pkg/admission/initialresources/BUILD index 855b31eb6cc..743fc59bf4e 100644 --- a/plugin/pkg/admission/initialresources/BUILD +++ b/plugin/pkg/admission/initialresources/BUILD @@ -21,7 +21,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//vendor:cloud.google.com/go/compute/metadata", "//vendor:github.com/golang/glog", diff --git a/plugin/pkg/client/auth/gcp/BUILD b/plugin/pkg/client/auth/gcp/BUILD index 4524742343b..75c3fd6e9ca 100644 --- a/plugin/pkg/client/auth/gcp/BUILD +++ b/plugin/pkg/client/auth/gcp/BUILD @@ -13,7 +13,6 @@ go_library( srcs = ["gcp.go"], tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", "//pkg/util/jsonpath:go_default_library", "//vendor:github.com/golang/glog", "//vendor:golang.org/x/net/context", diff --git a/plugin/pkg/client/auth/oidc/BUILD b/plugin/pkg/client/auth/oidc/BUILD index fdac035a6d0..c1c7059577a 100644 --- a/plugin/pkg/client/auth/oidc/BUILD +++ b/plugin/pkg/client/auth/oidc/BUILD @@ -13,7 +13,6 @@ go_library( srcs = ["oidc.go"], tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", "//vendor:github.com/coreos/go-oidc/jose", "//vendor:github.com/coreos/go-oidc/oauth2", "//vendor:github.com/coreos/go-oidc/oidc", diff --git a/plugin/pkg/scheduler/BUILD b/plugin/pkg/scheduler/BUILD index 0535c94ac55..7b6c6ada2be 100644 --- a/plugin/pkg/scheduler/BUILD +++ b/plugin/pkg/scheduler/BUILD @@ -22,7 +22,6 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util:go_default_library", "//pkg/util/hash:go_default_library", "//pkg/util/workqueue:go_default_library", diff --git a/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD b/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD index f76e56685c8..6f8ff6a8aac 100644 --- a/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD +++ b/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD @@ -35,7 +35,6 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util/testing:go_default_library", "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/api/latest:go_default_library", diff --git a/plugin/pkg/scheduler/api/BUILD b/plugin/pkg/scheduler/api/BUILD index 167b90d1b2d..e6533d4f87f 100644 --- a/plugin/pkg/scheduler/api/BUILD +++ b/plugin/pkg/scheduler/api/BUILD @@ -16,7 +16,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/plugin/pkg/scheduler/api/v1/BUILD b/plugin/pkg/scheduler/api/v1/BUILD index 1a55ca63137..855b5a5a384 100644 --- a/plugin/pkg/scheduler/api/v1/BUILD +++ b/plugin/pkg/scheduler/api/v1/BUILD @@ -16,7 +16,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//plugin/pkg/scheduler/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/plugin/pkg/scheduler/factory/BUILD b/plugin/pkg/scheduler/factory/BUILD index 24ba0d7c4ef..751d6711b3f 100644 --- a/plugin/pkg/scheduler/factory/BUILD +++ b/plugin/pkg/scheduler/factory/BUILD @@ -56,7 +56,6 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util/testing:go_default_library", "//plugin/pkg/scheduler/algorithm:go_default_library", "//plugin/pkg/scheduler/api:go_default_library", diff --git a/test/e2e/BUILD b/test/e2e/BUILD index 0b0c84ab762..63cc5f70564 100644 --- a/test/e2e/BUILD +++ b/test/e2e/BUILD @@ -120,7 +120,6 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers/aws:go_default_library", "//pkg/cloudprovider/providers/gce:go_default_library", diff --git a/test/e2e/framework/BUILD b/test/e2e/framework/BUILD index 5b4cf8c18dd..3b564f6731d 100644 --- a/test/e2e/framework/BUILD +++ b/test/e2e/framework/BUILD @@ -50,7 +50,6 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/conditions:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", diff --git a/test/e2e_federation/BUILD b/test/e2e_federation/BUILD index 50368e636d9..250d7591cdf 100644 --- a/test/e2e_federation/BUILD +++ b/test/e2e_federation/BUILD @@ -32,7 +32,6 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/util/intstr:go_default_library", "//test/e2e/common:go_default_library", diff --git a/test/e2e_federation/framework/BUILD b/test/e2e_federation/framework/BUILD index ca7e9003fc1..7ff540b449a 100644 --- a/test/e2e_federation/framework/BUILD +++ b/test/e2e_federation/framework/BUILD @@ -21,7 +21,6 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/api/validation:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//test/e2e/framework:go_default_library", "//vendor:github.com/onsi/ginkgo", diff --git a/test/e2e_node/services/BUILD b/test/e2e_node/services/BUILD index 254146bb837..905116de981 100644 --- a/test/e2e_node/services/BUILD +++ b/test/e2e_node/services/BUILD @@ -26,7 +26,6 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/controller/namespace:go_default_library", "//pkg/util/config:go_default_library", diff --git a/test/images/clusterapi-tester/BUILD b/test/images/clusterapi-tester/BUILD index 62a3729e278..969727beed2 100644 --- a/test/images/clusterapi-tester/BUILD +++ b/test/images/clusterapi-tester/BUILD @@ -21,7 +21,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", ], diff --git a/test/images/network-tester/BUILD b/test/images/network-tester/BUILD index b5f3d58d2e3..b0bad02aa77 100644 --- a/test/images/network-tester/BUILD +++ b/test/images/network-tester/BUILD @@ -20,7 +20,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], diff --git a/test/integration/framework/BUILD b/test/integration/framework/BUILD index 9bb6f6cca28..bacca6506ad 100644 --- a/test/integration/framework/BUILD +++ b/test/integration/framework/BUILD @@ -32,7 +32,6 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/replication:go_default_library", "//pkg/generated/openapi:go_default_library", diff --git a/test/integration/objectmeta/BUILD b/test/integration/objectmeta/BUILD index 38712fde353..ebff894a171 100644 --- a/test/integration/objectmeta/BUILD +++ b/test/integration/objectmeta/BUILD @@ -15,7 +15,6 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//test/integration/framework:go_default_library", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", diff --git a/test/integration/scheduler_perf/BUILD b/test/integration/scheduler_perf/BUILD index 06bdd784a73..a097424a81d 100644 --- a/test/integration/scheduler_perf/BUILD +++ b/test/integration/scheduler_perf/BUILD @@ -18,7 +18,6 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//plugin/pkg/scheduler:go_default_library", "//plugin/pkg/scheduler/algorithmprovider:go_default_library", "//plugin/pkg/scheduler/factory:go_default_library", diff --git a/test/soak/cauldron/BUILD b/test/soak/cauldron/BUILD index 3d9d0739e06..3cb3110a933 100644 --- a/test/soak/cauldron/BUILD +++ b/test/soak/cauldron/BUILD @@ -21,7 +21,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", diff --git a/test/soak/serve_hostnames/BUILD b/test/soak/serve_hostnames/BUILD index 1a3b5d7b8cf..f8512fefede 100644 --- a/test/soak/serve_hostnames/BUILD +++ b/test/soak/serve_hostnames/BUILD @@ -22,7 +22,6 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/util/intstr:go_default_library", "//test/e2e/framework:go_default_library", diff --git a/vendor/BUILD b/vendor/BUILD index 55a7e056c43..fd5e454a8fc 100644 --- a/vendor/BUILD +++ b/vendor/BUILD @@ -10290,7 +10290,10 @@ go_library( go_library( name = "k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi", - srcs = ["k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/common.go"], + srcs = [ + "k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/common.go", + "k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/doc.go", + ], tags = ["automanaged"], deps = [ "//vendor:github.com/emicklei/go-restful", @@ -11147,6 +11150,7 @@ go_library( tags = ["automanaged"], deps = [ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", @@ -11156,7 +11160,6 @@ go_library( "//vendor:k8s.io/client-go/pkg/api", "//vendor:k8s.io/client-go/pkg/api/v1", "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1", - "//vendor:k8s.io/client-go/pkg/fields", "//vendor:k8s.io/client-go/rest", ], ) @@ -11191,6 +11194,7 @@ go_library( tags = ["automanaged"], deps = [ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -11200,7 +11204,6 @@ go_library( "//vendor:k8s.io/client-go/pkg/api", "//vendor:k8s.io/client-go/pkg/api/v1", "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1", - "//vendor:k8s.io/client-go/pkg/fields", "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/testing", ], @@ -11475,6 +11478,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -11484,7 +11488,6 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/client-go/pkg/api/resource", - "//vendor:k8s.io/client-go/pkg/fields", "//vendor:k8s.io/client-go/pkg/util/intstr", "//vendor:k8s.io/client-go/pkg/util/labels", ], @@ -11595,6 +11598,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -11606,7 +11610,6 @@ go_library( "//vendor:k8s.io/client-go/pkg/api", "//vendor:k8s.io/client-go/pkg/api/resource", "//vendor:k8s.io/client-go/pkg/apis/extensions", - "//vendor:k8s.io/client-go/pkg/fields", "//vendor:k8s.io/client-go/pkg/util", "//vendor:k8s.io/client-go/pkg/util/intstr", "//vendor:k8s.io/client-go/pkg/util/parsers", @@ -12528,18 +12531,6 @@ go_library( ], ) -go_library( - name = "k8s.io/client-go/pkg/fields", - srcs = [ - "k8s.io/client-go/pkg/fields/doc.go", - "k8s.io/client-go/pkg/fields/fields.go", - "k8s.io/client-go/pkg/fields/requirements.go", - "k8s.io/client-go/pkg/fields/selector.go", - ], - tags = ["automanaged"], - deps = ["//vendor:k8s.io/apimachinery/pkg/selection"], -) - go_library( name = "k8s.io/client-go/pkg/kubelet/qos", srcs = [ @@ -12964,6 +12955,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -12975,7 +12967,6 @@ go_library( "//vendor:k8s.io/client-go/pkg/api", "//vendor:k8s.io/client-go/pkg/api/v1", "//vendor:k8s.io/client-go/pkg/api/validation/path", - "//vendor:k8s.io/client-go/pkg/fields", "//vendor:k8s.io/client-go/pkg/util/cert", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", "//vendor:k8s.io/client-go/pkg/version", @@ -13047,6 +13038,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -13054,7 +13046,6 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/pkg/api", "//vendor:k8s.io/client-go/pkg/api/v1", - "//vendor:k8s.io/client-go/pkg/fields", "//vendor:k8s.io/client-go/pkg/version", "//vendor:k8s.io/client-go/rest", ], @@ -13137,6 +13128,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -13155,7 +13147,6 @@ go_library( "//vendor:k8s.io/client-go/pkg/apis/rbac", "//vendor:k8s.io/client-go/pkg/apis/storage", "//vendor:k8s.io/client-go/pkg/apis/storage/v1beta1", - "//vendor:k8s.io/client-go/pkg/fields", "//vendor:k8s.io/client-go/pkg/util/clock", "//vendor:k8s.io/client-go/rest", ], @@ -13663,3 +13654,15 @@ go_library( tags = ["automanaged"], deps = ["//vendor:k8s.io/apimachinery/pkg/selection"], ) + +go_library( + name = "k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields", + srcs = [ + "k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/doc.go", + "k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/fields.go", + "k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/requirements.go", + "k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/selector.go", + ], + tags = ["automanaged"], + deps = ["//vendor:k8s.io/apimachinery/pkg/selection"], +) From ee6752ef20d588ea6ceeba8729c370ecd855e880 Mon Sep 17 00:00:00 2001 From: deads2k Date: Thu, 19 Jan 2017 13:27:59 -0500 Subject: [PATCH 4/7] find and replace --- BUILD.bazel | 1 + .../elasticsearch_logging_discovery.go | 2 +- cmd/cloud-controller-manager/app/BUILD | 1 + .../app/controllermanager.go | 2 +- cmd/kube-aggregator/pkg/apiserver/BUILD | 1 + .../pkg/apiserver/handler_proxy.go | 2 +- cmd/kube-aggregator/pkg/cmd/server/BUILD | 1 + cmd/kube-aggregator/pkg/cmd/server/start.go | 2 +- cmd/kube-controller-manager/app/BUILD | 3 +- .../app/controllermanager.go | 4 +- cmd/kubeadm/app/master/BUILD | 2 +- cmd/kubeadm/app/master/discovery.go | 2 +- cmd/kubeadm/app/node/BUILD | 3 +- cmd/kubeadm/app/node/bootstrap_test.go | 2 +- cmd/kubeadm/app/node/csr.go | 2 +- cmd/kubeadm/app/phases/certs/BUILD | 4 +- cmd/kubeadm/app/phases/certs/certs.go | 2 +- cmd/kubeadm/app/phases/certs/pki_helpers.go | 2 +- .../app/phases/certs/pki_helpers_test.go | 2 +- cmd/kubeadm/app/phases/kubeconfig/BUILD | 2 +- .../app/phases/kubeconfig/kubeconfig.go | 2 +- cmd/kubelet/app/BUILD | 3 +- cmd/kubelet/app/bootstrap.go | 4 +- cmd/kubelet/app/bootstrap_test.go | 2 +- cmd/kubelet/app/server.go | 6 +- cmd/kubemark/BUILD | 1 + cmd/kubemark/hollow-node.go | 2 +- .../test_internalclientset/BUILD | 5 +- .../test_internalclientset/clientset_test.go | 2 +- .../federation-controller-manager/app/BUILD | 1 + .../app/controllermanager.go | 2 +- .../pkg/federation-controller/cluster/BUILD | 2 + .../cluster/cluster_client.go | 2 +- .../cluster/clustercontroller_test.go | 2 +- .../pkg/federation-controller/service/BUILD | 1 + .../service/cluster_helper.go | 2 +- .../pkg/federation-controller/util/BUILD | 1 + .../util/cluster_util.go | 2 +- .../util/federated_informer.go | 2 +- federation/pkg/kubefed/init/BUILD | 4 +- federation/pkg/kubefed/init/init.go | 4 +- federation/pkg/kubefed/testing/BUILD | 1 + federation/pkg/kubefed/testing/testing.go | 2 +- pkg/client/cache/BUILD | 4 +- pkg/client/cache/listwatch.go | 2 +- pkg/client/cache/listwatch_test.go | 4 +- .../clientset_generated/clientset/BUILD | 1 - .../typed/core/v1/fake/fake_pod_expansion.go | 2 +- .../core/v1/fake/fake_service_expansion.go | 2 +- .../clientset/typed/core/v1/pod_expansion.go | 2 +- .../typed/core/v1/service_expansion.go | 2 +- .../clientset/typed/policy/v1alpha1/BUILD | 44 ----- .../clientset/typed/policy/v1alpha1/doc.go | 20 --- .../typed/policy/v1alpha1/fake/BUILD | 41 ----- .../typed/policy/v1alpha1/fake/doc.go | 20 --- .../v1alpha1/fake/fake_poddisruptionbudget.go | 128 ------------- .../v1alpha1/fake/fake_policy_client.go | 38 ---- .../policy/v1alpha1/generated_expansion.go | 19 -- .../policy/v1alpha1/poddisruptionbudget.go | 168 ------------------ .../typed/policy/v1alpha1/policy_client.go | 98 ---------- .../fake/fake_pod_expansion.go | 2 +- .../fake/fake_service_expansion.go | 2 +- .../core/internalversion/pod_expansion.go | 2 +- .../core/internalversion/service_expansion.go | 2 +- pkg/client/record/BUILD | 2 + pkg/client/record/event.go | 2 +- pkg/client/record/event_test.go | 2 +- pkg/client/restclient/fake/BUILD | 1 + pkg/client/restclient/fake/fake.go | 2 +- pkg/client/testing/core/BUILD | 1 + pkg/client/testing/core/fake.go | 2 +- pkg/client/testing/core/fixture.go | 2 +- pkg/client/typed/discovery/BUILD | 3 + .../typed/discovery/discovery_client.go | 2 +- .../typed/discovery/discovery_client_test.go | 2 +- pkg/client/typed/discovery/fake/BUILD | 1 + pkg/client/typed/discovery/fake/discovery.go | 2 +- .../typed/discovery/helper_blackbox_test.go | 2 +- pkg/client/typed/discovery/restmapper_test.go | 2 +- pkg/client/typed/dynamic/BUILD | 2 + pkg/client/typed/dynamic/client.go | 2 +- pkg/client/typed/dynamic/client_pool.go | 2 +- pkg/client/typed/dynamic/client_test.go | 2 +- pkg/client/unversioned/BUILD | 2 + pkg/client/unversioned/auth/BUILD | 1 + pkg/client/unversioned/auth/clientauth.go | 2 +- pkg/client/unversioned/clientcmd/BUILD | 2 + .../unversioned/clientcmd/client_config.go | 2 +- .../clientcmd/client_config_test.go | 2 +- pkg/client/unversioned/clientcmd/config.go | 2 +- pkg/client/unversioned/clientcmd/loader.go | 2 +- .../clientcmd/merged_client_builder.go | 2 +- .../clientcmd/merged_client_builder_test.go | 2 +- pkg/client/unversioned/helper.go | 2 +- pkg/client/unversioned/helper_test.go | 2 +- pkg/client/unversioned/portforward/BUILD | 1 + .../portforward/portforward_test.go | 2 +- pkg/client/unversioned/remotecommand/BUILD | 2 + .../remotecommand/remotecommand.go | 2 +- .../remotecommand/remotecommand_test.go | 2 +- .../unversioned/testclient/simple/BUILD | 3 +- .../testclient/simple/simple_testclient.go | 4 +- pkg/controller/BUILD | 4 +- pkg/controller/certificates/BUILD | 2 +- .../certificates/cfssl_signer_test.go | 2 +- pkg/controller/client_builder.go | 2 +- pkg/controller/controller_utils_test.go | 4 +- pkg/controller/endpoint/BUILD | 3 +- .../endpoint/endpoints_controller_test.go | 4 +- pkg/controller/garbagecollector/BUILD | 1 + .../garbagecollector/garbagecollector_test.go | 2 +- pkg/controller/job/BUILD | 1 + pkg/controller/job/jobcontroller_test.go | 2 +- pkg/controller/namespace/BUILD | 1 + .../namespace/namespace_controller_test.go | 2 +- pkg/controller/podautoscaler/BUILD | 1 + .../podautoscaler/horizontal_test.go | 2 +- pkg/controller/podautoscaler/metrics/BUILD | 1 + .../metrics/metrics_client_test.go | 2 +- .../podautoscaler/replica_calculator_test.go | 2 +- pkg/controller/replicaset/BUILD | 3 +- pkg/controller/replicaset/replica_set_test.go | 4 +- pkg/controller/replication/BUILD | 3 +- .../replication_controller_test.go | 4 +- pkg/controller/statefulset/BUILD | 3 +- .../statefulset/statefulpod_test.go | 4 +- pkg/genericapiserver/authenticator/BUILD | 2 +- .../authenticator/delegating.go | 2 +- pkg/genericapiserver/server/BUILD | 5 +- pkg/genericapiserver/server/config.go | 4 +- .../server/config_selfclient.go | 2 +- .../server/genericapiserver.go | 2 +- pkg/genericapiserver/server/hooks.go | 2 +- pkg/genericapiserver/server/options/BUILD | 2 +- .../server/options/serving.go | 2 +- pkg/genericapiserver/server/serve_test.go | 2 +- pkg/kubeapiserver/authenticator/BUILD | 2 +- pkg/kubeapiserver/authenticator/config.go | 2 +- pkg/kubectl/BUILD | 4 +- pkg/kubectl/cmd/BUILD | 2 + pkg/kubectl/cmd/annotate_test.go | 2 +- pkg/kubectl/cmd/attach.go | 2 +- pkg/kubectl/cmd/attach_test.go | 2 +- pkg/kubectl/cmd/cmd_test.go | 2 +- pkg/kubectl/cmd/delete_test.go | 2 +- pkg/kubectl/cmd/drain.go | 2 +- pkg/kubectl/cmd/exec.go | 2 +- pkg/kubectl/cmd/exec_test.go | 2 +- pkg/kubectl/cmd/get_test.go | 2 +- pkg/kubectl/cmd/label_test.go | 2 +- pkg/kubectl/cmd/logs.go | 2 +- pkg/kubectl/cmd/logs_test.go | 2 +- pkg/kubectl/cmd/portforward.go | 2 +- pkg/kubectl/cmd/run_test.go | 2 +- pkg/kubectl/cmd/set/BUILD | 1 + pkg/kubectl/cmd/set/set_image_test.go | 2 +- pkg/kubectl/cmd/testing/BUILD | 1 + pkg/kubectl/cmd/testing/fake.go | 2 +- pkg/kubectl/cmd/util/BUILD | 2 + pkg/kubectl/cmd/util/cached_discovery.go | 2 +- pkg/kubectl/cmd/util/cached_discovery_test.go | 2 +- pkg/kubectl/cmd/util/clientcache.go | 2 +- pkg/kubectl/cmd/util/factory.go | 2 +- pkg/kubectl/cmd/util/factory_client_access.go | 2 +- .../cmd/util/factory_object_mapping.go | 2 +- pkg/kubectl/interfaces.go | 2 +- pkg/kubectl/proxy_server.go | 2 +- pkg/kubectl/proxy_server_test.go | 2 +- pkg/kubectl/resource/BUILD | 3 +- pkg/kubectl/resource/builder_test.go | 2 +- pkg/kubectl/resource/interfaces.go | 2 +- pkg/kubectl/rolling_updater_test.go | 2 +- pkg/kubectl/secret_for_tls_test.go | 2 +- pkg/kubelet/BUILD | 2 +- pkg/kubelet/client/BUILD | 6 +- pkg/kubelet/client/kubelet_client.go | 2 +- pkg/kubelet/client/kubelet_client_test.go | 2 +- pkg/kubelet/config/BUILD | 2 +- pkg/kubelet/config/file_linux_test.go | 2 +- pkg/kubelet/config/http_test.go | 2 +- pkg/kubelet/network/cni/BUILD | 2 +- pkg/kubelet/network/cni/cni_test.go | 2 +- pkg/kubelet/rkt/BUILD | 2 +- pkg/kubelet/rkt/rkt_test.go | 2 +- pkg/kubelet/runonce_test.go | 2 +- pkg/kubelet/server/BUILD | 2 +- pkg/kubelet/server/server_test.go | 2 +- pkg/kubelet/server/streaming/BUILD | 1 + pkg/kubelet/server/streaming/server_test.go | 2 +- pkg/kubelet/util/csr/BUILD | 2 +- pkg/kubelet/util/csr/csr.go | 2 +- pkg/kubelet/volumemanager/BUILD | 2 +- .../volumemanager/volume_manager_test.go | 2 +- pkg/master/BUILD | 1 + pkg/master/master_test.go | 2 +- pkg/registry/core/rest/BUILD | 1 + pkg/registry/core/rest/storage_core.go | 2 +- pkg/util/BUILD | 2 - pkg/util/io/BUILD | 2 +- pkg/util/io/io_test.go | 2 +- pkg/volume/BUILD | 4 +- pkg/volume/aws_ebs/BUILD | 2 +- pkg/volume/aws_ebs/aws_ebs_test.go | 2 +- pkg/volume/azure_dd/BUILD | 2 +- pkg/volume/azure_dd/azure_dd_test.go | 2 +- pkg/volume/cephfs/BUILD | 2 +- pkg/volume/cephfs/cephfs_test.go | 2 +- pkg/volume/cinder/BUILD | 2 +- pkg/volume/cinder/cinder_test.go | 2 +- pkg/volume/downwardapi/BUILD | 2 +- pkg/volume/downwardapi/downwardapi_test.go | 2 +- pkg/volume/empty_dir/BUILD | 2 +- pkg/volume/empty_dir/empty_dir_test.go | 2 +- pkg/volume/fc/BUILD | 2 +- pkg/volume/fc/fc_test.go | 2 +- pkg/volume/flexvolume/BUILD | 2 +- pkg/volume/flexvolume/flexvolume_test.go | 2 +- pkg/volume/flocker/BUILD | 2 +- pkg/volume/flocker/flocker_test.go | 2 +- pkg/volume/flocker/flocker_volume_test.go | 2 +- pkg/volume/gce_pd/BUILD | 2 +- pkg/volume/gce_pd/gce_pd_test.go | 2 +- pkg/volume/glusterfs/BUILD | 2 +- pkg/volume/glusterfs/glusterfs_test.go | 2 +- pkg/volume/iscsi/BUILD | 2 +- pkg/volume/iscsi/iscsi_test.go | 2 +- pkg/volume/metrics_du_test.go | 2 +- pkg/volume/metrics_statfs_test.go | 2 +- pkg/volume/nfs/BUILD | 2 +- pkg/volume/nfs/nfs_test.go | 2 +- pkg/volume/photon_pd/BUILD | 2 +- pkg/volume/photon_pd/photon_pd_test.go | 2 +- pkg/volume/quobyte/BUILD | 2 +- pkg/volume/quobyte/quobyte_test.go | 2 +- pkg/volume/rbd/BUILD | 2 +- pkg/volume/rbd/rbd_test.go | 2 +- pkg/volume/testing/BUILD | 2 +- pkg/volume/testing/testing.go | 2 +- pkg/volume/util/BUILD | 2 +- pkg/volume/util/atomic_writer_test.go | 2 +- pkg/volume/vsphere_volume/BUILD | 2 +- .../vsphere_volume/vsphere_volume_test.go | 2 +- plugin/cmd/kube-scheduler/app/BUILD | 1 + plugin/cmd/kube-scheduler/app/server.go | 2 +- plugin/pkg/admission/initialresources/BUILD | 1 + .../admission/initialresources/hawkular.go | 2 +- .../authenticator/password/keystone/BUILD | 2 +- .../password/keystone/keystone.go | 2 +- .../pkg/auth/authenticator/token/oidc/BUILD | 2 +- .../pkg/auth/authenticator/token/oidc/oidc.go | 2 +- plugin/pkg/client/auth/gcp/BUILD | 1 + plugin/pkg/client/auth/gcp/gcp.go | 2 +- plugin/pkg/client/auth/oidc/BUILD | 1 + plugin/pkg/client/auth/oidc/oidc.go | 2 +- plugin/pkg/scheduler/BUILD | 1 + .../algorithmprovider/defaults/BUILD | 3 +- .../defaults/compatibility_test.go | 4 +- plugin/pkg/scheduler/api/BUILD | 1 + plugin/pkg/scheduler/api/types.go | 2 +- plugin/pkg/scheduler/api/v1/BUILD | 1 + plugin/pkg/scheduler/api/v1/types.go | 2 +- plugin/pkg/scheduler/extender.go | 2 +- plugin/pkg/scheduler/factory/BUILD | 3 +- plugin/pkg/scheduler/factory/factory_test.go | 4 +- .../client-go/pkg/util/cert/triple/BUILD | 12 +- .../client-go/pkg/util/cert/triple/triple.go | 2 +- .../pkg/util/flowcontrol/backoff_test.go | 2 +- test/e2e/BUILD | 1 + test/e2e/framework/exec_util.go | 2 +- test/e2e/framework/framework.go | 2 +- test/e2e/framework/util.go | 2 +- test/e2e/load.go | 2 +- test/e2e/service_latency.go | 2 +- test/e2e_federation/BUILD | 1 + test/e2e_federation/federation-util.go | 2 +- test/e2e_federation/framework/BUILD | 1 + test/e2e_federation/framework/util.go | 2 +- test/e2e_node/services/BUILD | 1 + .../e2e_node/services/namespace_controller.go | 2 +- test/images/clusterapi-tester/BUILD | 1 + test/images/clusterapi-tester/main.go | 2 +- test/images/network-tester/BUILD | 1 + test/images/network-tester/webserver.go | 2 +- test/integration/auth/accessreview_test.go | 2 +- test/integration/auth/rbac_test.go | 2 +- test/integration/client/client_test.go | 2 +- .../integration/client/dynamic_client_test.go | 2 +- test/integration/configmap/configmap_test.go | 2 +- test/integration/evictions/evictions_test.go | 2 +- test/integration/framework/BUILD | 1 + test/integration/framework/master_utils.go | 2 +- .../garbage_collector_test.go | 2 +- test/integration/master/master_test.go | 2 +- test/integration/metrics/metrics_test.go | 2 +- test/integration/objectmeta/BUILD | 1 + .../integration/objectmeta/objectmeta_test.go | 2 +- test/integration/pods/pods_test.go | 2 +- test/integration/quota/quota_test.go | 2 +- .../integration/replicaset/replicaset_test.go | 2 +- .../replicationcontroller_test.go | 2 +- test/integration/scheduler/extender_test.go | 2 +- test/integration/scheduler/scheduler_test.go | 2 +- test/integration/scheduler_perf/BUILD | 1 + test/integration/scheduler_perf/util.go | 2 +- test/integration/secrets/secrets_test.go | 2 +- .../serviceaccount/service_account_test.go | 2 +- .../storageclasses/storage_classes_test.go | 2 +- .../integration/thirdparty/thirdparty_test.go | 2 +- test/integration/volume/attach_detach_test.go | 2 +- .../volume/persistent_volumes_test.go | 2 +- test/soak/cauldron/BUILD | 1 + test/soak/cauldron/cauldron.go | 2 +- test/soak/serve_hostnames/BUILD | 1 + test/soak/serve_hostnames/serve_hostnames.go | 2 +- vendor/BUILD | 46 +++++ 315 files changed, 403 insertions(+), 860 deletions(-) delete mode 100644 pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD delete mode 100644 pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/doc.go delete mode 100644 pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD delete mode 100644 pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/doc.go delete mode 100644 pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go delete mode 100644 pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_policy_client.go delete mode 100644 pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/generated_expansion.go delete mode 100644 pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/poddisruptionbudget.go delete mode 100644 pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/policy_client.go diff --git a/BUILD.bazel b/BUILD.bazel index 339affffa45..8d9ce2fab5f 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -46,6 +46,7 @@ filegroup( "//hack:all-srcs", "//pkg:all-srcs", "//plugin:all-srcs", + "//staging/src/k8s.io/client-go/pkg/util/cert/triple:all-srcs", "//test:all-srcs", "//third_party:all-srcs", "//vendor:all-srcs", diff --git a/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go b/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go index 91610191270..569155cf0a4 100644 --- a/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go +++ b/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go @@ -24,9 +24,9 @@ import ( "time" "github.com/golang/glog" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" ) func flattenSubsets(subsets []api.EndpointSubset) []string { diff --git a/cmd/cloud-controller-manager/app/BUILD b/cmd/cloud-controller-manager/app/BUILD index 144f9b6a480..381a6e9ae39 100644 --- a/cmd/cloud-controller-manager/app/BUILD +++ b/cmd/cloud-controller-manager/app/BUILD @@ -34,6 +34,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/cloud-controller-manager/app/controllermanager.go b/cmd/cloud-controller-manager/app/controllermanager.go index fcde120a226..4dbbec9c45a 100644 --- a/cmd/cloud-controller-manager/app/controllermanager.go +++ b/cmd/cloud-controller-manager/app/controllermanager.go @@ -28,6 +28,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/cmd/cloud-controller-manager/app/options" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -35,7 +36,6 @@ import ( "k8s.io/kubernetes/pkg/client/leaderelection" "k8s.io/kubernetes/pkg/client/leaderelection/resourcelock" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller" diff --git a/cmd/kube-aggregator/pkg/apiserver/BUILD b/cmd/kube-aggregator/pkg/apiserver/BUILD index 251fc8d30cf..ee945be58c0 100644 --- a/cmd/kube-aggregator/pkg/apiserver/BUILD +++ b/cmd/kube-aggregator/pkg/apiserver/BUILD @@ -74,6 +74,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/transport", ], ) diff --git a/cmd/kube-aggregator/pkg/apiserver/handler_proxy.go b/cmd/kube-aggregator/pkg/apiserver/handler_proxy.go index f11a2f63af4..2f8a35ce67f 100644 --- a/cmd/kube-aggregator/pkg/apiserver/handler_proxy.go +++ b/cmd/kube-aggregator/pkg/apiserver/handler_proxy.go @@ -23,8 +23,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/transport" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" genericrest "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest" "k8s.io/kubernetes/pkg/util/httpstream/spdy" diff --git a/cmd/kube-aggregator/pkg/cmd/server/BUILD b/cmd/kube-aggregator/pkg/cmd/server/BUILD index cc2b9c027d0..f137ac892f5 100644 --- a/cmd/kube-aggregator/pkg/cmd/server/BUILD +++ b/cmd/kube-aggregator/pkg/cmd/server/BUILD @@ -29,6 +29,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/cmd/server/start.go b/cmd/kube-aggregator/pkg/cmd/server/start.go index 52699dacf27..cd6cb15d2d2 100644 --- a/cmd/kube-aggregator/pkg/cmd/server/start.go +++ b/cmd/kube-aggregator/pkg/cmd/server/start.go @@ -27,11 +27,11 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/legacy" "k8s.io/kubernetes/pkg/api" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" diff --git a/cmd/kube-controller-manager/app/BUILD b/cmd/kube-controller-manager/app/BUILD index fc00043bbb1..32b64137378 100644 --- a/cmd/kube-controller-manager/app/BUILD +++ b/cmd/kube-controller-manager/app/BUILD @@ -72,7 +72,6 @@ go_library( "//pkg/controller/volume/persistentvolume:go_default_library", "//pkg/quota/install:go_default_library", "//pkg/serviceaccount:go_default_library", - "//pkg/util/cert:go_default_library", "//pkg/util/config:go_default_library", "//pkg/util/configz:go_default_library", "//pkg/util/io:go_default_library", @@ -100,6 +99,8 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/pkg/util/cert", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index 826a8df435f..7f21b1d2cb9 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -36,6 +36,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/server/healthz" + certutil "k8s.io/client-go/pkg/util/cert" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/cmd/kube-controller-manager/app/options" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -43,7 +45,6 @@ import ( "k8s.io/kubernetes/pkg/client/leaderelection" "k8s.io/kubernetes/pkg/client/leaderelection/resourcelock" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/cloudprovider" @@ -56,7 +57,6 @@ import ( "k8s.io/kubernetes/pkg/controller/volume/attachdetach" persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/volume/persistentvolume" "k8s.io/kubernetes/pkg/serviceaccount" - certutil "k8s.io/kubernetes/pkg/util/cert" "k8s.io/kubernetes/pkg/util/configz" "github.com/golang/glog" diff --git a/cmd/kubeadm/app/master/BUILD b/cmd/kubeadm/app/master/BUILD index 10011ddc536..d2ffeb85f39 100644 --- a/cmd/kubeadm/app/master/BUILD +++ b/cmd/kubeadm/app/master/BUILD @@ -32,13 +32,13 @@ go_library( "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", - "//pkg/util/cert:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:github.com/blang/semver", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/pkg/util/cert", "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/cmd/kubeadm/app/master/discovery.go b/cmd/kubeadm/app/master/discovery.go index fda6ab81767..d6b9b0e8f9d 100644 --- a/cmd/kubeadm/app/master/discovery.go +++ b/cmd/kubeadm/app/master/discovery.go @@ -24,6 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + certutil "k8s.io/client-go/pkg/util/cert" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubeadmapiext "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" @@ -31,7 +32,6 @@ import ( "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - certutil "k8s.io/kubernetes/pkg/util/cert" ) type kubeDiscovery struct { diff --git a/cmd/kubeadm/app/node/BUILD b/cmd/kubeadm/app/node/BUILD index 53ccb872b47..a30ecb5d868 100644 --- a/cmd/kubeadm/app/node/BUILD +++ b/cmd/kubeadm/app/node/BUILD @@ -24,12 +24,12 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/kubelet/util/csr:go_default_library", - "//pkg/util/cert:go_default_library", "//vendor:github.com/square/go-jose", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/pkg/util/cert", "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) @@ -48,6 +48,7 @@ go_test( "//pkg/client/typed/discovery:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kubeadm/app/node/bootstrap_test.go b/cmd/kubeadm/app/node/bootstrap_test.go index 01deacb6685..e206c376a94 100644 --- a/cmd/kubeadm/app/node/bootstrap_test.go +++ b/cmd/kubeadm/app/node/bootstrap_test.go @@ -24,9 +24,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" ) diff --git a/cmd/kubeadm/app/node/csr.go b/cmd/kubeadm/app/node/csr.go index 70c203dbc1a..c472440691d 100644 --- a/cmd/kubeadm/app/node/csr.go +++ b/cmd/kubeadm/app/node/csr.go @@ -21,11 +21,11 @@ import ( "os" "k8s.io/apimachinery/pkg/types" + certutil "k8s.io/client-go/pkg/util/cert" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/kubelet/util/csr" - certutil "k8s.io/kubernetes/pkg/util/cert" ) // PerformTLSBootstrap executes a node certificate signing request. diff --git a/cmd/kubeadm/app/phases/certs/BUILD b/cmd/kubeadm/app/phases/certs/BUILD index 83b7f6da18e..21f563d1288 100644 --- a/cmd/kubeadm/app/phases/certs/BUILD +++ b/cmd/kubeadm/app/phases/certs/BUILD @@ -18,7 +18,7 @@ go_test( tags = ["automanaged"], deps = [ "//cmd/kubeadm/app/apis/kubeadm:go_default_library", - "//pkg/util/cert:go_default_library", + "//vendor:k8s.io/client-go/pkg/util/cert", ], ) @@ -33,7 +33,7 @@ go_library( deps = [ "//cmd/kubeadm/app/apis/kubeadm:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", - "//pkg/util/cert:go_default_library", + "//vendor:k8s.io/client-go/pkg/util/cert", ], ) diff --git a/cmd/kubeadm/app/phases/certs/certs.go b/cmd/kubeadm/app/phases/certs/certs.go index cd0396eb1b6..186c5d3998d 100644 --- a/cmd/kubeadm/app/phases/certs/certs.go +++ b/cmd/kubeadm/app/phases/certs/certs.go @@ -22,9 +22,9 @@ import ( "net" "os" + certutil "k8s.io/client-go/pkg/util/cert" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" - certutil "k8s.io/kubernetes/pkg/util/cert" ) // CreatePKIAssets will create and write to disk all PKI assets necessary to establish the control plane. diff --git a/cmd/kubeadm/app/phases/certs/pki_helpers.go b/cmd/kubeadm/app/phases/certs/pki_helpers.go index 0d33d7d6cc0..d97b427fd8d 100644 --- a/cmd/kubeadm/app/phases/certs/pki_helpers.go +++ b/cmd/kubeadm/app/phases/certs/pki_helpers.go @@ -22,7 +22,7 @@ import ( "fmt" "path" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/pkg/util/cert" ) func newCertificateAuthority() (*rsa.PrivateKey, *x509.Certificate, error) { diff --git a/cmd/kubeadm/app/phases/certs/pki_helpers_test.go b/cmd/kubeadm/app/phases/certs/pki_helpers_test.go index 3dd81ba27fa..a8d16d9bf94 100644 --- a/cmd/kubeadm/app/phases/certs/pki_helpers_test.go +++ b/cmd/kubeadm/app/phases/certs/pki_helpers_test.go @@ -24,7 +24,7 @@ import ( "os" "testing" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/pkg/util/cert" ) func TestNewCertificateAuthority(t *testing.T) { diff --git a/cmd/kubeadm/app/phases/kubeconfig/BUILD b/cmd/kubeadm/app/phases/kubeconfig/BUILD index b8df01aadb8..2cae35fc129 100644 --- a/cmd/kubeadm/app/phases/kubeconfig/BUILD +++ b/cmd/kubeadm/app/phases/kubeconfig/BUILD @@ -26,7 +26,7 @@ go_library( deps = [ "//cmd/kubeadm/app/phases/certs:go_default_library", "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/util/cert:go_default_library", + "//vendor:k8s.io/client-go/pkg/util/cert", "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go b/cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go index 1ea95a40b21..93ae3b39b8a 100644 --- a/cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go +++ b/cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go @@ -24,10 +24,10 @@ import ( "os" "path" + certutil "k8s.io/client-go/pkg/util/cert" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" certphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/certs" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - certutil "k8s.io/kubernetes/pkg/util/cert" ) const ( diff --git a/cmd/kubelet/app/BUILD b/cmd/kubelet/app/BUILD index e038171f0a9..8ce96840541 100644 --- a/cmd/kubelet/app/BUILD +++ b/cmd/kubelet/app/BUILD @@ -20,6 +20,7 @@ go_test( "//pkg/kubelet:go_default_library", "//pkg/util/config:go_default_library", "//vendor:k8s.io/apimachinery/pkg/util/diff", + "//vendor:k8s.io/client-go/rest", ], ) @@ -68,7 +69,6 @@ go_library( "//pkg/kubelet/server:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/kubelet/util/csr:go_default_library", - "//pkg/util/cert:go_default_library", "//pkg/util/config:go_default_library", "//pkg/util/configz:go_default_library", "//pkg/util/flock:go_default_library", @@ -116,6 +116,7 @@ go_library( "//vendor:k8s.io/client-go/kubernetes", "//vendor:k8s.io/client-go/kubernetes/typed/authentication/v1beta1", "//vendor:k8s.io/client-go/kubernetes/typed/authorization/v1beta1", + "//vendor:k8s.io/client-go/pkg/util/cert", "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/auth", "//vendor:k8s.io/client-go/tools/clientcmd", diff --git a/cmd/kubelet/app/bootstrap.go b/cmd/kubelet/app/bootstrap.go index e25f7439007..1d1ee9c27bd 100644 --- a/cmd/kubelet/app/bootstrap.go +++ b/cmd/kubelet/app/bootstrap.go @@ -26,12 +26,12 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/types" + certutil "k8s.io/client-go/pkg/util/cert" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/kubelet/util/csr" - certutil "k8s.io/kubernetes/pkg/util/cert" ) const ( diff --git a/cmd/kubelet/app/bootstrap_test.go b/cmd/kubelet/app/bootstrap_test.go index 6e827ab462f..9f60028eaa3 100644 --- a/cmd/kubelet/app/bootstrap_test.go +++ b/cmd/kubelet/app/bootstrap_test.go @@ -23,7 +23,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) func TestLoadRESTClientConfig(t *testing.T) { diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 9af9d2bec7f..1885d886c70 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -44,6 +44,9 @@ import ( "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/pkg/util/cert" + certutil "k8s.io/client-go/pkg/util/cert" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/cmd/kubelet/app/options" "k8s.io/kubernetes/pkg/api" @@ -55,7 +58,6 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/cloudprovider" @@ -68,8 +70,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/kubelet/server" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/util/cert" - certutil "k8s.io/kubernetes/pkg/util/cert" utilconfig "k8s.io/kubernetes/pkg/util/config" "k8s.io/kubernetes/pkg/util/configz" "k8s.io/kubernetes/pkg/util/flock" diff --git a/cmd/kubemark/BUILD b/cmd/kubemark/BUILD index 74069eef202..d0e1cbb3a72 100644 --- a/cmd/kubemark/BUILD +++ b/cmd/kubemark/BUILD @@ -36,6 +36,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:github.com/spf13/pflag", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kubemark/hollow-node.go b/cmd/kubemark/hollow-node.go index acb1b2e1c39..31effc693c5 100644 --- a/cmd/kubemark/hollow-node.go +++ b/cmd/kubemark/hollow-node.go @@ -20,12 +20,12 @@ import ( "fmt" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" _ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing" "k8s.io/kubernetes/pkg/kubelet/cm" diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD index 532392b91eb..7e7e8369c89 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD @@ -30,7 +30,10 @@ go_test( srcs = ["clientset_test.go"], library = ":go_default_library", tags = ["automanaged"], - deps = ["//vendor:k8s.io/client-go/pkg/util/flowcontrol"], + deps = [ + "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", + ], ) filegroup( diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go index 7a2c394a9fa..3a68be4a509 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go @@ -20,7 +20,7 @@ import ( "testing" "k8s.io/client-go/pkg/util/flowcontrol" - restclient "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) func ClientSetRateLimiterTest(t *testing.T) { diff --git a/federation/cmd/federation-controller-manager/app/BUILD b/federation/cmd/federation-controller-manager/app/BUILD index 25597707e34..4fd50233878 100644 --- a/federation/cmd/federation-controller-manager/app/BUILD +++ b/federation/cmd/federation-controller-manager/app/BUILD @@ -45,6 +45,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/cmd/federation-controller-manager/app/controllermanager.go b/federation/cmd/federation-controller-manager/app/controllermanager.go index cc667842dcf..9ff7b19efaf 100644 --- a/federation/cmd/federation-controller-manager/app/controllermanager.go +++ b/federation/cmd/federation-controller-manager/app/controllermanager.go @@ -29,6 +29,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/options" "k8s.io/kubernetes/federation/pkg/dnsprovider" @@ -42,7 +43,6 @@ import ( secretcontroller "k8s.io/kubernetes/federation/pkg/federation-controller/secret" servicecontroller "k8s.io/kubernetes/federation/pkg/federation-controller/service" "k8s.io/kubernetes/federation/pkg/federation-controller/util" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/util/configz" "k8s.io/kubernetes/pkg/version" diff --git a/federation/pkg/federation-controller/cluster/BUILD b/federation/pkg/federation-controller/cluster/BUILD index bb27fe5ce74..a3c6e790ff8 100644 --- a/federation/pkg/federation-controller/cluster/BUILD +++ b/federation/pkg/federation-controller/cluster/BUILD @@ -34,6 +34,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -51,6 +52,7 @@ go_test( "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/federation/pkg/federation-controller/cluster/cluster_client.go b/federation/pkg/federation-controller/cluster/cluster_client.go index 9a338453fea..9418fdd8b36 100644 --- a/federation/pkg/federation-controller/cluster/cluster_client.go +++ b/federation/pkg/federation-controller/cluster/cluster_client.go @@ -23,12 +23,12 @@ import ( "github.com/golang/glog" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/federation/pkg/federation-controller/util" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" ) diff --git a/federation/pkg/federation-controller/cluster/clustercontroller_test.go b/federation/pkg/federation-controller/cluster/clustercontroller_test.go index b827da5d2ef..ac1eeea1acd 100644 --- a/federation/pkg/federation-controller/cluster/clustercontroller_test.go +++ b/federation/pkg/federation-controller/cluster/clustercontroller_test.go @@ -24,13 +24,13 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" federationv1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" controllerutil "k8s.io/kubernetes/federation/pkg/federation-controller/util" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/util/uuid" ) diff --git a/federation/pkg/federation-controller/service/BUILD b/federation/pkg/federation-controller/service/BUILD index ec67967a13a..3ba4b610173 100644 --- a/federation/pkg/federation-controller/service/BUILD +++ b/federation/pkg/federation-controller/service/BUILD @@ -43,6 +43,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/pkg/federation-controller/service/cluster_helper.go b/federation/pkg/federation-controller/service/cluster_helper.go index 242678536c9..96c2676c31f 100644 --- a/federation/pkg/federation-controller/service/cluster_helper.go +++ b/federation/pkg/federation-controller/service/cluster_helper.go @@ -22,11 +22,11 @@ import ( pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/util/workqueue" "reflect" diff --git a/federation/pkg/federation-controller/util/BUILD b/federation/pkg/federation-controller/util/BUILD index c13628b29f4..810ccbd28c8 100644 --- a/federation/pkg/federation-controller/util/BUILD +++ b/federation/pkg/federation-controller/util/BUILD @@ -42,6 +42,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/federation/pkg/federation-controller/util/cluster_util.go b/federation/pkg/federation-controller/util/cluster_util.go index 5d8150a0df8..6c78485746a 100644 --- a/federation/pkg/federation-controller/util/cluster_util.go +++ b/federation/pkg/federation-controller/util/cluster_util.go @@ -26,12 +26,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" ) diff --git a/federation/pkg/federation-controller/util/federated_informer.go b/federation/pkg/federation-controller/util/federated_informer.go index 2ef0beb9a35..11ddb24ba77 100644 --- a/federation/pkg/federation-controller/util/federated_informer.go +++ b/federation/pkg/federation-controller/util/federated_informer.go @@ -24,12 +24,12 @@ import ( pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" apiv1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "github.com/golang/glog" ) diff --git a/federation/pkg/kubefed/init/BUILD b/federation/pkg/kubefed/init/BUILD index cf44e148eea..c5ea9b1a05a 100644 --- a/federation/pkg/kubefed/init/BUILD +++ b/federation/pkg/kubefed/init/BUILD @@ -22,13 +22,13 @@ go_library( "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/kubectl/cmd/templates:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", - "//pkg/util/cert:go_default_library", - "//pkg/util/cert/triple:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/version:go_default_library", "//vendor:github.com/spf13/cobra", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/pkg/util/cert", + "//vendor:k8s.io/client-go/pkg/util/cert/triple", "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/federation/pkg/kubefed/init/init.go b/federation/pkg/kubefed/init/init.go index 8e246ea6533..3b3c23aee35 100644 --- a/federation/pkg/kubefed/init/init.go +++ b/federation/pkg/kubefed/init/init.go @@ -38,6 +38,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + certutil "k8s.io/client-go/pkg/util/cert" + triple "k8s.io/client-go/pkg/util/cert/triple" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" kubeadmkubeconfigphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" "k8s.io/kubernetes/federation/pkg/kubefed/util" @@ -48,8 +50,6 @@ import ( "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" - certutil "k8s.io/kubernetes/pkg/util/cert" - triple "k8s.io/kubernetes/pkg/util/cert/triple" "k8s.io/kubernetes/pkg/util/intstr" "k8s.io/kubernetes/pkg/version" diff --git a/federation/pkg/kubefed/testing/BUILD b/federation/pkg/kubefed/testing/BUILD index b7286b31235..63060583c91 100644 --- a/federation/pkg/kubefed/testing/BUILD +++ b/federation/pkg/kubefed/testing/BUILD @@ -18,6 +18,7 @@ go_library( "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/federation/pkg/kubefed/testing/testing.go b/federation/pkg/kubefed/testing/testing.go index 2ffc9fdbfa4..c615135750d 100644 --- a/federation/pkg/kubefed/testing/testing.go +++ b/federation/pkg/kubefed/testing/testing.go @@ -24,11 +24,11 @@ import ( "os" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" fedclient "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/federation/pkg/kubefed/util" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/pkg/client/cache/BUILD b/pkg/client/cache/BUILD index 18e535f5065..948ad6aad44 100644 --- a/pkg/client/cache/BUILD +++ b/pkg/client/cache/BUILD @@ -57,6 +57,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/pkg/util/clock", + "//vendor:k8s.io/client-go/rest", ], ) @@ -85,7 +86,6 @@ go_test( "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/testing/cache:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/google/gofuzz", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", @@ -96,6 +96,8 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/pkg/util/clock", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/cache/listwatch.go b/pkg/client/cache/listwatch.go index c86a4bc38dc..3bd3b1e3353 100644 --- a/pkg/client/cache/listwatch.go +++ b/pkg/client/cache/listwatch.go @@ -23,9 +23,9 @@ import ( "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) // ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource. diff --git a/pkg/client/cache/listwatch_test.go b/pkg/client/cache/listwatch_test.go index f32afe1b780..2f5b04969d1 100644 --- a/pkg/client/cache/listwatch_test.go +++ b/pkg/client/cache/listwatch_test.go @@ -26,12 +26,12 @@ import ( "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + utiltesting "k8s.io/client-go/pkg/util/testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func parseSelectorOrDie(s string) fields.Selector { diff --git a/pkg/client/clientset_generated/clientset/BUILD b/pkg/client/clientset_generated/clientset/BUILD index 9675803ac42..25f5456aeb0 100644 --- a/pkg/client/clientset_generated/clientset/BUILD +++ b/pkg/client/clientset_generated/clientset/BUILD @@ -70,7 +70,6 @@ filegroup( "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/core/v1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:all-srcs", - "//pkg/client/clientset_generated/clientset/typed/policy/v1alpha1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:all-srcs", diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod_expansion.go b/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod_expansion.go index 6180bb4e275..e215baf25fa 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod_expansion.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod_expansion.go @@ -17,9 +17,9 @@ limitations under the License. package fake import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" ) diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service_expansion.go b/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service_expansion.go index 978585f670b..51d6fa8d3fd 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service_expansion.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service_expansion.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/testing/core" ) diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go b/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go index 14f8bf31517..d91af537af7 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go @@ -17,10 +17,10 @@ limitations under the License. package v1 import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1" - "k8s.io/kubernetes/pkg/client/restclient" ) // The PodExpansion interface allows manually adding extra methods to the PodInterface. diff --git a/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go b/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go index 03dca75aa3a..d2bb531d765 100644 --- a/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go +++ b/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go @@ -18,7 +18,7 @@ package v1 import ( "k8s.io/apimachinery/pkg/util/net" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) // The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface. diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD deleted file mode 100644 index 20539557167..00000000000 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "poddisruptionbudget.go", - "policy_client.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/apis/policy/v1alpha1:go_default_library", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", - "//vendor:k8s.io/apimachinery/pkg/types", - "//vendor:k8s.io/apimachinery/pkg/watch", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/doc.go b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/doc.go deleted file mode 100644 index cc29c4754ca..00000000000 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD deleted file mode 100644 index 3b05acf9dae..00000000000 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_poddisruptionbudget.go", - "fake_policy_client.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api/v1:go_default_library", - "//pkg/apis/policy/v1alpha1:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/policy/v1alpha1:go_default_library", - "//pkg/client/testing/core:go_default_library", - "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/types", - "//vendor:k8s.io/apimachinery/pkg/watch", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/doc.go b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/doc.go deleted file mode 100644 index 63fc5d297a7..00000000000 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go deleted file mode 100644 index 5a6216219a2..00000000000 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - labels "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" - v1alpha1 "k8s.io/kubernetes/pkg/apis/policy/v1alpha1" - core "k8s.io/kubernetes/pkg/client/testing/core" -) - -// FakePodDisruptionBudgets implements PodDisruptionBudgetInterface -type FakePodDisruptionBudgets struct { - Fake *FakePolicyV1alpha1 - ns string -} - -var poddisruptionbudgetsResource = schema.GroupVersionResource{Group: "policy", Version: "v1alpha1", Resource: "poddisruptionbudgets"} - -func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(core.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(core.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) { - obj, err := c.Fake. - Invokes(core.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(core.NewDeleteAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{}) - - return err -} - -func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := core.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.PodDisruptionBudgetList{}) - return err -} - -func (c *FakePodDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(core.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) { - obj, err := c.Fake. - Invokes(core.NewListAction(poddisruptionbudgetsResource, c.ns, opts), &v1alpha1.PodDisruptionBudgetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := core.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.PodDisruptionBudgetList{} - for _, item := range obj.(*v1alpha1.PodDisruptionBudgetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *FakePodDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(core.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) - -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(core.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_policy_client.go b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_policy_client.go deleted file mode 100644 index 9c6f37407ee..00000000000 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_policy_client.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - v1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" - core "k8s.io/kubernetes/pkg/client/testing/core" -) - -type FakePolicyV1alpha1 struct { - *core.Fake -} - -func (c *FakePolicyV1alpha1) PodDisruptionBudgets(namespace string) v1alpha1.PodDisruptionBudgetInterface { - return &FakePodDisruptionBudgets{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakePolicyV1alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/generated_expansion.go b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/generated_expansion.go deleted file mode 100644 index a2e74c84dff..00000000000 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -type PodDisruptionBudgetExpansion interface{} diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/poddisruptionbudget.go b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/poddisruptionbudget.go deleted file mode 100644 index e2a03917e96..00000000000 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/poddisruptionbudget.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" - v1alpha1 "k8s.io/kubernetes/pkg/apis/policy/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" -) - -// PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. -// A group's client should implement this interface. -type PodDisruptionBudgetsGetter interface { - PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface -} - -// PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. -type PodDisruptionBudgetInterface interface { - Create(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Update(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - UpdateStatus(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string) (*v1alpha1.PodDisruptionBudget, error) - List(opts v1.ListOptions) (*v1alpha1.PodDisruptionBudgetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) - PodDisruptionBudgetExpansion -} - -// podDisruptionBudgets implements PodDisruptionBudgetInterface -type podDisruptionBudgets struct { - client restclient.Interface - ns string -} - -// newPodDisruptionBudgets returns a PodDisruptionBudgets -func newPodDisruptionBudgets(c *PolicyV1alpha1Client, namespace string) *podDisruptionBudgets { - return &podDisruptionBudgets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Post(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - SubResource("status"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&listOptions, api.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *podDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) { - result = &v1alpha1.PodDisruptionBudgetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.client.Get(). - Prefix("watch"). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). - Watch() -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/policy_client.go b/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/policy_client.go deleted file mode 100644 index 989faf1b8a7..00000000000 --- a/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/policy_client.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - fmt "fmt" - - "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" -) - -type PolicyV1alpha1Interface interface { - RESTClient() restclient.Interface - PodDisruptionBudgetsGetter -} - -// PolicyV1alpha1Client is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group. -type PolicyV1alpha1Client struct { - restClient restclient.Interface -} - -func (c *PolicyV1alpha1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { - return newPodDisruptionBudgets(c, namespace) -} - -// NewForConfig creates a new PolicyV1alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*PolicyV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := restclient.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &PolicyV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new PolicyV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *PolicyV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new PolicyV1alpha1Client for the given RESTClient. -func New(c restclient.Interface) *PolicyV1alpha1Client { - return &PolicyV1alpha1Client{c} -} - -func setConfigDefaults(config *restclient.Config) error { - gv, err := schema.ParseGroupVersion("policy/v1alpha1") - if err != nil { - return err - } - // if policy/v1alpha1 is not enabled, return an error - if !api.Registry.IsEnabledVersion(gv) { - return fmt.Errorf("policy/v1alpha1 is not enabled") - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() - } - copyGroupVersion := gv - config.GroupVersion = ©GroupVersion - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *PolicyV1alpha1Client) RESTClient() restclient.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go index 26343982c59..9ae5c27e2d1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go index 978585f670b..51d6fa8d3fd 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/testing/core" ) diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go index be7dd3a711a..d6ea139a46b 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go @@ -17,8 +17,8 @@ limitations under the License. package internalversion import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" ) // The PodExpansion interface allows manually adding extra methods to the PodInterface. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go index 45d928bdc98..85d2c7207db 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go @@ -18,7 +18,7 @@ package internalversion import ( "k8s.io/apimachinery/pkg/util/net" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) // The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface. diff --git a/pkg/client/record/BUILD b/pkg/client/record/BUILD index 4e6d1779a3a..4ee4681241b 100644 --- a/pkg/client/record/BUILD +++ b/pkg/client/record/BUILD @@ -29,6 +29,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/pkg/util/clock", + "//vendor:k8s.io/client-go/rest", ], ) @@ -49,6 +50,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/client-go/pkg/util/clock", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/record/event.go b/pkg/client/record/event.go index 85eae35ec49..e9dc0317c88 100644 --- a/pkg/client/record/event.go +++ b/pkg/client/record/event.go @@ -27,8 +27,8 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/util/clock" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "net/http" diff --git a/pkg/client/record/event_test.go b/pkg/client/record/event_test.go index 01faca26fc3..1322ee9b4b6 100644 --- a/pkg/client/record/event_test.go +++ b/pkg/client/record/event_test.go @@ -29,9 +29,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/pkg/util/clock" + restclient "k8s.io/client-go/rest" _ "k8s.io/kubernetes/pkg/api/install" // To register api.Pod used in tests below "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/util/strategicpatch" ) diff --git a/pkg/client/restclient/fake/BUILD b/pkg/client/restclient/fake/BUILD index 6c4c2e8cc8e..3893ccc093c 100644 --- a/pkg/client/restclient/fake/BUILD +++ b/pkg/client/restclient/fake/BUILD @@ -18,6 +18,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/restclient/fake/fake.go b/pkg/client/restclient/fake/fake.go index 8fb4a9cbd49..835829583b1 100644 --- a/pkg/client/restclient/fake/fake.go +++ b/pkg/client/restclient/fake/fake.go @@ -26,9 +26,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/pkg/util/flowcontrol" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" ) func CreateHTTPClient(roundTripper func(*http.Request) (*http.Response, error)) *http.Client { diff --git a/pkg/client/testing/core/BUILD b/pkg/client/testing/core/BUILD index 9e6b75ed4d7..4b880bed6a0 100644 --- a/pkg/client/testing/core/BUILD +++ b/pkg/client/testing/core/BUILD @@ -29,6 +29,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/version", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/testing/core/fake.go b/pkg/client/testing/core/fake.go index 3ec8561525c..75adc857bc8 100644 --- a/pkg/client/testing/core/fake.go +++ b/pkg/client/testing/core/fake.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" kubeversion "k8s.io/kubernetes/pkg/version" ) diff --git a/pkg/client/testing/core/fixture.go b/pkg/client/testing/core/fixture.go index a7585e8fa74..3058bdcceb9 100644 --- a/pkg/client/testing/core/fixture.go +++ b/pkg/client/testing/core/fixture.go @@ -26,8 +26,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" ) // ObjectTracker keeps track of objects. It is intended to be used to diff --git a/pkg/client/typed/discovery/BUILD b/pkg/client/typed/discovery/BUILD index dd9e7e96643..49e5a739629 100644 --- a/pkg/client/typed/discovery/BUILD +++ b/pkg/client/typed/discovery/BUILD @@ -32,6 +32,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/client-go/rest", ], ) @@ -54,6 +55,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/client-go/rest", ], ) @@ -70,6 +72,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/typed/discovery/discovery_client.go b/pkg/client/typed/discovery/discovery_client.go index 0565a9b23d8..110efed099e 100644 --- a/pkg/client/typed/discovery/discovery_client.go +++ b/pkg/client/typed/discovery/discovery_client.go @@ -31,9 +31,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) // defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources). diff --git a/pkg/client/typed/discovery/discovery_client_test.go b/pkg/client/typed/discovery/discovery_client_test.go index 80d72f0c641..26b2f95075f 100644 --- a/pkg/client/typed/discovery/discovery_client_test.go +++ b/pkg/client/typed/discovery/discovery_client_test.go @@ -29,8 +29,8 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) func TestGetServerVersion(t *testing.T) { diff --git a/pkg/client/typed/discovery/fake/BUILD b/pkg/client/typed/discovery/fake/BUILD index 9d7817e8874..db9205340fb 100644 --- a/pkg/client/typed/discovery/fake/BUILD +++ b/pkg/client/typed/discovery/fake/BUILD @@ -19,6 +19,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/typed/discovery/fake/discovery.go b/pkg/client/typed/discovery/fake/discovery.go index b1de695280a..fdbbc16fe0b 100644 --- a/pkg/client/typed/discovery/fake/discovery.go +++ b/pkg/client/typed/discovery/fake/discovery.go @@ -24,8 +24,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" kubeversion "k8s.io/kubernetes/pkg/version" ) diff --git a/pkg/client/typed/discovery/helper_blackbox_test.go b/pkg/client/typed/discovery/helper_blackbox_test.go index bbd03be7e58..8be9a83f991 100644 --- a/pkg/client/typed/discovery/helper_blackbox_test.go +++ b/pkg/client/typed/discovery/helper_blackbox_test.go @@ -31,9 +31,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/discovery" ) diff --git a/pkg/client/typed/discovery/restmapper_test.go b/pkg/client/typed/discovery/restmapper_test.go index 39b4afdc5a2..880c5214e90 100644 --- a/pkg/client/typed/discovery/restmapper_test.go +++ b/pkg/client/typed/discovery/restmapper_test.go @@ -24,8 +24,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" "github.com/emicklei/go-restful/swagger" diff --git a/pkg/client/typed/dynamic/BUILD b/pkg/client/typed/dynamic/BUILD index 52027c59adf..bba04e7ba4e 100644 --- a/pkg/client/typed/dynamic/BUILD +++ b/pkg/client/typed/dynamic/BUILD @@ -29,6 +29,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/rest", ], ) @@ -49,6 +50,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/rest/watch", ], ) diff --git a/pkg/client/typed/dynamic/client.go b/pkg/client/typed/dynamic/client.go index d2601003f9e..39851a974f4 100644 --- a/pkg/client/typed/dynamic/client.go +++ b/pkg/client/typed/dynamic/client.go @@ -35,9 +35,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/util/flowcontrol" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) // Client is a Kubernetes client that allows you to access metadata diff --git a/pkg/client/typed/dynamic/client_pool.go b/pkg/client/typed/dynamic/client_pool.go index 8b06a1a1777..205d8a0d518 100644 --- a/pkg/client/typed/dynamic/client_pool.go +++ b/pkg/client/typed/dynamic/client_pool.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) // ClientPool manages a pool of dynamic clients. diff --git a/pkg/client/typed/dynamic/client_test.go b/pkg/client/typed/dynamic/client_test.go index 9166256df35..6045622fdca 100644 --- a/pkg/client/typed/dynamic/client_test.go +++ b/pkg/client/typed/dynamic/client_test.go @@ -32,9 +32,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/streaming" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" restclientwatch "k8s.io/client-go/rest/watch" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) func getJSON(version, kind, name string) []byte { diff --git a/pkg/client/unversioned/BUILD b/pkg/client/unversioned/BUILD index 868b5128a8a..6bf47063c0e 100644 --- a/pkg/client/unversioned/BUILD +++ b/pkg/client/unversioned/BUILD @@ -30,6 +30,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -44,6 +45,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/unversioned/auth/BUILD b/pkg/client/unversioned/auth/BUILD index b5006486719..eb351c89feb 100644 --- a/pkg/client/unversioned/auth/BUILD +++ b/pkg/client/unversioned/auth/BUILD @@ -12,6 +12,7 @@ go_library( name = "go_default_library", srcs = ["clientauth.go"], tags = ["automanaged"], + deps = ["//vendor:k8s.io/client-go/rest"], ) go_test( diff --git a/pkg/client/unversioned/auth/clientauth.go b/pkg/client/unversioned/auth/clientauth.go index 128597f93a6..2213b987816 100644 --- a/pkg/client/unversioned/auth/clientauth.go +++ b/pkg/client/unversioned/auth/clientauth.go @@ -68,7 +68,7 @@ import ( "io/ioutil" "os" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) // Info holds Kubernetes API authorization config. It is intended diff --git a/pkg/client/unversioned/clientcmd/BUILD b/pkg/client/unversioned/clientcmd/BUILD index 695370947af..d97075135c3 100644 --- a/pkg/client/unversioned/clientcmd/BUILD +++ b/pkg/client/unversioned/clientcmd/BUILD @@ -34,6 +34,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/validation", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/clientcmd/api", "//vendor:k8s.io/client-go/tools/clientcmd/api/latest", ], @@ -54,6 +55,7 @@ go_test( "//vendor:github.com/imdario/mergo", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/errors", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/clientcmd/api", "//vendor:k8s.io/client-go/tools/clientcmd/api/latest", ], diff --git a/pkg/client/unversioned/clientcmd/client_config.go b/pkg/client/unversioned/clientcmd/client_config.go index e8716386270..4185b23d841 100644 --- a/pkg/client/unversioned/clientcmd/client_config.go +++ b/pkg/client/unversioned/clientcmd/client_config.go @@ -27,9 +27,9 @@ import ( "github.com/golang/glog" "github.com/imdario/mergo" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth" ) diff --git a/pkg/client/unversioned/clientcmd/client_config_test.go b/pkg/client/unversioned/clientcmd/client_config_test.go index 43008d24b4b..0cbff3f8efa 100644 --- a/pkg/client/unversioned/clientcmd/client_config_test.go +++ b/pkg/client/unversioned/clientcmd/client_config_test.go @@ -24,8 +24,8 @@ import ( "testing" "github.com/imdario/mergo" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/kubernetes/pkg/client/restclient" ) func TestOldMergoLib(t *testing.T) { diff --git a/pkg/client/unversioned/clientcmd/config.go b/pkg/client/unversioned/clientcmd/config.go index 28f5b795dc7..16ccdaf20a2 100644 --- a/pkg/client/unversioned/clientcmd/config.go +++ b/pkg/client/unversioned/clientcmd/config.go @@ -26,8 +26,8 @@ import ( "github.com/golang/glog" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/kubernetes/pkg/client/restclient" ) // ConfigAccess is used by subcommands and methods in this package to load and modify the appropriate config files diff --git a/pkg/client/unversioned/clientcmd/loader.go b/pkg/client/unversioned/clientcmd/loader.go index 9d121585e69..99e607abc52 100644 --- a/pkg/client/unversioned/clientcmd/loader.go +++ b/pkg/client/unversioned/clientcmd/loader.go @@ -33,9 +33,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" clientcmdlatest "k8s.io/client-go/tools/clientcmd/api/latest" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/util/homedir" ) diff --git a/pkg/client/unversioned/clientcmd/merged_client_builder.go b/pkg/client/unversioned/clientcmd/merged_client_builder.go index 30c618bbf9a..92c1a5a0061 100644 --- a/pkg/client/unversioned/clientcmd/merged_client_builder.go +++ b/pkg/client/unversioned/clientcmd/merged_client_builder.go @@ -22,8 +22,8 @@ import ( "github.com/golang/glog" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/kubernetes/pkg/client/restclient" ) // DeferredLoadingClientConfig is a ClientConfig interface that is backed by a client config loader. diff --git a/pkg/client/unversioned/clientcmd/merged_client_builder_test.go b/pkg/client/unversioned/clientcmd/merged_client_builder_test.go index ace3679dd3b..8b0386764d5 100644 --- a/pkg/client/unversioned/clientcmd/merged_client_builder_test.go +++ b/pkg/client/unversioned/clientcmd/merged_client_builder_test.go @@ -20,8 +20,8 @@ import ( "fmt" "testing" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/kubernetes/pkg/client/restclient" ) type testLoader struct { diff --git a/pkg/client/unversioned/helper.go b/pkg/client/unversioned/helper.go index 7ab52346c92..6d2abc62ffd 100644 --- a/pkg/client/unversioned/helper.go +++ b/pkg/client/unversioned/helper.go @@ -17,8 +17,8 @@ limitations under the License. package unversioned import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" // Import solely to initialize client auth plugins. _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) diff --git a/pkg/client/unversioned/helper_test.go b/pkg/client/unversioned/helper_test.go index 4428b3376c4..3e884accaa6 100644 --- a/pkg/client/unversioned/helper_test.go +++ b/pkg/client/unversioned/helper_test.go @@ -26,9 +26,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" ) func TestSetKubernetesDefaults(t *testing.T) { diff --git a/pkg/client/unversioned/portforward/BUILD b/pkg/client/unversioned/portforward/BUILD index f96dab6e15a..a549554e882 100644 --- a/pkg/client/unversioned/portforward/BUILD +++ b/pkg/client/unversioned/portforward/BUILD @@ -33,6 +33,7 @@ go_test( "//pkg/kubelet/server/portforward:go_default_library", "//pkg/util/httpstream:go_default_library", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/unversioned/portforward/portforward_test.go b/pkg/client/unversioned/portforward/portforward_test.go index 52ab89a56ef..9fec3427132 100644 --- a/pkg/client/unversioned/portforward/portforward_test.go +++ b/pkg/client/unversioned/portforward/portforward_test.go @@ -32,7 +32,7 @@ import ( "time" "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" "k8s.io/kubernetes/pkg/kubelet/server/portforward" "k8s.io/kubernetes/pkg/util/httpstream" diff --git a/pkg/client/unversioned/remotecommand/BUILD b/pkg/client/unversioned/remotecommand/BUILD index 7992f3ecef0..b39f0684530 100644 --- a/pkg/client/unversioned/remotecommand/BUILD +++ b/pkg/client/unversioned/remotecommand/BUILD @@ -30,6 +30,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/runtime", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/transport", ], ) @@ -53,6 +54,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/unversioned/remotecommand/remotecommand.go b/pkg/client/unversioned/remotecommand/remotecommand.go index dd4fd5ed6e4..1086f369134 100644 --- a/pkg/client/unversioned/remotecommand/remotecommand.go +++ b/pkg/client/unversioned/remotecommand/remotecommand.go @@ -24,8 +24,8 @@ import ( "github.com/golang/glog" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/transport" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" "k8s.io/kubernetes/pkg/util/httpstream" "k8s.io/kubernetes/pkg/util/httpstream/spdy" diff --git a/pkg/client/unversioned/remotecommand/remotecommand_test.go b/pkg/client/unversioned/remotecommand/remotecommand_test.go index be6cf93afab..1d4886e7889 100644 --- a/pkg/client/unversioned/remotecommand/remotecommand_test.go +++ b/pkg/client/unversioned/remotecommand/remotecommand_test.go @@ -33,9 +33,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" "k8s.io/kubernetes/pkg/util/httpstream" "k8s.io/kubernetes/pkg/util/term" diff --git a/pkg/client/unversioned/testclient/simple/BUILD b/pkg/client/unversioned/testclient/simple/BUILD index dfe8ab291ad..525e69cf69d 100644 --- a/pkg/client/unversioned/testclient/simple/BUILD +++ b/pkg/client/unversioned/testclient/simple/BUILD @@ -15,11 +15,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/unversioned/testclient/simple/simple_testclient.go b/pkg/client/unversioned/testclient/simple/simple_testclient.go index dcfa826c84c..d94d1d40e58 100644 --- a/pkg/client/unversioned/testclient/simple/simple_testclient.go +++ b/pkg/client/unversioned/testclient/simple/simple_testclient.go @@ -28,11 +28,11 @@ import ( "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + utiltesting "k8s.io/client-go/pkg/util/testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) const NameRequiredError = "resource name may not be empty" diff --git a/pkg/controller/BUILD b/pkg/controller/BUILD index e0525262b38..01645f2053b 100644 --- a/pkg/controller/BUILD +++ b/pkg/controller/BUILD @@ -44,6 +44,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authentication/serviceaccount", "//vendor:k8s.io/client-go/pkg/util/clock", "//vendor:k8s.io/client-go/pkg/util/integer", + "//vendor:k8s.io/client-go/rest", ], ) @@ -60,12 +61,13 @@ go_test( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/client-go/pkg/util/clock", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/controller/certificates/BUILD b/pkg/controller/certificates/BUILD index 830857c9d30..8fabac0c5ef 100644 --- a/pkg/controller/certificates/BUILD +++ b/pkg/controller/certificates/BUILD @@ -68,6 +68,6 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/apis/certificates/v1beta1:go_default_library", - "//pkg/util/cert:go_default_library", + "//vendor:k8s.io/client-go/pkg/util/cert", ], ) diff --git a/pkg/controller/certificates/cfssl_signer_test.go b/pkg/controller/certificates/cfssl_signer_test.go index 594bc5ad792..4951e45f053 100644 --- a/pkg/controller/certificates/cfssl_signer_test.go +++ b/pkg/controller/certificates/cfssl_signer_test.go @@ -22,8 +22,8 @@ import ( "reflect" "testing" + "k8s.io/client-go/pkg/util/cert" capi "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" - "k8s.io/kubernetes/pkg/util/cert" ) func TestSigner(t *testing.T) { diff --git a/pkg/controller/client_builder.go b/pkg/controller/client_builder.go index 13cd57762bc..3841a953aad 100644 --- a/pkg/controller/client_builder.go +++ b/pkg/controller/client_builder.go @@ -26,12 +26,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/serviceaccount" "github.com/golang/glog" diff --git a/pkg/controller/controller_utils_test.go b/pkg/controller/controller_utils_test.go index b4c70489aa6..d3b7e075f36 100644 --- a/pkg/controller/controller_utils_test.go +++ b/pkg/controller/controller_utils_test.go @@ -31,15 +31,15 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/pkg/util/clock" + utiltesting "k8s.io/client-go/pkg/util/testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/securitycontext" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/util/uuid" ) diff --git a/pkg/controller/endpoint/BUILD b/pkg/controller/endpoint/BUILD index 46f0029ce4c..2d277d6e9eb 100644 --- a/pkg/controller/endpoint/BUILD +++ b/pkg/controller/endpoint/BUILD @@ -51,9 +51,10 @@ go_test( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/intstr:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/controller/endpoint/endpoints_controller_test.go b/pkg/controller/endpoint/endpoints_controller_test.go index ba8354a7f2f..7a7a14d5c29 100644 --- a/pkg/controller/endpoint/endpoints_controller_test.go +++ b/pkg/controller/endpoint/endpoints_controller_test.go @@ -24,16 +24,16 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + utiltesting "k8s.io/client-go/pkg/util/testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" endptspkg "k8s.io/kubernetes/pkg/api/v1/endpoints" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/intstr" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) var alwaysReady = func() bool { return true } diff --git a/pkg/controller/garbagecollector/BUILD b/pkg/controller/garbagecollector/BUILD index f1167070709..c1a4fd7a741 100644 --- a/pkg/controller/garbagecollector/BUILD +++ b/pkg/controller/garbagecollector/BUILD @@ -63,6 +63,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/json", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/client-go/pkg/util/clock", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/controller/garbagecollector/garbagecollector_test.go b/pkg/controller/garbagecollector/garbagecollector_test.go index 830051c9302..e6988a180dc 100644 --- a/pkg/controller/garbagecollector/garbagecollector_test.go +++ b/pkg/controller/garbagecollector/garbagecollector_test.go @@ -34,9 +34,9 @@ import ( "k8s.io/apimachinery/pkg/util/json" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/pkg/util/clock" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly" "k8s.io/kubernetes/pkg/util/workqueue" diff --git a/pkg/controller/job/BUILD b/pkg/controller/job/BUILD index 5252747ba71..8a5de853f68 100644 --- a/pkg/controller/job/BUILD +++ b/pkg/controller/job/BUILD @@ -58,6 +58,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/rand", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/controller/job/jobcontroller_test.go b/pkg/controller/job/jobcontroller_test.go index 23b2d3c3999..6f9e60b2a04 100644 --- a/pkg/controller/job/jobcontroller_test.go +++ b/pkg/controller/job/jobcontroller_test.go @@ -25,13 +25,13 @@ import ( "k8s.io/apimachinery/pkg/util/rand" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" batch "k8s.io/kubernetes/pkg/apis/batch/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" diff --git a/pkg/controller/namespace/BUILD b/pkg/controller/namespace/BUILD index 58adf5973e3..b0eea8c73a2 100644 --- a/pkg/controller/namespace/BUILD +++ b/pkg/controller/namespace/BUILD @@ -56,6 +56,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/controller/namespace/namespace_controller_test.go b/pkg/controller/namespace/namespace_controller_test.go index fa9b6baf0a5..760e1d9e05c 100644 --- a/pkg/controller/namespace/namespace_controller_test.go +++ b/pkg/controller/namespace/namespace_controller_test.go @@ -30,11 +30,11 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/typed/dynamic" diff --git a/pkg/controller/podautoscaler/BUILD b/pkg/controller/podautoscaler/BUILD index cfb17821e64..ebbd546e5a0 100644 --- a/pkg/controller/podautoscaler/BUILD +++ b/pkg/controller/podautoscaler/BUILD @@ -61,6 +61,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/heapster/metrics/api/v1/types", "//vendor:k8s.io/heapster/metrics/apis/metrics/v1alpha1", ], diff --git a/pkg/controller/podautoscaler/horizontal_test.go b/pkg/controller/podautoscaler/horizontal_test.go index d13639bcd98..60d53ddbc9c 100644 --- a/pkg/controller/podautoscaler/horizontal_test.go +++ b/pkg/controller/podautoscaler/horizontal_test.go @@ -30,6 +30,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" @@ -38,7 +39,6 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" diff --git a/pkg/controller/podautoscaler/metrics/BUILD b/pkg/controller/podautoscaler/metrics/BUILD index a3a2fac0995..87f8d866d30 100644 --- a/pkg/controller/podautoscaler/metrics/BUILD +++ b/pkg/controller/podautoscaler/metrics/BUILD @@ -41,6 +41,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/heapster/metrics/api/v1/types", "//vendor:k8s.io/heapster/metrics/apis/metrics/v1alpha1", ], diff --git a/pkg/controller/podautoscaler/metrics/metrics_client_test.go b/pkg/controller/podautoscaler/metrics/metrics_client_test.go index af550559c32..71d28f6579f 100644 --- a/pkg/controller/podautoscaler/metrics/metrics_client_test.go +++ b/pkg/controller/podautoscaler/metrics/metrics_client_test.go @@ -26,11 +26,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" heapster "k8s.io/heapster/metrics/api/v1/types" diff --git a/pkg/controller/podautoscaler/replica_calculator_test.go b/pkg/controller/podautoscaler/replica_calculator_test.go index 846dfe22fc4..e70decc1de4 100644 --- a/pkg/controller/podautoscaler/replica_calculator_test.go +++ b/pkg/controller/podautoscaler/replica_calculator_test.go @@ -27,11 +27,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" diff --git a/pkg/controller/replicaset/BUILD b/pkg/controller/replicaset/BUILD index 1e2e5791791..0fdfcf2629f 100644 --- a/pkg/controller/replicaset/BUILD +++ b/pkg/controller/replicaset/BUILD @@ -57,13 +57,14 @@ go_test( "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/controller/replicaset/replica_set_test.go b/pkg/controller/replicaset/replica_set_test.go index 2599aa0a4de..4220cce1eb4 100644 --- a/pkg/controller/replicaset/replica_set_test.go +++ b/pkg/controller/replicaset/replica_set_test.go @@ -33,6 +33,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + utiltesting "k8s.io/client-go/pkg/util/testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -41,12 +43,10 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" fakeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/securitycontext" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/util/uuid" ) diff --git a/pkg/controller/replication/BUILD b/pkg/controller/replication/BUILD index 6b9777dc740..6f11891398d 100644 --- a/pkg/controller/replication/BUILD +++ b/pkg/controller/replication/BUILD @@ -54,13 +54,14 @@ go_test( "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/controller/replication/replication_controller_test.go b/pkg/controller/replication/replication_controller_test.go index 0a943f83c16..129227f66cb 100644 --- a/pkg/controller/replication/replication_controller_test.go +++ b/pkg/controller/replication/replication_controller_test.go @@ -32,6 +32,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + utiltesting "k8s.io/client-go/pkg/util/testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -39,12 +41,10 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" fakeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/securitycontext" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/util/uuid" ) diff --git a/pkg/controller/statefulset/BUILD b/pkg/controller/statefulset/BUILD index 5c4d8453739..26072ac34df 100644 --- a/pkg/controller/statefulset/BUILD +++ b/pkg/controller/statefulset/BUILD @@ -68,11 +68,12 @@ go_test( "//pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/controller/statefulset/statefulpod_test.go b/pkg/controller/statefulset/statefulpod_test.go index 252178495ec..36cfbdf8b59 100644 --- a/pkg/controller/statefulset/statefulpod_test.go +++ b/pkg/controller/statefulset/statefulpod_test.go @@ -23,14 +23,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + utiltesting "k8s.io/client-go/pkg/util/testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func newPetClient(client *clientset.Clientset) *apiServerPetClient { diff --git a/pkg/genericapiserver/authenticator/BUILD b/pkg/genericapiserver/authenticator/BUILD index 7af1365f48e..d95d65683c7 100644 --- a/pkg/genericapiserver/authenticator/BUILD +++ b/pkg/genericapiserver/authenticator/BUILD @@ -16,7 +16,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/util/cert:go_default_library", "//plugin/pkg/auth/authenticator/token/webhook:go_default_library", "//vendor:github.com/go-openapi/spec", "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", @@ -29,6 +28,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authentication/token/tokenfile", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/client-go/kubernetes/typed/authentication/v1beta1", + "//vendor:k8s.io/client-go/pkg/util/cert", ], ) diff --git a/pkg/genericapiserver/authenticator/delegating.go b/pkg/genericapiserver/authenticator/delegating.go index 97ed9facdbc..23c55089259 100644 --- a/pkg/genericapiserver/authenticator/delegating.go +++ b/pkg/genericapiserver/authenticator/delegating.go @@ -33,7 +33,7 @@ import ( "k8s.io/apiserver/pkg/authentication/user" authenticationclient "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" - "k8s.io/kubernetes/pkg/util/cert" + "k8s.io/client-go/pkg/util/cert" webhooktoken "k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook" ) diff --git a/pkg/genericapiserver/server/BUILD b/pkg/genericapiserver/server/BUILD index 7950a9e0f52..dc71c98435c 100644 --- a/pkg/genericapiserver/server/BUILD +++ b/pkg/genericapiserver/server/BUILD @@ -31,7 +31,6 @@ go_test( "//pkg/genericapiserver/server/options:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/storage/storagebackend:go_default_library", - "//pkg/util/cert:go_default_library", "//pkg/util/config:go_default_library", "//vendor:github.com/go-openapi/spec", "//vendor:github.com/stretchr/testify/assert", @@ -46,6 +45,7 @@ go_test( "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/client-go/pkg/util/cert", ], ) @@ -78,7 +78,6 @@ go_library( "//pkg/genericapiserver/server/options:go_default_library", "//pkg/genericapiserver/server/routes:go_default_library", "//pkg/storage/storagebackend:go_default_library", - "//pkg/util/cert:go_default_library", "//vendor:github.com/coreos/go-systemd/daemon", "//vendor:github.com/emicklei/go-restful", "//vendor:github.com/emicklei/go-restful/swagger", @@ -106,6 +105,8 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authorization/union", "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/pkg/util/cert", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/genericapiserver/server/config.go b/pkg/genericapiserver/server/config.go index 1371433303d..51d64b52cf8 100644 --- a/pkg/genericapiserver/server/config.go +++ b/pkg/genericapiserver/server/config.go @@ -49,8 +49,9 @@ import ( authorizerunion "k8s.io/apiserver/pkg/authorization/union" apirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/server/healthz" + certutil "k8s.io/client-go/pkg/util/cert" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" genericauthenticator "k8s.io/kubernetes/pkg/genericapiserver/authenticator" genericauthorizer "k8s.io/kubernetes/pkg/genericapiserver/authorizer" genericapifilters "k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters" @@ -59,7 +60,6 @@ import ( "k8s.io/kubernetes/pkg/genericapiserver/server/mux" "k8s.io/kubernetes/pkg/genericapiserver/server/options" "k8s.io/kubernetes/pkg/genericapiserver/server/routes" - certutil "k8s.io/kubernetes/pkg/util/cert" ) const ( diff --git a/pkg/genericapiserver/server/config_selfclient.go b/pkg/genericapiserver/server/config_selfclient.go index df0db58d13b..f916dd5347f 100644 --- a/pkg/genericapiserver/server/config_selfclient.go +++ b/pkg/genericapiserver/server/config_selfclient.go @@ -24,7 +24,7 @@ import ( "fmt" "net" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "github.com/golang/glog" ) diff --git a/pkg/genericapiserver/server/genericapiserver.go b/pkg/genericapiserver/server/genericapiserver.go index 4244d162722..f3edaba858c 100644 --- a/pkg/genericapiserver/server/genericapiserver.go +++ b/pkg/genericapiserver/server/genericapiserver.go @@ -40,8 +40,8 @@ import ( "k8s.io/apiserver/pkg/admission" apirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" genericapi "k8s.io/kubernetes/pkg/genericapiserver/endpoints" "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" genericmux "k8s.io/kubernetes/pkg/genericapiserver/server/mux" diff --git a/pkg/genericapiserver/server/hooks.go b/pkg/genericapiserver/server/hooks.go index 54290761b3b..16e1cb5cc29 100644 --- a/pkg/genericapiserver/server/hooks.go +++ b/pkg/genericapiserver/server/hooks.go @@ -25,7 +25,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/server/healthz" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) // PostStartHookFunc is a function that is called after the server has started. diff --git a/pkg/genericapiserver/server/options/BUILD b/pkg/genericapiserver/server/options/BUILD index 9ff338155b2..b1c799b8713 100644 --- a/pkg/genericapiserver/server/options/BUILD +++ b/pkg/genericapiserver/server/options/BUILD @@ -23,7 +23,6 @@ go_library( "//pkg/genericapiserver/authenticator:go_default_library", "//pkg/genericapiserver/authorizer:go_default_library", "//pkg/storage/storagebackend:go_default_library", - "//pkg/util/cert:go_default_library", "//pkg/util/config:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/spf13/pflag", @@ -32,6 +31,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/client-go/kubernetes/typed/authentication/v1beta1", "//vendor:k8s.io/client-go/kubernetes/typed/authorization/v1beta1", + "//vendor:k8s.io/client-go/pkg/util/cert", "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/clientcmd", ], diff --git a/pkg/genericapiserver/server/options/serving.go b/pkg/genericapiserver/server/options/serving.go index 6c1d1b2a8cb..2d8bc40b78d 100644 --- a/pkg/genericapiserver/server/options/serving.go +++ b/pkg/genericapiserver/server/options/serving.go @@ -25,7 +25,7 @@ import ( "github.com/spf13/pflag" utilnet "k8s.io/apimachinery/pkg/util/net" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/pkg/util/cert" "k8s.io/kubernetes/pkg/util/config" ) diff --git a/pkg/genericapiserver/server/serve_test.go b/pkg/genericapiserver/server/serve_test.go index 67f0f7aa5f7..9079dbf4233 100644 --- a/pkg/genericapiserver/server/serve_test.go +++ b/pkg/genericapiserver/server/serve_test.go @@ -31,9 +31,9 @@ import ( "github.com/stretchr/testify/assert" + utilcert "k8s.io/client-go/pkg/util/cert" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/genericapiserver/server/options" - utilcert "k8s.io/kubernetes/pkg/util/cert" "k8s.io/kubernetes/pkg/util/config" ) diff --git a/pkg/kubeapiserver/authenticator/BUILD b/pkg/kubeapiserver/authenticator/BUILD index a528db756e0..a740575e963 100644 --- a/pkg/kubeapiserver/authenticator/BUILD +++ b/pkg/kubeapiserver/authenticator/BUILD @@ -14,7 +14,6 @@ go_library( deps = [ "//pkg/genericapiserver/authenticator:go_default_library", "//pkg/serviceaccount:go_default_library", - "//pkg/util/cert:go_default_library", "//plugin/pkg/auth/authenticator/password/keystone:go_default_library", "//plugin/pkg/auth/authenticator/password/passwordfile:go_default_library", "//plugin/pkg/auth/authenticator/request/basicauth:go_default_library", @@ -31,6 +30,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authentication/request/x509", "//vendor:k8s.io/apiserver/pkg/authentication/token/tokenfile", "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/pkg/util/cert", "//vendor:k8s.io/client-go/plugin/pkg/client/auth/gcp", "//vendor:k8s.io/client-go/plugin/pkg/client/auth/oidc", ], diff --git a/pkg/kubeapiserver/authenticator/config.go b/pkg/kubeapiserver/authenticator/config.go index c4427589453..07303a5b22e 100644 --- a/pkg/kubeapiserver/authenticator/config.go +++ b/pkg/kubeapiserver/authenticator/config.go @@ -30,9 +30,9 @@ import ( "k8s.io/apiserver/pkg/authentication/request/x509" "k8s.io/apiserver/pkg/authentication/token/tokenfile" "k8s.io/apiserver/pkg/authentication/user" + certutil "k8s.io/client-go/pkg/util/cert" genericauthenticator "k8s.io/kubernetes/pkg/genericapiserver/authenticator" "k8s.io/kubernetes/pkg/serviceaccount" - certutil "k8s.io/kubernetes/pkg/util/cert" "k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone" "k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/passwordfile" "k8s.io/kubernetes/plugin/pkg/auth/authenticator/request/basicauth" diff --git a/pkg/kubectl/BUILD b/pkg/kubectl/BUILD index 9ad7bb3225c..719d2c42aab 100644 --- a/pkg/kubectl/BUILD +++ b/pkg/kubectl/BUILD @@ -111,6 +111,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/pkg/util/integer", + "//vendor:k8s.io/client-go/rest", ], ) @@ -170,7 +171,6 @@ go_test( "//pkg/kubectl/testing:go_default_library", "//pkg/util:go_default_library", "//pkg/util/intstr:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/ghodss/yaml", "//vendor:github.com/spf13/cobra", "//vendor:k8s.io/apimachinery/pkg/api/errors", @@ -181,6 +181,8 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/kubectl/cmd/BUILD b/pkg/kubectl/cmd/BUILD index 3b9d065320a..c0bc9835b0c 100644 --- a/pkg/kubectl/cmd/BUILD +++ b/pkg/kubectl/cmd/BUILD @@ -123,6 +123,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/util/yaml", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -202,6 +203,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/rest/watch", "//vendor:k8s.io/heapster/metrics/apis/metrics/v1alpha1", ], diff --git a/pkg/kubectl/cmd/annotate_test.go b/pkg/kubectl/cmd/annotate_test.go index 715636958b1..ceef2c37036 100644 --- a/pkg/kubectl/cmd/annotate_test.go +++ b/pkg/kubectl/cmd/annotate_test.go @@ -25,8 +25,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" ) diff --git a/pkg/kubectl/cmd/attach.go b/pkg/kubectl/cmd/attach.go index 6297d4ddff3..36260647492 100644 --- a/pkg/kubectl/cmd/attach.go +++ b/pkg/kubectl/cmd/attach.go @@ -26,9 +26,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/pkg/kubectl/cmd/attach_test.go b/pkg/kubectl/cmd/attach_test.go index 28a7f71641d..bdd2ac30565 100644 --- a/pkg/kubectl/cmd/attach_test.go +++ b/pkg/kubectl/cmd/attach_test.go @@ -29,8 +29,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" "k8s.io/kubernetes/pkg/util/term" diff --git a/pkg/kubectl/cmd/cmd_test.go b/pkg/kubectl/cmd/cmd_test.go index d953b4630d4..4f2c9ed8167 100644 --- a/pkg/kubectl/cmd/cmd_test.go +++ b/pkg/kubectl/cmd/cmd_test.go @@ -31,9 +31,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/kubectl" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" diff --git a/pkg/kubectl/cmd/delete_test.go b/pkg/kubectl/cmd/delete_test.go index 8486897279f..840a7e2794b 100644 --- a/pkg/kubectl/cmd/delete_test.go +++ b/pkg/kubectl/cmd/delete_test.go @@ -26,8 +26,8 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/pkg/kubectl" diff --git a/pkg/kubectl/cmd/drain.go b/pkg/kubectl/cmd/drain.go index 3c1c2fdba56..65c29e3addb 100644 --- a/pkg/kubectl/cmd/drain.go +++ b/pkg/kubectl/cmd/drain.go @@ -34,10 +34,10 @@ import ( "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/pkg/kubectl/cmd/exec.go b/pkg/kubectl/cmd/exec.go index 9bd0281b6d8..19b79ae5434 100644 --- a/pkg/kubectl/cmd/exec.go +++ b/pkg/kubectl/cmd/exec.go @@ -25,9 +25,9 @@ import ( "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/pkg/kubectl/cmd/exec_test.go b/pkg/kubectl/cmd/exec_test.go index df4706ee495..e671052c858 100644 --- a/pkg/kubectl/cmd/exec_test.go +++ b/pkg/kubectl/cmd/exec_test.go @@ -30,8 +30,8 @@ import ( "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" "k8s.io/kubernetes/pkg/util/term" diff --git a/pkg/kubectl/cmd/get_test.go b/pkg/kubectl/cmd/get_test.go index 7c751e95515..a9f4ededdb3 100644 --- a/pkg/kubectl/cmd/get_test.go +++ b/pkg/kubectl/cmd/get_test.go @@ -33,11 +33,11 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/apimachinery/pkg/runtime/serializer/streaming" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" restclientwatch "k8s.io/client-go/rest/watch" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" ) diff --git a/pkg/kubectl/cmd/label_test.go b/pkg/kubectl/cmd/label_test.go index 94fe2ba10f5..56d96198141 100644 --- a/pkg/kubectl/cmd/label_test.go +++ b/pkg/kubectl/cmd/label_test.go @@ -25,8 +25,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" "k8s.io/kubernetes/pkg/kubectl/resource" diff --git a/pkg/kubectl/cmd/logs.go b/pkg/kubectl/cmd/logs.go index 8fb9b71ccf6..2c418c3364e 100644 --- a/pkg/kubectl/cmd/logs.go +++ b/pkg/kubectl/cmd/logs.go @@ -27,9 +27,9 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" diff --git a/pkg/kubectl/cmd/logs_test.go b/pkg/kubectl/cmd/logs_test.go index ac4f5b08e0a..776e0dee5ac 100644 --- a/pkg/kubectl/cmd/logs_test.go +++ b/pkg/kubectl/cmd/logs_test.go @@ -28,8 +28,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" ) diff --git a/pkg/kubectl/cmd/portforward.go b/pkg/kubectl/cmd/portforward.go index 59177717774..d78f51f9e7f 100644 --- a/pkg/kubectl/cmd/portforward.go +++ b/pkg/kubectl/cmd/portforward.go @@ -26,9 +26,9 @@ import ( "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/portforward" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" diff --git a/pkg/kubectl/cmd/run_test.go b/pkg/kubectl/cmd/run_test.go index e3a94b507a0..146690fcabb 100644 --- a/pkg/kubectl/cmd/run_test.go +++ b/pkg/kubectl/cmd/run_test.go @@ -31,8 +31,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/pkg/kubectl/cmd/set/BUILD b/pkg/kubectl/cmd/set/BUILD index f37be78d1a7..a34bce1e2ed 100644 --- a/pkg/kubectl/cmd/set/BUILD +++ b/pkg/kubectl/cmd/set/BUILD @@ -60,6 +60,7 @@ go_test( "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/kubectl/cmd/set/set_image_test.go b/pkg/kubectl/cmd/set/set_image_test.go index 8a720c9a95c..6b6e949a1d7 100644 --- a/pkg/kubectl/cmd/set/set_image_test.go +++ b/pkg/kubectl/cmd/set/set_image_test.go @@ -22,8 +22,8 @@ import ( "strings" "testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/pkg/kubectl/cmd/testing/BUILD b/pkg/kubectl/cmd/testing/BUILD index df0a55b8dcf..73431a58c06 100644 --- a/pkg/kubectl/cmd/testing/BUILD +++ b/pkg/kubectl/cmd/testing/BUILD @@ -30,6 +30,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/kubectl/cmd/testing/fake.go b/pkg/kubectl/cmd/testing/fake.go index 16aab416c21..895c2fefacb 100644 --- a/pkg/kubectl/cmd/testing/fake.go +++ b/pkg/kubectl/cmd/testing/fake.go @@ -30,12 +30,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + restclient "k8s.io/client-go/rest" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/kubectl" diff --git a/pkg/kubectl/cmd/util/BUILD b/pkg/kubectl/cmd/util/BUILD index 5277257ec05..91d762386fe 100644 --- a/pkg/kubectl/cmd/util/BUILD +++ b/pkg/kubectl/cmd/util/BUILD @@ -63,6 +63,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/version", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -107,6 +108,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/version", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/pkg/kubectl/cmd/util/cached_discovery.go b/pkg/kubectl/cmd/util/cached_discovery.go index c38e0d6d7cc..62c5dfafa55 100644 --- a/pkg/kubectl/cmd/util/cached_discovery.go +++ b/pkg/kubectl/cmd/util/cached_discovery.go @@ -31,8 +31,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" ) diff --git a/pkg/kubectl/cmd/util/cached_discovery_test.go b/pkg/kubectl/cmd/util/cached_discovery_test.go index 747e2a0970b..089a81372dd 100644 --- a/pkg/kubectl/cmd/util/cached_discovery_test.go +++ b/pkg/kubectl/cmd/util/cached_discovery_test.go @@ -29,7 +29,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/discovery" ) diff --git a/pkg/kubectl/cmd/util/clientcache.go b/pkg/kubectl/cmd/util/clientcache.go index 70d47fd63a0..8626159e72f 100644 --- a/pkg/kubectl/cmd/util/clientcache.go +++ b/pkg/kubectl/cmd/util/clientcache.go @@ -20,10 +20,10 @@ import ( "sync" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" oldclient "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index d9f6b80f04d..783e374d6ae 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -39,13 +39,13 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/kubectl" diff --git a/pkg/kubectl/cmd/util/factory_client_access.go b/pkg/kubectl/cmd/util/factory_client_access.go index a1b57e644c7..72f03ec216e 100644 --- a/pkg/kubectl/cmd/util/factory_client_access.go +++ b/pkg/kubectl/cmd/util/factory_client_access.go @@ -35,6 +35,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/service" @@ -42,7 +43,6 @@ import ( "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/kubectl" diff --git a/pkg/kubectl/cmd/util/factory_object_mapping.go b/pkg/kubectl/cmd/util/factory_object_mapping.go index a8de9abf274..f4c515dda87 100644 --- a/pkg/kubectl/cmd/util/factory_object_mapping.go +++ b/pkg/kubectl/cmd/util/factory_object_mapping.go @@ -34,13 +34,13 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/typed/dynamic" client "k8s.io/kubernetes/pkg/client/unversioned" diff --git a/pkg/kubectl/interfaces.go b/pkg/kubectl/interfaces.go index 4c2b73c524c..de20a5d77b7 100644 --- a/pkg/kubectl/interfaces.go +++ b/pkg/kubectl/interfaces.go @@ -18,7 +18,7 @@ package kubectl import ( "k8s.io/apimachinery/pkg/types" - client "k8s.io/kubernetes/pkg/client/restclient" + client "k8s.io/client-go/rest" ) // RESTClient is a client helper for dealing with RESTful resources diff --git a/pkg/kubectl/proxy_server.go b/pkg/kubectl/proxy_server.go index d7a8edacc3d..39b870c5aab 100644 --- a/pkg/kubectl/proxy_server.go +++ b/pkg/kubectl/proxy_server.go @@ -28,7 +28,7 @@ import ( "time" "github.com/golang/glog" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/util" ) diff --git a/pkg/kubectl/proxy_server_test.go b/pkg/kubectl/proxy_server_test.go index 3aad8c315d9..8a5e1e8afa8 100644 --- a/pkg/kubectl/proxy_server_test.go +++ b/pkg/kubectl/proxy_server_test.go @@ -26,7 +26,7 @@ import ( "strings" "testing" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) func TestAccept(t *testing.T) { diff --git a/pkg/kubectl/resource/BUILD b/pkg/kubectl/resource/BUILD index b25d27b79b6..520f41ad957 100644 --- a/pkg/kubectl/resource/BUILD +++ b/pkg/kubectl/resource/BUILD @@ -39,6 +39,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/yaml", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -64,7 +65,6 @@ go_test( "//pkg/api/testing:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/restclient/fake:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/ghodss/yaml", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/api/meta", @@ -74,6 +74,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/pkg/util/testing", "//vendor:k8s.io/client-go/rest/watch", ], ) diff --git a/pkg/kubectl/resource/builder_test.go b/pkg/kubectl/resource/builder_test.go index 91b562d794a..2329a25f6f3 100644 --- a/pkg/kubectl/resource/builder_test.go +++ b/pkg/kubectl/resource/builder_test.go @@ -37,6 +37,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/streaming" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/watch" + utiltesting "k8s.io/client-go/pkg/util/testing" restclientwatch "k8s.io/client-go/rest/watch" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" @@ -44,7 +45,6 @@ import ( apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/restclient/fake" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func stringBody(body string) io.ReadCloser { diff --git a/pkg/kubectl/resource/interfaces.go b/pkg/kubectl/resource/interfaces.go index 796083c8431..bb7a956cde2 100644 --- a/pkg/kubectl/resource/interfaces.go +++ b/pkg/kubectl/resource/interfaces.go @@ -19,7 +19,7 @@ package resource import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/types" - client "k8s.io/kubernetes/pkg/client/restclient" + client "k8s.io/client-go/rest" ) // RESTClient is a client helper for dealing with RESTful resources diff --git a/pkg/kubectl/rolling_updater_test.go b/pkg/kubectl/rolling_updater_test.go index 40f5f51f8c5..9a364acdeee 100644 --- a/pkg/kubectl/rolling_updater_test.go +++ b/pkg/kubectl/rolling_updater_test.go @@ -31,12 +31,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" manualfake "k8s.io/kubernetes/pkg/client/restclient/fake" testcore "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/util/intstr" diff --git a/pkg/kubectl/secret_for_tls_test.go b/pkg/kubectl/secret_for_tls_test.go index 54962ad75e0..29ae9710ce5 100644 --- a/pkg/kubectl/secret_for_tls_test.go +++ b/pkg/kubectl/secret_for_tls_test.go @@ -24,8 +24,8 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) var rsaCertPEM = `-----BEGIN CERTIFICATE----- diff --git a/pkg/kubelet/BUILD b/pkg/kubelet/BUILD index a2a9f0b60f3..0c9f6102138 100644 --- a/pkg/kubelet/BUILD +++ b/pkg/kubelet/BUILD @@ -185,7 +185,6 @@ go_test( "//pkg/util/bandwidth:go_default_library", "//pkg/util/mount:go_default_library", "//pkg/util/strategicpatch:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//pkg/version:go_default_library", "//pkg/volume:go_default_library", @@ -208,6 +207,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/client-go/pkg/util/clock", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/kubelet/client/BUILD b/pkg/kubelet/client/BUILD index 6a8a33ba16a..5712429712b 100644 --- a/pkg/kubelet/client/BUILD +++ b/pkg/kubelet/client/BUILD @@ -18,6 +18,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/transport", ], ) @@ -30,7 +31,10 @@ go_test( tags = [ "automanaged", ], - deps = ["//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library"], + deps = [ + "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", + "//vendor:k8s.io/client-go/rest", + ], ) filegroup( diff --git a/pkg/kubelet/client/kubelet_client.go b/pkg/kubelet/client/kubelet_client.go index 3df67c78681..dc886488799 100644 --- a/pkg/kubelet/client/kubelet_client.go +++ b/pkg/kubelet/client/kubelet_client.go @@ -24,9 +24,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" utilnet "k8s.io/apimachinery/pkg/util/net" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/transport" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" nodeutil "k8s.io/kubernetes/pkg/util/node" ) diff --git a/pkg/kubelet/client/kubelet_client_test.go b/pkg/kubelet/client/kubelet_client_test.go index c2b008d1d0e..9e8abe24567 100644 --- a/pkg/kubelet/client/kubelet_client_test.go +++ b/pkg/kubelet/client/kubelet_client_test.go @@ -19,8 +19,8 @@ package client import ( "testing" + restclient "k8s.io/client-go/rest" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) // Ensure a node client can be used as a NodeGetter. diff --git a/pkg/kubelet/config/BUILD b/pkg/kubelet/config/BUILD index a2ee67ba037..f22a44fd60f 100644 --- a/pkg/kubelet/config/BUILD +++ b/pkg/kubelet/config/BUILD @@ -67,12 +67,12 @@ go_test( "//pkg/client/record:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/kubelet/config/file_linux_test.go b/pkg/kubelet/config/file_linux_test.go index d009857b7b5..9473349a23c 100644 --- a/pkg/kubelet/config/file_linux_test.go +++ b/pkg/kubelet/config/file_linux_test.go @@ -33,13 +33,13 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/securitycontext" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func TestExtractFromNonExistentFile(t *testing.T) { diff --git a/pkg/kubelet/config/http_test.go b/pkg/kubelet/config/http_test.go index ada382f35b0..d637cb9c0b6 100644 --- a/pkg/kubelet/config/http_test.go +++ b/pkg/kubelet/config/http_test.go @@ -26,12 +26,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func TestURLErrorNotExistNoUpdate(t *testing.T) { diff --git a/pkg/kubelet/network/cni/BUILD b/pkg/kubelet/network/cni/BUILD index 2b3c0c665c8..b364cd4b998 100644 --- a/pkg/kubelet/network/cni/BUILD +++ b/pkg/kubelet/network/cni/BUILD @@ -38,9 +38,9 @@ go_test( "//pkg/kubelet/network:go_default_library", "//pkg/kubelet/network/cni/testing:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/containernetworking/cni/pkg/types", "//vendor:github.com/stretchr/testify/mock", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/kubelet/network/cni/cni_test.go b/pkg/kubelet/network/cni/cni_test.go index d0c485801fd..c5859f1c446 100644 --- a/pkg/kubelet/network/cni/cni_test.go +++ b/pkg/kubelet/network/cni/cni_test.go @@ -31,6 +31,7 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types" "github.com/stretchr/testify/mock" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/componentconfig" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -39,7 +40,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/network" "k8s.io/kubernetes/pkg/kubelet/network/cni/testing" utilexec "k8s.io/kubernetes/pkg/util/exec" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func installPluginUnderTest(t *testing.T, testVendorCNIDirPrefix, testNetworkConfigPath, vendorName string, plugName string) { diff --git a/pkg/kubelet/rkt/BUILD b/pkg/kubelet/rkt/BUILD index e93087d0406..051e5daf0ec 100644 --- a/pkg/kubelet/rkt/BUILD +++ b/pkg/kubelet/rkt/BUILD @@ -80,7 +80,6 @@ go_test( "//pkg/kubelet/network/mock_network:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/appc/spec/schema", "//vendor:github.com/appc/spec/schema/types", "//vendor:github.com/coreos/go-systemd/dbus", @@ -92,6 +91,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/kubelet/rkt/rkt_test.go b/pkg/kubelet/rkt/rkt_test.go index 273b5e5ac24..a5ff05cc40c 100644 --- a/pkg/kubelet/rkt/rkt_test.go +++ b/pkg/kubelet/rkt/rkt_test.go @@ -34,6 +34,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubetypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/errors" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -45,7 +46,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/network/mock_network" "k8s.io/kubernetes/pkg/kubelet/types" utilexec "k8s.io/kubernetes/pkg/util/exec" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func mustMarshalPodManifest(man *appcschema.PodManifest) []byte { diff --git a/pkg/kubelet/runonce_test.go b/pkg/kubelet/runonce_test.go index 1fc0850b07a..831efe1e22c 100644 --- a/pkg/kubelet/runonce_test.go +++ b/pkg/kubelet/runonce_test.go @@ -26,6 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/pkg/util/clock" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/componentconfig" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -43,7 +44,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/kubelet/status" "k8s.io/kubernetes/pkg/kubelet/volumemanager" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/kubelet/server/BUILD b/pkg/kubelet/server/BUILD index c54c95cc165..f26ecc7842c 100644 --- a/pkg/kubelet/server/BUILD +++ b/pkg/kubelet/server/BUILD @@ -70,7 +70,6 @@ go_test( "//pkg/util/httpstream:go_default_library", "//pkg/util/httpstream/spdy:go_default_library", "//pkg/util/term:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//vendor:github.com/google/cadvisor/info/v1", "//vendor:github.com/google/cadvisor/info/v2", @@ -82,6 +81,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/kubelet/server/server_test.go b/pkg/kubelet/server/server_test.go index 889c4701742..9b95c9f7baf 100644 --- a/pkg/kubelet/server/server_test.go +++ b/pkg/kubelet/server/server_test.go @@ -44,6 +44,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/kubelet/cm" @@ -55,7 +56,6 @@ import ( "k8s.io/kubernetes/pkg/util/httpstream" "k8s.io/kubernetes/pkg/util/httpstream/spdy" "k8s.io/kubernetes/pkg/util/term" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" ) diff --git a/pkg/kubelet/server/streaming/BUILD b/pkg/kubelet/server/streaming/BUILD index 16a59cf2152..861bc41b314 100644 --- a/pkg/kubelet/server/streaming/BUILD +++ b/pkg/kubelet/server/streaming/BUILD @@ -47,6 +47,7 @@ go_test( "//vendor:github.com/stretchr/testify/require", "//vendor:k8s.io/client-go/pkg/api", "//vendor:k8s.io/client-go/pkg/util/clock", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/kubelet/server/streaming/server_test.go b/pkg/kubelet/server/streaming/server_test.go index e6170a9222c..91ed5778f8e 100644 --- a/pkg/kubelet/server/streaming/server_test.go +++ b/pkg/kubelet/server/streaming/server_test.go @@ -31,7 +31,7 @@ import ( "github.com/stretchr/testify/require" "k8s.io/client-go/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" runtimeapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" kubeletportforward "k8s.io/kubernetes/pkg/kubelet/server/portforward" diff --git a/pkg/kubelet/util/csr/BUILD b/pkg/kubelet/util/csr/BUILD index 10fa22f4ce8..7447f15a668 100644 --- a/pkg/kubelet/util/csr/BUILD +++ b/pkg/kubelet/util/csr/BUILD @@ -15,11 +15,11 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library", - "//pkg/util/cert:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/pkg/util/cert", ], ) diff --git a/pkg/kubelet/util/csr/csr.go b/pkg/kubelet/util/csr/csr.go index 2dd1ce6cb85..9c543f81000 100644 --- a/pkg/kubelet/util/csr/csr.go +++ b/pkg/kubelet/util/csr/csr.go @@ -24,10 +24,10 @@ import ( "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" + certutil "k8s.io/client-go/pkg/util/cert" "k8s.io/kubernetes/pkg/api/v1" certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" certificatesclient "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1" - certutil "k8s.io/kubernetes/pkg/util/cert" ) // RequestNodeCertificate will create a certificate signing request and send it to API server, diff --git a/pkg/kubelet/volumemanager/BUILD b/pkg/kubelet/volumemanager/BUILD index 21232f8caa3..64bc2058413 100644 --- a/pkg/kubelet/volumemanager/BUILD +++ b/pkg/kubelet/volumemanager/BUILD @@ -52,13 +52,13 @@ go_test( "//pkg/kubelet/pod/testing:go_default_library", "//pkg/kubelet/secret:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//pkg/volume/util/types:go_default_library", "//pkg/volume/util/volumehelper:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/kubelet/volumemanager/volume_manager_test.go b/pkg/kubelet/volumemanager/volume_manager_test.go index d2c9a6a3fe3..5fe4b6d0064 100644 --- a/pkg/kubelet/volumemanager/volume_manager_test.go +++ b/pkg/kubelet/volumemanager/volume_manager_test.go @@ -25,6 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -36,7 +37,6 @@ import ( podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" "k8s.io/kubernetes/pkg/kubelet/secret" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" "k8s.io/kubernetes/pkg/volume/util/types" diff --git a/pkg/master/BUILD b/pkg/master/BUILD index 8c1bbcb2b20..23bf6b9bced 100644 --- a/pkg/master/BUILD +++ b/pkg/master/BUILD @@ -132,6 +132,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/version", "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index cb262730c55..f4fa55448d7 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -33,6 +33,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/version" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apiv1 "k8s.io/kubernetes/pkg/api/v1" @@ -48,7 +49,6 @@ import ( extensionsapiv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" diff --git a/pkg/registry/core/rest/BUILD b/pkg/registry/core/rest/BUILD index 0decae1776f..3e55d0bfb51 100644 --- a/pkg/registry/core/rest/BUILD +++ b/pkg/registry/core/rest/BUILD @@ -58,6 +58,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/registry/core/rest/storage_core.go b/pkg/registry/core/rest/storage_core.go index c90eec160e4..828e7a4b5f9 100644 --- a/pkg/registry/core/rest/storage_core.go +++ b/pkg/registry/core/rest/storage_core.go @@ -29,9 +29,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" policyclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" diff --git a/pkg/util/BUILD b/pkg/util/BUILD index 801a859066e..6f53ba09327 100644 --- a/pkg/util/BUILD +++ b/pkg/util/BUILD @@ -49,7 +49,6 @@ filegroup( ":package-srcs", "//pkg/util/async:all-srcs", "//pkg/util/bandwidth:all-srcs", - "//pkg/util/cert:all-srcs", "//pkg/util/chmod:all-srcs", "//pkg/util/chown:all-srcs", "//pkg/util/config:all-srcs", @@ -102,7 +101,6 @@ filegroup( "//pkg/util/system:all-srcs", "//pkg/util/taints:all-srcs", "//pkg/util/term:all-srcs", - "//pkg/util/testing:all-srcs", "//pkg/util/threading:all-srcs", "//pkg/util/uuid:all-srcs", "//pkg/util/validation:all-srcs", diff --git a/pkg/util/io/BUILD b/pkg/util/io/BUILD index bc167702895..996e04cf51a 100644 --- a/pkg/util/io/BUILD +++ b/pkg/util/io/BUILD @@ -30,10 +30,10 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/util/io:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//vendor:github.com/pborman/uuid", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/util/io/io_test.go b/pkg/util/io/io_test.go index 688e4f25e59..a91b532adfb 100644 --- a/pkg/util/io/io_test.go +++ b/pkg/util/io/io_test.go @@ -23,9 +23,9 @@ import ( "github.com/pborman/uuid" "k8s.io/apimachinery/pkg/runtime" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/io" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" ) diff --git a/pkg/volume/BUILD b/pkg/volume/BUILD index 46b0696814b..9f1047c5781 100644 --- a/pkg/volume/BUILD +++ b/pkg/volume/BUILD @@ -59,11 +59,11 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) @@ -72,9 +72,9 @@ go_test( srcs = ["metrics_du_test.go"], tags = ["automanaged"], deps = [ - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/aws_ebs/BUILD b/pkg/volume/aws_ebs/BUILD index bb8b8c056ec..7e2bd18934c 100644 --- a/pkg/volume/aws_ebs/BUILD +++ b/pkg/volume/aws_ebs/BUILD @@ -46,12 +46,12 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/cloudprovider/providers/aws:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/aws_ebs/aws_ebs_test.go b/pkg/volume/aws_ebs/aws_ebs_test.go index b1b1e3b8f28..d3492348489 100644 --- a/pkg/volume/aws_ebs/aws_ebs_test.go +++ b/pkg/volume/aws_ebs/aws_ebs_test.go @@ -24,11 +24,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/azure_dd/BUILD b/pkg/volume/azure_dd/BUILD index b88d96321c1..b7880fad87f 100644 --- a/pkg/volume/azure_dd/BUILD +++ b/pkg/volume/azure_dd/BUILD @@ -48,11 +48,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/Azure/azure-sdk-for-go/arm/compute", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/azure_dd/azure_dd_test.go b/pkg/volume/azure_dd/azure_dd_test.go index 095eb129f80..c4ab32e1c1e 100644 --- a/pkg/volume/azure_dd/azure_dd_test.go +++ b/pkg/volume/azure_dd/azure_dd_test.go @@ -25,9 +25,9 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/compute" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/cephfs/BUILD b/pkg/volume/cephfs/BUILD index 1a15b262161..7321b7e0bc8 100644 --- a/pkg/volume/cephfs/BUILD +++ b/pkg/volume/cephfs/BUILD @@ -35,10 +35,10 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/cephfs/cephfs_test.go b/pkg/volume/cephfs/cephfs_test.go index c49d0c7b7d2..0d104b2e259 100644 --- a/pkg/volume/cephfs/cephfs_test.go +++ b/pkg/volume/cephfs/cephfs_test.go @@ -22,9 +22,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/cinder/BUILD b/pkg/volume/cinder/BUILD index 6dc47c99c1f..6a5252d9ccd 100644 --- a/pkg/volume/cinder/BUILD +++ b/pkg/volume/cinder/BUILD @@ -47,11 +47,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/cinder/cinder_test.go b/pkg/volume/cinder/cinder_test.go index ae0a3b06eee..754d317d7e4 100644 --- a/pkg/volume/cinder/cinder_test.go +++ b/pkg/volume/cinder/cinder_test.go @@ -24,9 +24,9 @@ import ( "time" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/downwardapi/BUILD b/pkg/volume/downwardapi/BUILD index 2aa2b03da18..345fd3d5b1a 100644 --- a/pkg/volume/downwardapi/BUILD +++ b/pkg/volume/downwardapi/BUILD @@ -34,12 +34,12 @@ go_test( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/fieldpath:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/empty_dir:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/downwardapi/downwardapi_test.go b/pkg/volume/downwardapi/downwardapi_test.go index 537af0a878f..c6933f460ea 100644 --- a/pkg/volume/downwardapi/downwardapi_test.go +++ b/pkg/volume/downwardapi/downwardapi_test.go @@ -25,11 +25,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/fieldpath" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/empty_dir" volumetest "k8s.io/kubernetes/pkg/volume/testing" diff --git a/pkg/volume/empty_dir/BUILD b/pkg/volume/empty_dir/BUILD index 75a6f012302..cd901ede24b 100644 --- a/pkg/volume/empty_dir/BUILD +++ b/pkg/volume/empty_dir/BUILD @@ -36,12 +36,12 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/empty_dir/empty_dir_test.go b/pkg/volume/empty_dir/empty_dir_test.go index 9cf90ec3c13..4e2d91ba228 100644 --- a/pkg/volume/empty_dir/empty_dir_test.go +++ b/pkg/volume/empty_dir/empty_dir_test.go @@ -25,9 +25,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" "k8s.io/kubernetes/pkg/volume/util" diff --git a/pkg/volume/fc/BUILD b/pkg/volume/fc/BUILD index a38d6f94c91..6ee4df3995e 100644 --- a/pkg/volume/fc/BUILD +++ b/pkg/volume/fc/BUILD @@ -41,11 +41,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/fc/fc_test.go b/pkg/volume/fc/fc_test.go index f4cd4ff0f96..b0447c19a16 100644 --- a/pkg/volume/fc/fc_test.go +++ b/pkg/volume/fc/fc_test.go @@ -23,10 +23,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/flexvolume/BUILD b/pkg/volume/flexvolume/BUILD index 07cd08ddf40..d735917b1aa 100644 --- a/pkg/volume/flexvolume/BUILD +++ b/pkg/volume/flexvolume/BUILD @@ -37,11 +37,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/flexvolume/flexvolume_test.go b/pkg/volume/flexvolume/flexvolume_test.go index 38396db7470..bb5eba0dfbd 100644 --- a/pkg/volume/flexvolume/flexvolume_test.go +++ b/pkg/volume/flexvolume/flexvolume_test.go @@ -27,10 +27,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/flocker/BUILD b/pkg/volume/flocker/BUILD index eec4e11adde..36a8f18aef9 100644 --- a/pkg/volume/flocker/BUILD +++ b/pkg/volume/flocker/BUILD @@ -45,13 +45,13 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/clusterhq/flocker-go", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/flocker/flocker_test.go b/pkg/volume/flocker/flocker_test.go index 06340809b7c..9b7d5b7d7b7 100644 --- a/pkg/volume/flocker/flocker_test.go +++ b/pkg/volume/flocker/flocker_test.go @@ -22,9 +22,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" diff --git a/pkg/volume/flocker/flocker_volume_test.go b/pkg/volume/flocker/flocker_volume_test.go index b9c19f236f8..3bd6fa40eff 100644 --- a/pkg/volume/flocker/flocker_volume_test.go +++ b/pkg/volume/flocker/flocker_volume_test.go @@ -21,8 +21,8 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" diff --git a/pkg/volume/gce_pd/BUILD b/pkg/volume/gce_pd/BUILD index 9686b54fbc7..049b6db6e82 100644 --- a/pkg/volume/gce_pd/BUILD +++ b/pkg/volume/gce_pd/BUILD @@ -46,12 +46,12 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/gce_pd/gce_pd_test.go b/pkg/volume/gce_pd/gce_pd_test.go index 0646dd32472..cc0f008c171 100644 --- a/pkg/volume/gce_pd/gce_pd_test.go +++ b/pkg/volume/gce_pd/gce_pd_test.go @@ -24,10 +24,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/glusterfs/BUILD b/pkg/volume/glusterfs/BUILD index 19cb8754344..9cdc2009b04 100644 --- a/pkg/volume/glusterfs/BUILD +++ b/pkg/volume/glusterfs/BUILD @@ -52,13 +52,13 @@ go_test( "//pkg/client/testing/core:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/heketi/heketi/pkg/glusterfs/api", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/glusterfs/glusterfs_test.go b/pkg/volume/glusterfs/glusterfs_test.go index 8760c2a0981..eac4eff1fd8 100644 --- a/pkg/volume/glusterfs/glusterfs_test.go +++ b/pkg/volume/glusterfs/glusterfs_test.go @@ -26,12 +26,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/iscsi/BUILD b/pkg/volume/iscsi/BUILD index 6a1cfd25af0..867dbf651e3 100644 --- a/pkg/volume/iscsi/BUILD +++ b/pkg/volume/iscsi/BUILD @@ -41,11 +41,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/iscsi/iscsi_test.go b/pkg/volume/iscsi/iscsi_test.go index ace334c6793..87d72d765bb 100644 --- a/pkg/volume/iscsi/iscsi_test.go +++ b/pkg/volume/iscsi/iscsi_test.go @@ -23,10 +23,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/metrics_du_test.go b/pkg/volume/metrics_du_test.go index a866897c3da..0238961764a 100644 --- a/pkg/volume/metrics_du_test.go +++ b/pkg/volume/metrics_du_test.go @@ -24,7 +24,7 @@ import ( "path/filepath" "testing" - utiltesting "k8s.io/kubernetes/pkg/util/testing" + utiltesting "k8s.io/client-go/pkg/util/testing" . "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/metrics_statfs_test.go b/pkg/volume/metrics_statfs_test.go index 9418b4f1e18..5fde43ba5b6 100644 --- a/pkg/volume/metrics_statfs_test.go +++ b/pkg/volume/metrics_statfs_test.go @@ -20,7 +20,7 @@ import ( "os" "testing" - utiltesting "k8s.io/kubernetes/pkg/util/testing" + utiltesting "k8s.io/client-go/pkg/util/testing" ) func TestGetMetricsStatFS(t *testing.T) { diff --git a/pkg/volume/nfs/BUILD b/pkg/volume/nfs/BUILD index 7814c641ca2..260922e8de3 100644 --- a/pkg/volume/nfs/BUILD +++ b/pkg/volume/nfs/BUILD @@ -38,11 +38,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/nfs/nfs_test.go b/pkg/volume/nfs/nfs_test.go index 248d20f08b4..3317eced1fb 100644 --- a/pkg/volume/nfs/nfs_test.go +++ b/pkg/volume/nfs/nfs_test.go @@ -23,10 +23,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/photon_pd/BUILD b/pkg/volume/photon_pd/BUILD index 4753f57d08d..15aa9432dc1 100644 --- a/pkg/volume/photon_pd/BUILD +++ b/pkg/volume/photon_pd/BUILD @@ -44,11 +44,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/cloudprovider/providers/photon:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/photon_pd/photon_pd_test.go b/pkg/volume/photon_pd/photon_pd_test.go index 86b7df8d2a1..f4b49276336 100644 --- a/pkg/volume/photon_pd/photon_pd_test.go +++ b/pkg/volume/photon_pd/photon_pd_test.go @@ -23,9 +23,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/quobyte/BUILD b/pkg/volume/quobyte/BUILD index eaeca401880..b0f3a4595b9 100644 --- a/pkg/volume/quobyte/BUILD +++ b/pkg/volume/quobyte/BUILD @@ -41,11 +41,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/quobyte/quobyte_test.go b/pkg/volume/quobyte/quobyte_test.go index 8e6255c83c8..6f9ea22f5c6 100644 --- a/pkg/volume/quobyte/quobyte_test.go +++ b/pkg/volume/quobyte/quobyte_test.go @@ -23,10 +23,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/rbd/BUILD b/pkg/volume/rbd/BUILD index 901f300e585..b5a1dbe7e30 100644 --- a/pkg/volume/rbd/BUILD +++ b/pkg/volume/rbd/BUILD @@ -42,11 +42,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/rbd/rbd_test.go b/pkg/volume/rbd/rbd_test.go index 03cd8086063..3b702135c43 100644 --- a/pkg/volume/rbd/rbd_test.go +++ b/pkg/volume/rbd/rbd_test.go @@ -23,10 +23,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/volume/testing/BUILD b/pkg/volume/testing/BUILD index 0b116c89010..63445abd2e8 100644 --- a/pkg/volume/testing/BUILD +++ b/pkg/volume/testing/BUILD @@ -22,12 +22,12 @@ go_library( "//pkg/util/io:go_default_library", "//pkg/util/mount:go_default_library", "//pkg/util/strings:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//pkg/volume:go_default_library", "//vendor:github.com/stretchr/testify/mock", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/testing/testing.go b/pkg/volume/testing/testing.go index 1102a7bfe12..4da0587d58b 100644 --- a/pkg/volume/testing/testing.go +++ b/pkg/volume/testing/testing.go @@ -29,6 +29,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -36,7 +37,6 @@ import ( "k8s.io/kubernetes/pkg/util/io" "k8s.io/kubernetes/pkg/util/mount" utilstrings "k8s.io/kubernetes/pkg/util/strings" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/util/uuid" . "k8s.io/kubernetes/pkg/volume" ) diff --git a/pkg/volume/util/BUILD b/pkg/volume/util/BUILD index 9cac087b7f3..be34789fa4c 100644 --- a/pkg/volume/util/BUILD +++ b/pkg/volume/util/BUILD @@ -41,8 +41,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/util/atomic_writer_test.go b/pkg/volume/util/atomic_writer_test.go index f0551d00c16..7bcfd6823c3 100644 --- a/pkg/volume/util/atomic_writer_test.go +++ b/pkg/volume/util/atomic_writer_test.go @@ -29,7 +29,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/util/sets" - utiltesting "k8s.io/kubernetes/pkg/util/testing" + utiltesting "k8s.io/client-go/pkg/util/testing" ) func TestNewAtomicWriter(t *testing.T) { diff --git a/pkg/volume/vsphere_volume/BUILD b/pkg/volume/vsphere_volume/BUILD index 000f4c73300..02783fa01ec 100644 --- a/pkg/volume/vsphere_volume/BUILD +++ b/pkg/volume/vsphere_volume/BUILD @@ -45,11 +45,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/cloudprovider/providers/vsphere:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/pkg/util/testing", ], ) diff --git a/pkg/volume/vsphere_volume/vsphere_volume_test.go b/pkg/volume/vsphere_volume/vsphere_volume_test.go index b16fb82c805..9455db4d092 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume_test.go +++ b/pkg/volume/vsphere_volume/vsphere_volume_test.go @@ -23,9 +23,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/pkg/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/plugin/cmd/kube-scheduler/app/BUILD b/plugin/cmd/kube-scheduler/app/BUILD index 9973dcbd820..c824f6e5e15 100644 --- a/plugin/cmd/kube-scheduler/app/BUILD +++ b/plugin/cmd/kube-scheduler/app/BUILD @@ -33,6 +33,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/plugin/cmd/kube-scheduler/app/server.go b/plugin/cmd/kube-scheduler/app/server.go index 8e4e1d394fa..5569ae5f565 100644 --- a/plugin/cmd/kube-scheduler/app/server.go +++ b/plugin/cmd/kube-scheduler/app/server.go @@ -30,13 +30,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/leaderelection" "k8s.io/kubernetes/pkg/client/leaderelection/resourcelock" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/util/configz" "k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options" diff --git a/plugin/pkg/admission/initialresources/BUILD b/plugin/pkg/admission/initialresources/BUILD index 743fc59bf4e..4bab6d9f460 100644 --- a/plugin/pkg/admission/initialresources/BUILD +++ b/plugin/pkg/admission/initialresources/BUILD @@ -31,6 +31,7 @@ go_library( "//vendor:google.golang.org/api/cloudmonitoring/v2beta2", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apiserver/pkg/admission", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/plugin/pkg/admission/initialresources/hawkular.go b/plugin/pkg/admission/initialresources/hawkular.go index 80d9ab866d3..ce6edcc6a02 100644 --- a/plugin/pkg/admission/initialresources/hawkular.go +++ b/plugin/pkg/admission/initialresources/hawkular.go @@ -31,7 +31,7 @@ import ( "github.com/hawkular/hawkular-client-go/metrics" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" ) diff --git a/plugin/pkg/auth/authenticator/password/keystone/BUILD b/plugin/pkg/auth/authenticator/password/keystone/BUILD index 179cc62344a..c007f2f3072 100644 --- a/plugin/pkg/auth/authenticator/password/keystone/BUILD +++ b/plugin/pkg/auth/authenticator/password/keystone/BUILD @@ -15,12 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/util/cert:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/rackspace/gophercloud", "//vendor:github.com/rackspace/gophercloud/openstack", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/pkg/util/cert", ], ) diff --git a/plugin/pkg/auth/authenticator/password/keystone/keystone.go b/plugin/pkg/auth/authenticator/password/keystone/keystone.go index ce792410835..338c86f5478 100644 --- a/plugin/pkg/auth/authenticator/password/keystone/keystone.go +++ b/plugin/pkg/auth/authenticator/password/keystone/keystone.go @@ -27,7 +27,7 @@ import ( "github.com/rackspace/gophercloud/openstack" netutil "k8s.io/apimachinery/pkg/util/net" "k8s.io/apiserver/pkg/authentication/user" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/pkg/util/cert" ) // KeystoneAuthenticator contacts openstack keystone to validate user's credentials passed in the request. diff --git a/plugin/pkg/auth/authenticator/token/oidc/BUILD b/plugin/pkg/auth/authenticator/token/oidc/BUILD index ff2a3ea9434..52295271061 100644 --- a/plugin/pkg/auth/authenticator/token/oidc/BUILD +++ b/plugin/pkg/auth/authenticator/token/oidc/BUILD @@ -13,13 +13,13 @@ go_library( srcs = ["oidc.go"], tags = ["automanaged"], deps = [ - "//pkg/util/cert:go_default_library", "//vendor:github.com/coreos/go-oidc/jose", "//vendor:github.com/coreos/go-oidc/oidc", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/pkg/util/cert", ], ) diff --git a/plugin/pkg/auth/authenticator/token/oidc/oidc.go b/plugin/pkg/auth/authenticator/token/oidc/oidc.go index 2187124b463..777fc0e95fd 100644 --- a/plugin/pkg/auth/authenticator/token/oidc/oidc.go +++ b/plugin/pkg/auth/authenticator/token/oidc/oidc.go @@ -42,7 +42,7 @@ import ( "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/authentication/user" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/pkg/util/cert" ) type OIDCOptions struct { diff --git a/plugin/pkg/client/auth/gcp/BUILD b/plugin/pkg/client/auth/gcp/BUILD index 75c3fd6e9ca..9ee4167c241 100644 --- a/plugin/pkg/client/auth/gcp/BUILD +++ b/plugin/pkg/client/auth/gcp/BUILD @@ -19,6 +19,7 @@ go_library( "//vendor:golang.org/x/oauth2", "//vendor:golang.org/x/oauth2/google", "//vendor:k8s.io/apimachinery/pkg/util/yaml", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/plugin/pkg/client/auth/gcp/gcp.go b/plugin/pkg/client/auth/gcp/gcp.go index e4a87cd1810..8cde8a46d5b 100644 --- a/plugin/pkg/client/auth/gcp/gcp.go +++ b/plugin/pkg/client/auth/gcp/gcp.go @@ -31,7 +31,7 @@ import ( "golang.org/x/oauth2" "golang.org/x/oauth2/google" "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/util/jsonpath" ) diff --git a/plugin/pkg/client/auth/oidc/BUILD b/plugin/pkg/client/auth/oidc/BUILD index c1c7059577a..522a4a4e746 100644 --- a/plugin/pkg/client/auth/oidc/BUILD +++ b/plugin/pkg/client/auth/oidc/BUILD @@ -17,6 +17,7 @@ go_library( "//vendor:github.com/coreos/go-oidc/oauth2", "//vendor:github.com/coreos/go-oidc/oidc", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/plugin/pkg/client/auth/oidc/oidc.go b/plugin/pkg/client/auth/oidc/oidc.go index 68168bf9d73..ca5b72cbd60 100644 --- a/plugin/pkg/client/auth/oidc/oidc.go +++ b/plugin/pkg/client/auth/oidc/oidc.go @@ -30,7 +30,7 @@ import ( "github.com/coreos/go-oidc/oidc" "github.com/golang/glog" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) const ( diff --git a/plugin/pkg/scheduler/BUILD b/plugin/pkg/scheduler/BUILD index 7b6c6ada2be..43e349c91bd 100644 --- a/plugin/pkg/scheduler/BUILD +++ b/plugin/pkg/scheduler/BUILD @@ -38,6 +38,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD b/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD index 6f8ff6a8aac..0bc394ffe5e 100644 --- a/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD +++ b/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD @@ -35,12 +35,13 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/util/testing:go_default_library", "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/api/latest:go_default_library", "//plugin/pkg/scheduler/factory:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go b/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go index 7bbc1a4c043..3f73a1f50df 100644 --- a/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go +++ b/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go @@ -25,11 +25,11 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" + utiltesting "k8s.io/client-go/pkg/util/testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" - utiltesting "k8s.io/kubernetes/pkg/util/testing" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" latestschedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api/latest" "k8s.io/kubernetes/plugin/pkg/scheduler/factory" diff --git a/plugin/pkg/scheduler/api/BUILD b/plugin/pkg/scheduler/api/BUILD index e6533d4f87f..6b65eaefd67 100644 --- a/plugin/pkg/scheduler/api/BUILD +++ b/plugin/pkg/scheduler/api/BUILD @@ -19,6 +19,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/plugin/pkg/scheduler/api/types.go b/plugin/pkg/scheduler/api/types.go index 8f4f655118d..bad6abc640f 100644 --- a/plugin/pkg/scheduler/api/types.go +++ b/plugin/pkg/scheduler/api/types.go @@ -20,8 +20,8 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) type Policy struct { diff --git a/plugin/pkg/scheduler/api/v1/BUILD b/plugin/pkg/scheduler/api/v1/BUILD index 855b5a5a384..2433d15bada 100644 --- a/plugin/pkg/scheduler/api/v1/BUILD +++ b/plugin/pkg/scheduler/api/v1/BUILD @@ -20,6 +20,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/plugin/pkg/scheduler/api/v1/types.go b/plugin/pkg/scheduler/api/v1/types.go index 371cd0e7b62..3097d83b874 100644 --- a/plugin/pkg/scheduler/api/v1/types.go +++ b/plugin/pkg/scheduler/api/v1/types.go @@ -20,8 +20,8 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" apiv1 "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) type Policy struct { diff --git a/plugin/pkg/scheduler/extender.go b/plugin/pkg/scheduler/extender.go index 55a18e646dd..dca08567890 100644 --- a/plugin/pkg/scheduler/extender.go +++ b/plugin/pkg/scheduler/extender.go @@ -25,8 +25,8 @@ import ( "time" utilnet "k8s.io/apimachinery/pkg/util/net" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" ) diff --git a/plugin/pkg/scheduler/factory/BUILD b/plugin/pkg/scheduler/factory/BUILD index 751d6711b3f..23207d44fa5 100644 --- a/plugin/pkg/scheduler/factory/BUILD +++ b/plugin/pkg/scheduler/factory/BUILD @@ -56,7 +56,6 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/util/testing:go_default_library", "//plugin/pkg/scheduler/algorithm:go_default_library", "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/api/latest:go_default_library", @@ -64,6 +63,8 @@ go_test( "//plugin/pkg/scheduler/util:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/pkg/util/testing", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/plugin/pkg/scheduler/factory/factory_test.go b/plugin/pkg/scheduler/factory/factory_test.go index e8e1b8f3834..4f646a9fbdb 100644 --- a/plugin/pkg/scheduler/factory/factory_test.go +++ b/plugin/pkg/scheduler/factory/factory_test.go @@ -25,14 +25,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + utiltesting "k8s.io/client-go/pkg/util/testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" latestschedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api/latest" diff --git a/staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD b/staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD index 02247f6c3d6..a7403fd473c 100644 --- a/staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD +++ b/staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD @@ -2,17 +2,7 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["triple.go"], - tags = ["automanaged"], - deps = ["//pkg/util/cert:go_default_library"], -) +load("@io_bazel_rules_go//go:def.bzl") filegroup( name = "package-srcs", diff --git a/staging/src/k8s.io/client-go/pkg/util/cert/triple/triple.go b/staging/src/k8s.io/client-go/pkg/util/cert/triple/triple.go index d226ed8dd9e..98844aa01be 100644 --- a/staging/src/k8s.io/client-go/pkg/util/cert/triple/triple.go +++ b/staging/src/k8s.io/client-go/pkg/util/cert/triple/triple.go @@ -24,7 +24,7 @@ import ( "fmt" "net" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/pkg/util/cert" ) type KeyPair struct { diff --git a/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff_test.go b/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff_test.go index df663221d82..9cd9bb5c297 100644 --- a/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff_test.go +++ b/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/pkg/util/clock" ) func TestSlowBackoff(t *testing.T) { diff --git a/test/e2e/BUILD b/test/e2e/BUILD index 63cc5f70564..42870aa69af 100644 --- a/test/e2e/BUILD +++ b/test/e2e/BUILD @@ -196,6 +196,7 @@ go_library( "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", "//vendor:k8s.io/client-go/pkg/util/intstr", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/transport", ], ) diff --git a/test/e2e/framework/exec_util.go b/test/e2e/framework/exec_util.go index d4b84e9ee0b..d032ed72466 100644 --- a/test/e2e/framework/exec_util.go +++ b/test/e2e/framework/exec_util.go @@ -23,9 +23,9 @@ import ( "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" remotecommandserver "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index c0ca05a7eb3..619d2129071 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -34,11 +34,11 @@ import ( "k8s.io/apimachinery/pkg/util/wait" staging "k8s.io/client-go/kubernetes" clientreporestclient "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/pkg/metrics" "k8s.io/kubernetes/pkg/util/intstr" diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 3d4a2f361ab..c93fefe219a 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -62,6 +62,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -73,7 +74,6 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/conditions" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" diff --git a/test/e2e/load.go b/test/e2e/load.go index 4c6afc0ebb7..569be07e89d 100644 --- a/test/e2e/load.go +++ b/test/e2e/load.go @@ -31,6 +31,7 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/transport" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -38,7 +39,6 @@ import ( "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/util/intstr" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" diff --git a/test/e2e/service_latency.go b/test/e2e/service_latency.go index 59a18d79313..2a40459afde 100644 --- a/test/e2e/service_latency.go +++ b/test/e2e/service_latency.go @@ -27,9 +27,9 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/util/flowcontrol" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" diff --git a/test/e2e_federation/BUILD b/test/e2e_federation/BUILD index 250d7591cdf..6e948e91e7a 100644 --- a/test/e2e_federation/BUILD +++ b/test/e2e_federation/BUILD @@ -42,6 +42,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/test/e2e_federation/federation-util.go b/test/e2e_federation/federation-util.go index be2a37d7414..b59d1d12bf2 100644 --- a/test/e2e_federation/federation-util.go +++ b/test/e2e_federation/federation-util.go @@ -25,13 +25,13 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/test/e2e/common" "k8s.io/kubernetes/test/e2e/framework" diff --git a/test/e2e_federation/framework/BUILD b/test/e2e_federation/framework/BUILD index 7ff540b449a..7461abdf15b 100644 --- a/test/e2e_federation/framework/BUILD +++ b/test/e2e_federation/framework/BUILD @@ -30,6 +30,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/validation", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/test/e2e_federation/framework/util.go b/test/e2e_federation/framework/util.go index 5dd8d850743..587d05b4dc7 100644 --- a/test/e2e_federation/framework/util.go +++ b/test/e2e_federation/framework/util.go @@ -26,13 +26,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" validationutil "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/test/e2e/framework" ) diff --git a/test/e2e_node/services/BUILD b/test/e2e_node/services/BUILD index 905116de981..9754e5ccf46 100644 --- a/test/e2e_node/services/BUILD +++ b/test/e2e_node/services/BUILD @@ -38,6 +38,7 @@ go_library( "//vendor:github.com/coreos/pkg/capnslog", "//vendor:github.com/golang/glog", "//vendor:github.com/kardianos/osext", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/test/e2e_node/services/namespace_controller.go b/test/e2e_node/services/namespace_controller.go index bb2f62885f2..4db1f6cdd97 100644 --- a/test/e2e_node/services/namespace_controller.go +++ b/test/e2e_node/services/namespace_controller.go @@ -19,10 +19,10 @@ package services import ( "time" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/dynamic" namespacecontroller "k8s.io/kubernetes/pkg/controller/namespace" "k8s.io/kubernetes/test/e2e/framework" diff --git a/test/images/clusterapi-tester/BUILD b/test/images/clusterapi-tester/BUILD index 969727beed2..bdcf0e3d303 100644 --- a/test/images/clusterapi-tester/BUILD +++ b/test/images/clusterapi-tester/BUILD @@ -23,6 +23,7 @@ go_library( "//pkg/client/clientset_generated/internalclientset:go_default_library", "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/test/images/clusterapi-tester/main.go b/test/images/clusterapi-tester/main.go index d3a46eebd6a..0b25680c306 100644 --- a/test/images/clusterapi-tester/main.go +++ b/test/images/clusterapi-tester/main.go @@ -26,9 +26,9 @@ import ( "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" ) func main() { diff --git a/test/images/network-tester/BUILD b/test/images/network-tester/BUILD index b0bad02aa77..2802e035edc 100644 --- a/test/images/network-tester/BUILD +++ b/test/images/network-tester/BUILD @@ -22,6 +22,7 @@ go_library( "//pkg/client/clientset_generated/internalclientset:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/test/images/network-tester/webserver.go b/test/images/network-tester/webserver.go index 2156b0951e5..bc065f83f95 100644 --- a/test/images/network-tester/webserver.go +++ b/test/images/network-tester/webserver.go @@ -45,8 +45,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" ) var ( diff --git a/test/integration/auth/accessreview_test.go b/test/integration/auth/accessreview_test.go index 614ad270022..3e577c94b3d 100644 --- a/test/integration/auth/accessreview_test.go +++ b/test/integration/auth/accessreview_test.go @@ -28,10 +28,10 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/admission/admit" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/test/integration/auth/rbac_test.go b/test/integration/auth/rbac_test.go index 5a883fbc80b..f4bc322dbae 100644 --- a/test/integration/auth/rbac_test.go +++ b/test/integration/auth/rbac_test.go @@ -36,12 +36,12 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/request/bearertoken" "k8s.io/apiserver/pkg/authorization/authorizer" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/transport" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" rbacapi "k8s.io/kubernetes/pkg/apis/rbac" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/master" "k8s.io/kubernetes/pkg/registry/rbac/clusterrole" diff --git a/test/integration/client/client_test.go b/test/integration/client/client_test.go index 3f692cc81d9..f26e59b736d 100644 --- a/test/integration/client/client_test.go +++ b/test/integration/client/client_test.go @@ -35,10 +35,10 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/version" e2e "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/integration/framework" diff --git a/test/integration/client/dynamic_client_test.go b/test/integration/client/dynamic_client_test.go index f0a0c84bd5e..88f58a7b07c 100644 --- a/test/integration/client/dynamic_client_test.go +++ b/test/integration/client/dynamic_client_test.go @@ -25,11 +25,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/test/integration/configmap/configmap_test.go b/test/integration/configmap/configmap_test.go index 124e080ad2a..cc826a5457f 100644 --- a/test/integration/configmap/configmap_test.go +++ b/test/integration/configmap/configmap_test.go @@ -24,10 +24,10 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/test/integration/evictions/evictions_test.go b/test/integration/evictions/evictions_test.go index 3f6838b3fea..34b5d64205b 100644 --- a/test/integration/evictions/evictions_test.go +++ b/test/integration/evictions/evictions_test.go @@ -30,11 +30,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/policy/v1beta1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller/disruption" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/util/intstr" diff --git a/test/integration/framework/BUILD b/test/integration/framework/BUILD index bacca6506ad..8c304e964b4 100644 --- a/test/integration/framework/BUILD +++ b/test/integration/framework/BUILD @@ -61,6 +61,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", "//vendor:k8s.io/apiserver/pkg/authorization/union", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/test/integration/framework/master_utils.go b/test/integration/framework/master_utils.go index 53b649c0b25..1f2a09b1cd9 100644 --- a/test/integration/framework/master_utils.go +++ b/test/integration/framework/master_utils.go @@ -37,6 +37,7 @@ import ( "k8s.io/apiserver/pkg/authentication/user" authauthorizer "k8s.io/apiserver/pkg/authorization/authorizer" authorizerunion "k8s.io/apiserver/pkg/authorization/union" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -52,7 +53,6 @@ import ( coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller" replicationcontroller "k8s.io/kubernetes/pkg/controller/replication" "k8s.io/kubernetes/pkg/generated/openapi" diff --git a/test/integration/garbagecollector/garbage_collector_test.go b/test/integration/garbagecollector/garbage_collector_test.go index 87251f63675..6002ac86ceb 100644 --- a/test/integration/garbagecollector/garbage_collector_test.go +++ b/test/integration/garbagecollector/garbage_collector_test.go @@ -34,10 +34,10 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/pkg/controller/garbagecollector" diff --git a/test/integration/master/master_test.go b/test/integration/master/master_test.go index d5c86c36700..33291ff54da 100644 --- a/test/integration/master/master_test.go +++ b/test/integration/master/master_test.go @@ -36,12 +36,12 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" clienttypedv1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/test/integration/metrics/metrics_test.go b/test/integration/metrics/metrics_test.go index 305c8fb3ca1..b5703493fdb 100644 --- a/test/integration/metrics/metrics_test.go +++ b/test/integration/metrics/metrics_test.go @@ -25,10 +25,10 @@ import ( "net/http/httptest" "testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration/framework" "github.com/golang/glog" diff --git a/test/integration/objectmeta/BUILD b/test/integration/objectmeta/BUILD index ebff894a171..9fe6eb859a1 100644 --- a/test/integration/objectmeta/BUILD +++ b/test/integration/objectmeta/BUILD @@ -18,6 +18,7 @@ go_test( "//test/integration/framework:go_default_library", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/test/integration/objectmeta/objectmeta_test.go b/test/integration/objectmeta/objectmeta_test.go index 08608b05425..bc3460c7287 100644 --- a/test/integration/objectmeta/objectmeta_test.go +++ b/test/integration/objectmeta/objectmeta_test.go @@ -22,10 +22,10 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/test/integration/pods/pods_test.go b/test/integration/pods/pods_test.go index bb238b19a4a..dd2bebccd6f 100644 --- a/test/integration/pods/pods_test.go +++ b/test/integration/pods/pods_test.go @@ -23,10 +23,10 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/test/integration/quota/quota_test.go b/test/integration/quota/quota_test.go index 48e3b2fd80e..d4be5a9c59b 100644 --- a/test/integration/quota/quota_test.go +++ b/test/integration/quota/quota_test.go @@ -30,13 +30,13 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" replicationcontroller "k8s.io/kubernetes/pkg/controller/replication" diff --git a/test/integration/replicaset/replicaset_test.go b/test/integration/replicaset/replicaset_test.go index 273c667f369..812f9cd3979 100644 --- a/test/integration/replicaset/replicaset_test.go +++ b/test/integration/replicaset/replicaset_test.go @@ -28,11 +28,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/controller/replicaset" "k8s.io/kubernetes/test/integration/framework" diff --git a/test/integration/replicationcontroller/replicationcontroller_test.go b/test/integration/replicationcontroller/replicationcontroller_test.go index d53f9e65682..170c69a156a 100644 --- a/test/integration/replicationcontroller/replicationcontroller_test.go +++ b/test/integration/replicationcontroller/replicationcontroller_test.go @@ -28,10 +28,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/controller/replication" "k8s.io/kubernetes/test/integration/framework" diff --git a/test/integration/scheduler/extender_test.go b/test/integration/scheduler/extender_test.go index 69b24c913a8..72dd0bdd301 100644 --- a/test/integration/scheduler/extender_test.go +++ b/test/integration/scheduler/extender_test.go @@ -31,13 +31,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/scheduler" _ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" diff --git a/test/integration/scheduler/scheduler_test.go b/test/integration/scheduler/scheduler_test.go index f7947e92562..be4399a7709 100644 --- a/test/integration/scheduler/scheduler_test.go +++ b/test/integration/scheduler/scheduler_test.go @@ -28,6 +28,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -35,7 +36,6 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/scheduler" _ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider" "k8s.io/kubernetes/plugin/pkg/scheduler/factory" diff --git a/test/integration/scheduler_perf/BUILD b/test/integration/scheduler_perf/BUILD index a097424a81d..263b5506fda 100644 --- a/test/integration/scheduler_perf/BUILD +++ b/test/integration/scheduler_perf/BUILD @@ -23,6 +23,7 @@ go_library( "//plugin/pkg/scheduler/factory:go_default_library", "//test/integration/framework:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/test/integration/scheduler_perf/util.go b/test/integration/scheduler_perf/util.go index 59faa1fe80b..efd789c6685 100644 --- a/test/integration/scheduler_perf/util.go +++ b/test/integration/scheduler_perf/util.go @@ -21,12 +21,12 @@ import ( "net/http/httptest" "github.com/golang/glog" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/scheduler" _ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider" "k8s.io/kubernetes/plugin/pkg/scheduler/factory" diff --git a/test/integration/secrets/secrets_test.go b/test/integration/secrets/secrets_test.go index cd3a01cf6b8..f7c23e14872 100644 --- a/test/integration/secrets/secrets_test.go +++ b/test/integration/secrets/secrets_test.go @@ -24,10 +24,10 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/test/integration/serviceaccount/service_account_test.go b/test/integration/serviceaccount/service_account_test.go index dae0f7eb3c8..a6b138e74e0 100644 --- a/test/integration/serviceaccount/service_account_test.go +++ b/test/integration/serviceaccount/service_account_test.go @@ -41,11 +41,11 @@ import ( serviceaccountapiserver "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" diff --git a/test/integration/storageclasses/storage_classes_test.go b/test/integration/storageclasses/storage_classes_test.go index 9741f64c35a..a8b0f85ae43 100644 --- a/test/integration/storageclasses/storage_classes_test.go +++ b/test/integration/storageclasses/storage_classes_test.go @@ -24,13 +24,13 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" storage "k8s.io/kubernetes/pkg/apis/storage/v1beta1" storageutil "k8s.io/kubernetes/pkg/apis/storage/v1beta1/util" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/test/integration/thirdparty/thirdparty_test.go b/test/integration/thirdparty/thirdparty_test.go index 32613ec530a..ede5b134651 100644 --- a/test/integration/thirdparty/thirdparty_test.go +++ b/test/integration/thirdparty/thirdparty_test.go @@ -33,10 +33,10 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/test/integration/volume/attach_detach_test.go b/test/integration/volume/attach_detach_test.go index edfdd2fe353..bd25edcd202 100644 --- a/test/integration/volume/attach_detach_test.go +++ b/test/integration/volume/attach_detach_test.go @@ -25,11 +25,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" fakecloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/controller/volume/attachdetach" diff --git a/test/integration/volume/persistent_volumes_test.go b/test/integration/volume/persistent_volumes_test.go index b99340f5447..c8b52b43ea1 100644 --- a/test/integration/volume/persistent_volumes_test.go +++ b/test/integration/volume/persistent_volumes_test.go @@ -29,13 +29,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" storage "k8s.io/kubernetes/pkg/apis/storage/v1beta1" storageutil "k8s.io/kubernetes/pkg/apis/storage/v1beta1/util" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" fakecloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/volume/persistentvolume" "k8s.io/kubernetes/pkg/volume" diff --git a/test/soak/cauldron/BUILD b/test/soak/cauldron/BUILD index 3cb3110a933..abfdb524571 100644 --- a/test/soak/cauldron/BUILD +++ b/test/soak/cauldron/BUILD @@ -25,6 +25,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/test/soak/cauldron/cauldron.go b/test/soak/cauldron/cauldron.go index 52c770f2917..2b4f711a4ed 100644 --- a/test/soak/cauldron/cauldron.go +++ b/test/soak/cauldron/cauldron.go @@ -32,9 +32,9 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/util/intstr" ) diff --git a/test/soak/serve_hostnames/BUILD b/test/soak/serve_hostnames/BUILD index f8512fefede..cffad4efda5 100644 --- a/test/soak/serve_hostnames/BUILD +++ b/test/soak/serve_hostnames/BUILD @@ -29,6 +29,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/test/soak/serve_hostnames/serve_hostnames.go b/test/soak/serve_hostnames/serve_hostnames.go index 883a84eaddc..17671df14cd 100644 --- a/test/soak/serve_hostnames/serve_hostnames.go +++ b/test/soak/serve_hostnames/serve_hostnames.go @@ -32,10 +32,10 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/util/intstr" e2e "k8s.io/kubernetes/test/e2e/framework" diff --git a/vendor/BUILD b/vendor/BUILD index fd5e454a8fc..3bd9187678b 100644 --- a/vendor/BUILD +++ b/vendor/BUILD @@ -13666,3 +13666,49 @@ go_library( tags = ["automanaged"], deps = ["//vendor:k8s.io/apimachinery/pkg/selection"], ) + +go_test( + name = "k8s.io/client-go/pkg/util/cert_test", + srcs = ["k8s.io/client-go/pkg/util/cert/csr_test.go"], + library = ":k8s.io/client-go/pkg/util/cert", + tags = ["automanaged"], +) + +go_library( + name = "k8s.io/client-go/pkg/util/cert/triple", + srcs = ["k8s.io/client-go/pkg/util/cert/triple/triple.go"], + tags = ["automanaged"], + deps = ["//vendor:k8s.io/client-go/pkg/util/cert"], +) + +go_test( + name = "k8s.io/client-go/pkg/util/clock_test", + srcs = ["k8s.io/client-go/pkg/util/clock/clock_test.go"], + library = ":k8s.io/client-go/pkg/util/clock", + tags = ["automanaged"], +) + +go_test( + name = "k8s.io/client-go/pkg/util/flowcontrol_test", + srcs = [ + "k8s.io/client-go/pkg/util/flowcontrol/backoff_test.go", + "k8s.io/client-go/pkg/util/flowcontrol/throttle_test.go", + ], + library = ":k8s.io/client-go/pkg/util/flowcontrol", + tags = ["automanaged"], + deps = ["//vendor:k8s.io/client-go/pkg/util/clock"], +) + +go_test( + name = "k8s.io/client-go/pkg/util/integer_test", + srcs = ["k8s.io/client-go/pkg/util/integer/integer_test.go"], + library = ":k8s.io/client-go/pkg/util/integer", + tags = ["automanaged"], +) + +go_test( + name = "k8s.io/client-go/pkg/util/testing_test", + srcs = ["k8s.io/client-go/pkg/util/testing/fake_handler_test.go"], + library = ":k8s.io/client-go/pkg/util/testing", + tags = ["automanaged"], +) From af2c52085d97f65f99a1e87867096e40fc54f151 Mon Sep 17 00:00:00 2001 From: deads2k Date: Thu, 19 Jan 2017 15:00:15 -0500 Subject: [PATCH 5/7] update staging --- BUILD.bazel | 1 - .../client-go/discovery/discovery_client.go | 20 +-- .../discovery/discovery_client_test.go | 22 +-- .../client-go/discovery/fake/discovery.go | 4 +- .../discovery/helper_blackbox_test.go | 6 +- .../client-go/discovery/restmapper_test.go | 4 +- .../src/k8s.io/client-go/dynamic/client.go | 18 +- .../k8s.io/client-go/dynamic/client_pool.go | 6 +- .../k8s.io/client-go/dynamic/client_test.go | 6 +- .../typed/core/v1/fake/fake_pod_expansion.go | 6 +- .../core/v1/fake/fake_service_expansion.go | 4 +- .../kubernetes/typed/core/v1/pod_expansion.go | 6 +- .../typed/core/v1/service_expansion.go | 6 +- .../kubernetes/typed/policy/v1alpha1/doc.go | 20 --- .../typed/policy/v1alpha1/fake/doc.go | 20 --- .../v1alpha1/fake/fake_poddisruptionbudget.go | 128 ------------- .../v1alpha1/fake/fake_policy_client.go | 38 ---- .../policy/v1alpha1/generated_expansion.go | 19 -- .../policy/v1alpha1/poddisruptionbudget.go | 168 ------------------ .../typed/policy/v1alpha1/policy_client.go | 98 ---------- .../client-go/pkg/api/validation/path/name.go | 68 ------- .../client-go/pkg/apis/policy/v1alpha1/doc.go | 20 --- .../pkg/apis/policy/v1alpha1/register.go | 56 ------ .../pkg/apis/policy/v1alpha1/types.go | 93 ---------- .../client-go/pkg/util/cert/triple/BUILD | 18 -- .../plugin/pkg/client/auth/gcp/gcp.go | 12 +- .../plugin/pkg/client/auth/oidc/oidc.go | 14 +- .../src/k8s.io/client-go/rest/fake/fake.go | 22 +-- staging/src/k8s.io/client-go/testing/fake.go | 8 +- .../src/k8s.io/client-go/testing/fixture.go | 4 +- .../k8s.io/client-go/tools/auth/clientauth.go | 6 +- .../k8s.io/client-go/tools/cache/listwatch.go | 4 +- .../tools/clientcmd/client_config.go | 52 +++--- .../tools/clientcmd/client_config_test.go | 8 +- .../client-go/tools/clientcmd/config.go | 4 +- .../client-go/tools/clientcmd/loader.go | 8 +- .../tools/clientcmd/merged_client_builder.go | 4 +- .../clientcmd/merged_client_builder_test.go | 10 +- .../k8s.io/client-go/tools/record/event.go | 4 +- .../client-go/tools/record/event_test.go | 4 +- vendor/BUILD | 66 ------- 41 files changed, 136 insertions(+), 949 deletions(-) delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/doc.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/doc.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/generated_expansion.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/policy_client.go delete mode 100644 staging/src/k8s.io/client-go/pkg/api/validation/path/name.go delete mode 100644 staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/doc.go delete mode 100644 staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/register.go delete mode 100644 staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/types.go delete mode 100644 staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD diff --git a/BUILD.bazel b/BUILD.bazel index 8d9ce2fab5f..339affffa45 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -46,7 +46,6 @@ filegroup( "//hack:all-srcs", "//pkg:all-srcs", "//plugin:all-srcs", - "//staging/src/k8s.io/client-go/pkg/util/cert/triple:all-srcs", "//test:all-srcs", "//third_party:all-srcs", "//vendor:all-srcs", diff --git a/staging/src/k8s.io/client-go/discovery/discovery_client.go b/staging/src/k8s.io/client-go/discovery/discovery_client.go index 8031ce21226..25fa2cfa030 100644 --- a/staging/src/k8s.io/client-go/discovery/discovery_client.go +++ b/staging/src/k8s.io/client-go/discovery/discovery_client.go @@ -33,7 +33,7 @@ import ( "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources). @@ -42,7 +42,7 @@ const defaultRetries = 2 // DiscoveryInterface holds the methods that discover server-supported API groups, // versions and resources. type DiscoveryInterface interface { - RESTClient() rest.Interface + RESTClient() restclient.Interface ServerGroupsInterface ServerResourcesInterface ServerVersionInterface @@ -94,7 +94,7 @@ type SwaggerSchemaInterface interface { // DiscoveryClient implements the functions that discover server-supported API groups, // versions and resources. type DiscoveryClient struct { - restClient rest.Interface + restClient restclient.Interface LegacyPrefix string } @@ -380,31 +380,31 @@ func withRetries(maxRetries int, f func(failEarly bool) ([]*metav1.APIResourceLi return result, err } -func setDiscoveryDefaults(config *rest.Config) error { +func setDiscoveryDefaults(config *restclient.Config) error { config.APIPath = "" config.GroupVersion = nil codec := runtime.NoopEncoder{Decoder: api.Codecs.UniversalDecoder()} config.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}) if len(config.UserAgent) == 0 { - config.UserAgent = rest.DefaultKubernetesUserAgent() + config.UserAgent = restclient.DefaultKubernetesUserAgent() } return nil } // NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. This client // can be used to discover supported resources in the API server. -func NewDiscoveryClientForConfig(c *rest.Config) (*DiscoveryClient, error) { +func NewDiscoveryClientForConfig(c *restclient.Config) (*DiscoveryClient, error) { config := *c if err := setDiscoveryDefaults(&config); err != nil { return nil, err } - client, err := rest.UnversionedRESTClientFor(&config) + client, err := restclient.UnversionedRESTClientFor(&config) return &DiscoveryClient{restClient: client, LegacyPrefix: "/api"}, err } // NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. If // there is an error, it panics. -func NewDiscoveryClientForConfigOrDie(c *rest.Config) *DiscoveryClient { +func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient { client, err := NewDiscoveryClientForConfig(c) if err != nil { panic(err) @@ -414,7 +414,7 @@ func NewDiscoveryClientForConfigOrDie(c *rest.Config) *DiscoveryClient { } // New creates a new DiscoveryClient for the given RESTClient. -func NewDiscoveryClient(c rest.Interface) *DiscoveryClient { +func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient { return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"} } @@ -429,7 +429,7 @@ func stringDoesntExistIn(str string, slice []string) bool { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *DiscoveryClient) RESTClient() rest.Interface { +func (c *DiscoveryClient) RESTClient() restclient.Interface { if c == nil { return nil } diff --git a/staging/src/k8s.io/client-go/discovery/discovery_client_test.go b/staging/src/k8s.io/client-go/discovery/discovery_client_test.go index e1350615808..6f5a2ecf6ca 100644 --- a/staging/src/k8s.io/client-go/discovery/discovery_client_test.go +++ b/staging/src/k8s.io/client-go/discovery/discovery_client_test.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) func TestGetServerVersion(t *testing.T) { @@ -50,7 +50,7 @@ func TestGetServerVersion(t *testing.T) { w.Write(output) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) got, err := client.ServerVersion() if err != nil { @@ -85,7 +85,7 @@ func TestGetServerGroupsWithV1Server(t *testing.T) { w.Write(output) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) // ServerGroups should not return an error even if server returns error at /api and /apis apiGroupList, err := client.ServerGroups() if err != nil { @@ -103,7 +103,7 @@ func TestGetServerGroupsWithBrokenServer(t *testing.T) { w.WriteHeader(statusCode) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) // ServerGroups should not return an error even if server returns Not Found or Forbidden error at all end points apiGroupList, err := client.ServerGroups() if err != nil { @@ -140,7 +140,7 @@ func TestGetServerResourcesWithV1Server(t *testing.T) { w.Write(output) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) // ServerResources should not return an error even if server returns error at /api/v1. serverResources, err := client.ServerResources() if err != nil { @@ -232,7 +232,7 @@ func TestGetServerResources(t *testing.T) { w.Write(output) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) for _, test := range tests { got, err := client.ServerResourcesForGroupVersion(test.request) if test.expectErr { @@ -295,7 +295,7 @@ func TestGetSwaggerSchema(t *testing.T) { } defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) got, err := client.SwaggerSchema(v1.SchemeGroupVersion) if err != nil { t.Fatalf("unexpected encoding error: %v", err) @@ -314,7 +314,7 @@ func TestGetSwaggerSchemaFail(t *testing.T) { } defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) got, err := client.SwaggerSchema(schema.GroupVersion{Group: "api.group", Version: "v4"}) if got != nil { t.Fatalf("unexpected response: %v", got) @@ -427,7 +427,7 @@ func TestServerPreferredResources(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(test.response)) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) resources, err := client.ServerPreferredResources() if test.expectErr != nil { if err == nil { @@ -540,7 +540,7 @@ func TestServerPreferredResourcesRetries(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(response(tc.responseErrors))) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) resources, err := client.ServerPreferredResources() if !tc.expectedError(err) { t.Errorf("case %d: unexpected error: %v", i, err) @@ -711,7 +711,7 @@ func TestServerPreferredNamespacedResources(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(test.response)) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) resources, err := client.ServerPreferredNamespacedResources() if err != nil { t.Errorf("[%d] unexpected error: %v", i, err) diff --git a/staging/src/k8s.io/client-go/discovery/fake/discovery.go b/staging/src/k8s.io/client-go/discovery/fake/discovery.go index 534fa23ede7..8fbed28d978 100644 --- a/staging/src/k8s.io/client-go/discovery/fake/discovery.go +++ b/staging/src/k8s.io/client-go/discovery/fake/discovery.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/pkg/api/v1" kubeversion "k8s.io/client-go/pkg/version" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/testing" ) @@ -92,6 +92,6 @@ func (c *FakeDiscovery) SwaggerSchema(version schema.GroupVersion) (*swagger.Api return &swagger.ApiDeclaration{}, nil } -func (c *FakeDiscovery) RESTClient() rest.Interface { +func (c *FakeDiscovery) RESTClient() restclient.Interface { return nil } diff --git a/staging/src/k8s.io/client-go/discovery/helper_blackbox_test.go b/staging/src/k8s.io/client-go/discovery/helper_blackbox_test.go index 1253732b2aa..8731658a255 100644 --- a/staging/src/k8s.io/client-go/discovery/helper_blackbox_test.go +++ b/staging/src/k8s.io/client-go/discovery/helper_blackbox_test.go @@ -34,7 +34,7 @@ import ( "k8s.io/client-go/discovery" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/testapi" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/rest/fake" ) @@ -139,8 +139,8 @@ func TestNegotiateVersion(t *testing.T) { return &http.Response{StatusCode: test.statusCode, Header: header, Body: objBody(&uapi.APIVersions{Versions: test.serverVersions})}, nil }), } - c := discovery.NewDiscoveryClientForConfigOrDie(&rest.Config{}) - c.RESTClient().(*rest.RESTClient).Client = fakeClient.Client + c := discovery.NewDiscoveryClientForConfigOrDie(&restclient.Config{}) + c.RESTClient().(*restclient.RESTClient).Client = fakeClient.Client response, err := discovery.NegotiateVersion(c, test.requiredVersion, test.clientVersions) if err == nil && test.expectErr != nil { t.Errorf("expected error, got nil for [%s].", test.name) diff --git a/staging/src/k8s.io/client-go/discovery/restmapper_test.go b/staging/src/k8s.io/client-go/discovery/restmapper_test.go index deb619e1772..3961ab6f29a 100644 --- a/staging/src/k8s.io/client-go/discovery/restmapper_test.go +++ b/staging/src/k8s.io/client-go/discovery/restmapper_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/rest/fake" "github.com/emicklei/go-restful/swagger" @@ -246,7 +246,7 @@ func (c *fakeCachedDiscoveryInterface) Invalidate() { c.enabledA = true } -func (c *fakeCachedDiscoveryInterface) RESTClient() rest.Interface { +func (c *fakeCachedDiscoveryInterface) RESTClient() restclient.Interface { return &fake.RESTClient{} } diff --git a/staging/src/k8s.io/client-go/dynamic/client.go b/staging/src/k8s.io/client-go/dynamic/client.go index bf3929ed20e..75771dfa438 100644 --- a/staging/src/k8s.io/client-go/dynamic/client.go +++ b/staging/src/k8s.io/client-go/dynamic/client.go @@ -37,19 +37,19 @@ import ( "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/pkg/util/flowcontrol" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // Client is a Kubernetes client that allows you to access metadata // and manipulate metadata of a Kubernetes API group. type Client struct { - cl *rest.RESTClient + cl *restclient.RESTClient parameterCodec runtime.ParameterCodec } // NewClient returns a new client based on the passed in config. The // codec is ignored, as the dynamic client uses it's own codec. -func NewClient(conf *rest.Config) (*Client, error) { +func NewClient(conf *restclient.Config) (*Client, error) { // avoid changing the original config confCopy := *conf conf = &confCopy @@ -66,10 +66,10 @@ func NewClient(conf *rest.Config) (*Client, error) { } if len(conf.UserAgent) == 0 { - conf.UserAgent = rest.DefaultKubernetesUserAgent() + conf.UserAgent = restclient.DefaultKubernetesUserAgent() } - cl, err := rest.RESTClientFor(conf) + cl, err := restclient.RESTClientFor(conf) if err != nil { return nil, err } @@ -105,7 +105,7 @@ func (c *Client) ParameterCodec(parameterCodec runtime.ParameterCodec) *Client { // ResourceClient is an API interface to a specific resource under a // dynamic client. type ResourceClient struct { - cl *rest.RESTClient + cl *restclient.RESTClient resource *metav1.APIResource ns string parameterCodec runtime.ParameterCodec @@ -242,8 +242,8 @@ func (dynamicCodec) Encode(obj runtime.Object, w io.Writer) error { return unstructured.UnstructuredJSONScheme.Encode(obj, w) } -// ContentConfig returns a rest.ContentConfig for dynamic types. -func ContentConfig() rest.ContentConfig { +// ContentConfig returns a restclient.ContentConfig for dynamic types. +func ContentConfig() restclient.ContentConfig { var jsonInfo runtime.SerializerInfo // TODO: api.Codecs here should become "pkg/apis/server/scheme" which is the minimal core you need // to talk to a kubernetes server @@ -256,7 +256,7 @@ func ContentConfig() rest.ContentConfig { jsonInfo.Serializer = dynamicCodec{} jsonInfo.PrettySerializer = nil - return rest.ContentConfig{ + return restclient.ContentConfig{ AcceptContentTypes: runtime.ContentTypeJSON, ContentType: runtime.ContentTypeJSON, NegotiatedSerializer: serializer.NegotiatedSerializerWrapper(jsonInfo), diff --git a/staging/src/k8s.io/client-go/dynamic/client_pool.go b/staging/src/k8s.io/client-go/dynamic/client_pool.go index a5ff7f04332..205d8a0d518 100644 --- a/staging/src/k8s.io/client-go/dynamic/client_pool.go +++ b/staging/src/k8s.io/client-go/dynamic/client_pool.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // ClientPool manages a pool of dynamic clients. @@ -50,7 +50,7 @@ func LegacyAPIPathResolverFunc(kind schema.GroupVersionKind) string { // is asked to retrieve. This type is thread safe. type clientPoolImpl struct { lock sync.RWMutex - config *rest.Config + config *restclient.Config clients map[schema.GroupVersion]*Client apiPathResolverFunc APIPathResolverFunc mapper meta.RESTMapper @@ -59,7 +59,7 @@ type clientPoolImpl struct { // NewClientPool returns a ClientPool from the specified config. It reuses clients for the the same // group version. It is expected this type may be wrapped by specific logic that special cases certain // resources or groups. -func NewClientPool(config *rest.Config, mapper meta.RESTMapper, apiPathResolverFunc APIPathResolverFunc) ClientPool { +func NewClientPool(config *restclient.Config, mapper meta.RESTMapper, apiPathResolverFunc APIPathResolverFunc) ClientPool { confCopy := *config return &clientPoolImpl{ diff --git a/staging/src/k8s.io/client-go/dynamic/client_test.go b/staging/src/k8s.io/client-go/dynamic/client_test.go index 3499e43ea45..418aecbaf2f 100644 --- a/staging/src/k8s.io/client-go/dynamic/client_test.go +++ b/staging/src/k8s.io/client-go/dynamic/client_test.go @@ -33,7 +33,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" restclientwatch "k8s.io/client-go/rest/watch" ) @@ -61,9 +61,9 @@ func getObject(version, kind, name string) *unstructured.Unstructured { func getClientServer(gv *schema.GroupVersion, h func(http.ResponseWriter, *http.Request)) (*Client, *httptest.Server, error) { srv := httptest.NewServer(http.HandlerFunc(h)) - cl, err := NewClient(&rest.Config{ + cl, err := NewClient(&restclient.Config{ Host: srv.URL, - ContentConfig: rest.ContentConfig{GroupVersion: gv}, + ContentConfig: restclient.ContentConfig{GroupVersion: gv}, }) if err != nil { srv.Close() diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go index 4fe2a05b263..c54c1658312 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go @@ -19,7 +19,7 @@ package fake import ( "k8s.io/client-go/pkg/api/v1" policy "k8s.io/client-go/pkg/apis/policy/v1beta1" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/testing" ) @@ -34,7 +34,7 @@ func (c *FakePods) Bind(binding *v1.Binding) error { return err } -func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request { +func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request { action := testing.GenericActionImpl{} action.Verb = "get" action.Namespace = c.ns @@ -43,7 +43,7 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request { action.Value = opts _, _ = c.Fake.Invokes(action, &v1.Pod{}) - return &rest.Request{} + return &restclient.Request{} } func (c *FakePods) Evict(eviction *policy.Eviction) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go index f3128b8f8f8..59fa8e51241 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go @@ -17,10 +17,10 @@ limitations under the License. package fake import ( - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/testing" ) -func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper { +func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { return c.Fake.InvokesProxy(testing.NewProxyGetAction(servicesResource, c.ns, scheme, name, port, path, params)) } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go index c54ba6a7afe..82f3b7fba34 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go @@ -20,14 +20,14 @@ import ( "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" policy "k8s.io/client-go/pkg/apis/policy/v1beta1" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // The PodExpansion interface allows manually adding extra methods to the PodInterface. type PodExpansion interface { Bind(binding *v1.Binding) error Evict(eviction *policy.Eviction) error - GetLogs(name string, opts *v1.PodLogOptions) *rest.Request + GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request } // Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored). @@ -40,6 +40,6 @@ func (c *pods) Evict(eviction *policy.Eviction) error { } // Get constructs a request for getting the logs for a pod -func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request { +func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request { return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, api.ParameterCodec) } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go index 07b212bbfa0..d2bb531d765 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go @@ -18,16 +18,16 @@ package v1 import ( "k8s.io/apimachinery/pkg/util/net" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface. type ServiceExpansion interface { - ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper + ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper } // ProxyGet returns a response of the service by calling it through the proxy. -func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper { +func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { request := c.client.Get(). Prefix("proxy"). Namespace(c.ns). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/doc.go deleted file mode 100644 index bc5df818d9e..00000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/doc.go deleted file mode 100644 index b320cb63658..00000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// Package fake has the automatically generated clients. -package fake diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go deleted file mode 100644 index e10dc904c32..00000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - labels "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/client-go/pkg/api/v1" - v1alpha1 "k8s.io/client-go/pkg/apis/policy/v1alpha1" - testing "k8s.io/client-go/testing" -) - -// FakePodDisruptionBudgets implements PodDisruptionBudgetInterface -type FakePodDisruptionBudgets struct { - Fake *FakePolicyV1alpha1 - ns string -} - -var poddisruptionbudgetsResource = schema.GroupVersionResource{Group: "policy", Version: "v1alpha1", Resource: "poddisruptionbudgets"} - -func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{}) - - return err -} - -func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.PodDisruptionBudgetList{}) - return err -} - -func (c *FakePodDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(poddisruptionbudgetsResource, c.ns, opts), &v1alpha1.PodDisruptionBudgetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.PodDisruptionBudgetList{} - for _, item := range obj.(*v1alpha1.PodDisruptionBudgetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *FakePodDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) - -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go deleted file mode 100644 index 8b233265925..00000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - v1alpha1 "k8s.io/client-go/kubernetes/typed/policy/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakePolicyV1alpha1 struct { - *testing.Fake -} - -func (c *FakePolicyV1alpha1) PodDisruptionBudgets(namespace string) v1alpha1.PodDisruptionBudgetInterface { - return &FakePodDisruptionBudgets{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakePolicyV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/generated_expansion.go deleted file mode 100644 index a2e74c84dff..00000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -type PodDisruptionBudgetExpansion interface{} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go deleted file mode 100644 index f29ae41a906..00000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" - v1 "k8s.io/client-go/pkg/api/v1" - v1alpha1 "k8s.io/client-go/pkg/apis/policy/v1alpha1" - rest "k8s.io/client-go/rest" -) - -// PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. -// A group's client should implement this interface. -type PodDisruptionBudgetsGetter interface { - PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface -} - -// PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. -type PodDisruptionBudgetInterface interface { - Create(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Update(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - UpdateStatus(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string) (*v1alpha1.PodDisruptionBudget, error) - List(opts v1.ListOptions) (*v1alpha1.PodDisruptionBudgetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) - PodDisruptionBudgetExpansion -} - -// podDisruptionBudgets implements PodDisruptionBudgetInterface -type podDisruptionBudgets struct { - client rest.Interface - ns string -} - -// newPodDisruptionBudgets returns a PodDisruptionBudgets -func newPodDisruptionBudgets(c *PolicyV1alpha1Client, namespace string) *podDisruptionBudgets { - return &podDisruptionBudgets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Post(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - SubResource("status"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&listOptions, api.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *podDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) { - result = &v1alpha1.PodDisruptionBudgetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.client.Get(). - Prefix("watch"). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). - Watch() -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/policy_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/policy_client.go deleted file mode 100644 index 353a8e6fa61..00000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/policy_client.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - fmt "fmt" - - "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - api "k8s.io/client-go/pkg/api" - rest "k8s.io/client-go/rest" -) - -type PolicyV1alpha1Interface interface { - RESTClient() rest.Interface - PodDisruptionBudgetsGetter -} - -// PolicyV1alpha1Client is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group. -type PolicyV1alpha1Client struct { - restClient rest.Interface -} - -func (c *PolicyV1alpha1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { - return newPodDisruptionBudgets(c, namespace) -} - -// NewForConfig creates a new PolicyV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*PolicyV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &PolicyV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new PolicyV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PolicyV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new PolicyV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *PolicyV1alpha1Client { - return &PolicyV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv, err := schema.ParseGroupVersion("policy/v1alpha1") - if err != nil { - return err - } - // if policy/v1alpha1 is not enabled, return an error - if !api.Registry.IsEnabledVersion(gv) { - return fmt.Errorf("policy/v1alpha1 is not enabled") - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - copyGroupVersion := gv - config.GroupVersion = ©GroupVersion - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *PolicyV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/staging/src/k8s.io/client-go/pkg/api/validation/path/name.go b/staging/src/k8s.io/client-go/pkg/api/validation/path/name.go deleted file mode 100644 index a50cd089dfb..00000000000 --- a/staging/src/k8s.io/client-go/pkg/api/validation/path/name.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package path - -import ( - "fmt" - "strings" -) - -// NameMayNotBe specifies strings that cannot be used as names specified as path segments (like the REST API or etcd store) -var NameMayNotBe = []string{".", ".."} - -// NameMayNotContain specifies substrings that cannot be used in names specified as path segments (like the REST API or etcd store) -var NameMayNotContain = []string{"/", "%"} - -// IsValidPathSegmentName validates the name can be safely encoded as a path segment -func IsValidPathSegmentName(name string) []string { - for _, illegalName := range NameMayNotBe { - if name == illegalName { - return []string{fmt.Sprintf(`may not be '%s'`, illegalName)} - } - } - - var errors []string - for _, illegalContent := range NameMayNotContain { - if strings.Contains(name, illegalContent) { - errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) - } - } - - return errors -} - -// IsValidPathSegmentPrefix validates the name can be used as a prefix for a name which will be encoded as a path segment -// It does not check for exact matches with disallowed names, since an arbitrary suffix might make the name valid -func IsValidPathSegmentPrefix(name string) []string { - var errors []string - for _, illegalContent := range NameMayNotContain { - if strings.Contains(name, illegalContent) { - errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) - } - } - - return errors -} - -// ValidatePathSegmentName validates the name can be safely encoded as a path segment -func ValidatePathSegmentName(name string, prefix bool) []string { - if prefix { - return IsValidPathSegmentPrefix(name) - } else { - return IsValidPathSegmentName(name) - } -} diff --git a/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/doc.go b/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/doc.go deleted file mode 100644 index 65d58233ee1..00000000000 --- a/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package policy is for any kind of policy object. Suitable examples, even if -// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy, -// NetworkPolicy, etc. -package v1alpha1 diff --git a/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/register.go b/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/register.go deleted file mode 100644 index ac924635a30..00000000000 --- a/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/register.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/pkg/api/v1" -) - -// GroupName is the group name use in this package -const GroupName = "policy" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &PodDisruptionBudget{}, - &PodDisruptionBudgetList{}, - &Eviction{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - ) - // Add the watch version that applies - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/types.go b/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/types.go deleted file mode 100644 index 6c875028477..00000000000 --- a/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/types.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/util/intstr" -) - -// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. -type PodDisruptionBudgetSpec struct { - // An eviction is allowed if at least "minAvailable" pods selected by - // "selector" will still be available after the eviction, i.e. even in the - // absence of the evicted pod. So for example you can prevent all voluntary - // evictions by specifying "100%". - // +optional - MinAvailable intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"` - - // Label query over pods whose evictions are managed by the disruption - // budget. - // +optional - Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` -} - -// PodDisruptionBudgetStatus represents information about the status of a -// PodDisruptionBudget. Status may trail the actual state of a system. -type PodDisruptionBudgetStatus struct { - // Whether or not a disruption is currently allowed. - PodDisruptionAllowed bool `json:"disruptionAllowed" protobuf:"varint,1,opt,name=disruptionAllowed"` - - // current number of healthy pods - CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,2,opt,name=currentHealthy"` - - // minimum desired number of healthy pods - DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,3,opt,name=desiredHealthy"` - - // total number of pods counted by this disruption budget - ExpectedPods int32 `json:"expectedPods" protobuf:"varint,4,opt,name=expectedPods"` -} - -// +genclient=true - -// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods -type PodDisruptionBudget struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Specification of the desired behavior of the PodDisruptionBudget. - // +optional - Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // Most recently observed status of the PodDisruptionBudget. - // +optional - Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. -type PodDisruptionBudgetList struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Eviction evicts a pod from its node subject to certain policies and safety constraints. -// This is a subresource of Pod. A request to cause such an eviction is -// created by POSTing to .../pods//eviction. -type Eviction struct { - metav1.TypeMeta `json:",inline"` - - // ObjectMeta describes the pod that is being evicted. - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // DeleteOptions may be provided - // +optional - DeleteOptions *v1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` -} diff --git a/staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD b/staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD deleted file mode 100644 index a7403fd473c..00000000000 --- a/staging/src/k8s.io/client-go/pkg/util/cert/triple/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("@io_bazel_rules_go//go:def.bzl") - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go index 84a957675f0..a891fd575c1 100644 --- a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go +++ b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go @@ -32,11 +32,11 @@ import ( "golang.org/x/oauth2/google" "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/client-go/pkg/util/jsonpath" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) func init() { - if err := rest.RegisterAuthProviderPlugin("gcp", newGCPAuthProvider); err != nil { + if err := restclient.RegisterAuthProviderPlugin("gcp", newGCPAuthProvider); err != nil { glog.Fatalf("Failed to register gcp auth plugin: %v", err) } } @@ -85,10 +85,10 @@ func init() { // type gcpAuthProvider struct { tokenSource oauth2.TokenSource - persister rest.AuthProviderConfigPersister + persister restclient.AuthProviderConfigPersister } -func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister rest.AuthProviderConfigPersister) (rest.AuthProvider, error) { +func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { cmd, useCmd := gcpConfig["cmd-path"] var ts oauth2.TokenSource var err error @@ -121,11 +121,11 @@ type cachedTokenSource struct { source oauth2.TokenSource accessToken string expiry time.Time - persister rest.AuthProviderConfigPersister + persister restclient.AuthProviderConfigPersister cache map[string]string } -func newCachedTokenSource(accessToken, expiry string, persister rest.AuthProviderConfigPersister, ts oauth2.TokenSource, cache map[string]string) (*cachedTokenSource, error) { +func newCachedTokenSource(accessToken, expiry string, persister restclient.AuthProviderConfigPersister, ts oauth2.TokenSource, cache map[string]string) (*cachedTokenSource, error) { var expiryTime time.Time if parsedTime, err := time.Parse(time.RFC3339Nano, expiry); err == nil { expiryTime = parsedTime diff --git a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go index 606be4538d2..ca5b72cbd60 100644 --- a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go +++ b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go @@ -30,7 +30,7 @@ import ( "github.com/coreos/go-oidc/oidc" "github.com/golang/glog" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) const ( @@ -45,7 +45,7 @@ const ( ) func init() { - if err := rest.RegisterAuthProviderPlugin("oidc", newOIDCAuthProvider); err != nil { + if err := restclient.RegisterAuthProviderPlugin("oidc", newOIDCAuthProvider); err != nil { glog.Fatalf("Failed to register oidc auth plugin: %v", err) } } @@ -106,7 +106,7 @@ func (c *clientCache) setClient(issuer, clientID, clientSecret string, client *o return client } -func newOIDCAuthProvider(_ string, cfg map[string]string, persister rest.AuthProviderConfigPersister) (rest.AuthProvider, error) { +func newOIDCAuthProvider(_ string, cfg map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { issuer := cfg[cfgIssuerUrl] if issuer == "" { return nil, fmt.Errorf("Must provide %s", cfgIssuerUrl) @@ -136,14 +136,14 @@ func newOIDCAuthProvider(_ string, cfg map[string]string, persister rest.AuthPro } } - clientConfig := rest.Config{ - TLSClientConfig: rest.TLSClientConfig{ + clientConfig := restclient.Config{ + TLSClientConfig: restclient.TLSClientConfig{ CAFile: cfg[cfgCertificateAuthority], CAData: certAuthData, }, } - trans, err := rest.TransportFor(&clientConfig) + trans, err := restclient.TransportFor(&clientConfig) if err != nil { return nil, err } @@ -191,7 +191,7 @@ type oidcAuthProvider struct { // the RoundTripper only trigger a single refresh request. mu sync.Mutex cfg map[string]string - persister rest.AuthProviderConfigPersister + persister restclient.AuthProviderConfigPersister } func (p *oidcAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper { diff --git a/staging/src/k8s.io/client-go/rest/fake/fake.go b/staging/src/k8s.io/client-go/rest/fake/fake.go index 7882006fe79..f3447f44721 100644 --- a/staging/src/k8s.io/client-go/rest/fake/fake.go +++ b/staging/src/k8s.io/client-go/rest/fake/fake.go @@ -28,7 +28,7 @@ import ( "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/testapi" "k8s.io/client-go/pkg/util/flowcontrol" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) func CreateHTTPClient(roundTripper func(*http.Request) (*http.Response, error)) *http.Client { @@ -54,27 +54,27 @@ type RESTClient struct { Err error } -func (c *RESTClient) Get() *rest.Request { +func (c *RESTClient) Get() *restclient.Request { return c.request("GET") } -func (c *RESTClient) Put() *rest.Request { +func (c *RESTClient) Put() *restclient.Request { return c.request("PUT") } -func (c *RESTClient) Patch(_ types.PatchType) *rest.Request { +func (c *RESTClient) Patch(_ types.PatchType) *restclient.Request { return c.request("PATCH") } -func (c *RESTClient) Post() *rest.Request { +func (c *RESTClient) Post() *restclient.Request { return c.request("POST") } -func (c *RESTClient) Delete() *rest.Request { +func (c *RESTClient) Delete() *restclient.Request { return c.request("DELETE") } -func (c *RESTClient) Verb(verb string) *rest.Request { +func (c *RESTClient) Verb(verb string) *restclient.Request { return c.request(verb) } @@ -86,8 +86,8 @@ func (c *RESTClient) GetRateLimiter() flowcontrol.RateLimiter { return nil } -func (c *RESTClient) request(verb string) *rest.Request { - config := rest.ContentConfig{ +func (c *RESTClient) request(verb string) *restclient.Request { + config := restclient.ContentConfig{ ContentType: runtime.ContentTypeJSON, GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion, NegotiatedSerializer: c.NegotiatedSerializer, @@ -104,7 +104,7 @@ func (c *RESTClient) request(verb string) *rest.Request { Version: runtime.APIVersionInternal, } internalVersion.Version = runtime.APIVersionInternal - serializers := rest.Serializers{ + serializers := restclient.Serializers{ Encoder: ns.EncoderForVersion(info.Serializer, api.Registry.GroupOrDie(api.GroupName).GroupVersion), Decoder: ns.DecoderToVersion(info.Serializer, internalVersion), } @@ -112,7 +112,7 @@ func (c *RESTClient) request(verb string) *rest.Request { serializers.StreamingSerializer = info.StreamSerializer.Serializer serializers.Framer = info.StreamSerializer.Framer } - return rest.NewRequest(c, verb, &url.URL{Host: "localhost"}, "", config, serializers, nil, nil) + return restclient.NewRequest(c, verb, &url.URL{Host: "localhost"}, "", config, serializers, nil, nil) } func (c *RESTClient) Do(req *http.Request) (*http.Response, error) { diff --git a/staging/src/k8s.io/client-go/testing/fake.go b/staging/src/k8s.io/client-go/testing/fake.go index 32a860f8e35..da47b23b952 100644 --- a/staging/src/k8s.io/client-go/testing/fake.go +++ b/staging/src/k8s.io/client-go/testing/fake.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/version" "k8s.io/apimachinery/pkg/watch" kubeversion "k8s.io/client-go/pkg/version" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // Fake implements client.Interface. Meant to be embedded into a struct to get @@ -77,7 +77,7 @@ type ProxyReactor interface { Handles(action Action) bool // React handles a watch action and returns results. It may choose to // delegate by indicating handled=false. - React(action Action) (handled bool, ret rest.ResponseWrapper, err error) + React(action Action) (handled bool, ret restclient.ResponseWrapper, err error) } // ReactionFunc is a function that returns an object or error for a given @@ -95,7 +95,7 @@ type WatchReactionFunc func(action Action) (handled bool, ret watch.Interface, e // ProxyReactionFunc is a function that returns a ResponseWrapper interface // for a given Action. If "handled" is false, then the test client will // ignore the results and continue to the next ProxyReactionFunc. -type ProxyReactionFunc func(action Action) (handled bool, ret rest.ResponseWrapper, err error) +type ProxyReactionFunc func(action Action) (handled bool, ret restclient.ResponseWrapper, err error) // AddReactor appends a reactor to the end of the chain. func (c *Fake) AddReactor(verb, resource string, reaction ReactionFunc) { @@ -176,7 +176,7 @@ func (c *Fake) InvokesWatch(action Action) (watch.Interface, error) { // InvokesProxy records the provided Action and then invokes the ReactionFunc // that handles the action if one exists. -func (c *Fake) InvokesProxy(action Action) rest.ResponseWrapper { +func (c *Fake) InvokesProxy(action Action) restclient.ResponseWrapper { c.Lock() defer c.Unlock() diff --git a/staging/src/k8s.io/client-go/testing/fixture.go b/staging/src/k8s.io/client-go/testing/fixture.go index 065022183c1..64a617cf854 100644 --- a/staging/src/k8s.io/client-go/testing/fixture.go +++ b/staging/src/k8s.io/client-go/testing/fixture.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // ObjectTracker keeps track of objects. It is intended to be used to @@ -511,6 +511,6 @@ func (r *SimpleProxyReactor) Handles(action Action) bool { return true } -func (r *SimpleProxyReactor) React(action Action) (bool, rest.ResponseWrapper, error) { +func (r *SimpleProxyReactor) React(action Action) (bool, restclient.ResponseWrapper, error) { return r.Reaction(action) } diff --git a/staging/src/k8s.io/client-go/tools/auth/clientauth.go b/staging/src/k8s.io/client-go/tools/auth/clientauth.go index d820adcafe2..2213b987816 100644 --- a/staging/src/k8s.io/client-go/tools/auth/clientauth.go +++ b/staging/src/k8s.io/client-go/tools/auth/clientauth.go @@ -68,7 +68,7 @@ import ( "io/ioutil" "os" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // Info holds Kubernetes API authorization config. It is intended @@ -104,8 +104,8 @@ func LoadFromFile(path string) (*Info, error) { // MergeWithConfig returns a copy of a client.Config with values from the Info. // The fields of client.Config with a corresponding field in the Info are set // with the value from the Info. -func (info Info) MergeWithConfig(c rest.Config) (rest.Config, error) { - var config rest.Config = c +func (info Info) MergeWithConfig(c restclient.Config) (restclient.Config, error) { + var config restclient.Config = c config.Username = info.User config.Password = info.Password config.CAFile = info.CAFile diff --git a/staging/src/k8s.io/client-go/tools/cache/listwatch.go b/staging/src/k8s.io/client-go/tools/cache/listwatch.go index c1270060a0a..c3d1eeceafd 100644 --- a/staging/src/k8s.io/client-go/tools/cache/listwatch.go +++ b/staging/src/k8s.io/client-go/tools/cache/listwatch.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource. @@ -53,7 +53,7 @@ type ListWatch struct { // Getter interface knows how to access Get method from RESTClient. type Getter interface { - Get() *rest.Request + Get() *restclient.Request } // NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector. diff --git a/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go b/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go index 66206879884..39e923ea00a 100644 --- a/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go +++ b/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go @@ -28,7 +28,7 @@ import ( "github.com/imdario/mergo" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientauth "k8s.io/client-go/tools/auth" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -58,7 +58,7 @@ type ClientConfig interface { // RawConfig returns the merged result of all overrides RawConfig() (clientcmdapi.Config, error) // ClientConfig returns a complete client config - ClientConfig() (*rest.Config, error) + ClientConfig() (*restclient.Config, error) // Namespace returns the namespace resulting from the merged // result of all overrides and a boolean indicating if it was // overridden @@ -67,7 +67,7 @@ type ClientConfig interface { ConfigAccess() ConfigAccess } -type PersistAuthProviderConfigForUser func(user string) rest.AuthProviderConfigPersister +type PersistAuthProviderConfigForUser func(user string) restclient.AuthProviderConfigPersister type promptedCredentials struct { username string @@ -105,7 +105,7 @@ func (config *DirectClientConfig) RawConfig() (clientcmdapi.Config, error) { } // ClientConfig implements ClientConfig -func (config *DirectClientConfig) ClientConfig() (*rest.Config, error) { +func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) { // check that getAuthInfo, getContext, and getCluster do not return an error. // Do this before checking if the curent config is usable in the event that an // AuthInfo, Context, or Cluster config with user-defined names are not found. @@ -129,7 +129,7 @@ func (config *DirectClientConfig) ClientConfig() (*rest.Config, error) { return nil, err } - clientConfig := &rest.Config{} + clientConfig := &restclient.Config{} clientConfig.Host = configClusterInfo.Server if len(config.overrides.Timeout) > 0 { @@ -146,17 +146,17 @@ func (config *DirectClientConfig) ClientConfig() (*rest.Config, error) { clientConfig.Host = u.String() } if len(configAuthInfo.Impersonate) > 0 { - clientConfig.Impersonate = rest.ImpersonationConfig{UserName: configAuthInfo.Impersonate} + clientConfig.Impersonate = restclient.ImpersonationConfig{UserName: configAuthInfo.Impersonate} } // only try to read the auth information if we are secure - if rest.IsConfigTransportTLS(*clientConfig) { + if restclient.IsConfigTransportTLS(*clientConfig) { var err error // mergo is a first write wins for map value and a last writing wins for interface values // NOTE: This behavior changed with https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a. // Our mergo.Merge version is older than this change. - var persister rest.AuthProviderConfigPersister + var persister restclient.AuthProviderConfigPersister if config.configAccess != nil { authInfoName, _ := config.getAuthInfoName() persister = PersisterForUser(config.configAccess, authInfoName) @@ -183,11 +183,11 @@ func (config *DirectClientConfig) ClientConfig() (*rest.Config, error) { // 1. configClusterInfo (the final result of command line flags and merged .kubeconfig files) // 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) // 3. load the ~/.kubernetes_auth file as a default -func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClusterInfo clientcmdapi.Cluster) (*rest.Config, error) { - mergedConfig := &rest.Config{} +func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClusterInfo clientcmdapi.Cluster) (*restclient.Config, error) { + mergedConfig := &restclient.Config{} // configClusterInfo holds the information identify the server provided by .kubeconfig - configClientConfig := &rest.Config{} + configClientConfig := &restclient.Config{} configClientConfig.CAFile = configClusterInfo.CertificateAuthority configClientConfig.CAData = configClusterInfo.CertificateAuthorityData configClientConfig.Insecure = configClusterInfo.InsecureSkipTLSVerify @@ -203,8 +203,8 @@ func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, // 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) // 3. if there is not enough information to idenfity the user, load try the ~/.kubernetes_auth file // 4. if there is not enough information to identify the user, prompt if possible -func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, fallbackReader io.Reader, persistAuthConfig rest.AuthProviderConfigPersister) (*rest.Config, error) { - mergedConfig := &rest.Config{} +func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, fallbackReader io.Reader, persistAuthConfig restclient.AuthProviderConfigPersister) (*restclient.Config, error) { + mergedConfig := &restclient.Config{} // blindly overwrite existing values based on precedence if len(configAuthInfo.Token) > 0 { @@ -217,7 +217,7 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI mergedConfig.BearerToken = string(tokenBytes) } if len(configAuthInfo.Impersonate) > 0 { - mergedConfig.Impersonate = rest.ImpersonationConfig{UserName: configAuthInfo.Impersonate} + mergedConfig.Impersonate = restclient.ImpersonationConfig{UserName: configAuthInfo.Impersonate} } if len(configAuthInfo.ClientCertificate) > 0 || len(configAuthInfo.ClientCertificateData) > 0 { mergedConfig.CertFile = configAuthInfo.ClientCertificate @@ -248,7 +248,7 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI } promptedConfig := makeUserIdentificationConfig(*promptedAuthInfo) previouslyMergedConfig := mergedConfig - mergedConfig = &rest.Config{} + mergedConfig = &restclient.Config{} mergo.Merge(mergedConfig, promptedConfig) mergo.Merge(mergedConfig, previouslyMergedConfig) config.promptedCredentials.username = mergedConfig.Username @@ -259,8 +259,8 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI } // makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only user identification information -func makeUserIdentificationConfig(info clientauth.Info) *rest.Config { - config := &rest.Config{} +func makeUserIdentificationConfig(info clientauth.Info) *restclient.Config { + config := &restclient.Config{} config.Username = info.User config.Password = info.Password config.CertFile = info.CertFile @@ -270,8 +270,8 @@ func makeUserIdentificationConfig(info clientauth.Info) *rest.Config { } // makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only server identification information -func makeServerIdentificationConfig(info clientauth.Info) rest.Config { - config := rest.Config{} +func makeServerIdentificationConfig(info clientauth.Info) restclient.Config { + config := restclient.Config{} config.CAFile = info.CAFile if info.Insecure != nil { config.Insecure = *info.Insecure @@ -279,7 +279,7 @@ func makeServerIdentificationConfig(info clientauth.Info) rest.Config { return config } -func canIdentifyUser(config rest.Config) bool { +func canIdentifyUser(config restclient.Config) bool { return len(config.Username) > 0 || (len(config.CertFile) > 0 || len(config.CertData) > 0) || len(config.BearerToken) > 0 || @@ -442,7 +442,7 @@ func (config *DirectClientConfig) getCluster() (clientcmdapi.Cluster, error) { // Can take options overrides for flags explicitly provided to the command inside the cluster container. type inClusterClientConfig struct { overrides *ConfigOverrides - inClusterConfigProvider func() (*rest.Config, error) + inClusterConfigProvider func() (*restclient.Config, error) } var _ ClientConfig = &inClusterClientConfig{} @@ -451,9 +451,9 @@ func (config *inClusterClientConfig) RawConfig() (clientcmdapi.Config, error) { return clientcmdapi.Config{}, fmt.Errorf("inCluster environment config doesn't support multiple clusters") } -func (config *inClusterClientConfig) ClientConfig() (*rest.Config, error) { +func (config *inClusterClientConfig) ClientConfig() (*restclient.Config, error) { if config.inClusterConfigProvider == nil { - config.inClusterConfigProvider = rest.InClusterConfig + config.inClusterConfigProvider = restclient.InClusterConfig } icc, err := config.inClusterConfigProvider() @@ -512,10 +512,10 @@ func (config *inClusterClientConfig) Possible() bool { // components. Warnings should reflect this usage. If neither masterUrl or kubeconfigPath // are passed in we fallback to inClusterConfig. If inClusterConfig fails, we fallback // to the default config. -func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*rest.Config, error) { +func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*restclient.Config, error) { if kubeconfigPath == "" && masterUrl == "" { glog.Warningf("Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.") - kubeconfig, err := rest.InClusterConfig() + kubeconfig, err := restclient.InClusterConfig() if err == nil { return kubeconfig, nil } @@ -528,7 +528,7 @@ func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*rest.Config, error // BuildConfigFromKubeconfigGetter is a helper function that builds configs from a master // url and a kubeconfigGetter. -func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter KubeconfigGetter) (*rest.Config, error) { +func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter KubeconfigGetter) (*restclient.Config, error) { // TODO: We do not need a DeferredLoader here. Refactor code and see if we can use DirectClientConfig here. cc := NewNonInteractiveDeferredLoadingClientConfig( &ClientConfigGetter{kubeconfigGetter: kubeconfigGetter}, diff --git a/staging/src/k8s.io/client-go/tools/clientcmd/client_config_test.go b/staging/src/k8s.io/client-go/tools/clientcmd/client_config_test.go index c78cca276f5..0cbff3f8efa 100644 --- a/staging/src/k8s.io/client-go/tools/clientcmd/client_config_test.go +++ b/staging/src/k8s.io/client-go/tools/clientcmd/client_config_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/imdario/mergo" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -448,11 +448,11 @@ func TestInClusterClientConfigPrecedence(t *testing.T) { expectedCAFile := "/path/to/ca-from-cluster.crt" icc := &inClusterClientConfig{ - inClusterConfigProvider: func() (*rest.Config, error) { - return &rest.Config{ + inClusterConfigProvider: func() (*restclient.Config, error) { + return &restclient.Config{ Host: expectedServer, BearerToken: expectedToken, - TLSClientConfig: rest.TLSClientConfig{ + TLSClientConfig: restclient.TLSClientConfig{ CAFile: expectedCAFile, }, }, nil diff --git a/staging/src/k8s.io/client-go/tools/clientcmd/config.go b/staging/src/k8s.io/client-go/tools/clientcmd/config.go index 3e5aa49a38f..16ccdaf20a2 100644 --- a/staging/src/k8s.io/client-go/tools/clientcmd/config.go +++ b/staging/src/k8s.io/client-go/tools/clientcmd/config.go @@ -26,7 +26,7 @@ import ( "github.com/golang/glog" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -325,7 +325,7 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela return nil } -func PersisterForUser(configAccess ConfigAccess, user string) rest.AuthProviderConfigPersister { +func PersisterForUser(configAccess ConfigAccess, user string) restclient.AuthProviderConfigPersister { return &persister{configAccess, user} } diff --git a/staging/src/k8s.io/client-go/tools/clientcmd/loader.go b/staging/src/k8s.io/client-go/tools/clientcmd/loader.go index 5fcc0ad5f7c..9d8b6592c54 100644 --- a/staging/src/k8s.io/client-go/tools/clientcmd/loader.go +++ b/staging/src/k8s.io/client-go/tools/clientcmd/loader.go @@ -34,7 +34,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/pkg/util/homedir" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" clientcmdlatest "k8s.io/client-go/tools/clientcmd/api/latest" ) @@ -68,7 +68,7 @@ func currentMigrationRules() map[string]string { type ClientConfigLoader interface { ConfigAccess // IsDefaultConfig returns true if the returned config matches the defaults. - IsDefaultConfig(*rest.Config) bool + IsDefaultConfig(*restclient.Config) bool // Load returns the latest config Load() (*clientcmdapi.Config, error) } @@ -101,7 +101,7 @@ func (g *ClientConfigGetter) IsExplicitFile() bool { func (g *ClientConfigGetter) GetExplicitFile() string { return "" } -func (g *ClientConfigGetter) IsDefaultConfig(config *rest.Config) bool { +func (g *ClientConfigGetter) IsDefaultConfig(config *restclient.Config) bool { return false } @@ -330,7 +330,7 @@ func (rules *ClientConfigLoadingRules) GetExplicitFile() string { } // IsDefaultConfig returns true if the provided configuration matches the default -func (rules *ClientConfigLoadingRules) IsDefaultConfig(config *rest.Config) bool { +func (rules *ClientConfigLoadingRules) IsDefaultConfig(config *restclient.Config) bool { if rules.DefaultClientConfig == nil { return false } diff --git a/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder.go b/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder.go index ef15deed25f..92c1a5a0061 100644 --- a/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder.go +++ b/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder.go @@ -22,7 +22,7 @@ import ( "github.com/golang/glog" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -94,7 +94,7 @@ func (config *DeferredLoadingClientConfig) RawConfig() (clientcmdapi.Config, err } // ClientConfig implements ClientConfig -func (config *DeferredLoadingClientConfig) ClientConfig() (*rest.Config, error) { +func (config *DeferredLoadingClientConfig) ClientConfig() (*restclient.Config, error) { mergedClientConfig, err := config.createClientConfig() if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go b/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go index e73fc93b117..8b0386764d5 100644 --- a/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go +++ b/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go @@ -20,7 +20,7 @@ import ( "fmt" "testing" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -38,7 +38,7 @@ func (l *testLoader) Load() (*clientcmdapi.Config, error) { } type testClientConfig struct { - config *rest.Config + config *restclient.Config namespace string namespaceSpecified bool err error @@ -47,7 +47,7 @@ type testClientConfig struct { func (c *testClientConfig) RawConfig() (clientcmdapi.Config, error) { return clientcmdapi.Config{}, fmt.Errorf("unexpected call") } -func (c *testClientConfig) ClientConfig() (*rest.Config, error) { +func (c *testClientConfig) ClientConfig() (*restclient.Config, error) { return c.config, c.err } func (c *testClientConfig) Namespace() (string, bool, error) { @@ -95,7 +95,7 @@ func TestInClusterConfig(t *testing.T) { if err != nil { t.Fatal(err) } - config2 := &rest.Config{Host: "config2"} + config2 := &restclient.Config{Host: "config2"} err1 := fmt.Errorf("unique error") testCases := map[string]struct { @@ -104,7 +104,7 @@ func TestInClusterConfig(t *testing.T) { defaultConfig *DirectClientConfig checkedICC bool - result *rest.Config + result *restclient.Config err error }{ "in-cluster checked on other error": { diff --git a/staging/src/k8s.io/client-go/tools/record/event.go b/staging/src/k8s.io/client-go/tools/record/event.go index 9162fc0c24a..e195cc838b3 100644 --- a/staging/src/k8s.io/client-go/tools/record/event.go +++ b/staging/src/k8s.io/client-go/tools/record/event.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/pkg/util/clock" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "net/http" @@ -188,7 +188,7 @@ func recordEvent(sink EventSink, event *v1.Event, patch []byte, updateExistingEv // If we can't contact the server, then hold everything while we keep trying. // Otherwise, something about the event is malformed and we should abandon it. switch err.(type) { - case *rest.RequestConstructionError: + case *restclient.RequestConstructionError: // We will construct the request the same next time, so don't keep trying. glog.Errorf("Unable to construct event '%#v': '%v' (will not retry!)", event, err) return true diff --git a/staging/src/k8s.io/client-go/tools/record/event_test.go b/staging/src/k8s.io/client-go/tools/record/event_test.go index cfef4fb8550..60bc928eed4 100644 --- a/staging/src/k8s.io/client-go/tools/record/event_test.go +++ b/staging/src/k8s.io/client-go/tools/record/event_test.go @@ -32,7 +32,7 @@ import ( "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/pkg/util/clock" "k8s.io/client-go/pkg/util/strategicpatch" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) type testEventSink struct { @@ -387,7 +387,7 @@ func TestWriteEventError(t *testing.T) { "giveUp1": { timesToSendError: 1000, attemptsWanted: 1, - err: &rest.RequestConstructionError{}, + err: &restclient.RequestConstructionError{}, }, "giveUp2": { timesToSendError: 1000, diff --git a/vendor/BUILD b/vendor/BUILD index 3bd9187678b..8938efee3d4 100644 --- a/vendor/BUILD +++ b/vendor/BUILD @@ -11270,48 +11270,6 @@ go_library( ], ) -go_library( - name = "k8s.io/client-go/kubernetes/typed/policy/v1alpha1", - srcs = [ - "k8s.io/client-go/kubernetes/typed/policy/v1alpha1/doc.go", - "k8s.io/client-go/kubernetes/typed/policy/v1alpha1/generated_expansion.go", - "k8s.io/client-go/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go", - "k8s.io/client-go/kubernetes/typed/policy/v1alpha1/policy_client.go", - ], - tags = ["automanaged"], - deps = [ - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", - "//vendor:k8s.io/apimachinery/pkg/types", - "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/client-go/pkg/api", - "//vendor:k8s.io/client-go/pkg/api/v1", - "//vendor:k8s.io/client-go/pkg/apis/policy/v1alpha1", - "//vendor:k8s.io/client-go/rest", - ], -) - -go_library( - name = "k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake", - srcs = [ - "k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/doc.go", - "k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go", - "k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go", - ], - tags = ["automanaged"], - deps = [ - "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/types", - "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/client-go/kubernetes/typed/policy/v1alpha1", - "//vendor:k8s.io/client-go/pkg/api/v1", - "//vendor:k8s.io/client-go/pkg/apis/policy/v1alpha1", - "//vendor:k8s.io/client-go/rest", - "//vendor:k8s.io/client-go/testing", - ], -) - go_library( name = "k8s.io/client-go/kubernetes/typed/policy/v1beta1", srcs = [ @@ -11616,12 +11574,6 @@ go_library( ], ) -go_library( - name = "k8s.io/client-go/pkg/api/validation/path", - srcs = ["k8s.io/client-go/pkg/api/validation/path/name.go"], - tags = ["automanaged"], -) - go_library( name = "k8s.io/client-go/pkg/apimachinery/announced", srcs = [ @@ -12299,23 +12251,6 @@ go_library( ], ) -go_library( - name = "k8s.io/client-go/pkg/apis/policy/v1alpha1", - srcs = [ - "k8s.io/client-go/pkg/apis/policy/v1alpha1/doc.go", - "k8s.io/client-go/pkg/apis/policy/v1alpha1/register.go", - "k8s.io/client-go/pkg/apis/policy/v1alpha1/types.go", - ], - tags = ["automanaged"], - deps = [ - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/client-go/pkg/api/v1", - "//vendor:k8s.io/client-go/pkg/util/intstr", - ], -) - go_library( name = "k8s.io/client-go/pkg/apis/policy/v1beta1", srcs = [ @@ -12966,7 +12901,6 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/pkg/api", "//vendor:k8s.io/client-go/pkg/api/v1", - "//vendor:k8s.io/client-go/pkg/api/validation/path", "//vendor:k8s.io/client-go/pkg/util/cert", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", "//vendor:k8s.io/client-go/pkg/version", From 2f51cc4ce46ae886f71be0b56b7d06aa89521e63 Mon Sep 17 00:00:00 2001 From: deads2k Date: Thu, 19 Jan 2017 16:35:04 -0500 Subject: [PATCH 6/7] move client auth plugins --- pkg/util/jsonpath/doc.go | 20 - pkg/util/jsonpath/jsonpath.go | 498 ------------------ pkg/util/jsonpath/node.go | 239 --------- pkg/util/jsonpath/parser.go | 433 --------------- plugin/pkg/client/auth/BUILD | 35 -- plugin/pkg/client/auth/gcp/BUILD | 45 -- plugin/pkg/client/auth/gcp/OWNERS | 3 - plugin/pkg/client/auth/gcp/gcp.go | 274 ---------- plugin/pkg/client/auth/gcp/gcp_test.go | 211 -------- plugin/pkg/client/auth/oidc/BUILD | 48 -- plugin/pkg/client/auth/oidc/OWNERS | 2 - plugin/pkg/client/auth/oidc/oidc.go | 333 ------------ plugin/pkg/client/auth/oidc/oidc_test.go | 384 -------------- plugin/pkg/client/auth/plugins.go | 23 - staging/copy.sh | 5 +- .../k8s.io/client-go/pkg/util/jsonpath/doc.go | 2 +- .../pkg}/util/jsonpath/jsonpath_test.go | 0 .../pkg}/util/jsonpath/parser_test.go | 0 .../plugin/pkg/client/auth/oidc/oidc_test.go | 2 +- 19 files changed, 5 insertions(+), 2552 deletions(-) delete mode 100644 pkg/util/jsonpath/doc.go delete mode 100644 pkg/util/jsonpath/jsonpath.go delete mode 100644 pkg/util/jsonpath/node.go delete mode 100644 pkg/util/jsonpath/parser.go delete mode 100644 plugin/pkg/client/auth/BUILD delete mode 100644 plugin/pkg/client/auth/gcp/BUILD delete mode 100644 plugin/pkg/client/auth/gcp/OWNERS delete mode 100644 plugin/pkg/client/auth/gcp/gcp.go delete mode 100644 plugin/pkg/client/auth/gcp/gcp_test.go delete mode 100644 plugin/pkg/client/auth/oidc/BUILD delete mode 100644 plugin/pkg/client/auth/oidc/OWNERS delete mode 100644 plugin/pkg/client/auth/oidc/oidc.go delete mode 100644 plugin/pkg/client/auth/oidc/oidc_test.go delete mode 100644 plugin/pkg/client/auth/plugins.go rename {pkg => staging/src/k8s.io/client-go/pkg}/util/jsonpath/jsonpath_test.go (100%) rename {pkg => staging/src/k8s.io/client-go/pkg}/util/jsonpath/parser_test.go (100%) diff --git a/pkg/util/jsonpath/doc.go b/pkg/util/jsonpath/doc.go deleted file mode 100644 index 0077f30355c..00000000000 --- a/pkg/util/jsonpath/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// package jsonpath is a template engine using jsonpath syntax, -// which can be seen at http://goessner.net/articles/JsonPath/. -// In addition, it has {range} {end} function to iterate list and slice. -package jsonpath // import "k8s.io/kubernetes/pkg/util/jsonpath" diff --git a/pkg/util/jsonpath/jsonpath.go b/pkg/util/jsonpath/jsonpath.go deleted file mode 100644 index d84a1855976..00000000000 --- a/pkg/util/jsonpath/jsonpath.go +++ /dev/null @@ -1,498 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package jsonpath - -import ( - "bytes" - "fmt" - "io" - "reflect" - "strings" - - "k8s.io/kubernetes/third_party/forked/golang/template" -) - -type JSONPath struct { - name string - parser *Parser - stack [][]reflect.Value //push and pop values in different scopes - cur []reflect.Value //current scope values - beginRange int - inRange int - endRange int - - allowMissingKeys bool -} - -func New(name string) *JSONPath { - return &JSONPath{ - name: name, - beginRange: 0, - inRange: 0, - endRange: 0, - } -} - -// AllowMissingKeys allows a caller to specify whether they want an error if a field or map key -// cannot be located, or simply an empty result. The receiver is returned for chaining. -func (j *JSONPath) AllowMissingKeys(allow bool) *JSONPath { - j.allowMissingKeys = allow - return j -} - -// Parse parse the given template, return error -func (j *JSONPath) Parse(text string) (err error) { - j.parser, err = Parse(j.name, text) - return -} - -// Execute bounds data into template and write the result -func (j *JSONPath) Execute(wr io.Writer, data interface{}) error { - fullResults, err := j.FindResults(data) - if err != nil { - return err - } - for ix := range fullResults { - if err := j.PrintResults(wr, fullResults[ix]); err != nil { - return err - } - } - return nil -} - -func (j *JSONPath) FindResults(data interface{}) ([][]reflect.Value, error) { - if j.parser == nil { - return nil, fmt.Errorf("%s is an incomplete jsonpath template", j.name) - } - - j.cur = []reflect.Value{reflect.ValueOf(data)} - nodes := j.parser.Root.Nodes - fullResult := [][]reflect.Value{} - for i := 0; i < len(nodes); i++ { - node := nodes[i] - results, err := j.walk(j.cur, node) - if err != nil { - return nil, err - } - - //encounter an end node, break the current block - if j.endRange > 0 && j.endRange <= j.inRange { - j.endRange -= 1 - break - } - //encounter a range node, start a range loop - if j.beginRange > 0 { - j.beginRange -= 1 - j.inRange += 1 - for k, value := range results { - j.parser.Root.Nodes = nodes[i+1:] - if k == len(results)-1 { - j.inRange -= 1 - } - nextResults, err := j.FindResults(value.Interface()) - if err != nil { - return nil, err - } - fullResult = append(fullResult, nextResults...) - } - break - } - fullResult = append(fullResult, results) - } - return fullResult, nil -} - -// PrintResults write the results into writer -func (j *JSONPath) PrintResults(wr io.Writer, results []reflect.Value) error { - for i, r := range results { - text, err := j.evalToText(r) - if err != nil { - return err - } - if i != len(results)-1 { - text = append(text, ' ') - } - if _, err = wr.Write(text); err != nil { - return err - } - } - return nil -} - -// walk visits tree rooted at the given node in DFS order -func (j *JSONPath) walk(value []reflect.Value, node Node) ([]reflect.Value, error) { - switch node := node.(type) { - case *ListNode: - return j.evalList(value, node) - case *TextNode: - return []reflect.Value{reflect.ValueOf(node.Text)}, nil - case *FieldNode: - return j.evalField(value, node) - case *ArrayNode: - return j.evalArray(value, node) - case *FilterNode: - return j.evalFilter(value, node) - case *IntNode: - return j.evalInt(value, node) - case *FloatNode: - return j.evalFloat(value, node) - case *WildcardNode: - return j.evalWildcard(value, node) - case *RecursiveNode: - return j.evalRecursive(value, node) - case *UnionNode: - return j.evalUnion(value, node) - case *IdentifierNode: - return j.evalIdentifier(value, node) - default: - return value, fmt.Errorf("unexpected Node %v", node) - } -} - -// evalInt evaluates IntNode -func (j *JSONPath) evalInt(input []reflect.Value, node *IntNode) ([]reflect.Value, error) { - result := make([]reflect.Value, len(input)) - for i := range input { - result[i] = reflect.ValueOf(node.Value) - } - return result, nil -} - -// evalFloat evaluates FloatNode -func (j *JSONPath) evalFloat(input []reflect.Value, node *FloatNode) ([]reflect.Value, error) { - result := make([]reflect.Value, len(input)) - for i := range input { - result[i] = reflect.ValueOf(node.Value) - } - return result, nil -} - -// evalList evaluates ListNode -func (j *JSONPath) evalList(value []reflect.Value, node *ListNode) ([]reflect.Value, error) { - var err error - curValue := value - for _, node := range node.Nodes { - curValue, err = j.walk(curValue, node) - if err != nil { - return curValue, err - } - } - return curValue, nil -} - -// evalIdentifier evaluates IdentifierNode -func (j *JSONPath) evalIdentifier(input []reflect.Value, node *IdentifierNode) ([]reflect.Value, error) { - results := []reflect.Value{} - switch node.Name { - case "range": - j.stack = append(j.stack, j.cur) - j.beginRange += 1 - results = input - case "end": - if j.endRange < j.inRange { //inside a loop, break the current block - j.endRange += 1 - break - } - // the loop is about to end, pop value and continue the following execution - if len(j.stack) > 0 { - j.cur, j.stack = j.stack[len(j.stack)-1], j.stack[:len(j.stack)-1] - } else { - return results, fmt.Errorf("not in range, nothing to end") - } - default: - return input, fmt.Errorf("unrecognized identifier %v", node.Name) - } - return results, nil -} - -// evalArray evaluates ArrayNode -func (j *JSONPath) evalArray(input []reflect.Value, node *ArrayNode) ([]reflect.Value, error) { - result := []reflect.Value{} - for _, value := range input { - - value, isNil := template.Indirect(value) - if isNil { - continue - } - if value.Kind() != reflect.Array && value.Kind() != reflect.Slice { - return input, fmt.Errorf("%v is not array or slice", value.Type()) - } - params := node.Params - if !params[0].Known { - params[0].Value = 0 - } - if params[0].Value < 0 { - params[0].Value += value.Len() - } - if !params[1].Known { - params[1].Value = value.Len() - } - - if params[1].Value < 0 { - params[1].Value += value.Len() - } - - sliceLength := value.Len() - if params[1].Value != params[0].Value { // if you're requesting zero elements, allow it through. - if params[0].Value >= sliceLength { - return input, fmt.Errorf("array index out of bounds: index %d, length %d", params[0].Value, sliceLength) - } - if params[1].Value > sliceLength { - return input, fmt.Errorf("array index out of bounds: index %d, length %d", params[1].Value-1, sliceLength) - } - } - - if !params[2].Known { - value = value.Slice(params[0].Value, params[1].Value) - } else { - value = value.Slice3(params[0].Value, params[1].Value, params[2].Value) - } - for i := 0; i < value.Len(); i++ { - result = append(result, value.Index(i)) - } - } - return result, nil -} - -// evalUnion evaluates UnionNode -func (j *JSONPath) evalUnion(input []reflect.Value, node *UnionNode) ([]reflect.Value, error) { - result := []reflect.Value{} - for _, listNode := range node.Nodes { - temp, err := j.evalList(input, listNode) - if err != nil { - return input, err - } - result = append(result, temp...) - } - return result, nil -} - -func (j *JSONPath) findFieldInValue(value *reflect.Value, node *FieldNode) (reflect.Value, error) { - t := value.Type() - var inlineValue *reflect.Value - for ix := 0; ix < t.NumField(); ix++ { - f := t.Field(ix) - jsonTag := f.Tag.Get("json") - parts := strings.Split(jsonTag, ",") - if len(parts) == 0 { - continue - } - if parts[0] == node.Value { - return value.Field(ix), nil - } - if len(parts[0]) == 0 { - val := value.Field(ix) - inlineValue = &val - } - } - if inlineValue != nil { - if inlineValue.Kind() == reflect.Struct { - // handle 'inline' - match, err := j.findFieldInValue(inlineValue, node) - if err != nil { - return reflect.Value{}, err - } - if match.IsValid() { - return match, nil - } - } - } - return value.FieldByName(node.Value), nil -} - -// evalField evaluates field of struct or key of map. -func (j *JSONPath) evalField(input []reflect.Value, node *FieldNode) ([]reflect.Value, error) { - results := []reflect.Value{} - // If there's no input, there's no output - if len(input) == 0 { - return results, nil - } - for _, value := range input { - var result reflect.Value - value, isNil := template.Indirect(value) - if isNil { - continue - } - - if value.Kind() == reflect.Struct { - var err error - if result, err = j.findFieldInValue(&value, node); err != nil { - return nil, err - } - } else if value.Kind() == reflect.Map { - mapKeyType := value.Type().Key() - nodeValue := reflect.ValueOf(node.Value) - // node value type must be convertible to map key type - if !nodeValue.Type().ConvertibleTo(mapKeyType) { - return results, fmt.Errorf("%s is not convertible to %s", nodeValue, mapKeyType) - } - result = value.MapIndex(nodeValue.Convert(mapKeyType)) - } - if result.IsValid() { - results = append(results, result) - } - } - if len(results) == 0 { - if j.allowMissingKeys { - return results, nil - } - return results, fmt.Errorf("%s is not found", node.Value) - } - return results, nil -} - -// evalWildcard extract all contents of the given value -func (j *JSONPath) evalWildcard(input []reflect.Value, node *WildcardNode) ([]reflect.Value, error) { - results := []reflect.Value{} - for _, value := range input { - value, isNil := template.Indirect(value) - if isNil { - continue - } - - kind := value.Kind() - if kind == reflect.Struct { - for i := 0; i < value.NumField(); i++ { - results = append(results, value.Field(i)) - } - } else if kind == reflect.Map { - for _, key := range value.MapKeys() { - results = append(results, value.MapIndex(key)) - } - } else if kind == reflect.Array || kind == reflect.Slice || kind == reflect.String { - for i := 0; i < value.Len(); i++ { - results = append(results, value.Index(i)) - } - } - } - return results, nil -} - -// evalRecursive visit the given value recursively and push all of them to result -func (j *JSONPath) evalRecursive(input []reflect.Value, node *RecursiveNode) ([]reflect.Value, error) { - result := []reflect.Value{} - for _, value := range input { - results := []reflect.Value{} - value, isNil := template.Indirect(value) - if isNil { - continue - } - - kind := value.Kind() - if kind == reflect.Struct { - for i := 0; i < value.NumField(); i++ { - results = append(results, value.Field(i)) - } - } else if kind == reflect.Map { - for _, key := range value.MapKeys() { - results = append(results, value.MapIndex(key)) - } - } else if kind == reflect.Array || kind == reflect.Slice || kind == reflect.String { - for i := 0; i < value.Len(); i++ { - results = append(results, value.Index(i)) - } - } - if len(results) != 0 { - result = append(result, value) - output, err := j.evalRecursive(results, node) - if err != nil { - return result, err - } - result = append(result, output...) - } - } - return result, nil -} - -// evalFilter filter array according to FilterNode -func (j *JSONPath) evalFilter(input []reflect.Value, node *FilterNode) ([]reflect.Value, error) { - results := []reflect.Value{} - for _, value := range input { - value, _ = template.Indirect(value) - - if value.Kind() != reflect.Array && value.Kind() != reflect.Slice { - return input, fmt.Errorf("%v is not array or slice and cannot be filtered", value) - } - for i := 0; i < value.Len(); i++ { - temp := []reflect.Value{value.Index(i)} - lefts, err := j.evalList(temp, node.Left) - - //case exists - if node.Operator == "exists" { - if len(lefts) > 0 { - results = append(results, value.Index(i)) - } - continue - } - - if err != nil { - return input, err - } - - var left, right interface{} - if len(lefts) != 1 { - return input, fmt.Errorf("can only compare one element at a time") - } - left = lefts[0].Interface() - - rights, err := j.evalList(temp, node.Right) - if err != nil { - return input, err - } - if len(rights) != 1 { - return input, fmt.Errorf("can only compare one element at a time") - } - right = rights[0].Interface() - - pass := false - switch node.Operator { - case "<": - pass, err = template.Less(left, right) - case ">": - pass, err = template.Greater(left, right) - case "==": - pass, err = template.Equal(left, right) - case "!=": - pass, err = template.NotEqual(left, right) - case "<=": - pass, err = template.LessEqual(left, right) - case ">=": - pass, err = template.GreaterEqual(left, right) - default: - return results, fmt.Errorf("unrecognized filter operator %s", node.Operator) - } - if err != nil { - return results, err - } - if pass { - results = append(results, value.Index(i)) - } - } - } - return results, nil -} - -// evalToText translates reflect value to corresponding text -func (j *JSONPath) evalToText(v reflect.Value) ([]byte, error) { - iface, ok := template.PrintableValue(v) - if !ok { - return nil, fmt.Errorf("can't print type %s", v.Type()) - } - var buffer bytes.Buffer - fmt.Fprint(&buffer, iface) - return buffer.Bytes(), nil -} diff --git a/pkg/util/jsonpath/node.go b/pkg/util/jsonpath/node.go deleted file mode 100644 index f0a27853d84..00000000000 --- a/pkg/util/jsonpath/node.go +++ /dev/null @@ -1,239 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package jsonpath - -import "fmt" - -// NodeType identifies the type of a parse tree node. -type NodeType int - -// Type returns itself and provides an easy default implementation -func (t NodeType) Type() NodeType { - return t -} - -func (t NodeType) String() string { - return NodeTypeName[t] -} - -const ( - NodeText NodeType = iota - NodeArray - NodeList - NodeField - NodeIdentifier - NodeFilter - NodeInt - NodeFloat - NodeWildcard - NodeRecursive - NodeUnion -) - -var NodeTypeName = map[NodeType]string{ - NodeText: "NodeText", - NodeArray: "NodeArray", - NodeList: "NodeList", - NodeField: "NodeField", - NodeIdentifier: "NodeIdentifier", - NodeFilter: "NodeFilter", - NodeInt: "NodeInt", - NodeFloat: "NodeFloat", - NodeWildcard: "NodeWildcard", - NodeRecursive: "NodeRecursive", - NodeUnion: "NodeUnion", -} - -type Node interface { - Type() NodeType - String() string -} - -// ListNode holds a sequence of nodes. -type ListNode struct { - NodeType - Nodes []Node // The element nodes in lexical order. -} - -func newList() *ListNode { - return &ListNode{NodeType: NodeList} -} - -func (l *ListNode) append(n Node) { - l.Nodes = append(l.Nodes, n) -} - -func (l *ListNode) String() string { - return fmt.Sprintf("%s", l.Type()) -} - -// TextNode holds plain text. -type TextNode struct { - NodeType - Text string // The text; may span newlines. -} - -func newText(text string) *TextNode { - return &TextNode{NodeType: NodeText, Text: text} -} - -func (t *TextNode) String() string { - return fmt.Sprintf("%s: %s", t.Type(), t.Text) -} - -// FieldNode holds field of struct -type FieldNode struct { - NodeType - Value string -} - -func newField(value string) *FieldNode { - return &FieldNode{NodeType: NodeField, Value: value} -} - -func (f *FieldNode) String() string { - return fmt.Sprintf("%s: %s", f.Type(), f.Value) -} - -// IdentifierNode holds an identifier -type IdentifierNode struct { - NodeType - Name string -} - -func newIdentifier(value string) *IdentifierNode { - return &IdentifierNode{ - NodeType: NodeIdentifier, - Name: value, - } -} - -func (f *IdentifierNode) String() string { - return fmt.Sprintf("%s: %s", f.Type(), f.Name) -} - -// ParamsEntry holds param information for ArrayNode -type ParamsEntry struct { - Value int - Known bool //whether the value is known when parse it -} - -// ArrayNode holds start, end, step information for array index selection -type ArrayNode struct { - NodeType - Params [3]ParamsEntry //start, end, step -} - -func newArray(params [3]ParamsEntry) *ArrayNode { - return &ArrayNode{ - NodeType: NodeArray, - Params: params, - } -} - -func (a *ArrayNode) String() string { - return fmt.Sprintf("%s: %v", a.Type(), a.Params) -} - -// FilterNode holds operand and operator information for filter -type FilterNode struct { - NodeType - Left *ListNode - Right *ListNode - Operator string -} - -func newFilter(left, right *ListNode, operator string) *FilterNode { - return &FilterNode{ - NodeType: NodeFilter, - Left: left, - Right: right, - Operator: operator, - } -} - -func (f *FilterNode) String() string { - return fmt.Sprintf("%s: %s %s %s", f.Type(), f.Left, f.Operator, f.Right) -} - -// IntNode holds integer value -type IntNode struct { - NodeType - Value int -} - -func newInt(num int) *IntNode { - return &IntNode{NodeType: NodeInt, Value: num} -} - -func (i *IntNode) String() string { - return fmt.Sprintf("%s: %d", i.Type(), i.Value) -} - -// FloatNode holds float value -type FloatNode struct { - NodeType - Value float64 -} - -func newFloat(num float64) *FloatNode { - return &FloatNode{NodeType: NodeFloat, Value: num} -} - -func (i *FloatNode) String() string { - return fmt.Sprintf("%s: %f", i.Type(), i.Value) -} - -// WildcardNode means a wildcard -type WildcardNode struct { - NodeType -} - -func newWildcard() *WildcardNode { - return &WildcardNode{NodeType: NodeWildcard} -} - -func (i *WildcardNode) String() string { - return fmt.Sprintf("%s", i.Type()) -} - -// RecursiveNode means a recursive descent operator -type RecursiveNode struct { - NodeType -} - -func newRecursive() *RecursiveNode { - return &RecursiveNode{NodeType: NodeRecursive} -} - -func (r *RecursiveNode) String() string { - return fmt.Sprintf("%s", r.Type()) -} - -// UnionNode is union of ListNode -type UnionNode struct { - NodeType - Nodes []*ListNode -} - -func newUnion(nodes []*ListNode) *UnionNode { - return &UnionNode{NodeType: NodeUnion, Nodes: nodes} -} - -func (u *UnionNode) String() string { - return fmt.Sprintf("%s", u.Type()) -} diff --git a/pkg/util/jsonpath/parser.go b/pkg/util/jsonpath/parser.go deleted file mode 100644 index 7dc38d31fc3..00000000000 --- a/pkg/util/jsonpath/parser.go +++ /dev/null @@ -1,433 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package jsonpath - -import ( - "fmt" - "regexp" - "strconv" - "strings" - "unicode" - "unicode/utf8" -) - -const eof = -1 - -const ( - leftDelim = "{" - rightDelim = "}" -) - -type Parser struct { - Name string - Root *ListNode - input string - cur *ListNode - pos int - start int - width int -} - -// Parse parsed the given text and return a node Parser. -// If an error is encountered, parsing stops and an empty -// Parser is returned with the error -func Parse(name, text string) (*Parser, error) { - p := NewParser(name) - err := p.Parse(text) - if err != nil { - p = nil - } - return p, err -} - -func NewParser(name string) *Parser { - return &Parser{ - Name: name, - } -} - -// parseAction parsed the expression inside delimiter -func parseAction(name, text string) (*Parser, error) { - p, err := Parse(name, fmt.Sprintf("%s%s%s", leftDelim, text, rightDelim)) - // when error happens, p will be nil, so we need to return here - if err != nil { - return p, err - } - p.Root = p.Root.Nodes[0].(*ListNode) - return p, nil -} - -func (p *Parser) Parse(text string) error { - p.input = text - p.Root = newList() - p.pos = 0 - return p.parseText(p.Root) -} - -// consumeText return the parsed text since last cosumeText -func (p *Parser) consumeText() string { - value := p.input[p.start:p.pos] - p.start = p.pos - return value -} - -// next returns the next rune in the input. -func (p *Parser) next() rune { - if int(p.pos) >= len(p.input) { - p.width = 0 - return eof - } - r, w := utf8.DecodeRuneInString(p.input[p.pos:]) - p.width = w - p.pos += p.width - return r -} - -// peek returns but does not consume the next rune in the input. -func (p *Parser) peek() rune { - r := p.next() - p.backup() - return r -} - -// backup steps back one rune. Can only be called once per call of next. -func (p *Parser) backup() { - p.pos -= p.width -} - -func (p *Parser) parseText(cur *ListNode) error { - for { - if strings.HasPrefix(p.input[p.pos:], leftDelim) { - if p.pos > p.start { - cur.append(newText(p.consumeText())) - } - return p.parseLeftDelim(cur) - } - if p.next() == eof { - break - } - } - // Correctly reached EOF. - if p.pos > p.start { - cur.append(newText(p.consumeText())) - } - return nil -} - -// parseLeftDelim scans the left delimiter, which is known to be present. -func (p *Parser) parseLeftDelim(cur *ListNode) error { - p.pos += len(leftDelim) - p.consumeText() - newNode := newList() - cur.append(newNode) - cur = newNode - return p.parseInsideAction(cur) -} - -func (p *Parser) parseInsideAction(cur *ListNode) error { - prefixMap := map[string]func(*ListNode) error{ - rightDelim: p.parseRightDelim, - "[?(": p.parseFilter, - "..": p.parseRecursive, - } - for prefix, parseFunc := range prefixMap { - if strings.HasPrefix(p.input[p.pos:], prefix) { - return parseFunc(cur) - } - } - - switch r := p.next(); { - case r == eof || isEndOfLine(r): - return fmt.Errorf("unclosed action") - case r == ' ': - p.consumeText() - case r == '@' || r == '$': //the current object, just pass it - p.consumeText() - case r == '[': - return p.parseArray(cur) - case r == '"': - return p.parseQuote(cur) - case r == '.': - return p.parseField(cur) - case r == '+' || r == '-' || unicode.IsDigit(r): - p.backup() - return p.parseNumber(cur) - case isAlphaNumeric(r): - p.backup() - return p.parseIdentifier(cur) - default: - return fmt.Errorf("unrecognized character in action: %#U", r) - } - return p.parseInsideAction(cur) -} - -// parseRightDelim scans the right delimiter, which is known to be present. -func (p *Parser) parseRightDelim(cur *ListNode) error { - p.pos += len(rightDelim) - p.consumeText() - cur = p.Root - return p.parseText(cur) -} - -// parseIdentifier scans build-in keywords, like "range" "end" -func (p *Parser) parseIdentifier(cur *ListNode) error { - var r rune - for { - r = p.next() - if isTerminator(r) { - p.backup() - break - } - } - value := p.consumeText() - cur.append(newIdentifier(value)) - return p.parseInsideAction(cur) -} - -// parseRecursive scans the recursive desent operator .. -func (p *Parser) parseRecursive(cur *ListNode) error { - p.pos += len("..") - p.consumeText() - cur.append(newRecursive()) - if r := p.peek(); isAlphaNumeric(r) { - return p.parseField(cur) - } - return p.parseInsideAction(cur) -} - -// parseNumber scans number -func (p *Parser) parseNumber(cur *ListNode) error { - r := p.peek() - if r == '+' || r == '-' { - r = p.next() - } - for { - r = p.next() - if r != '.' && !unicode.IsDigit(r) { - p.backup() - break - } - } - value := p.consumeText() - i, err := strconv.Atoi(value) - if err == nil { - cur.append(newInt(i)) - return p.parseInsideAction(cur) - } - d, err := strconv.ParseFloat(value, 64) - if err == nil { - cur.append(newFloat(d)) - return p.parseInsideAction(cur) - } - return fmt.Errorf("cannot parse number %s", value) -} - -// parseArray scans array index selection -func (p *Parser) parseArray(cur *ListNode) error { -Loop: - for { - switch p.next() { - case eof, '\n': - return fmt.Errorf("unterminated array") - case ']': - break Loop - } - } - text := p.consumeText() - text = string(text[1 : len(text)-1]) - if text == "*" { - text = ":" - } - - //union operator - strs := strings.Split(text, ",") - if len(strs) > 1 { - union := []*ListNode{} - for _, str := range strs { - parser, err := parseAction("union", fmt.Sprintf("[%s]", strings.Trim(str, " "))) - if err != nil { - return err - } - union = append(union, parser.Root) - } - cur.append(newUnion(union)) - return p.parseInsideAction(cur) - } - - // dict key - reg := regexp.MustCompile(`^'([^']*)'$`) - value := reg.FindStringSubmatch(text) - if value != nil { - parser, err := parseAction("arraydict", fmt.Sprintf(".%s", value[1])) - if err != nil { - return err - } - for _, node := range parser.Root.Nodes { - cur.append(node) - } - return p.parseInsideAction(cur) - } - - //slice operator - reg = regexp.MustCompile(`^(-?[\d]*)(:-?[\d]*)?(:[\d]*)?$`) - value = reg.FindStringSubmatch(text) - if value == nil { - return fmt.Errorf("invalid array index %s", text) - } - value = value[1:] - params := [3]ParamsEntry{} - for i := 0; i < 3; i++ { - if value[i] != "" { - if i > 0 { - value[i] = value[i][1:] - } - if i > 0 && value[i] == "" { - params[i].Known = false - } else { - var err error - params[i].Known = true - params[i].Value, err = strconv.Atoi(value[i]) - if err != nil { - return fmt.Errorf("array index %s is not a number", value[i]) - } - } - } else { - if i == 1 { - params[i].Known = true - params[i].Value = params[0].Value + 1 - } else { - params[i].Known = false - params[i].Value = 0 - } - } - } - cur.append(newArray(params)) - return p.parseInsideAction(cur) -} - -// parseFilter scans filter inside array selection -func (p *Parser) parseFilter(cur *ListNode) error { - p.pos += len("[?(") - p.consumeText() -Loop: - for { - switch p.next() { - case eof, '\n': - return fmt.Errorf("unterminated filter") - case ')': - break Loop - } - } - if p.next() != ']' { - return fmt.Errorf("unclosed array expect ]") - } - reg := regexp.MustCompile(`^([^!<>=]+)([!<>=]+)(.+?)$`) - text := p.consumeText() - text = string(text[:len(text)-2]) - value := reg.FindStringSubmatch(text) - if value == nil { - parser, err := parseAction("text", text) - if err != nil { - return err - } - cur.append(newFilter(parser.Root, newList(), "exists")) - } else { - leftParser, err := parseAction("left", value[1]) - if err != nil { - return err - } - rightParser, err := parseAction("right", value[3]) - if err != nil { - return err - } - cur.append(newFilter(leftParser.Root, rightParser.Root, value[2])) - } - return p.parseInsideAction(cur) -} - -// parseQuote unquotes string inside double quote -func (p *Parser) parseQuote(cur *ListNode) error { -Loop: - for { - switch p.next() { - case eof, '\n': - return fmt.Errorf("unterminated quoted string") - case '"': - break Loop - } - } - value := p.consumeText() - s, err := strconv.Unquote(value) - if err != nil { - return fmt.Errorf("unquote string %s error %v", value, err) - } - cur.append(newText(s)) - return p.parseInsideAction(cur) -} - -// parseField scans a field until a terminator -func (p *Parser) parseField(cur *ListNode) error { - p.consumeText() - for p.advance() { - } - value := p.consumeText() - if value == "*" { - cur.append(newWildcard()) - } else { - cur.append(newField(strings.Replace(value, "\\", "", -1))) - } - return p.parseInsideAction(cur) -} - -// advance scans until next non-escaped terminator -func (p *Parser) advance() bool { - r := p.next() - if r == '\\' { - p.next() - } else if isTerminator(r) { - p.backup() - return false - } - return true -} - -// isTerminator reports whether the input is at valid termination character to appear after an identifier. -func isTerminator(r rune) bool { - if isSpace(r) || isEndOfLine(r) { - return true - } - switch r { - case eof, '.', ',', '[', ']', '$', '@', '{', '}': - return true - } - return false -} - -// isSpace reports whether r is a space character. -func isSpace(r rune) bool { - return r == ' ' || r == '\t' -} - -// isEndOfLine reports whether r is an end-of-line character. -func isEndOfLine(r rune) bool { - return r == '\r' || r == '\n' -} - -// isAlphaNumeric reports whether r is an alphabetic, digit, or underscore. -func isAlphaNumeric(r rune) bool { - return r == '_' || unicode.IsLetter(r) || unicode.IsDigit(r) -} diff --git a/plugin/pkg/client/auth/BUILD b/plugin/pkg/client/auth/BUILD deleted file mode 100644 index 11c15383f4c..00000000000 --- a/plugin/pkg/client/auth/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["plugins.go"], - tags = ["automanaged"], - deps = [ - "//plugin/pkg/client/auth/gcp:go_default_library", - "//plugin/pkg/client/auth/oidc:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//plugin/pkg/client/auth/gcp:all-srcs", - "//plugin/pkg/client/auth/oidc:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/plugin/pkg/client/auth/gcp/BUILD b/plugin/pkg/client/auth/gcp/BUILD deleted file mode 100644 index 9ee4167c241..00000000000 --- a/plugin/pkg/client/auth/gcp/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["gcp.go"], - tags = ["automanaged"], - deps = [ - "//pkg/util/jsonpath:go_default_library", - "//vendor:github.com/golang/glog", - "//vendor:golang.org/x/net/context", - "//vendor:golang.org/x/oauth2", - "//vendor:golang.org/x/oauth2/google", - "//vendor:k8s.io/apimachinery/pkg/util/yaml", - "//vendor:k8s.io/client-go/rest", - ], -) - -go_test( - name = "go_default_test", - srcs = ["gcp_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = ["//vendor:golang.org/x/oauth2"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/plugin/pkg/client/auth/gcp/OWNERS b/plugin/pkg/client/auth/gcp/OWNERS deleted file mode 100644 index d75421c5efd..00000000000 --- a/plugin/pkg/client/auth/gcp/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -assignees: - - cjcullen - - jlowdermilk diff --git a/plugin/pkg/client/auth/gcp/gcp.go b/plugin/pkg/client/auth/gcp/gcp.go deleted file mode 100644 index 8cde8a46d5b..00000000000 --- a/plugin/pkg/client/auth/gcp/gcp.go +++ /dev/null @@ -1,274 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gcp - -import ( - "bytes" - "encoding/json" - "fmt" - "net/http" - "os/exec" - "strings" - "sync" - "time" - - "github.com/golang/glog" - "golang.org/x/net/context" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - "k8s.io/apimachinery/pkg/util/yaml" - restclient "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/util/jsonpath" -) - -func init() { - if err := restclient.RegisterAuthProviderPlugin("gcp", newGCPAuthProvider); err != nil { - glog.Fatalf("Failed to register gcp auth plugin: %v", err) - } -} - -// gcpAuthProvider is an auth provider plugin that uses GCP credentials to provide -// tokens for kubectl to authenticate itself to the apiserver. A sample json config -// is provided below with all recognized options described. -// -// { -// 'auth-provider': { -// # Required -// "name": "gcp", -// -// 'config': { -// # Caching options -// -// # Raw string data representing cached access token. -// "access-token": "ya29.CjWdA4GiBPTt", -// # RFC3339Nano expiration timestamp for cached access token. -// "expiry": "2016-10-31 22:31:9.123", -// -// # Command execution options -// # These options direct the plugin to execute a specified command and parse -// # token and expiry time from the output of the command. -// -// # Command to execute for access token. String is split on whitespace -// # with first field treated as the executable, remaining fields as args. -// # Command output will be parsed as JSON. -// "cmd-path": "/usr/bin/gcloud config config-helper --output=json", -// -// # JSONPath to the string field that represents the access token in -// # command output. If omitted, defaults to "{.access_token}". -// "token-key": "{.credential.access_token}", -// -// # JSONPath to the string field that represents expiration timestamp -// # of the access token in the command output. If omitted, defaults to -// # "{.token_expiry}" -// "expiry-key": ""{.credential.token_expiry}", -// -// # golang reference time in the format that the expiration timestamp uses. -// # If omitted, defaults to time.RFC3339Nano -// "time-fmt": "2006-01-02 15:04:05.999999999" -// } -// } -// } -// -type gcpAuthProvider struct { - tokenSource oauth2.TokenSource - persister restclient.AuthProviderConfigPersister -} - -func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { - cmd, useCmd := gcpConfig["cmd-path"] - var ts oauth2.TokenSource - var err error - if useCmd { - ts, err = newCmdTokenSource(cmd, gcpConfig["token-key"], gcpConfig["expiry-key"], gcpConfig["time-fmt"]) - } else { - ts, err = google.DefaultTokenSource(context.Background(), "https://www.googleapis.com/auth/cloud-platform") - } - if err != nil { - return nil, err - } - cts, err := newCachedTokenSource(gcpConfig["access-token"], gcpConfig["expiry"], persister, ts, gcpConfig) - if err != nil { - return nil, err - } - return &gcpAuthProvider{cts, persister}, nil -} - -func (g *gcpAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &oauth2.Transport{ - Source: g.tokenSource, - Base: rt, - } -} - -func (g *gcpAuthProvider) Login() error { return nil } - -type cachedTokenSource struct { - lk sync.Mutex - source oauth2.TokenSource - accessToken string - expiry time.Time - persister restclient.AuthProviderConfigPersister - cache map[string]string -} - -func newCachedTokenSource(accessToken, expiry string, persister restclient.AuthProviderConfigPersister, ts oauth2.TokenSource, cache map[string]string) (*cachedTokenSource, error) { - var expiryTime time.Time - if parsedTime, err := time.Parse(time.RFC3339Nano, expiry); err == nil { - expiryTime = parsedTime - } - if cache == nil { - cache = make(map[string]string) - } - return &cachedTokenSource{ - source: ts, - accessToken: accessToken, - expiry: expiryTime, - persister: persister, - cache: cache, - }, nil -} - -func (t *cachedTokenSource) Token() (*oauth2.Token, error) { - tok := t.cachedToken() - if tok.Valid() && !tok.Expiry.IsZero() { - return tok, nil - } - tok, err := t.source.Token() - if err != nil { - return nil, err - } - cache := t.update(tok) - if t.persister != nil { - if err := t.persister.Persist(cache); err != nil { - glog.V(4).Infof("Failed to persist token: %v", err) - } - } - return tok, nil -} - -func (t *cachedTokenSource) cachedToken() *oauth2.Token { - t.lk.Lock() - defer t.lk.Unlock() - return &oauth2.Token{ - AccessToken: t.accessToken, - TokenType: "Bearer", - Expiry: t.expiry, - } -} - -func (t *cachedTokenSource) update(tok *oauth2.Token) map[string]string { - t.lk.Lock() - defer t.lk.Unlock() - t.accessToken = tok.AccessToken - t.expiry = tok.Expiry - ret := map[string]string{} - for k, v := range t.cache { - ret[k] = v - } - ret["access-token"] = t.accessToken - ret["expiry"] = t.expiry.Format(time.RFC3339Nano) - return ret -} - -type commandTokenSource struct { - cmd string - args []string - tokenKey string - expiryKey string - timeFmt string -} - -func newCmdTokenSource(cmd, tokenKey, expiryKey, timeFmt string) (*commandTokenSource, error) { - if len(timeFmt) == 0 { - timeFmt = time.RFC3339Nano - } - if len(tokenKey) == 0 { - tokenKey = "{.access_token}" - } - if len(expiryKey) == 0 { - expiryKey = "{.token_expiry}" - } - fields := strings.Fields(cmd) - if len(fields) == 0 { - return nil, fmt.Errorf("missing access token cmd") - } - return &commandTokenSource{ - cmd: fields[0], - args: fields[1:], - tokenKey: tokenKey, - expiryKey: expiryKey, - timeFmt: timeFmt, - }, nil -} - -func (c *commandTokenSource) Token() (*oauth2.Token, error) { - fullCmd := fmt.Sprintf("%s %s", c.cmd, strings.Join(c.args, " ")) - cmd := exec.Command(c.cmd, c.args...) - output, err := cmd.Output() - if err != nil { - return nil, fmt.Errorf("error executing access token command %q: %v", fullCmd, err) - } - token, err := c.parseTokenCmdOutput(output) - if err != nil { - return nil, fmt.Errorf("error parsing output for access token command %q: %v", fullCmd, err) - } - return token, nil -} - -func (c *commandTokenSource) parseTokenCmdOutput(output []byte) (*oauth2.Token, error) { - output, err := yaml.ToJSON(output) - if err != nil { - return nil, err - } - var data interface{} - if err := json.Unmarshal(output, &data); err != nil { - return nil, err - } - - accessToken, err := parseJSONPath(data, "token-key", c.tokenKey) - if err != nil { - return nil, fmt.Errorf("error parsing token-key %q: %v", c.tokenKey, err) - } - expiryStr, err := parseJSONPath(data, "expiry-key", c.expiryKey) - if err != nil { - return nil, fmt.Errorf("error parsing expiry-key %q: %v", c.expiryKey, err) - } - var expiry time.Time - if t, err := time.Parse(c.timeFmt, expiryStr); err != nil { - glog.V(4).Infof("Failed to parse token expiry from %s (fmt=%s): %v", expiryStr, c.timeFmt, err) - } else { - expiry = t - } - - return &oauth2.Token{ - AccessToken: accessToken, - TokenType: "Bearer", - Expiry: expiry, - }, nil -} - -func parseJSONPath(input interface{}, name, template string) (string, error) { - j := jsonpath.New(name) - buf := new(bytes.Buffer) - if err := j.Parse(template); err != nil { - return "", err - } - if err := j.Execute(buf, input); err != nil { - return "", err - } - return buf.String(), nil -} diff --git a/plugin/pkg/client/auth/gcp/gcp_test.go b/plugin/pkg/client/auth/gcp/gcp_test.go deleted file mode 100644 index cb64b8380ca..00000000000 --- a/plugin/pkg/client/auth/gcp/gcp_test.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gcp - -import ( - "fmt" - "reflect" - "strings" - "sync" - "testing" - "time" - - "golang.org/x/oauth2" -) - -func TestCmdTokenSource(t *testing.T) { - fakeExpiry := time.Date(2016, 10, 31, 22, 31, 9, 123000000, time.UTC) - customFmt := "2006-01-02 15:04:05.999999999" - - tests := []struct { - name string - output []byte - cmd, tokenKey, expiryKey, timeFmt string - tok *oauth2.Token - expectErr error - }{ - { - "defaults", - []byte(`{ - "access_token": "faketoken", - "token_expiry": "2016-10-31T22:31:09.123000000Z" -}`), - "/fake/cmd/path", "", "", "", - &oauth2.Token{ - AccessToken: "faketoken", - TokenType: "Bearer", - Expiry: fakeExpiry, - }, - nil, - }, - { - "custom keys", - []byte(`{ - "token": "faketoken", - "token_expiry": { - "datetime": "2016-10-31 22:31:09.123" - } -}`), - "/fake/cmd/path", "{.token}", "{.token_expiry.datetime}", customFmt, - &oauth2.Token{ - AccessToken: "faketoken", - TokenType: "Bearer", - Expiry: fakeExpiry, - }, - nil, - }, - { - "missing cmd", - nil, - "", "", "", "", - nil, - fmt.Errorf("missing access token cmd"), - }, - { - "missing token-key", - []byte(`{ - "broken": "faketoken", - "token_expiry": { - "datetime": "2016-10-31 22:31:09.123000000Z" - } -}`), - "/fake/cmd/path", "{.token}", "", "", - nil, - fmt.Errorf("error parsing token-key %q", "{.token}"), - }, - { - "missing expiry-key", - []byte(`{ - "access_token": "faketoken", - "expires": "2016-10-31T22:31:09.123000000Z" -}`), - "/fake/cmd/path", "", "{.expiry}", "", - nil, - fmt.Errorf("error parsing expiry-key %q", "{.expiry}"), - }, - { - "invalid expiry timestamp", - []byte(`{ - "access_token": "faketoken", - "token_expiry": "sometime soon, idk" -}`), - "/fake/cmd/path", "", "", "", - &oauth2.Token{ - AccessToken: "faketoken", - TokenType: "Bearer", - Expiry: time.Time{}, - }, - nil, - }, - { - "bad JSON", - []byte(`{ - "access_token": "faketoken", - "token_expiry": "sometime soon, idk" - ------ -`), - "/fake/cmd", "", "", "", - nil, - fmt.Errorf("invalid character '-' after object key:value pair"), - }, - } - - for _, tc := range tests { - ts, err := newCmdTokenSource(tc.cmd, tc.tokenKey, tc.expiryKey, tc.timeFmt) - if err != nil { - if !strings.Contains(err.Error(), tc.expectErr.Error()) { - t.Errorf("%s newCmdTokenSource error: %v, want %v", tc.name, err, tc.expectErr) - } - continue - } - tok, err := ts.parseTokenCmdOutput(tc.output) - - if err != tc.expectErr && !strings.Contains(err.Error(), tc.expectErr.Error()) { - t.Errorf("%s parseCmdTokenSource error: %v, want %v", tc.name, err, tc.expectErr) - } - if !reflect.DeepEqual(tok, tc.tok) { - t.Errorf("%s got token %v, want %v", tc.name, tok, tc.tok) - } - } -} - -type fakePersister struct { - lk sync.Mutex - cache map[string]string -} - -func (f *fakePersister) Persist(cache map[string]string) error { - f.lk.Lock() - defer f.lk.Unlock() - f.cache = map[string]string{} - for k, v := range cache { - f.cache[k] = v - } - return nil -} - -func (f *fakePersister) read() map[string]string { - ret := map[string]string{} - f.lk.Lock() - for k, v := range f.cache { - ret[k] = v - } - return ret -} - -type fakeTokenSource struct { - token *oauth2.Token - err error -} - -func (f *fakeTokenSource) Token() (*oauth2.Token, error) { - return f.token, f.err -} - -func TestCachedTokenSource(t *testing.T) { - tok := &oauth2.Token{AccessToken: "fakeaccesstoken"} - persister := &fakePersister{} - source := &fakeTokenSource{ - token: tok, - err: nil, - } - cache := map[string]string{ - "foo": "bar", - "baz": "bazinga", - } - ts, err := newCachedTokenSource("fakeaccesstoken", "", persister, source, cache) - if err != nil { - t.Fatal(err) - } - var wg sync.WaitGroup - wg.Add(10) - for i := 0; i < 10; i++ { - go func() { - _, err := ts.Token() - if err != nil { - t.Errorf("unexpected error: %s", err) - } - wg.Done() - }() - } - wg.Wait() - cache["access-token"] = "fakeaccesstoken" - cache["expiry"] = tok.Expiry.Format(time.RFC3339Nano) - if got := persister.read(); !reflect.DeepEqual(got, cache) { - t.Errorf("got cache %v, want %v", got, cache) - } -} diff --git a/plugin/pkg/client/auth/oidc/BUILD b/plugin/pkg/client/auth/oidc/BUILD deleted file mode 100644 index 522a4a4e746..00000000000 --- a/plugin/pkg/client/auth/oidc/BUILD +++ /dev/null @@ -1,48 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["oidc.go"], - tags = ["automanaged"], - deps = [ - "//vendor:github.com/coreos/go-oidc/jose", - "//vendor:github.com/coreos/go-oidc/oauth2", - "//vendor:github.com/coreos/go-oidc/oidc", - "//vendor:github.com/golang/glog", - "//vendor:k8s.io/client-go/rest", - ], -) - -go_test( - name = "go_default_test", - srcs = ["oidc_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//plugin/pkg/auth/authenticator/token/oidc/testing:go_default_library", - "//vendor:github.com/coreos/go-oidc/jose", - "//vendor:github.com/coreos/go-oidc/key", - "//vendor:github.com/coreos/go-oidc/oauth2", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/plugin/pkg/client/auth/oidc/OWNERS b/plugin/pkg/client/auth/oidc/OWNERS deleted file mode 100644 index 2f80bc7e10f..00000000000 --- a/plugin/pkg/client/auth/oidc/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -assignees: - - ericchiang diff --git a/plugin/pkg/client/auth/oidc/oidc.go b/plugin/pkg/client/auth/oidc/oidc.go deleted file mode 100644 index ca5b72cbd60..00000000000 --- a/plugin/pkg/client/auth/oidc/oidc.go +++ /dev/null @@ -1,333 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package oidc - -import ( - "encoding/base64" - "errors" - "fmt" - "net/http" - "strings" - "sync" - "time" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/oauth2" - "github.com/coreos/go-oidc/oidc" - "github.com/golang/glog" - - restclient "k8s.io/client-go/rest" -) - -const ( - cfgIssuerUrl = "idp-issuer-url" - cfgClientID = "client-id" - cfgClientSecret = "client-secret" - cfgCertificateAuthority = "idp-certificate-authority" - cfgCertificateAuthorityData = "idp-certificate-authority-data" - cfgExtraScopes = "extra-scopes" - cfgIDToken = "id-token" - cfgRefreshToken = "refresh-token" -) - -func init() { - if err := restclient.RegisterAuthProviderPlugin("oidc", newOIDCAuthProvider); err != nil { - glog.Fatalf("Failed to register oidc auth plugin: %v", err) - } -} - -// expiryDelta determines how earlier a token should be considered -// expired than its actual expiration time. It is used to avoid late -// expirations due to client-server time mismatches. -// -// NOTE(ericchiang): this is take from golang.org/x/oauth2 -const expiryDelta = 10 * time.Second - -var cache = newClientCache() - -// Like TLS transports, keep a cache of OIDC clients indexed by issuer URL. -type clientCache struct { - mu sync.RWMutex - cache map[cacheKey]*oidcAuthProvider -} - -func newClientCache() *clientCache { - return &clientCache{cache: make(map[cacheKey]*oidcAuthProvider)} -} - -type cacheKey struct { - // Canonical issuer URL string of the provider. - issuerURL string - - clientID string - clientSecret string - - // Don't use CA as cache key because we only add a cache entry if we can connect - // to the issuer in the first place. A valid CA is a prerequisite. -} - -func (c *clientCache) getClient(issuer, clientID, clientSecret string) (*oidcAuthProvider, bool) { - c.mu.RLock() - defer c.mu.RUnlock() - client, ok := c.cache[cacheKey{issuer, clientID, clientSecret}] - return client, ok -} - -// setClient attempts to put the client in the cache but may return any clients -// with the same keys set before. This is so there's only ever one client for a provider. -func (c *clientCache) setClient(issuer, clientID, clientSecret string, client *oidcAuthProvider) *oidcAuthProvider { - c.mu.Lock() - defer c.mu.Unlock() - key := cacheKey{issuer, clientID, clientSecret} - - // If another client has already initialized a client for the given provider we want - // to use that client instead of the one we're trying to set. This is so all transports - // share a client and can coordinate around the same mutex when refreshing and writing - // to the kubeconfig. - if oldClient, ok := c.cache[key]; ok { - return oldClient - } - - c.cache[key] = client - return client -} - -func newOIDCAuthProvider(_ string, cfg map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { - issuer := cfg[cfgIssuerUrl] - if issuer == "" { - return nil, fmt.Errorf("Must provide %s", cfgIssuerUrl) - } - - clientID := cfg[cfgClientID] - if clientID == "" { - return nil, fmt.Errorf("Must provide %s", cfgClientID) - } - - clientSecret := cfg[cfgClientSecret] - if clientSecret == "" { - return nil, fmt.Errorf("Must provide %s", cfgClientSecret) - } - - // Check cache for existing provider. - if provider, ok := cache.getClient(issuer, clientID, clientSecret); ok { - return provider, nil - } - - var certAuthData []byte - var err error - if cfg[cfgCertificateAuthorityData] != "" { - certAuthData, err = base64.StdEncoding.DecodeString(cfg[cfgCertificateAuthorityData]) - if err != nil { - return nil, err - } - } - - clientConfig := restclient.Config{ - TLSClientConfig: restclient.TLSClientConfig{ - CAFile: cfg[cfgCertificateAuthority], - CAData: certAuthData, - }, - } - - trans, err := restclient.TransportFor(&clientConfig) - if err != nil { - return nil, err - } - hc := &http.Client{Transport: trans} - - providerCfg, err := oidc.FetchProviderConfig(hc, issuer) - if err != nil { - return nil, fmt.Errorf("error fetching provider config: %v", err) - } - - scopes := strings.Split(cfg[cfgExtraScopes], ",") - oidcCfg := oidc.ClientConfig{ - HTTPClient: hc, - Credentials: oidc.ClientCredentials{ - ID: clientID, - Secret: clientSecret, - }, - ProviderConfig: providerCfg, - Scope: append(scopes, oidc.DefaultScope...), - } - client, err := oidc.NewClient(oidcCfg) - if err != nil { - return nil, fmt.Errorf("error creating OIDC Client: %v", err) - } - - provider := &oidcAuthProvider{ - client: &oidcClient{client}, - cfg: cfg, - persister: persister, - now: time.Now, - } - - return cache.setClient(issuer, clientID, clientSecret, provider), nil -} - -type oidcAuthProvider struct { - // Interface rather than a raw *oidc.Client for testing. - client OIDCClient - - // Stubbed out for testing. - now func() time.Time - - // Mutex guards persisting to the kubeconfig file and allows synchronized - // updates to the in-memory config. It also ensures concurrent calls to - // the RoundTripper only trigger a single refresh request. - mu sync.Mutex - cfg map[string]string - persister restclient.AuthProviderConfigPersister -} - -func (p *oidcAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &roundTripper{ - wrapped: rt, - provider: p, - } -} - -func (p *oidcAuthProvider) Login() error { - return errors.New("not yet implemented") -} - -type OIDCClient interface { - refreshToken(rt string) (oauth2.TokenResponse, error) - verifyJWT(jwt *jose.JWT) error -} - -type roundTripper struct { - provider *oidcAuthProvider - wrapped http.RoundTripper -} - -func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - token, err := r.provider.idToken() - if err != nil { - return nil, err - } - - // shallow copy of the struct - r2 := new(http.Request) - *r2 = *req - // deep copy of the Header so we don't modify the original - // request's Header (as per RoundTripper contract). - r2.Header = make(http.Header) - for k, s := range req.Header { - r2.Header[k] = s - } - r2.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token)) - - return r.wrapped.RoundTrip(r2) -} - -func (p *oidcAuthProvider) idToken() (string, error) { - p.mu.Lock() - defer p.mu.Unlock() - - if idToken, ok := p.cfg[cfgIDToken]; ok && len(idToken) > 0 { - valid, err := verifyJWTExpiry(p.now(), idToken) - if err != nil { - return "", err - } - if valid { - // If the cached id token is still valid use it. - return idToken, nil - } - } - - // Try to request a new token using the refresh token. - rt, ok := p.cfg[cfgRefreshToken] - if !ok || len(rt) == 0 { - return "", errors.New("No valid id-token, and cannot refresh without refresh-token") - } - - tokens, err := p.client.refreshToken(rt) - if err != nil { - return "", fmt.Errorf("could not refresh token: %v", err) - } - jwt, err := jose.ParseJWT(tokens.IDToken) - if err != nil { - return "", err - } - - if err := p.client.verifyJWT(&jwt); err != nil { - return "", err - } - - // Create a new config to persist. - newCfg := make(map[string]string) - for key, val := range p.cfg { - newCfg[key] = val - } - - if tokens.RefreshToken != "" && tokens.RefreshToken != rt { - newCfg[cfgRefreshToken] = tokens.RefreshToken - } - - newCfg[cfgIDToken] = tokens.IDToken - if err = p.persister.Persist(newCfg); err != nil { - return "", fmt.Errorf("could not perist new tokens: %v", err) - } - - // Update the in memory config to reflect the on disk one. - p.cfg = newCfg - - return tokens.IDToken, nil -} - -// oidcClient is the real implementation of the OIDCClient interface, which is -// used for testing. -type oidcClient struct { - client *oidc.Client -} - -func (o *oidcClient) refreshToken(rt string) (oauth2.TokenResponse, error) { - oac, err := o.client.OAuthClient() - if err != nil { - return oauth2.TokenResponse{}, err - } - - return oac.RequestToken(oauth2.GrantTypeRefreshToken, rt) -} - -func (o *oidcClient) verifyJWT(jwt *jose.JWT) error { - return o.client.VerifyJWT(*jwt) -} - -func verifyJWTExpiry(now time.Time, s string) (valid bool, err error) { - jwt, err := jose.ParseJWT(s) - if err != nil { - return false, fmt.Errorf("invalid %q", cfgIDToken) - } - claims, err := jwt.Claims() - if err != nil { - return false, err - } - - exp, ok, err := claims.TimeClaim("exp") - switch { - case err != nil: - return false, fmt.Errorf("failed to parse 'exp' claim: %v", err) - case !ok: - return false, errors.New("missing required 'exp' claim") - case exp.After(now.Add(expiryDelta)): - return true, nil - } - - return false, nil -} diff --git a/plugin/pkg/client/auth/oidc/oidc_test.go b/plugin/pkg/client/auth/oidc/oidc_test.go deleted file mode 100644 index 16e11492818..00000000000 --- a/plugin/pkg/client/auth/oidc/oidc_test.go +++ /dev/null @@ -1,384 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package oidc - -import ( - "encoding/base64" - "errors" - "io/ioutil" - "os" - "path" - "reflect" - "testing" - "time" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/key" - "github.com/coreos/go-oidc/oauth2" - - oidctesting "k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/testing" -) - -func clearCache() { - cache = newClientCache() -} - -type persister struct{} - -// we don't need to actually persist anything because there's no way for us to -// read from a persister. -func (p *persister) Persist(map[string]string) error { return nil } - -type noRefreshOIDCClient struct{} - -func (c *noRefreshOIDCClient) refreshToken(rt string) (oauth2.TokenResponse, error) { - return oauth2.TokenResponse{}, errors.New("alwaysErrOIDCClient: cannot refresh token") -} - -func (c *noRefreshOIDCClient) verifyJWT(jwt *jose.JWT) error { - return nil -} - -type mockOIDCClient struct { - tokenResponse oauth2.TokenResponse -} - -func (c *mockOIDCClient) refreshToken(rt string) (oauth2.TokenResponse, error) { - return c.tokenResponse, nil -} - -func (c *mockOIDCClient) verifyJWT(jwt *jose.JWT) error { - return nil -} - -func TestNewOIDCAuthProvider(t *testing.T) { - tempDir, err := ioutil.TempDir(os.TempDir(), "oidc_test") - if err != nil { - t.Fatalf("Cannot make temp dir %v", err) - } - cert := path.Join(tempDir, "oidc-cert") - key := path.Join(tempDir, "oidc-key") - defer os.RemoveAll(tempDir) - - oidctesting.GenerateSelfSignedCert(t, "127.0.0.1", cert, key) - op := oidctesting.NewOIDCProvider(t, "") - srv, err := op.ServeTLSWithKeyPair(cert, key) - if err != nil { - t.Fatalf("Cannot start server %v", err) - } - defer srv.Close() - - certData, err := ioutil.ReadFile(cert) - if err != nil { - t.Fatalf("Could not read cert bytes %v", err) - } - - makeToken := func(exp time.Time) *jose.JWT { - jwt, err := jose.NewSignedJWT(jose.Claims(map[string]interface{}{ - "exp": exp.UTC().Unix(), - }), op.PrivKey.Signer()) - if err != nil { - t.Fatalf("Could not create signed JWT %v", err) - } - return jwt - } - - t0 := time.Now() - - goodToken := makeToken(t0.Add(time.Hour)).Encode() - expiredToken := makeToken(t0.Add(-time.Hour)).Encode() - - tests := []struct { - name string - - cfg map[string]string - wantInitErr bool - - client OIDCClient - wantCfg map[string]string - wantTokenErr bool - }{ - { - // A Valid configuration - name: "no id token and no refresh token", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - }, - wantTokenErr: true, - }, - { - name: "valid config with an initial token", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgIDToken: goodToken, - }, - client: new(noRefreshOIDCClient), - wantCfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgIDToken: goodToken, - }, - }, - { - name: "invalid ID token with a refresh token", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgRefreshToken: "foo", - cfgIDToken: expiredToken, - }, - client: &mockOIDCClient{ - tokenResponse: oauth2.TokenResponse{ - IDToken: goodToken, - }, - }, - wantCfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgRefreshToken: "foo", - cfgIDToken: goodToken, - }, - }, - { - name: "invalid ID token with a refresh token, server returns new refresh token", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgRefreshToken: "foo", - cfgIDToken: expiredToken, - }, - client: &mockOIDCClient{ - tokenResponse: oauth2.TokenResponse{ - IDToken: goodToken, - RefreshToken: "bar", - }, - }, - wantCfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgRefreshToken: "bar", - cfgIDToken: goodToken, - }, - }, - { - name: "expired token and no refresh otken", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgIDToken: expiredToken, - }, - wantTokenErr: true, - }, - { - name: "valid base64d ca", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthorityData: base64.StdEncoding.EncodeToString(certData), - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - }, - client: new(noRefreshOIDCClient), - wantTokenErr: true, - }, - { - name: "missing client ID", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientSecret: "client-secret", - }, - wantInitErr: true, - }, - { - name: "missing client secret", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - }, - wantInitErr: true, - }, - { - name: "missing issuer URL", - cfg: map[string]string{ - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "secret", - }, - wantInitErr: true, - }, - { - name: "missing TLS config", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgClientID: "client-id", - cfgClientSecret: "secret", - }, - wantInitErr: true, - }, - } - - for _, tt := range tests { - clearCache() - - p, err := newOIDCAuthProvider("cluster.example.com", tt.cfg, new(persister)) - if tt.wantInitErr { - if err == nil { - t.Errorf("%s: want non-nil err", tt.name) - } - continue - } - - if err != nil { - t.Errorf("%s: unexpected error on newOIDCAuthProvider: %v", tt.name, err) - continue - } - - provider := p.(*oidcAuthProvider) - provider.client = tt.client - provider.now = func() time.Time { return t0 } - - if _, err := provider.idToken(); err != nil { - if !tt.wantTokenErr { - t.Errorf("%s: failed to get id token: %v", tt.name, err) - } - continue - } - if tt.wantTokenErr { - t.Errorf("%s: expected to not get id token: %v", tt.name, err) - continue - } - - if !reflect.DeepEqual(tt.wantCfg, provider.cfg) { - t.Errorf("%s: expected config %#v got %#v", tt.name, tt.wantCfg, provider.cfg) - } - } -} - -func TestVerifyJWTExpiry(t *testing.T) { - privKey, err := key.GeneratePrivateKey() - if err != nil { - t.Fatalf("can't generate private key: %v", err) - } - makeToken := func(s string, exp time.Time, count int) *jose.JWT { - jwt, err := jose.NewSignedJWT(jose.Claims(map[string]interface{}{ - "test": s, - "exp": exp.UTC().Unix(), - "count": count, - }), privKey.Signer()) - if err != nil { - t.Fatalf("Could not create signed JWT %v", err) - } - return jwt - } - - t0 := time.Now() - - tests := []struct { - name string - jwt *jose.JWT - now time.Time - wantErr bool - wantExpired bool - }{ - { - name: "valid jwt", - jwt: makeToken("foo", t0.Add(time.Hour), 1), - now: t0, - }, - { - name: "invalid jwt", - jwt: &jose.JWT{}, - now: t0, - wantErr: true, - }, - { - name: "expired jwt", - jwt: makeToken("foo", t0.Add(-time.Hour), 1), - now: t0, - wantExpired: true, - }, - { - name: "jwt expires soon enough to be marked expired", - jwt: makeToken("foo", t0, 1), - now: t0, - wantExpired: true, - }, - } - - for _, tc := range tests { - func() { - valid, err := verifyJWTExpiry(tc.now, tc.jwt.Encode()) - if err != nil { - if !tc.wantErr { - t.Errorf("%s: %v", tc.name, err) - } - return - } - if tc.wantErr { - t.Errorf("%s: expected error", tc.name) - return - } - - if valid && tc.wantExpired { - t.Errorf("%s: expected token to be expired", tc.name) - } - if !valid && !tc.wantExpired { - t.Errorf("%s: expected token to be valid", tc.name) - } - }() - } -} - -func TestClientCache(t *testing.T) { - cache := newClientCache() - - if _, ok := cache.getClient("issuer1", "id1", "secret1"); ok { - t.Fatalf("got client before putting one in the cache") - } - - cli1 := new(oidcAuthProvider) - cli2 := new(oidcAuthProvider) - - gotcli := cache.setClient("issuer1", "id1", "secret1", cli1) - if cli1 != gotcli { - t.Fatalf("set first client and got a different one") - } - - gotcli = cache.setClient("issuer1", "id1", "secret1", cli2) - if cli1 != gotcli { - t.Fatalf("set a second client and didn't get the first") - } -} diff --git a/plugin/pkg/client/auth/plugins.go b/plugin/pkg/client/auth/plugins.go deleted file mode 100644 index 21813b05812..00000000000 --- a/plugin/pkg/client/auth/plugins.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package auth - -import ( - // Initialize all known client auth plugins. - _ "k8s.io/kubernetes/plugin/pkg/client/auth/gcp" - _ "k8s.io/kubernetes/plugin/pkg/client/auth/oidc" -) diff --git a/staging/copy.sh b/staging/copy.sh index 73c6913404a..fea5e965813 100755 --- a/staging/copy.sh +++ b/staging/copy.sh @@ -75,11 +75,14 @@ save "tools/clientcmd/api" save "rest" # remove the rest/fake until we're authoritative for it (need to update for registry) rm -rf ${CLIENT_REPO_TEMP}/rest/fake +save "pkg/third_party" save "pkg/util/cert" save "pkg/util/clock" save "pkg/util/flowcontrol" save "pkg/util/integer" +save "pkg/util/jsonpath" save "pkg/util/testing" +save "plugin" @@ -105,7 +108,6 @@ mkcp "/pkg/client/unversioned/auth" "/pkg/client/unversioned" mkcp "/pkg/client/unversioned/clientcmd" "/pkg/client/unversioned" mkcp "/pkg/client/unversioned/portforward" "/pkg/client/unversioned" -mkcp "/plugin/pkg/client/auth" "/plugin/pkg/client" mkcp "/pkg/util/workqueue" "pkg/util" # remove this folder because it imports prometheus rm -rf "${CLIENT_REPO_TEMP}/pkg/util/workqueue/prometheus" @@ -208,7 +210,6 @@ if [ "$(find "${CLIENT_REPO_TEMP}"/pkg/client -type f -name "*.go")" ]; then else rm -r "${CLIENT_REPO_TEMP}"/pkg/client fi -mvfolder third_party pkg/third_party mvfolder federation pkg/federation echo "running gofmt" diff --git a/staging/src/k8s.io/client-go/pkg/util/jsonpath/doc.go b/staging/src/k8s.io/client-go/pkg/util/jsonpath/doc.go index 2a6e1706170..bdbd056c2f9 100644 --- a/staging/src/k8s.io/client-go/pkg/util/jsonpath/doc.go +++ b/staging/src/k8s.io/client-go/pkg/util/jsonpath/doc.go @@ -17,4 +17,4 @@ limitations under the License. // package jsonpath is a template engine using jsonpath syntax, // which can be seen at http://goessner.net/articles/JsonPath/. // In addition, it has {range} {end} function to iterate list and slice. -package jsonpath +package jsonpath // import "k8s.io/client-go/pkg/util/jsonpath" diff --git a/pkg/util/jsonpath/jsonpath_test.go b/staging/src/k8s.io/client-go/pkg/util/jsonpath/jsonpath_test.go similarity index 100% rename from pkg/util/jsonpath/jsonpath_test.go rename to staging/src/k8s.io/client-go/pkg/util/jsonpath/jsonpath_test.go diff --git a/pkg/util/jsonpath/parser_test.go b/staging/src/k8s.io/client-go/pkg/util/jsonpath/parser_test.go similarity index 100% rename from pkg/util/jsonpath/parser_test.go rename to staging/src/k8s.io/client-go/pkg/util/jsonpath/parser_test.go diff --git a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc_test.go b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc_test.go index 7ef319b277d..16e11492818 100644 --- a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc_test.go +++ b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc_test.go @@ -30,7 +30,7 @@ import ( "github.com/coreos/go-oidc/key" "github.com/coreos/go-oidc/oauth2" - oidctesting "k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing" + oidctesting "k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/testing" ) func clearCache() { From 9c6a522882f0dbff76bb5ad900822a0f51da8588 Mon Sep 17 00:00:00 2001 From: deads2k Date: Thu, 19 Jan 2017 16:35:17 -0500 Subject: [PATCH 7/7] mechanical results of client auth plugin --- .../clientset_generated/clientset/BUILD | 2 +- .../clientset/clientset.go | 2 +- .../internalclientset/BUILD | 2 +- .../internalclientset/clientset.go | 2 +- .../generators/generator_for_clientset.go | 2 +- .../test_internalclientset/BUILD | 2 +- .../test_internalclientset/clientset.go | 2 +- .../federation_clientset/BUILD | 2 +- .../federation_clientset/clientset.go | 2 +- .../federation_internalclientset/BUILD | 2 +- .../federation_internalclientset/clientset.go | 2 +- .../clientset_generated/clientset/BUILD | 2 +- .../clientset/clientset.go | 2 +- .../typed/certificates/v1beta1/BUILD | 2 +- .../typed/certificates/v1beta1/fake/BUILD | 2 +- .../internalclientset/BUILD | 2 +- .../internalclientset/clientset.go | 2 +- pkg/client/typed/discovery/BUILD | 2 +- pkg/client/typed/discovery/helper.go | 2 +- pkg/client/unversioned/BUILD | 2 +- pkg/client/unversioned/helper.go | 2 +- pkg/kubectl/BUILD | 2 +- pkg/kubectl/custom_column_printer.go | 2 +- pkg/kubectl/resource_printer.go | 2 +- pkg/kubectl/sorting_printer.go | 2 +- pkg/util/BUILD | 1 - pkg/util/jsonpath/BUILD | 44 ------------------- plugin/BUILD | 1 - vendor/BUILD | 12 ++++- 29 files changed, 36 insertions(+), 72 deletions(-) delete mode 100644 pkg/util/jsonpath/BUILD diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD index 6363bcdbb21..56aa051a099 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD @@ -17,9 +17,9 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go index a5780014f2a..4cbd8ee8c84 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go @@ -19,10 +19,10 @@ package clientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + _ "k8s.io/client-go/plugin/pkg/client/auth" rest "k8s.io/client-go/rest" v1alpha1apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD index abeea15fcd7..625408d0312 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD @@ -17,9 +17,9 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go index 93c3c1e06c4..94ef80b7669 100644 --- a/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go +++ b/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go @@ -19,10 +19,10 @@ package internalclientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + _ "k8s.io/client-go/plugin/pkg/client/auth" rest "k8s.io/client-go/rest" internalversionapiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go b/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go index f4309498db0..116043a98d6 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go @@ -64,7 +64,7 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { imports = append(imports, "github.com/golang/glog") imports = append(imports, "k8s.io/client-go/pkg/util/flowcontrol") // import solely to initialize client auth plugins. - imports = append(imports, "_ \"k8s.io/kubernetes/plugin/pkg/client/auth\"") + imports = append(imports, "_ \"k8s.io/client-go/plugin/pkg/client/auth\"") return } diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD index 7e7e8369c89..92cabdbe8d9 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD @@ -18,9 +18,9 @@ go_library( deps = [ "//cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go index a5fffeda583..b7a8a86fc66 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go @@ -19,10 +19,10 @@ package test_internalclientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + _ "k8s.io/client-go/plugin/pkg/client/auth" rest "k8s.io/client-go/rest" internalversiontestgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { diff --git a/federation/client/clientset_generated/federation_clientset/BUILD b/federation/client/clientset_generated/federation_clientset/BUILD index 1b9427befd1..8ad7222816b 100644 --- a/federation/client/clientset_generated/federation_clientset/BUILD +++ b/federation/client/clientset_generated/federation_clientset/BUILD @@ -22,9 +22,9 @@ go_library( "//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_clientset/clientset.go b/federation/client/clientset_generated/federation_clientset/clientset.go index 8b396416547..7ce9fdd07a1 100644 --- a/federation/client/clientset_generated/federation_clientset/clientset.go +++ b/federation/client/clientset_generated/federation_clientset/clientset.go @@ -19,13 +19,13 @@ package federation_clientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + _ "k8s.io/client-go/plugin/pkg/client/auth" rest "k8s.io/client-go/rest" v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1" v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1" v1beta1extensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1" v1beta1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { diff --git a/federation/client/clientset_generated/federation_internalclientset/BUILD b/federation/client/clientset_generated/federation_internalclientset/BUILD index f5fdbb9f457..595c18f0dd7 100644 --- a/federation/client/clientset_generated/federation_internalclientset/BUILD +++ b/federation/client/clientset_generated/federation_internalclientset/BUILD @@ -22,9 +22,9 @@ go_library( "//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/federation/client/clientset_generated/federation_internalclientset/clientset.go b/federation/client/clientset_generated/federation_internalclientset/clientset.go index 384279514bb..f296acff198 100644 --- a/federation/client/clientset_generated/federation_internalclientset/clientset.go +++ b/federation/client/clientset_generated/federation_internalclientset/clientset.go @@ -19,13 +19,13 @@ package federation_internalclientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + _ "k8s.io/client-go/plugin/pkg/client/auth" rest "k8s.io/client-go/rest" internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion" internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion" internalversionextensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion" internalversionfederation "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { diff --git a/pkg/client/clientset_generated/clientset/BUILD b/pkg/client/clientset_generated/clientset/BUILD index 25f5456aeb0..056623bbc3c 100644 --- a/pkg/client/clientset_generated/clientset/BUILD +++ b/pkg/client/clientset_generated/clientset/BUILD @@ -42,9 +42,9 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/clientset.go b/pkg/client/clientset_generated/clientset/clientset.go index b3a6a4ba8de..b8e6da8e6fc 100644 --- a/pkg/client/clientset_generated/clientset/clientset.go +++ b/pkg/client/clientset_generated/clientset/clientset.go @@ -19,6 +19,7 @@ package clientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + _ "k8s.io/client-go/plugin/pkg/client/auth" rest "k8s.io/client-go/rest" v1beta1apps "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1" v1beta1authentication "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1" @@ -34,7 +35,6 @@ import ( v1beta1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1" v1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { diff --git a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/BUILD b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/BUILD index 7538c0f08d4..64eed9864b5 100644 --- a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/BUILD @@ -21,12 +21,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/certificates/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/BUILD index c94d52cf2e6..e24906db8f5 100644 --- a/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/BUILD +++ b/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/BUILD @@ -20,13 +20,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/BUILD b/pkg/client/clientset_generated/internalclientset/BUILD index 0639817e75b..8ef2ab7f783 100644 --- a/pkg/client/clientset_generated/internalclientset/BUILD +++ b/pkg/client/clientset_generated/internalclientset/BUILD @@ -41,9 +41,9 @@ go_library( "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/client-go/pkg/util/flowcontrol", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/clientset_generated/internalclientset/clientset.go b/pkg/client/clientset_generated/internalclientset/clientset.go index ee063c51511..df073c9e18c 100644 --- a/pkg/client/clientset_generated/internalclientset/clientset.go +++ b/pkg/client/clientset_generated/internalclientset/clientset.go @@ -19,6 +19,7 @@ package internalclientset import ( "github.com/golang/glog" "k8s.io/client-go/pkg/util/flowcontrol" + _ "k8s.io/client-go/plugin/pkg/client/auth" rest "k8s.io/client-go/rest" internalversionapps "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion" internalversionauthentication "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion" @@ -32,7 +33,6 @@ import ( internalversionrbac "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" internalversionstorage "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { diff --git a/pkg/client/typed/discovery/BUILD b/pkg/client/typed/discovery/BUILD index 49e5a739629..d14274f1842 100644 --- a/pkg/client/typed/discovery/BUILD +++ b/pkg/client/typed/discovery/BUILD @@ -21,7 +21,6 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/version:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/emicklei/go-restful/swagger", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", @@ -32,6 +31,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/typed/discovery/helper.go b/pkg/client/typed/discovery/helper.go index 6e776ca3d2b..1c511a6051f 100644 --- a/pkg/client/typed/discovery/helper.go +++ b/pkg/client/typed/discovery/helper.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/version" // Import solely to initialize client auth plugins. - _ "k8s.io/kubernetes/plugin/pkg/client/auth" + _ "k8s.io/client-go/plugin/pkg/client/auth" ) // MatchesServerVersion queries the server to compares the build version diff --git a/pkg/client/unversioned/BUILD b/pkg/client/unversioned/BUILD index 6bf47063c0e..07ca472a2f3 100644 --- a/pkg/client/unversioned/BUILD +++ b/pkg/client/unversioned/BUILD @@ -24,12 +24,12 @@ go_library( "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/client/unversioned/helper.go b/pkg/client/unversioned/helper.go index 6d2abc62ffd..c8d09ef41e7 100644 --- a/pkg/client/unversioned/helper.go +++ b/pkg/client/unversioned/helper.go @@ -20,7 +20,7 @@ import ( restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" // Import solely to initialize client auth plugins. - _ "k8s.io/kubernetes/plugin/pkg/client/auth" + _ "k8s.io/client-go/plugin/pkg/client/auth" ) const ( diff --git a/pkg/kubectl/BUILD b/pkg/kubectl/BUILD index 719d2c42aab..f1fd1c04803 100644 --- a/pkg/kubectl/BUILD +++ b/pkg/kubectl/BUILD @@ -87,7 +87,6 @@ go_library( "//pkg/kubelet/qos:go_default_library", "//pkg/util:go_default_library", "//pkg/util/intstr:go_default_library", - "//pkg/util/jsonpath:go_default_library", "//pkg/util/node:go_default_library", "//pkg/util/slice:go_default_library", "//pkg/util/uuid:go_default_library", @@ -111,6 +110,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/pkg/util/integer", + "//vendor:k8s.io/client-go/pkg/util/jsonpath", "//vendor:k8s.io/client-go/rest", ], ) diff --git a/pkg/kubectl/custom_column_printer.go b/pkg/kubectl/custom_column_printer.go index 6cefff9fcef..b8059c85d74 100644 --- a/pkg/kubectl/custom_column_printer.go +++ b/pkg/kubectl/custom_column_printer.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/util/jsonpath" + "k8s.io/client-go/pkg/util/jsonpath" ) const ( diff --git a/pkg/kubectl/resource_printer.go b/pkg/kubectl/resource_printer.go index b09dba33222..3971ff539f4 100644 --- a/pkg/kubectl/resource_printer.go +++ b/pkg/kubectl/resource_printer.go @@ -38,6 +38,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/pkg/util/jsonpath" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/events" @@ -50,7 +51,6 @@ import ( "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/apis/storage" storageutil "k8s.io/kubernetes/pkg/apis/storage/util" - "k8s.io/kubernetes/pkg/util/jsonpath" "k8s.io/kubernetes/pkg/util/node" "github.com/ghodss/yaml" diff --git a/pkg/kubectl/sorting_printer.go b/pkg/kubectl/sorting_printer.go index 7c7d0295a65..c003d399708 100644 --- a/pkg/kubectl/sorting_printer.go +++ b/pkg/kubectl/sorting_printer.go @@ -29,8 +29,8 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/pkg/util/integer" + "k8s.io/client-go/pkg/util/jsonpath" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/util/jsonpath" ) // Sorting printer sorts list types before delegating to another printer. diff --git a/pkg/util/BUILD b/pkg/util/BUILD index 6f53ba09327..a5dcd03d3ad 100644 --- a/pkg/util/BUILD +++ b/pkg/util/BUILD @@ -73,7 +73,6 @@ filegroup( "//pkg/util/io:all-srcs", "//pkg/util/iptables:all-srcs", "//pkg/util/json:all-srcs", - "//pkg/util/jsonpath:all-srcs", "//pkg/util/keymutex:all-srcs", "//pkg/util/labels:all-srcs", "//pkg/util/limitwriter:all-srcs", diff --git a/pkg/util/jsonpath/BUILD b/pkg/util/jsonpath/BUILD deleted file mode 100644 index b54bfbd0478..00000000000 --- a/pkg/util/jsonpath/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "jsonpath.go", - "node.go", - "parser.go", - ], - tags = ["automanaged"], - deps = ["//third_party/forked/golang/template:go_default_library"], -) - -go_test( - name = "go_default_test", - srcs = [ - "jsonpath_test.go", - "parser_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/plugin/BUILD b/plugin/BUILD index fabfccfae18..9225d06f724 100644 --- a/plugin/BUILD +++ b/plugin/BUILD @@ -34,7 +34,6 @@ filegroup( "//plugin/pkg/admission/serviceaccount:all-srcs", "//plugin/pkg/admission/storageclass/default:all-srcs", "//plugin/pkg/auth:all-srcs", - "//plugin/pkg/client/auth:all-srcs", "//plugin/pkg/scheduler:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/BUILD b/vendor/BUILD index 8938efee3d4..8b409b40162 100644 --- a/vendor/BUILD +++ b/vendor/BUILD @@ -12817,10 +12817,10 @@ go_test( library = ":k8s.io/client-go/plugin/pkg/client/auth/oidc", tags = ["automanaged"], deps = [ + "//plugin/pkg/auth/authenticator/token/oidc/testing:go_default_library", "//vendor:github.com/coreos/go-oidc/jose", "//vendor:github.com/coreos/go-oidc/key", "//vendor:github.com/coreos/go-oidc/oauth2", - "//vendor:k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing", ], ) @@ -13646,3 +13646,13 @@ go_test( library = ":k8s.io/client-go/pkg/util/testing", tags = ["automanaged"], ) + +go_test( + name = "k8s.io/client-go/pkg/util/jsonpath_test", + srcs = [ + "k8s.io/client-go/pkg/util/jsonpath/jsonpath_test.go", + "k8s.io/client-go/pkg/util/jsonpath/parser_test.go", + ], + library = ":k8s.io/client-go/pkg/util/jsonpath", + tags = ["automanaged"], +)