diff --git a/cmd/cloud-controller-manager/app/BUILD b/cmd/cloud-controller-manager/app/BUILD index ddb913b70c2..5f39e010c83 100644 --- a/cmd/cloud-controller-manager/app/BUILD +++ b/cmd/cloud-controller-manager/app/BUILD @@ -32,6 +32,7 @@ go_library( "//vendor:github.com/prometheus/client_golang/prometheus", "//vendor:github.com/spf13/cobra", "//vendor:github.com/spf13/pflag", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apiserver/pkg/healthz", ], diff --git a/cmd/cloud-controller-manager/app/controllermanager.go b/cmd/cloud-controller-manager/app/controllermanager.go index 8e32bbe6d91..61f903c0a3f 100644 --- a/cmd/cloud-controller-manager/app/controllermanager.go +++ b/cmd/cloud-controller-manager/app/controllermanager.go @@ -25,6 +25,7 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/healthz" "k8s.io/kubernetes/cmd/cloud-controller-manager/app/options" @@ -158,7 +159,7 @@ func Run(s *options.CloudControllerManagerServer, cloud cloudprovider.Interface) // Lock required for leader election rl := resourcelock.EndpointsLock{ - EndpointsMeta: v1.ObjectMeta{ + EndpointsMeta: metav1.ObjectMeta{ Namespace: "kube-system", Name: "cloud-controller-manager", }, diff --git a/cmd/kube-aggregator/pkg/apis/apiregistration/types.go b/cmd/kube-aggregator/pkg/apis/apiregistration/types.go index 95fdde02f65..cabe68d0032 100644 --- a/cmd/kube-aggregator/pkg/apis/apiregistration/types.go +++ b/cmd/kube-aggregator/pkg/apis/apiregistration/types.go @@ -16,10 +16,7 @@ limitations under the License. package apiregistration -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - kapi "k8s.io/kubernetes/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // APIServiceList is a list of APIService objects. type APIServiceList struct { diff --git a/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.generated.go b/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.generated.go index dd6c9fc4b82..5e0b3a9392f 100644 --- a/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.generated.go +++ b/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -1340,7 +1338,13 @@ func (x *APIService) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1350,7 +1354,13 @@ func (x *APIService) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1474,24 +1484,30 @@ func (x *APIService) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = APIServiceSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = APIServiceStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1504,16 +1520,16 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1521,21 +1537,21 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1543,38 +1559,44 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1582,16 +1604,16 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = APIServiceSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1599,21 +1621,21 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = APIServiceStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go b/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go index ce4b7a3963a..8f32989432c 100644 --- a/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go +++ b/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go @@ -16,10 +16,7 @@ limitations under the License. package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - kapi "k8s.io/kubernetes/pkg/api/v1" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // APIServiceList is a list of APIService objects. type APIServiceList struct { @@ -74,7 +71,7 @@ type APIServiceStatus struct { // APIService represents a server for a particular GroupVersion. // Name must be "version.group". type APIService struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec contains information for locating and communicating with a server diff --git a/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.conversion.go b/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.conversion.go index 27c9a97fae6..debd300b94f 100644 --- a/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.conversion.go +++ b/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.conversion.go @@ -49,10 +49,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_APIService_To_apiregistration_APIService(in *APIService, out *apiregistration.APIService, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1alpha1_APIServiceSpec_To_apiregistration_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -67,10 +64,7 @@ func Convert_v1alpha1_APIService_To_apiregistration_APIService(in *APIService, o } func autoConvert_apiregistration_APIService_To_v1alpha1_APIService(in *apiregistration.APIService, out *APIService, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_apiregistration_APIServiceSpec_To_v1alpha1_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.deepcopy.go b/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.deepcopy.go index 9ed7285ce4c..e1b2afa9e0d 100644 --- a/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.deepcopy.go +++ b/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.deepcopy.go @@ -21,10 +21,11 @@ limitations under the License. package v1alpha1 import ( + reflect "reflect" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" v1 "k8s.io/kubernetes/pkg/api/v1" - reflect "reflect" ) func init() { diff --git a/cmd/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go b/cmd/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go index 3b7c610f772..2d11b419dfd 100644 --- a/cmd/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go +++ b/cmd/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go @@ -21,10 +21,11 @@ limitations under the License. package apiregistration import ( + reflect "reflect" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go b/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go index 96a8a9efceb..a1cd3d79ed9 100644 --- a/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go +++ b/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go @@ -111,7 +111,7 @@ func TestAPIs(t *testing.T) { name: "simple add", apiservices: []*apiregistration.APIService{ { - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -123,7 +123,7 @@ func TestAPIs(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v1.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -172,7 +172,7 @@ func TestAPIs(t *testing.T) { name: "sorting", apiservices: []*apiregistration.APIService{ { - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -184,7 +184,7 @@ func TestAPIs(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v2.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v2.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -196,7 +196,7 @@ func TestAPIs(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v2.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v2.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -208,7 +208,7 @@ func TestAPIs(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v1.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -352,7 +352,7 @@ func TestAPIGroup(t *testing.T) { group: "foo", apiservices: []*apiregistration.APIService{ { - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -364,7 +364,7 @@ func TestAPIGroup(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v2.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v2.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -376,7 +376,7 @@ func TestAPIGroup(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v2.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v2.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -388,7 +388,7 @@ func TestAPIGroup(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v1.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", diff --git a/cmd/kube-aggregator/pkg/apiserver/handler_proxy_test.go b/cmd/kube-aggregator/pkg/apiserver/handler_proxy_test.go index 10a6f0ba4e5..b41f6b93c0c 100644 --- a/cmd/kube-aggregator/pkg/apiserver/handler_proxy_test.go +++ b/cmd/kube-aggregator/pkg/apiserver/handler_proxy_test.go @@ -25,10 +25,10 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/authentication/user" genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" ) @@ -103,7 +103,7 @@ func TestProxyHandler(t *testing.T) { }, "no user": { apiService: &apiregistration.APIService{ - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Group: "foo", Version: "v1", @@ -119,7 +119,7 @@ func TestProxyHandler(t *testing.T) { }, path: "/request/path", apiService: &apiregistration.APIService{ - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Group: "foo", Version: "v1", @@ -144,7 +144,7 @@ func TestProxyHandler(t *testing.T) { }, path: "/request/path", apiService: &apiregistration.APIService{ - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Group: "foo", Version: "v1", diff --git a/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/BUILD b/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/BUILD index 197c0d70569..93d3d345182 100644 --- a/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/BUILD +++ b/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/BUILD @@ -16,9 +16,9 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", - "//pkg/api:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/apiservice.go b/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/apiservice.go index 6b4ffb06172..30446f28eb6 100644 --- a/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/apiservice.go +++ b/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/apiservice.go @@ -20,9 +20,9 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" - api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *aPIServiceLister) List(selector labels.Selector) (ret []*apiregistratio // Get retrieves the APIService from the index for a given name. func (s *aPIServiceLister) Get(name string) (*apiregistration.APIService, error) { - key := &apiregistration.APIService{ObjectMeta: api.ObjectMeta{Name: name}} + key := &apiregistration.APIService{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/BUILD b/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/BUILD index db0d4b33ddd..8aa6ee95080 100644 --- a/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/BUILD +++ b/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/BUILD @@ -17,9 +17,9 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/apiservice.go b/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/apiservice.go index 364a3d819ea..c339b8ef374 100644 --- a/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/apiservice.go +++ b/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/apiservice.go @@ -20,10 +20,10 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" - v1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" ) diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index 95d55cb42b2..08e093c4006 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -31,6 +31,7 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" @@ -178,7 +179,7 @@ func Run(s *options.CMServer) error { // TODO: enable other lock types rl := resourcelock.EndpointsLock{ - EndpointsMeta: v1.ObjectMeta{ + EndpointsMeta: metav1.ObjectMeta{ Namespace: "kube-system", Name: "kube-controller-manager", }, diff --git a/cmd/kubeadm/app/master/apiclient.go b/cmd/kubeadm/app/master/apiclient.go index 982c0d0e4b9..a8b54b12c27 100644 --- a/cmd/kubeadm/app/master/apiclient.go +++ b/cmd/kubeadm/app/master/apiclient.go @@ -127,11 +127,11 @@ func standardLabels(n string) map[string]string { func NewDaemonSet(daemonName string, podSpec v1.PodSpec) *extensions.DaemonSet { l := standardLabels(daemonName) return &extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{Name: daemonName}, + ObjectMeta: metav1.ObjectMeta{Name: daemonName}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: l}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: l}, + ObjectMeta: metav1.ObjectMeta{Labels: l}, Spec: podSpec, }, }, @@ -141,7 +141,7 @@ func NewDaemonSet(daemonName string, podSpec v1.PodSpec) *extensions.DaemonSet { func NewService(serviceName string, spec v1.ServiceSpec) *v1.Service { l := standardLabels(serviceName) return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Labels: l, }, @@ -152,12 +152,12 @@ func NewService(serviceName string, spec v1.ServiceSpec) *v1.Service { func NewDeployment(deploymentName string, replicas int32, podSpec v1.PodSpec) *extensions.Deployment { l := standardLabels(deploymentName) return &extensions.Deployment{ - ObjectMeta: v1.ObjectMeta{Name: deploymentName}, + ObjectMeta: metav1.ObjectMeta{Name: deploymentName}, Spec: extensions.DeploymentSpec{ Replicas: &replicas, Selector: &metav1.LabelSelector{MatchLabels: l}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: l}, + ObjectMeta: metav1.ObjectMeta{Labels: l}, Spec: podSpec, }, }, @@ -213,7 +213,7 @@ func UpdateMasterRoleLabelsAndTaints(client *clientset.Clientset, schedulable bo return nil } -func SetMasterTaintTolerations(meta *v1.ObjectMeta) { +func SetMasterTaintTolerations(meta *metav1.ObjectMeta) { tolerationsAnnotation, _ := json.Marshal([]v1.Toleration{{Key: "dedicated", Value: "master", Effect: "NoSchedule"}}) if meta.Annotations == nil { meta.Annotations = map[string]string{} @@ -222,7 +222,7 @@ func SetMasterTaintTolerations(meta *v1.ObjectMeta) { } // SetNodeAffinity is a basic helper to set meta.Annotations[v1.AffinityAnnotationKey] for one or more v1.NodeSelectorRequirement(s) -func SetNodeAffinity(meta *v1.ObjectMeta, expr ...v1.NodeSelectorRequirement) { +func SetNodeAffinity(meta *metav1.ObjectMeta, expr ...v1.NodeSelectorRequirement) { nodeAffinity := &v1.NodeAffinity{ RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{{MatchExpressions: expr}}, diff --git a/cmd/kubeadm/app/master/discovery.go b/cmd/kubeadm/app/master/discovery.go index 4416e576857..fda6ab81767 100644 --- a/cmd/kubeadm/app/master/discovery.go +++ b/cmd/kubeadm/app/master/discovery.go @@ -109,7 +109,7 @@ func newKubeDiscovery(cfg *kubeadmapi.MasterConfiguration, caCert *x509.Certific kd := kubeDiscovery{ Deployment: NewDeployment(kubeDiscoveryName, 1, newKubeDiscoveryPodSpec(cfg)), Secret: &v1.Secret{ - ObjectMeta: v1.ObjectMeta{Name: kubeDiscoverySecretName}, + ObjectMeta: metav1.ObjectMeta{Name: kubeDiscoverySecretName}, Type: v1.SecretTypeOpaque, Data: encodeKubeDiscoverySecretData(cfg.Discovery.Token, cfg.API, caCert), }, diff --git a/cmd/kubeadm/app/master/manifests.go b/cmd/kubeadm/app/master/manifests.go index 1bf3fe35bc9..179031a9d18 100644 --- a/cmd/kubeadm/app/master/manifests.go +++ b/cmd/kubeadm/app/master/manifests.go @@ -261,7 +261,7 @@ func componentPod(container api.Container, volumes ...api.Volume) api.Pod { APIVersion: "v1", Kind: "Pod", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: container.Name, Namespace: "kube-system", Labels: map[string]string{"component": container.Name, "tier": "control-plane"}, diff --git a/cmd/kubeadm/app/util/tokens.go b/cmd/kubeadm/app/util/tokens.go index 355be56eda3..3e48289d7f7 100644 --- a/cmd/kubeadm/app/util/tokens.go +++ b/cmd/kubeadm/app/util/tokens.go @@ -151,7 +151,7 @@ func UpdateOrCreateToken(client *clientset.Clientset, d *kubeadmapi.TokenDiscove // Secret does not already exist: if apierrors.IsNotFound(err) { secret = &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: secretName, }, Type: api.SecretTypeBootstrapToken, diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup/types.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup/types.go index d93be1fe7fd..8e0137348de 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup/types.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup/types.go @@ -16,10 +16,7 @@ limitations under the License. package testgroup -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.generated.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.generated.go index 3feeb1faa2f..228af6fb46a 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.generated.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -276,17 +286,23 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "status": if r.TryDecodeAsNil() { x.Status = TestTypeStatus{} } else { - yyv9 := &x.Status - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Status + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -299,16 +315,16 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -316,21 +332,21 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -338,38 +354,44 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -377,21 +399,21 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = TestTypeStatus{} } else { - yyv16 := &x.Status - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Status + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.go index 7d36cc6e941..96e30452bca 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.go @@ -16,10 +16,7 @@ limitations under the License. package v1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apiv1 "k8s.io/kubernetes/pkg/api/v1" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true diff --git a/cmd/libs/go2idl/conversion-gen/generators/conversion.go b/cmd/libs/go2idl/conversion-gen/generators/conversion.go index 6d0ab3c19f0..11027c2b112 100644 --- a/cmd/libs/go2idl/conversion-gen/generators/conversion.go +++ b/cmd/libs/go2idl/conversion-gen/generators/conversion.go @@ -657,7 +657,7 @@ func (g *genConversion) doSlice(inType, outType *types.Type, sw *generator.Snipp } else if g.convertibleOnlyWithinPackage(inType.Elem, outType.Elem) { sw.Do("if err := "+nameTmpl+"(&(*in)[i], &(*out)[i], s); err != nil {\n", argsFromType(inType.Elem, outType.Elem)) } else { - // TODO: This triggers on v1.ObjectMeta <-> api.ObjectMeta and + // TODO: This triggers on metav1.ObjectMeta <-> metav1.ObjectMeta and // similar because neither package is the target package, and // we really don't know which package will have the conversion // function defined. This fires on basically every object diff --git a/federation/apis/federation/install/install_test.go b/federation/apis/federation/install/install_test.go index 1f6653ad24f..393bedd2590 100644 --- a/federation/apis/federation/install/install_test.go +++ b/federation/apis/federation/install/install_test.go @@ -28,7 +28,7 @@ import ( ) func TestResourceVersioner(t *testing.T) { - cluster := federation.Cluster{ObjectMeta: api.ObjectMeta{ResourceVersion: "10"}} + cluster := federation.Cluster{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "10"}} version, err := accessor.ResourceVersion(&cluster) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -105,7 +105,7 @@ func TestRESTMapper(t *testing.T) { t.Errorf("unexpected: %#v, expected: %#v", mapping, interfaces) } - rc := &federation.Cluster{ObjectMeta: api.ObjectMeta{Name: "foo"}} + rc := &federation.Cluster{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} name, err := mapping.MetadataAccessor.Name(rc) if err != nil { t.Errorf("unexpected error: %v", err) diff --git a/federation/apis/federation/v1beta1/generated.pb.go b/federation/apis/federation/v1beta1/generated.pb.go index 1de1fe653e9..6e36ab7227f 100644 --- a/federation/apis/federation/v1beta1/generated.pb.go +++ b/federation/apis/federation/v1beta1/generated.pb.go @@ -468,7 +468,7 @@ func (this *Cluster) String() string { return "nil" } s := strings.Join([]string{`&Cluster{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterSpec", "ClusterSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ClusterStatus", "ClusterStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1487,56 +1487,56 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 806 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6a, 0xeb, 0x46, - 0x14, 0xb6, 0xfc, 0x7b, 0x3d, 0xa9, 0xdb, 0xcb, 0xd0, 0x82, 0xeb, 0x85, 0x7c, 0x31, 0xa5, 0xf8, - 0x96, 0x56, 0xc2, 0xa6, 0x94, 0x0b, 0xa5, 0x85, 0x2b, 0x5f, 0x0a, 0x01, 0x87, 0x94, 0x49, 0x28, - 0x25, 0x14, 0x8a, 0x2c, 0x1f, 0x2b, 0xaa, 0xad, 0x1f, 0x66, 0x46, 0x06, 0x67, 0xd5, 0x07, 0xe8, - 0xa2, 0x0f, 0xd1, 0x37, 0x28, 0x7d, 0x87, 0xec, 0x9a, 0x45, 0x17, 0x59, 0x99, 0xc6, 0x7d, 0x8b, - 0xac, 0xca, 0x8c, 0x46, 0xb2, 0x15, 0xc5, 0x69, 0x6f, 0xb2, 0xd3, 0x39, 0x3a, 0xe7, 0xfb, 0xbe, - 0x39, 0x7f, 0xe8, 0xcd, 0xfc, 0x15, 0x33, 0xbc, 0xd0, 0x9c, 0xc7, 0x13, 0xa0, 0x01, 0x70, 0x60, - 0xe6, 0x0c, 0xa6, 0x40, 0x6d, 0xee, 0x85, 0x81, 0x69, 0x47, 0x5e, 0xce, 0x5e, 0x0e, 0x26, 0xc0, - 0xed, 0x81, 0xe9, 0x42, 0x20, 0x5c, 0x30, 0x35, 0x22, 0x1a, 0xf2, 0x10, 0x7f, 0x9e, 0xa0, 0x18, - 0x5b, 0x14, 0x63, 0x9b, 0x65, 0x08, 0x94, 0x5d, 0x5b, 0xa1, 0x74, 0x3e, 0x73, 0x3d, 0x7e, 0x1e, - 0x4f,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0x9f, 0x8c, 0xbe, 0xeb, 0x85, 0x81, 0x9a, 0xe8, 0x9d, 0xd1, 0x17, 0x5e, 0xa2, - 0xfe, 0xf6, 0x7e, 0xd1, 0xd0, 0x87, 0x7b, 0x4b, 0x8e, 0x87, 0x08, 0x39, 0x99, 0xa5, 0x2e, 0xd7, - 0x56, 0x5a, 0xf6, 0x87, 0xec, 0x44, 0xe1, 0x2f, 0x51, 0x2b, 0xd7, 0x27, 0x75, 0xb4, 0xb2, 0x4b, - 0x91, 0x63, 0x23, 0xf9, 0x58, 0xeb, 0xe5, 0xe5, 0x8d, 0x5e, 0xba, 0xba, 0xd1, 0x4b, 0xd7, 0x37, - 0x7a, 0xe9, 0xe7, 0x8d, 0xae, 0x5d, 0x6e, 0x74, 0xed, 0x6a, 0xa3, 0x6b, 0x7f, 0x6f, 0x74, 0xed, - 0xd7, 0x7f, 0xf4, 0xd2, 0x59, 0x43, 0xd5, 0xec, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x15, 0xe8, - 0xc4, 0x9a, 0x7c, 0x08, 0x00, 0x00, + // 802 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6b, 0x33, 0x55, + 0x14, 0xce, 0xe4, 0xb3, 0xb9, 0x35, 0x5a, 0x2e, 0x0a, 0x31, 0x8b, 0x49, 0x09, 0x22, 0xad, 0xe8, + 0x8c, 0x09, 0x22, 0x05, 0x51, 0xe8, 0xa4, 0x08, 0x85, 0x96, 0xca, 0x6d, 0x71, 0x51, 0x04, 0x9d, + 0x4c, 0x4e, 0xa6, 0x63, 0x32, 0x1f, 0xdc, 0x7b, 0x27, 0x90, 0xae, 0xfc, 0x01, 0x2e, 0xfc, 0x11, + 0xfe, 0x03, 0xd7, 0xee, 0xbb, 0xb3, 0x0b, 0x17, 0x5d, 0x05, 0x1b, 0xff, 0x45, 0x57, 0x2f, 0xf7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, 0x46, 0xa3, 0x6a, 0x83, 0x6c, 0x40, 0xe8, 0xd8, 0xa3, 0xe4, 0x20, 0x11, + 0x18, 0x00, 0x85, 0xc0, 0x01, 0xab, 0x36, 0x9b, 0x36, 0xab, 0xe7, 0x73, 0x20, 0xb2, 0xc0, 0x6c, + 0xfd, 0xab, 0xa1, 0x5a, 0x66, 0xfb, 0xf1, 0x35, 0x42, 0xce, 0x7c, 0xb3, 0xe6, 0x75, 0xf9, 0xfe, + 0x55, 0x1d, 0x4a, 0x17, 0x75, 0x71, 0x31, 0x53, 0x17, 0x23, 0x4b, 0x6c, 0xb8, 0x89, 0x4a, 0xd7, + 0x61, 0x00, 0xac, 0x5e, 0xda, 0x2d, 0xec, 0x55, 0xad, 0xaa, 0xe8, 0xea, 0xa5, 0x70, 0x90, 0xc4, + 0x9f, 0x8c, 0xbe, 0xeb, 0x85, 0x81, 0x9a, 0xe8, 0xa5, 0xd1, 0x17, 0x5e, 0xa2, 0xfe, 0xb6, 0x7e, + 0xd7, 0xd0, 0xc7, 0x1b, 0x4b, 0x8e, 0x3b, 0x08, 0x39, 0xa9, 0xa5, 0x2e, 0xd7, 0x42, 0x5a, 0xfa, + 0x87, 0x2c, 0x45, 0xe1, 0x6f, 0x50, 0x2d, 0xd3, 0x27, 0x75, 0xb4, 0xd2, 0x4b, 0x91, 0x61, 0x23, + 0xd9, 0x58, 0x6b, 0xff, 0xe6, 0x5e, 0xcf, 0xdd, 0xde, 0xeb, 0xb9, 0xbb, 0x7b, 0x3d, 0xf7, 0xdb, + 0x4c, 0xd7, 0x6e, 0x66, 0xba, 0x76, 0x3b, 0xd3, 0xb5, 0xff, 0x66, 0xba, 0xf6, 0xc7, 0xff, 0x7a, + 0xee, 0xb2, 0xa2, 0x6a, 0xf6, 0x26, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x52, 0x01, 0x24, 0x84, 0x08, + 0x00, 0x00, } diff --git a/federation/apis/federation/v1beta1/generated.proto b/federation/apis/federation/v1beta1/generated.proto index c37f7b9612b..0be7a854ddd 100644 --- a/federation/apis/federation/v1beta1/generated.proto +++ b/federation/apis/federation/v1beta1/generated.proto @@ -36,7 +36,7 @@ message Cluster { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of the Cluster. // +optional diff --git a/federation/apis/federation/v1beta1/types.generated.go b/federation/apis/federation/v1beta1/types.generated.go index 7fc8a043a8a..a4b1540babf 100644 --- a/federation/apis/federation/v1beta1/types.generated.go +++ b/federation/apis/federation/v1beta1/types.generated.go @@ -1441,7 +1441,13 @@ func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1451,7 +1457,13 @@ func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1575,24 +1587,30 @@ func (x *Cluster) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg1_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ClusterSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ClusterStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1605,16 +1623,16 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1622,21 +1640,21 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1644,38 +1662,44 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg1_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1683,16 +1707,16 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ClusterSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1700,21 +1724,21 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ClusterStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/federation/apis/federation/v1beta1/zz_generated.conversion.go b/federation/apis/federation/v1beta1/zz_generated.conversion.go index ee57a6a9960..f3b6d1426b0 100644 --- a/federation/apis/federation/v1beta1/zz_generated.conversion.go +++ b/federation/apis/federation/v1beta1/zz_generated.conversion.go @@ -53,10 +53,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -71,10 +68,7 @@ func Convert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation. } func autoConvert_federation_Cluster_To_v1beta1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/federation/apis/federation/v1beta1/zz_generated.deepcopy.go b/federation/apis/federation/v1beta1/zz_generated.deepcopy.go index 111d0be1ac8..601c5b40c69 100644 --- a/federation/apis/federation/v1beta1/zz_generated.deepcopy.go +++ b/federation/apis/federation/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,10 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" + api_v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -49,8 +50,10 @@ func DeepCopy_v1beta1_Cluster(in interface{}, out interface{}, c *conversion.Clo in := in.(*Cluster) out := out.(*Cluster) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ClusterSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -105,7 +108,7 @@ func DeepCopy_v1beta1_ClusterSpec(in interface{}, out interface{}, c *conversion } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - *out = new(v1.LocalObjectReference) + *out = new(api_v1.LocalObjectReference) **out = **in } return nil diff --git a/federation/apis/federation/validation/BUILD b/federation/apis/federation/validation/BUILD index 1678c5d59c0..d8e09483863 100644 --- a/federation/apis/federation/validation/BUILD +++ b/federation/apis/federation/validation/BUILD @@ -27,6 +27,7 @@ go_test( deps = [ "//federation/apis/federation:go_default_library", "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/federation/apis/federation/validation/validation_test.go b/federation/apis/federation/validation/validation_test.go index d1ec2dc86a7..cf1d57b4b45 100644 --- a/federation/apis/federation/validation/validation_test.go +++ b/federation/apis/federation/validation/validation_test.go @@ -19,6 +19,7 @@ package validation import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" ) @@ -26,7 +27,7 @@ import ( func TestValidateCluster(t *testing.T) { successCases := []federation.Cluster{ { - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -46,15 +47,15 @@ func TestValidateCluster(t *testing.T) { errorCases := map[string]federation.Cluster{ "missing cluster addresses": { - ObjectMeta: api.ObjectMeta{Name: "cluster-f"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-f"}, }, "empty cluster addresses": { - ObjectMeta: api.ObjectMeta{Name: "cluster-f"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-f"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{}, }}, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "cluster-f", Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", @@ -62,7 +63,7 @@ func TestValidateCluster(t *testing.T) { }, }, "invalid cluster name (is a subdomain)": { - ObjectMeta: api.ObjectMeta{Name: "mycluster.mycompany"}, + ObjectMeta: metav1.ObjectMeta{Name: "mycluster.mycompany"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -89,7 +90,7 @@ func TestValidateClusterUpdate(t *testing.T) { successCases := []clusterUpdateTest{ { old: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -100,7 +101,7 @@ func TestValidateClusterUpdate(t *testing.T) { }, }, update: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -124,7 +125,7 @@ func TestValidateClusterUpdate(t *testing.T) { errorCases := map[string]clusterUpdateTest{ "cluster name changed": { old: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -135,7 +136,7 @@ func TestValidateClusterUpdate(t *testing.T) { }, }, update: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-newname"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-newname"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -163,7 +164,7 @@ func TestValidateClusterStatusUpdate(t *testing.T) { successCases := []clusterUpdateTest{ { old: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -179,7 +180,7 @@ func TestValidateClusterStatusUpdate(t *testing.T) { }, }, update: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { diff --git a/federation/apis/federation/zz_generated.deepcopy.go b/federation/apis/federation/zz_generated.deepcopy.go index 9a05d2e3f2e..a290e106cc3 100644 --- a/federation/apis/federation/zz_generated.deepcopy.go +++ b/federation/apis/federation/zz_generated.deepcopy.go @@ -21,10 +21,11 @@ limitations under the License. package federation import ( + reflect "reflect" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/federation/pkg/federation-controller/cluster/clustercontroller_test.go b/federation/pkg/federation-controller/cluster/clustercontroller_test.go index 76190b1f94c..483e78e4da7 100644 --- a/federation/pkg/federation-controller/cluster/clustercontroller_test.go +++ b/federation/pkg/federation-controller/cluster/clustercontroller_test.go @@ -38,7 +38,7 @@ import ( func newCluster(clusterName string, serverUrl string) *federationv1beta1.Cluster { cluster := federationv1beta1.Cluster{ TypeMeta: metav1.TypeMeta{APIVersion: testapi.Federation.GroupVersion().String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: clusterName, }, diff --git a/federation/pkg/federation-controller/configmap/BUILD b/federation/pkg/federation-controller/configmap/BUILD index a236e7f975e..39ebbfbaf03 100644 --- a/federation/pkg/federation-controller/configmap/BUILD +++ b/federation/pkg/federation-controller/configmap/BUILD @@ -45,6 +45,7 @@ go_test( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//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", diff --git a/federation/pkg/federation-controller/configmap/configmap_controller_test.go b/federation/pkg/federation-controller/configmap/configmap_controller_test.go index 57e45543970..718a831ec4e 100644 --- a/federation/pkg/federation-controller/configmap/configmap_controller_test.go +++ b/federation/pkg/federation-controller/configmap/configmap_controller_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -78,7 +79,7 @@ func TestConfigMapController(t *testing.T) { configmapController.Run(stop) configmap1 := &apiv1.ConfigMap{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-configmap", Namespace: "ns", SelfLink: "/api/v1/namespaces/ns/configmaps/test-configmap", diff --git a/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go b/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go index d5cc707c7a6..18036f35779 100644 --- a/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go +++ b/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go @@ -82,7 +82,7 @@ func TestDaemonSetController(t *testing.T) { daemonsetController.Run(stop) daemonset1 := extensionsv1.DaemonSet{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-daemonset", Namespace: "ns", SelfLink: "/api/v1/namespaces/ns/daemonsets/test-daemonset", diff --git a/federation/pkg/federation-controller/deployment/BUILD b/federation/pkg/federation-controller/deployment/BUILD index cc7d390c58d..eeae6905554 100644 --- a/federation/pkg/federation-controller/deployment/BUILD +++ b/federation/pkg/federation-controller/deployment/BUILD @@ -53,6 +53,7 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//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", diff --git a/federation/pkg/federation-controller/deployment/deploymentcontroller_test.go b/federation/pkg/federation-controller/deployment/deploymentcontroller_test.go index ed544e5ba42..8f858bd223e 100644 --- a/federation/pkg/federation-controller/deployment/deploymentcontroller_test.go +++ b/federation/pkg/federation-controller/deployment/deploymentcontroller_test.go @@ -23,6 +23,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -174,7 +175,7 @@ func GetDeploymentFromChan(c chan runtime.Object) *extensionsv1.Deployment { func newDeploymentWithReplicas(name string, replicas int32) *extensionsv1.Deployment { return &extensionsv1.Deployment{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: apiv1.NamespaceDefault, SelfLink: "/api/v1/namespaces/default/deployments/name", diff --git a/federation/pkg/federation-controller/ingress/BUILD b/federation/pkg/federation-controller/ingress/BUILD index c2394a0b5a4..890d6b7d92e 100644 --- a/federation/pkg/federation-controller/ingress/BUILD +++ b/federation/pkg/federation-controller/ingress/BUILD @@ -28,6 +28,7 @@ go_library( "//pkg/util/flowcontrol: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/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", @@ -54,6 +55,7 @@ go_test( "//vendor:github.com/golang/glog", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//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", diff --git a/federation/pkg/federation-controller/ingress/ingress_controller.go b/federation/pkg/federation-controller/ingress/ingress_controller.go index b634619068c..d20e040dfe1 100644 --- a/federation/pkg/federation-controller/ingress/ingress_controller.go +++ b/federation/pkg/federation-controller/ingress/ingress_controller.go @@ -22,6 +22,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" @@ -764,9 +765,9 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) { if err != nil { glog.Errorf("Error deep copying Spec: %v", err) } - objMetaCopy, ok := objMeta.(*v1.ObjectMeta) + objMetaCopy, ok := objMeta.(*metav1.ObjectMeta) if !ok { - glog.Errorf("Internal error: Failed to cast to *v1.ObjectMeta: %v", objMeta) + glog.Errorf("Internal error: Failed to cast to *metav1.ObjectMeta: %v", objMeta) } desiredIngress.ObjectMeta = *objMetaCopy objSpecCopy, ok := objSpec.(*extensionsv1beta1.IngressSpec) @@ -857,9 +858,9 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) { glog.Errorf("Error deep copying ObjectMeta: %v", err) ic.deliverIngress(ingress, ic.ingressReviewDelay, true) } - objMetaCopy, ok := objMeta.(*v1.ObjectMeta) + objMetaCopy, ok := objMeta.(*metav1.ObjectMeta) if !ok { - glog.Errorf("Internal error: Failed to cast to v1.ObjectMeta: %v", objMeta) + glog.Errorf("Internal error: Failed to cast to metav1.ObjectMeta: %v", objMeta) ic.deliverIngress(ingress, ic.ingressReviewDelay, true) } desiredIngress.ObjectMeta = *objMetaCopy diff --git a/federation/pkg/federation-controller/ingress/ingress_controller_test.go b/federation/pkg/federation-controller/ingress/ingress_controller_test.go index 1221c5e4228..2b52ee4c7b6 100644 --- a/federation/pkg/federation-controller/ingress/ingress_controller_test.go +++ b/federation/pkg/federation-controller/ingress/ingress_controller_test.go @@ -23,6 +23,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -108,7 +109,7 @@ func TestIngressController(t *testing.T) { // Add another test without that annotation when // https://github.com/kubernetes/kubernetes/issues/36540 is fixed. fedIngress := extensionsv1beta1.Ingress{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-ingress", Namespace: "mynamespace", SelfLink: "/api/v1/namespaces/mynamespace/ingress/test-ingress", @@ -282,7 +283,7 @@ func GetClusterFromChan(c chan runtime.Object) *federationapi.Cluster { func NewConfigMap(uid string) *apiv1.ConfigMap { return &apiv1.ConfigMap{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: uidConfigMapName, Namespace: uidConfigMapNamespace, SelfLink: "/api/v1/namespaces/" + uidConfigMapNamespace + "/configmap/" + uidConfigMapName, diff --git a/federation/pkg/federation-controller/namespace/namespace_controller_test.go b/federation/pkg/federation-controller/namespace/namespace_controller_test.go index e959931435f..08387bf6b66 100644 --- a/federation/pkg/federation-controller/namespace/namespace_controller_test.go +++ b/federation/pkg/federation-controller/namespace/namespace_controller_test.go @@ -42,7 +42,7 @@ func TestNamespaceController(t *testing.T) { cluster1 := NewCluster("cluster1", apiv1.ConditionTrue) cluster2 := NewCluster("cluster2", apiv1.ConditionTrue) ns1 := apiv1.Namespace{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-namespace", SelfLink: "/api/v1/namespaces/test-namespace", }, @@ -71,19 +71,19 @@ func TestNamespaceController(t *testing.T) { RegisterFakeList("replicasets", &fakeClient.Fake, &extensionsv1.ReplicaSetList{Items: []extensionsv1.ReplicaSet{ { - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-rs", Namespace: ns1.Namespace, }}}}) RegisterFakeList("secrets", &fakeClient.Fake, &apiv1.SecretList{Items: []apiv1.Secret{ { - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-secret", Namespace: ns1.Namespace, }}}}) RegisterFakeList("services", &fakeClient.Fake, &apiv1.ServiceList{Items: []apiv1.Service{ { - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-service", Namespace: ns1.Namespace, }}}}) diff --git a/federation/pkg/federation-controller/replicaset/replicasetcontroller_test.go b/federation/pkg/federation-controller/replicaset/replicasetcontroller_test.go index 007aa3cd3a0..bfdbaec9242 100644 --- a/federation/pkg/federation-controller/replicaset/replicasetcontroller_test.go +++ b/federation/pkg/federation-controller/replicaset/replicasetcontroller_test.go @@ -182,7 +182,7 @@ func TestReplicaSetController(t *testing.T) { func newReplicaSetWithReplicas(name string, replicas int32) *extensionsv1.ReplicaSet { return &extensionsv1.ReplicaSet{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: apiv1.NamespaceDefault, SelfLink: "/api/v1/namespaces/default/replicasets/name", diff --git a/federation/pkg/federation-controller/secret/BUILD b/federation/pkg/federation-controller/secret/BUILD index e73f940923b..72d72d4686d 100644 --- a/federation/pkg/federation-controller/secret/BUILD +++ b/federation/pkg/federation-controller/secret/BUILD @@ -49,6 +49,7 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/stretchr/testify/assert", + "//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", diff --git a/federation/pkg/federation-controller/secret/secret_controller_test.go b/federation/pkg/federation-controller/secret/secret_controller_test.go index 183678bdb42..c62aad64636 100644 --- a/federation/pkg/federation-controller/secret/secret_controller_test.go +++ b/federation/pkg/federation-controller/secret/secret_controller_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -82,7 +83,7 @@ func TestSecretController(t *testing.T) { secretController.Run(stop) secret1 := apiv1.Secret{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-secret", Namespace: "ns", SelfLink: "/api/v1/namespaces/ns/secrets/test-secret", diff --git a/federation/pkg/federation-controller/service/BUILD b/federation/pkg/federation-controller/service/BUILD index cc8234fac80..66546b61217 100644 --- a/federation/pkg/federation-controller/service/BUILD +++ b/federation/pkg/federation-controller/service/BUILD @@ -61,6 +61,7 @@ go_test( "//federation/apis/federation/v1beta1:go_default_library", "//federation/pkg/dnsprovider/providers/google/clouddns:go_default_library", "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/federation/pkg/federation-controller/service/dns_test.go b/federation/pkg/federation-controller/service/dns_test.go index e9e84354834..6836449e7e1 100644 --- a/federation/pkg/federation-controller/service/dns_test.go +++ b/federation/pkg/federation-controller/service/dns_test.go @@ -24,6 +24,7 @@ import ( "reflect" "sort" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/federation/pkg/dnsprovider/providers/google/clouddns" // Only for unit testing purposes. @@ -40,7 +41,7 @@ func TestServiceController_ensureDnsRecords(t *testing.T) { { name: "withip", service: v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "servicename", Namespace: "servicenamespace", }, @@ -58,7 +59,7 @@ func TestServiceController_ensureDnsRecords(t *testing.T) { { name: "withname", service: v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "servicename", Namespace: "servicenamespace", }, @@ -74,7 +75,7 @@ func TestServiceController_ensureDnsRecords(t *testing.T) { { name: "noendpoints", service: v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "servicename", Namespace: "servicenamespace", }, diff --git a/federation/pkg/federation-controller/service/service_helper_test.go b/federation/pkg/federation-controller/service/service_helper_test.go index 78b7f871cc0..03c154a2ad9 100644 --- a/federation/pkg/federation-controller/service/service_helper_test.go +++ b/federation/pkg/federation-controller/service/service_helper_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -74,7 +75,7 @@ func TestProcessServiceUpdate(t *testing.T) { "diff-cluster", &cachedService{ lastState: &v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "bar1"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar1"}, }, serviceStatusMap: map[string]v1.LoadBalancerStatus{ "foo2": {Ingress: []v1.LoadBalancerIngress{{IP: "ip1", Hostname: ""}}}, diff --git a/federation/pkg/federation-controller/util/BUILD b/federation/pkg/federation-controller/util/BUILD index 6a81dca11ef..ecddc9e8fdf 100644 --- a/federation/pkg/federation-controller/util/BUILD +++ b/federation/pkg/federation-controller/util/BUILD @@ -70,6 +70,7 @@ go_test( "//pkg/client/testing/core:go_default_library", "//pkg/controller/deployment/util:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/federation/pkg/federation-controller/util/deployment.go b/federation/pkg/federation-controller/util/deployment.go index ee14484deea..c4f4c0f9646 100644 --- a/federation/pkg/federation-controller/util/deployment.go +++ b/federation/pkg/federation-controller/util/deployment.go @@ -19,7 +19,7 @@ package util import ( "reflect" - api_v1 "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" extensions_v1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" deputils "k8s.io/kubernetes/pkg/controller/deployment/util" ) @@ -60,7 +60,7 @@ func DeploymentEquivalent(a, b *extensions_v1.Deployment) bool { } // Copies object meta for Deployment, skipping revision information. -func DeepCopyDeploymentObjectMeta(meta api_v1.ObjectMeta) api_v1.ObjectMeta { +func DeepCopyDeploymentObjectMeta(meta metav1.ObjectMeta) metav1.ObjectMeta { meta = DeepCopyRelevantObjectMeta(meta) delete(meta.Annotations, deputils.RevisionAnnotation) return meta diff --git a/federation/pkg/federation-controller/util/deployment_test.go b/federation/pkg/federation-controller/util/deployment_test.go index 451a68d561a..9d83b5c1e6c 100644 --- a/federation/pkg/federation-controller/util/deployment_test.go +++ b/federation/pkg/federation-controller/util/deployment_test.go @@ -19,6 +19,7 @@ package util import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" apiv1 "k8s.io/kubernetes/pkg/api/v1" extensionsv1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" deputils "k8s.io/kubernetes/pkg/controller/deployment/util" @@ -58,7 +59,7 @@ func TestDeploymentCopy(t *testing.T) { func newDeployment() *extensionsv1.Deployment { replicas := int32(5) return &extensionsv1.Deployment{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "wrr", Namespace: apiv1.NamespaceDefault, SelfLink: "/api/v1/namespaces/default/deployments/name123", diff --git a/federation/pkg/federation-controller/util/eventsink/BUILD b/federation/pkg/federation-controller/util/eventsink/BUILD index c2510e5f3dc..bdf0d7886f0 100644 --- a/federation/pkg/federation-controller/util/eventsink/BUILD +++ b/federation/pkg/federation-controller/util/eventsink/BUILD @@ -31,6 +31,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/federation/pkg/federation-controller/util/eventsink/eventsink_test.go b/federation/pkg/federation-controller/util/eventsink/eventsink_test.go index dd9fa6d1769..3364d0cab2b 100644 --- a/federation/pkg/federation-controller/util/eventsink/eventsink_test.go +++ b/federation/pkg/federation-controller/util/eventsink/eventsink_test.go @@ -19,6 +19,7 @@ package eventsink import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" fakefedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake" . "k8s.io/kubernetes/federation/pkg/federation-controller/util/test" @@ -46,7 +47,7 @@ func TestEventSink(t *testing.T) { }) event := apiv1.Event{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bzium", Namespace: "ns", }, diff --git a/federation/pkg/federation-controller/util/federated_informer_test.go b/federation/pkg/federation-controller/util/federated_informer_test.go index 8c02998c8ee..0e64b6d2665 100644 --- a/federation/pkg/federation-controller/util/federated_informer_test.go +++ b/federation/pkg/federation-controller/util/federated_informer_test.go @@ -20,6 +20,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" @@ -40,7 +41,7 @@ func TestFederatedInformer(t *testing.T) { // Add a single cluster to federation and remove it when needed. cluster := federationapi.Cluster{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycluster", }, Status: federationapi.ClusterStatus{ @@ -65,7 +66,7 @@ func TestFederatedInformer(t *testing.T) { fakeKubeClient := &fakekubeclientset.Clientset{} // There is a single service ns1/s1 in cluster mycluster. service := apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, diff --git a/federation/pkg/federation-controller/util/federated_updater_test.go b/federation/pkg/federation-controller/util/federated_updater_test.go index 7ce203b8502..43a44818b23 100644 --- a/federation/pkg/federation-controller/util/federated_updater_test.go +++ b/federation/pkg/federation-controller/util/federated_updater_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" apiv1 "k8s.io/kubernetes/pkg/api/v1" @@ -136,7 +137,7 @@ func TestFederatedUpdaterTimeout(t *testing.T) { func makeService(cluster, name string) *apiv1.Service { return &apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: name, }, diff --git a/federation/pkg/federation-controller/util/handlers.go b/federation/pkg/federation-controller/util/handlers.go index 76c23279ed3..db47af02664 100644 --- a/federation/pkg/federation-controller/util/handlers.go +++ b/federation/pkg/federation-controller/util/handlers.go @@ -20,8 +20,8 @@ import ( "fmt" "reflect" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" - apiv1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" ) @@ -68,8 +68,8 @@ func NewTriggerOnMetaAndSpecChanges(triggerFunc func(pkgruntime.Object)) *cache. }, UpdateFunc: func(old, cur interface{}) { curObj := cur.(pkgruntime.Object) - oldMeta := getFieldOrPanic(old, "ObjectMeta").(apiv1.ObjectMeta) - curMeta := getFieldOrPanic(cur, "ObjectMeta").(apiv1.ObjectMeta) + oldMeta := getFieldOrPanic(old, "ObjectMeta").(metav1.ObjectMeta) + curMeta := getFieldOrPanic(cur, "ObjectMeta").(metav1.ObjectMeta) if !ObjectMetaEquivalent(oldMeta, curMeta) || !reflect.DeepEqual(getFieldOrPanic(old, "Spec"), getFieldOrPanic(cur, "Spec")) { triggerFunc(curObj) diff --git a/federation/pkg/federation-controller/util/handlers_test.go b/federation/pkg/federation-controller/util/handlers_test.go index c9a46c7c311..054101077af 100644 --- a/federation/pkg/federation-controller/util/handlers_test.go +++ b/federation/pkg/federation-controller/util/handlers_test.go @@ -19,6 +19,7 @@ package util import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" apiv1 "k8s.io/kubernetes/pkg/api/v1" @@ -28,13 +29,13 @@ import ( func TestHandlers(t *testing.T) { // There is a single service ns1/s1 in cluster mycluster. service := apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, } service2 := apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", Annotations: map[string]string{ @@ -82,7 +83,7 @@ func TestHandlers(t *testing.T) { assert.True(t, triggered()) service3 := apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, diff --git a/federation/pkg/federation-controller/util/meta.go b/federation/pkg/federation-controller/util/meta.go index 6f9a94335c9..50e5e03a983 100644 --- a/federation/pkg/federation-controller/util/meta.go +++ b/federation/pkg/federation-controller/util/meta.go @@ -19,16 +19,16 @@ package util import ( "reflect" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - api_v1 "k8s.io/kubernetes/pkg/api/v1" ) // Copies cluster-independent, user provided data from the given ObjectMeta struct. If in // the future the ObjectMeta structure is expanded then any field that is not populated // by the api server should be included here. -func copyObjectMeta(obj api_v1.ObjectMeta) api_v1.ObjectMeta { - return api_v1.ObjectMeta{ +func copyObjectMeta(obj metav1.ObjectMeta) metav1.ObjectMeta { + return metav1.ObjectMeta{ Name: obj.Name, Namespace: obj.Namespace, Labels: obj.Labels, @@ -39,7 +39,7 @@ func copyObjectMeta(obj api_v1.ObjectMeta) api_v1.ObjectMeta { // Deep copies cluster-independent, user provided data from the given ObjectMeta struct. If in // the future the ObjectMeta structure is expanded then any field that is not populated // by the api server should be included here. -func DeepCopyRelevantObjectMeta(obj api_v1.ObjectMeta) api_v1.ObjectMeta { +func DeepCopyRelevantObjectMeta(obj metav1.ObjectMeta) metav1.ObjectMeta { copyMeta := copyObjectMeta(obj) if obj.Labels != nil { copyMeta.Labels = make(map[string]string) @@ -59,7 +59,7 @@ func DeepCopyRelevantObjectMeta(obj api_v1.ObjectMeta) api_v1.ObjectMeta { // Checks if cluster-independent, user provided data in two given ObjectMeta are equal. If in // the future the ObjectMeta structure is expanded then any field that is not populated // by the api server should be included here. -func ObjectMetaEquivalent(a, b api_v1.ObjectMeta) bool { +func ObjectMetaEquivalent(a, b metav1.ObjectMeta) bool { if a.Name != b.Name { return false } @@ -78,8 +78,8 @@ func ObjectMetaEquivalent(a, b api_v1.ObjectMeta) bool { // Checks if cluster-independent, user provided data in ObjectMeta and Spec in two given top // level api objects are equivalent. func ObjectMetaAndSpecEquivalent(a, b runtime.Object) bool { - objectMetaA := reflect.ValueOf(a).Elem().FieldByName("ObjectMeta").Interface().(api_v1.ObjectMeta) - objectMetaB := reflect.ValueOf(b).Elem().FieldByName("ObjectMeta").Interface().(api_v1.ObjectMeta) + objectMetaA := reflect.ValueOf(a).Elem().FieldByName("ObjectMeta").Interface().(metav1.ObjectMeta) + objectMetaB := reflect.ValueOf(b).Elem().FieldByName("ObjectMeta").Interface().(metav1.ObjectMeta) specA := reflect.ValueOf(a).Elem().FieldByName("Spec").Interface() specB := reflect.ValueOf(b).Elem().FieldByName("Spec").Interface() return ObjectMetaEquivalent(objectMetaA, objectMetaB) && reflect.DeepEqual(specA, specB) diff --git a/federation/pkg/federation-controller/util/meta_test.go b/federation/pkg/federation-controller/util/meta_test.go index 2a23cacb70b..3ee53b1de1d 100644 --- a/federation/pkg/federation-controller/util/meta_test.go +++ b/federation/pkg/federation-controller/util/meta_test.go @@ -19,51 +19,52 @@ package util import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api_v1 "k8s.io/kubernetes/pkg/api/v1" "github.com/stretchr/testify/assert" ) func TestObjectMeta(t *testing.T) { - o1 := api_v1.ObjectMeta{ + o1 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", UID: "1231231412", ResourceVersion: "999", } o2 := copyObjectMeta(o1) - o3 := api_v1.ObjectMeta{ + o3 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", UID: "1231231412", Annotations: map[string]string{"A": "B"}, } - o4 := api_v1.ObjectMeta{ + o4 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", UID: "1231255531412", Annotations: map[string]string{"A": "B"}, } - o5 := api_v1.ObjectMeta{ + o5 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", ResourceVersion: "1231231412", Annotations: map[string]string{"A": "B"}, } - o6 := api_v1.ObjectMeta{ + o6 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", ResourceVersion: "1231255531412", Annotations: map[string]string{"A": "B"}, } - o7 := api_v1.ObjectMeta{ + o7 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", ResourceVersion: "1231255531412", Annotations: map[string]string{}, Labels: map[string]string{}, } - o8 := api_v1.ObjectMeta{ + o8 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", ResourceVersion: "1231255531412", @@ -82,7 +83,7 @@ func TestObjectMeta(t *testing.T) { func TestObjectMetaAndSpec(t *testing.T) { s1 := api_v1.Service{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, @@ -92,7 +93,7 @@ func TestObjectMetaAndSpec(t *testing.T) { } s1b := s1 s2 := api_v1.Service{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s2", }, @@ -101,7 +102,7 @@ func TestObjectMetaAndSpec(t *testing.T) { }, } s3 := api_v1.Service{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, diff --git a/federation/pkg/federation-controller/util/podanalyzer/pod_helper_test.go b/federation/pkg/federation-controller/util/podanalyzer/pod_helper_test.go index 7a69d0e3fc2..3f84afe08b1 100644 --- a/federation/pkg/federation-controller/util/podanalyzer/pod_helper_test.go +++ b/federation/pkg/federation-controller/util/podanalyzer/pod_helper_test.go @@ -95,7 +95,7 @@ func TestAnalyze(t *testing.T) { func newReplicaSet(selectorMap map[string]string) *v1beta1.ReplicaSet { replicas := int32(3) rs := &v1beta1.ReplicaSet{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foobar", Namespace: "default", }, @@ -109,7 +109,7 @@ func newReplicaSet(selectorMap map[string]string) *v1beta1.ReplicaSet { func newPod(name string, rs *v1beta1.ReplicaSet, status api_v1.PodStatus) *api_v1.Pod { return &api_v1.Pod{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: rs.Namespace, Labels: rs.Spec.Selector.MatchLabels, diff --git a/federation/pkg/federation-controller/util/test/BUILD b/federation/pkg/federation-controller/util/test/BUILD index afe41267247..75895544713 100644 --- a/federation/pkg/federation-controller/util/test/BUILD +++ b/federation/pkg/federation-controller/util/test/BUILD @@ -18,6 +18,7 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", diff --git a/federation/pkg/federation-controller/util/test/test_helper.go b/federation/pkg/federation-controller/util/test/test_helper.go index 89fd7c1855c..ca1ed5966b1 100644 --- a/federation/pkg/federation-controller/util/test/test_helper.go +++ b/federation/pkg/federation-controller/util/test/test_helper.go @@ -24,6 +24,7 @@ import ( "sync" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" @@ -264,7 +265,7 @@ func CheckObjectFromChan(c chan runtime.Object, checkFunction CheckingFunction) } // CompareObjectMeta returns an error when the given objects are not equivalent. -func CompareObjectMeta(a, b apiv1.ObjectMeta) error { +func CompareObjectMeta(a, b metav1.ObjectMeta) error { if a.Namespace != b.Namespace { return fmt.Errorf("Different namespace expected:%s observed:%s", a.Namespace, b.Namespace) } @@ -288,7 +289,7 @@ func ToFederatedInformerForTestOnly(informer util.FederatedInformer) util.Federa // NewCluster builds a new cluster object. func NewCluster(name string, readyStatus apiv1.ConditionStatus) *federationapi.Cluster { return &federationapi.Cluster{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Annotations: map[string]string{}, }, diff --git a/federation/pkg/kubefed/init/init.go b/federation/pkg/kubefed/init/init.go index f5a06a0daea..b37897081eb 100644 --- a/federation/pkg/kubefed/init/init.go +++ b/federation/pkg/kubefed/init/init.go @@ -250,7 +250,7 @@ func initFederation(cmdOut io.Writer, config util.AdminConfig, cmd *cobra.Comman func createNamespace(clientset *client.Clientset, namespace string, dryRun bool) (*api.Namespace, error) { ns := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespace, }, } @@ -264,7 +264,7 @@ func createNamespace(clientset *client.Clientset, namespace string, dryRun bool) func createService(clientset *client.Clientset, namespace, svcName string, dryRun bool) (*api.Service, error) { svc := &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Namespace: namespace, Labels: componentLabel, @@ -353,7 +353,7 @@ func genCerts(svcNamespace, name, svcName, localDNSZoneName string, ips, hostnam func createAPIServerCredentialsSecret(clientset *client.Clientset, namespace, credentialsName string, entKeyPairs *entityKeyPairs, dryRun bool) (*api.Secret, error) { // Build the secret object with API server credentials. secret := &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: credentialsName, Namespace: namespace, }, @@ -391,7 +391,7 @@ func createPVC(clientset *client.Clientset, namespace, svcName, etcdPVCapacity s } pvc := &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-etcd-claim", svcName), Namespace: namespace, Labels: componentLabel, @@ -438,7 +438,7 @@ func createAPIServer(clientset *client.Clientset, namespace, name, image, creden dataVolumeName := "etcddata" dep := &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, Labels: componentLabel, @@ -446,7 +446,7 @@ func createAPIServer(clientset *client.Clientset, namespace, name, image, creden Spec: extensions.DeploymentSpec{ Replicas: 1, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: apiserverPodLabels, }, @@ -522,7 +522,7 @@ func createAPIServer(clientset *client.Clientset, namespace, name, image, creden func createControllerManager(clientset *client.Clientset, namespace, name, svcName, cmName, image, kubeconfigName, dnsZoneName, dnsProvider string, dryRun bool) (*extensions.Deployment, error) { dep := &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Namespace: namespace, Labels: componentLabel, @@ -530,7 +530,7 @@ func createControllerManager(clientset *client.Clientset, namespace, name, svcNa Spec: extensions.DeploymentSpec{ Replicas: 1, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Labels: controllerManagerPodLabels, }, diff --git a/federation/pkg/kubefed/init/init_test.go b/federation/pkg/kubefed/init/init_test.go index 06504e2729a..7c4352b7d46 100644 --- a/federation/pkg/kubefed/init/init_test.go +++ b/federation/pkg/kubefed/init/init_test.go @@ -465,7 +465,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Namespace", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespaceName, }, } @@ -475,7 +475,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Service", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespaceName, Name: svcName, Labels: componentLabel, @@ -510,7 +510,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Secret", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: credSecretName, Namespace: namespaceName, }, @@ -522,7 +522,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Secret", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmKubeconfigSecretName, Namespace: namespaceName, }, @@ -534,7 +534,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "PersistentVolumeClaim", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: pvcName, Namespace: namespaceName, Labels: componentLabel, @@ -559,7 +559,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Deployment", APIVersion: testapi.Extensions.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Namespace: namespaceName, Labels: componentLabel, @@ -568,7 +568,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Replicas: &replicas, Selector: nil, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Labels: apiserverPodLabels, }, @@ -652,7 +652,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Deployment", APIVersion: testapi.Extensions.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Namespace: namespaceName, Labels: componentLabel, @@ -661,7 +661,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Replicas: &replicas, Selector: nil, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Labels: controllerManagerPodLabels, }, @@ -720,7 +720,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Pod", APIVersion: testapi.Extensions.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Namespace: namespaceName, }, @@ -734,7 +734,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Pod", APIVersion: testapi.Extensions.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Namespace: namespaceName, }, diff --git a/federation/pkg/kubefed/join_test.go b/federation/pkg/kubefed/join_test.go index ab87b9e1990..d541ac6a2d6 100644 --- a/federation/pkg/kubefed/join_test.go +++ b/federation/pkg/kubefed/join_test.go @@ -237,7 +237,7 @@ func fakeJoinHostFactory(clusterName, clusterCtx, secretName, server, token stri Kind: "Secret", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: secretName, Namespace: util.DefaultFederationSystemNamespace, }, @@ -277,7 +277,7 @@ func fakeJoinHostFactory(clusterName, clusterCtx, secretName, server, token stri func fakeCluster(clusterName, secretName, server string) federationapi.Cluster { return federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: clusterName, }, Spec: federationapi.ClusterSpec{ diff --git a/federation/pkg/kubefed/util/BUILD b/federation/pkg/kubefed/util/BUILD index 648da264ac7..4766ac74c88 100644 --- a/federation/pkg/kubefed/util/BUILD +++ b/federation/pkg/kubefed/util/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/kubectl/cmd:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//vendor:github.com/spf13/cobra", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/federation/pkg/kubefed/util/util.go b/federation/pkg/kubefed/util/util.go index 358223df6fd..342abe669cd 100644 --- a/federation/pkg/kubefed/util/util.go +++ b/federation/pkg/kubefed/util/util.go @@ -17,6 +17,7 @@ limitations under the License. package util import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" fedclient "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api" client "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -135,7 +136,7 @@ func CreateKubeconfigSecret(clientset *client.Clientset, kubeconfig *clientcmdap // Build the secret object with the minified and flattened // kubeconfig content. secret := &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/federation/registry/cluster/BUILD b/federation/registry/cluster/BUILD index 30a6c7d3b29..3be487b1941 100644 --- a/federation/registry/cluster/BUILD +++ b/federation/registry/cluster/BUILD @@ -43,6 +43,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", "//pkg/fields:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apiserver/pkg/request", ], diff --git a/federation/registry/cluster/etcd/BUILD b/federation/registry/cluster/etcd/BUILD index e14acafd91b..a2069f5391d 100644 --- a/federation/registry/cluster/etcd/BUILD +++ b/federation/registry/cluster/etcd/BUILD @@ -35,6 +35,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/federation/registry/cluster/etcd/etcd_test.go b/federation/registry/cluster/etcd/etcd_test.go index 9e44ed66812..1b862de0d47 100644 --- a/federation/registry/cluster/etcd/etcd_test.go +++ b/federation/registry/cluster/etcd/etcd_test.go @@ -19,6 +19,7 @@ package etcd import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/federation/apis/federation" @@ -43,7 +44,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewCluster() *federation.Cluster { return &federation.Cluster{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "name": "foo", @@ -70,11 +71,11 @@ func TestCreate(t *testing.T) { defer server.Terminate(t) test := registrytest.New(t, storage.Store).ClusterScope() cluster := validNewCluster() - cluster.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + cluster.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( cluster, &federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "-a123-a_"}, }, ) } diff --git a/federation/registry/cluster/strategy_test.go b/federation/registry/cluster/strategy_test.go index 85a30492c05..07afe8b9916 100644 --- a/federation/registry/cluster/strategy_test.go +++ b/federation/registry/cluster/strategy_test.go @@ -21,6 +21,7 @@ import ( "reflect" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" genericapirequest "k8s.io/apiserver/pkg/request" "k8s.io/kubernetes/federation/apis/federation" @@ -31,7 +32,7 @@ import ( func validNewCluster() *federation.Cluster { return &federation.Cluster{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", ResourceVersion: "4", Labels: map[string]string{ @@ -57,7 +58,7 @@ func validNewCluster() *federation.Cluster { func invalidNewCluster() *federation.Cluster { // Create a cluster with empty ServerAddressByClientCIDRs (which is a required field). return &federation.Cluster{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", ResourceVersion: "5", }, diff --git a/pkg/api/deep_copy_test.go b/pkg/api/deep_copy_test.go index 514e667f04f..b1a0e002dc4 100644 --- a/pkg/api/deep_copy_test.go +++ b/pkg/api/deep_copy_test.go @@ -41,7 +41,7 @@ var benchmarkPod api.Pod = api.Pod{ Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "etcd-server-e2e-test-wojtekt-master", Namespace: "default", SelfLink: "/api/v1/namespaces/default/pods/etcd-server-e2e-test-wojtekt-master", diff --git a/pkg/api/meta_test.go b/pkg/api/meta_test.go index 11b693ac6e4..ab355ecc891 100644 --- a/pkg/api/meta_test.go +++ b/pkg/api/meta_test.go @@ -31,7 +31,7 @@ import ( var _ metav1.Object = &metav1.ObjectMeta{} -func getObjectMetaAndOwnerReferences() (objectMeta api.ObjectMeta, metaOwnerReferences []metav1.OwnerReference) { +func getObjectMetaAndOwnerReferences() (objectMeta metav1.ObjectMeta, metaOwnerReferences []metav1.OwnerReference) { fuzz.New().NilChance(.5).NumElements(1, 5).Fuzz(&objectMeta) references := objectMeta.OwnerReferences metaOwnerReferences = make([]metav1.OwnerReference, 0) @@ -60,7 +60,7 @@ func testGetOwnerReferences(t *testing.T) { func testSetOwnerReferences(t *testing.T) { expected, newRefs := getObjectMetaAndOwnerReferences() - objectMeta := &api.ObjectMeta{} + objectMeta := &metav1.ObjectMeta{} objectMeta.SetOwnerReferences(newRefs) if !reflect.DeepEqual(expected.OwnerReferences, objectMeta.OwnerReferences) { t.Errorf("expect: %#v\n got: %#v", expected.OwnerReferences, objectMeta.OwnerReferences) diff --git a/pkg/api/serialization_proto_test.go b/pkg/api/serialization_proto_test.go index 53fb6a1ead5..37d14e486ea 100644 --- a/pkg/api/serialization_proto_test.go +++ b/pkg/api/serialization_proto_test.go @@ -52,7 +52,7 @@ func init() { } func TestUniversalDeserializer(t *testing.T) { - expected := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "test"}} + expected := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "test"}} d := api.Codecs.UniversalDeserializer() for _, mediaType := range []string{"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"} { info, ok := runtime.SerializerInfoForMediaType(api.Codecs.SupportedMediaTypes(), mediaType) diff --git a/pkg/api/serialization_test.go b/pkg/api/serialization_test.go index eb841ff779a..e2660cfb1b0 100644 --- a/pkg/api/serialization_test.go +++ b/pkg/api/serialization_test.go @@ -356,7 +356,7 @@ func roundTrip(t *testing.T, codec runtime.Codec, item runtime.Object) { func TestEncodePtr(t *testing.T) { grace := int64(30) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "foo"}, }, Spec: api.PodSpec{ diff --git a/pkg/api/testing/fuzzer.go b/pkg/api/testing/fuzzer.go index 6b94fb58612..d32473b07ed 100644 --- a/pkg/api/testing/fuzzer.go +++ b/pkg/api/testing/fuzzer.go @@ -77,7 +77,7 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz j.APIVersion = "" j.Kind = "" }, - func(j *api.ObjectMeta, c fuzz.Continue) { + func(j *metav1.ObjectMeta, c fuzz.Continue) { j.Name = c.RandString() j.ResourceVersion = strconv.FormatUint(c.RandUint64(), 10) j.SelfLink = c.RandString() diff --git a/pkg/api/v1/defaults_test.go b/pkg/api/v1/defaults_test.go index 6c322b6d5f9..7d7b92cf686 100644 --- a/pkg/api/v1/defaults_test.go +++ b/pkg/api/v1/defaults_test.go @@ -21,11 +21,11 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -60,7 +60,7 @@ func TestSetDefaultReplicationController(t *testing.T) { rc: &v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -73,14 +73,14 @@ func TestSetDefaultReplicationController(t *testing.T) { }, { rc: &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, }, Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -93,7 +93,7 @@ func TestSetDefaultReplicationController(t *testing.T) { }, { rc: &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, @@ -103,7 +103,7 @@ func TestSetDefaultReplicationController(t *testing.T) { "some": "other", }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -121,7 +121,7 @@ func TestSetDefaultReplicationController(t *testing.T) { "some": "other", }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -174,7 +174,7 @@ func TestSetDefaultReplicationControllerReplicas(t *testing.T) { rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -189,7 +189,7 @@ func TestSetDefaultReplicationControllerReplicas(t *testing.T) { Spec: v1.ReplicationControllerSpec{ Replicas: newInt(0), Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -204,7 +204,7 @@ func TestSetDefaultReplicationControllerReplicas(t *testing.T) { Spec: v1.ReplicationControllerSpec{ Replicas: newInt(3), Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -255,7 +255,7 @@ func TestSetDefaultReplicationControllerImagePullPolicy(t *testing.T) { rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "pod.beta.kubernetes.io/init-containers": string(containersWithoutPullPolicy), }, @@ -269,7 +269,7 @@ func TestSetDefaultReplicationControllerImagePullPolicy(t *testing.T) { rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "pod.beta.kubernetes.io/init-containers": string(containersWithPullPolicy), }, @@ -725,7 +725,7 @@ func TestDefaultRequestIsNotSetForReplicationController(t *testing.T) { Spec: v1.ReplicationControllerSpec{ Replicas: newInt(3), Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -745,7 +745,7 @@ func TestDefaultRequestIsNotSetForReplicationController(t *testing.T) { func TestSetDefaultLimitRangeItem(t *testing.T) { limitRange := &v1.LimitRange{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-defaults", }, Spec: v1.LimitRangeSpec{ diff --git a/pkg/api/v1/generated.pb.go b/pkg/api/v1/generated.pb.go index 56d236af90c..6bd90aa8afd 100644 --- a/pkg/api/v1/generated.pb.go +++ b/pkg/api/v1/generated.pb.go @@ -11111,7 +11111,7 @@ func (this *Binding) String() string { return "nil" } s := strings.Join([]string{`&Binding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Target:` + strings.Replace(strings.Replace(this.Target.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11173,7 +11173,7 @@ func (this *ComponentStatus) String() string { return "nil" } s := strings.Join([]string{`&ComponentStatus{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ComponentCondition", "ComponentCondition", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11205,7 +11205,7 @@ func (this *ConfigMap) String() string { } mapStringForData += "}" s := strings.Join([]string{`&ConfigMap{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + mapStringForData + `,`, `}`, }, "") @@ -11472,7 +11472,7 @@ func (this *Endpoints) String() string { return "nil" } s := strings.Join([]string{`&Endpoints{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subsets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subsets), "EndpointSubset", "EndpointSubset", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11530,7 +11530,7 @@ func (this *Event) String() string { return "nil" } s := strings.Join([]string{`&Event{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `InvolvedObject:` + strings.Replace(strings.Replace(this.InvolvedObject.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, @@ -11750,7 +11750,7 @@ func (this *LimitRange) String() string { return "nil" } s := strings.Join([]string{`&LimitRange{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LimitRangeSpec", "LimitRangeSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11915,7 +11915,7 @@ func (this *Namespace) String() string { return "nil" } s := strings.Join([]string{`&Namespace{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NamespaceSpec", "NamespaceSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NamespaceStatus", "NamespaceStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -11958,7 +11958,7 @@ func (this *Node) String() string { return "nil" } s := strings.Join([]string{`&Node{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NodeSpec", "NodeSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NodeStatus", "NodeStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12232,7 +12232,7 @@ func (this *PersistentVolume) String() string { return "nil" } s := strings.Join([]string{`&PersistentVolume{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeSpec", "PersistentVolumeSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeStatus", "PersistentVolumeStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12244,7 +12244,7 @@ func (this *PersistentVolumeClaim) String() string { return "nil" } s := strings.Join([]string{`&PersistentVolumeClaim{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeClaimSpec", "PersistentVolumeClaimSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeClaimStatus", "PersistentVolumeClaimStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12397,7 +12397,7 @@ func (this *Pod) String() string { return "nil" } s := strings.Join([]string{`&Pod{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12604,7 +12604,7 @@ func (this *PodStatusResult) String() string { return "nil" } s := strings.Join([]string{`&PodStatusResult{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12615,7 +12615,7 @@ func (this *PodTemplate) String() string { return "nil" } s := strings.Join([]string{`&PodTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "PodTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12637,7 +12637,7 @@ func (this *PodTemplateSpec) String() string { return "nil" } s := strings.Join([]string{`&PodTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12728,7 +12728,7 @@ func (this *RangeAllocation) String() string { return "nil" } s := strings.Join([]string{`&RangeAllocation{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Range:` + fmt.Sprintf("%v", this.Range) + `,`, `Data:` + valueToStringGenerated(this.Data) + `,`, `}`, @@ -12740,7 +12740,7 @@ func (this *ReplicationController) String() string { return "nil" } s := strings.Join([]string{`&ReplicationController{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicationControllerSpec", "ReplicationControllerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicationControllerStatus", "ReplicationControllerStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12827,7 +12827,7 @@ func (this *ResourceQuota) String() string { return "nil" } s := strings.Join([]string{`&ResourceQuota{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceQuotaSpec", "ResourceQuotaSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceQuotaStatus", "ResourceQuotaStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12966,7 +12966,7 @@ func (this *Secret) String() string { } mapStringForStringData += "}" s := strings.Join([]string{`&Secret{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + mapStringForData + `,`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `StringData:` + mapStringForStringData + `,`, @@ -13038,7 +13038,7 @@ func (this *Service) String() string { return "nil" } s := strings.Join([]string{`&Service{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "ServiceSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceStatus", "ServiceStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -13050,7 +13050,7 @@ func (this *ServiceAccount) String() string { return "nil" } s := strings.Join([]string{`&ServiceAccount{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Secrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Secrets), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `ImagePullSecrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ImagePullSecrets), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `}`, @@ -39586,640 +39586,641 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 10157 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x6c, 0x24, 0xc9, - 0x75, 0x98, 0x7a, 0x86, 0x5f, 0xf3, 0xf8, 0xb9, 0xb5, 0x1f, 0xc7, 0xa3, 0xee, 0x96, 0x7b, 0x7d, - 0xba, 0xd3, 0xde, 0xdd, 0x1e, 0x79, 0xbb, 0x77, 0xa7, 0x5b, 0xe9, 0x94, 0x93, 0x48, 0x0e, 0xb9, - 0x4b, 0xed, 0x07, 0xe7, 0x6a, 0xb8, 0xbb, 0x27, 0xe9, 0x22, 0xa9, 0x39, 0x5d, 0x24, 0x5b, 0xdb, - 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 0xdb, - 0x99, 0x88, 0xb5, 0xd8, 0x1f, 0xdb, 0x54, 0xb5, 0x77, 0xe2, 0x44, 0xdb, 0xc5, 0x79, 0x2d, 0x29, - 0x73, 0xba, 0xe7, 0x51, 0x95, 0x43, 0x1e, 0x95, 0xa8, 0xe6, 0x50, 0xbd, 0x64, 0x17, 0x73, 0x1c, - 0xba, 0x0a, 0x63, 0x11, 0x61, 0x33, 0x65, 0x89, 0x6a, 0x55, 0x6c, 0xea, 0x0d, 0xa6, 0xea, 0x17, - 0xd6, 0x70, 0xd8, 0xa0, 0x4c, 0xb5, 0xef, 0xa1, 0x43, 0xb4, 0xef, 0xe7, 0x60, 0x98, 0xfd, 0x50, - 0xb3, 0x42, 0x7d, 0xa1, 0x55, 0x0e, 0xc6, 0x12, 0x9f, 0x9d, 0x44, 0x23, 0x05, 0x27, 0xd1, 0xf3, - 0x30, 0x51, 0x75, 0x48, 0x33, 0x0c, 0x96, 0x03, 0xb7, 0x15, 0x7a, 0x41, 0x82, 0xa6, 0x61, 0x80, - 0xed, 0x27, 0x7c, 0xbd, 0x0f, 0x50, 0x0e, 0x78, 0x80, 0x6a, 0xd0, 0xf6, 0xff, 0xb5, 0x60, 0xbc, - 0x4a, 0x7c, 0x92, 0x90, 0xb5, 0x16, 0xf3, 0xb7, 0xa0, 0x15, 0x40, 0x5b, 0x91, 0xd3, 0x20, 0x35, - 0x12, 0x79, 0xa1, 0x5b, 0x27, 0x8d, 0x30, 0x60, 0x27, 0x0c, 0x74, 0x83, 0x3c, 0xb7, 0xbf, 0x37, - 0x8b, 0xae, 0x75, 0x60, 0x71, 0x97, 0x12, 0xc8, 0x85, 0xf1, 0x56, 0x44, 0x0c, 0x07, 0x91, 0x95, - 0xbf, 0xe1, 0xd7, 0xf4, 0x22, 0x5c, 0x27, 0x35, 0x40, 0xd8, 0x64, 0x8a, 0x3e, 0x0d, 0x53, 0x61, - 0xd4, 0xda, 0x76, 0x82, 0x2a, 0x69, 0x91, 0xc0, 0xa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0x8a, 0x05, 0x56, 0xd0, 0x91, 0x28, 0x12, 0x17, 0x55, 0x74, 0x3a, - 0x12, 0x45, 0x58, 0x60, 0x65, 0xba, 0xf4, 0x81, 0x1e, 0xe9, 0xd2, 0x59, 0x7e, 0x1f, 0x11, 0x40, - 0x20, 0xd4, 0x00, 0x2d, 0xbf, 0x8f, 0x8c, 0x2c, 0x48, 0x69, 0xec, 0xef, 0x96, 0x61, 0xac, 0x16, - 0xba, 0x69, 0xa0, 0xf5, 0x2b, 0x46, 0xa0, 0xf5, 0x85, 0x4c, 0xa0, 0xf5, 0x94, 0x4e, 0xfb, 0x68, - 0xe2, 0xac, 0x45, 0x1e, 0x28, 0x96, 0xd0, 0xff, 0x88, 0x31, 0xd6, 0x46, 0x1e, 0x28, 0xc5, 0x08, - 0x9b, 0x7c, 0xff, 0x22, 0xc5, 0x56, 0xff, 0xb9, 0x05, 0x13, 0xb5, 0xd0, 0xa5, 0x13, 0xf4, 0x2f, - 0xd2, 0x6c, 0xd4, 0xb3, 0x47, 0x0d, 0x1d, 0x92, 0x3d, 0xea, 0x97, 0x2c, 0x18, 0xae, 0x85, 0xee, - 0x09, 0xb8, 0x11, 0x57, 0x4c, 0x37, 0xe2, 0x53, 0xb9, 0x92, 0xb7, 0x87, 0xe7, 0xf0, 0x57, 0xcb, - 0x30, 0x4e, 0x5b, 0x1c, 0x6e, 0xc9, 0xef, 0x65, 0x8c, 0x8d, 0x55, 0x60, 0x6c, 0xa8, 0x2a, 0x18, - 0xfa, 0x7e, 0xf8, 0x20, 0xfb, 0xed, 0x56, 0x18, 0x14, 0x0b, 0x2c, 0xba, 0x04, 0x23, 0xad, 0x88, - 0xec, 0x78, 0x61, 0x3b, 0xce, 0x5e, 0x7a, 0xab, 0x09, 0x38, 0x56, 0x14, 0xe8, 0x15, 0x18, 0x8b, - 0xbd, 0xa0, 0x41, 0x64, 0x78, 0xc1, 0x00, 0x0b, 0x2f, 0xe0, 0x09, 0xfa, 0x34, 0x38, 0x36,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, 0xfc, 0xe0, 0xbd, 0xf3, 0x1f, 0xfa, 0xe1, 0x7b, 0xe7, 0x3f, 0xf4, 0x87, - 0xef, 0x9d, 0xff, 0xd0, 0x4f, 0xec, 0x9f, 0xb7, 0x7e, 0xb0, 0x7f, 0xde, 0xfa, 0xe1, 0xfe, 0x79, - 0xeb, 0x4f, 0xf6, 0xcf, 0x5b, 0xdf, 0xfc, 0xd3, 0xf3, 0x1f, 0xfa, 0x5c, 0x69, 0xe7, 0xf2, 0xff, - 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x95, 0x60, 0xd6, 0x7d, 0xb7, 0x00, 0x00, + // 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, 0xa5, 0xc4, 0x95, 0x0f, 0x45, 0xb1, 0x25, 0x97, 0x95, + 0xa4, 0x92, 0xd8, 0x8a, 0x9c, 0x0f, 0x97, 0x52, 0xae, 0x8a, 0x1d, 0xbb, 0x0a, 0x31, 0xe1, 0x54, + 0xfe, 0xcc, 0x1f, 0xc9, 0x7f, 0x97, 0x54, 0x92, 0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, 0x17, 0x61, 0x98, 0xfe, 0xbe, 0x8d, 0x57, + 0x45, 0xef, 0x4f, 0x0a, 0xe2, 0xd1, 0xba, 0x93, 0x38, 0x75, 0x8e, 0xc2, 0x92, 0x06, 0xdd, 0x80, + 0xd1, 0x16, 0x93, 0x11, 0x9b, 0x37, 0x42, 0x97, 0xb0, 0x2f, 0x5c, 0x5b, 0x7c, 0x81, 0x92, 0x2f, + 0xa5, 0xe0, 0x87, 0x7b, 0xb3, 0xd3, 0xbc, 0x6d, 0x82, 0x85, 0x86, 0xc3, 0x7a, 0x79, 0x64, 0xab, + 0x85, 0x38, 0xc0, 0x38, 0x41, 0xce, 0x22, 0x3c, 0xaf, 0xad, 0xa9, 0x41, 0xb6, 0xa6, 0xc6, 0x7a, + 0xac, 0xa7, 0xbf, 0x67, 0x89, 0x31, 0x59, 0xf1, 0x7c, 0x53, 0x3c, 0x5c, 0x02, 0x88, 0x49, 0x2b, + 0x22, 0x89, 0x36, 0x2a, 0xea, 0x33, 0x37, 0x15, 0x06, 0x6b, 0x54, 0x74, 0xf1, 0xc7, 0x5b, 0x4e, + 0xc4, 0x66, 0x8b, 0x18, 0x1b, 0xb5, 0xf8, 0x9b, 0x12, 0x81, 0x53, 0x1a, 0x63, 0xf1, 0x57, 0x0b, + 0x17, 0xff, 0xbf, 0xb4, 0x60, 0x78, 0xd1, 0x0b, 0x5c, 0x2f, 0xd8, 0x44, 0x6f, 0xc3, 0x08, 0x95, + 0xe6, 0xae, 0x93, 0x38, 0x62, 0xdd, 0x7f, 0x4c, 0x4e, 0x1e, 0x5d, 0x28, 0xcb, 0xe9, 0x13, 0xcf, + 0x51, 0x6a, 0x3a, 0x89, 0x6e, 0xad, 0x7f, 0x99, 0xb4, 0x92, 0x1b, 0x24, 0x71, 0xd2, 0xee, 0xa4, + 0x30, 0xac, 0xb8, 0xa2, 0xdb, 0x30, 0x94, 0x38, 0xd1, 0x26, 0x49, 0xc4, 0xb2, 0x2f, 0x58, 0x94, + 0x9c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 0x77, 0x17, 0x5d, 0x84, 0x51, 0x97, 0x6c, 0x38, 0x1d, 0x3f, + 0x51, 0x2a, 0xee, 0x20, 0xb7, 0x7d, 0xea, 0x29, 0x18, 0xeb, 0x34, 0xf6, 0xaf, 0x02, 0x13, 0x1d, + 0x89, 0x43, 0x3f, 0x1a, 0x55, 0x26, 0x34, 0x4b, 0x64, 0x4c, 0xb7, 0x44, 0x84, 0xd5, 0xf1, 0x34, + 0x0c, 0x7a, 0xdb, 0x74, 0x7b, 0xa9, 0x98, 0xbb, 0xc6, 0x2a, 0x05, 0x62, 0x8e, 0x43, 0xcf, 0xc0, + 0x70, 0x2b, 0xdc, 0xde, 0x76, 0x02, 0x77, 0xba, 0xca, 0xd4, 0x9b, 0x51, 0xba, 0x03, 0x2d, 0x71, + 0x10, 0x96, 0x38, 0xf4, 0x04, 0x0c, 0x38, 0xd1, 0x66, 0x3c, 0x3d, 0xc0, 0x68, 0x46, 0x68, 0x4d, + 0x0b, 0xd1, 0x66, 0x8c, 0x19, 0x94, 0xaa, 0x2d, 0xf7, 0xc3, 0xe8, 0x9e, 0x17, 0x6c, 0xd6, 0xbd, + 0x88, 0xe9, 0x20, 0x9a, 0xda, 0x72, 0x57, 0x61, 0xb0, 0x46, 0x85, 0x1a, 0x30, 0xd8, 0x0e, 0xa3, + 0x24, 0x9e, 0x1e, 0x62, 0xc3, 0xf9, 0x42, 0xe1, 0xec, 0xe1, 0xfd, 0x6e, 0x84, 0x51, 0x92, 0x76, + 0x85, 0xfe, 0x8b, 0x31, 0x67, 0x84, 0x96, 0xa0, 0x4a, 0x82, 0x9d, 0xe9, 0x61, 0xc6, 0xef, 0x23, + 0x07, 0xf3, 0x5b, 0x0e, 0x76, 0xee, 0x38, 0x51, 0xba, 0x88, 0x96, 0x83, 0x1d, 0x4c, 0x4b, 0xa3, + 0x16, 0xd4, 0xa4, 0x5b, 0x21, 0x9e, 0x1e, 0x29, 0x33, 0xc1, 0xb0, 0x20, 0xc7, 0xe4, 0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 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, 0xdf, 0x6b, 0x53, 0x99, + 0x54, 0x42, 0x1e, 0x5f, 0x80, 0x91, 0xad, 0x30, 0x4e, 0x28, 0x35, 0xab, 0x63, 0x30, 0xdd, 0x5d, + 0xaf, 0x0a, 0x38, 0x56, 0x14, 0xe8, 0x35, 0x18, 0x6f, 0xe9, 0x15, 0x88, 0x2d, 0x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, 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, 0x38, 0x55, 0xcb, 0x7a, 0xb9, 0x38, 0x59, 0xeb, 0x35, 0x23, 0x96, 0x6a, 0x72, 0xed, 0x88, + 0x6c, 0x78, 0x0f, 0xb2, 0x9a, 0x5c, 0x83, 0x41, 0xb1, 0xc0, 0xa2, 0x0d, 0x18, 0x6b, 0x49, 0xdf, + 0x68, 0x2a, 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x30, 0xe4, + 0x53, 0x88, 0x3c, 0x64, 0xba, 0xd0, 0xcf, 0xda, 0x4c, 0x75, 0x0c, 0x06, 0x8f, 0xb1, 0xe0, 0x65, + 0x7f, 0xdf, 0x82, 0x81, 0x9f, 0xe0, 0x25, 0x86, 0x2e, 0xd6, 0xe2, 0x1e, 0xee, 0x1c, 0x76, 0xee, + 0x2f, 0x3f, 0x48, 0x48, 0x10, 0x33, 0x95, 0x32, 0x77, 0x88, 0x7e, 0xad, 0x02, 0xa3, 0xb4, 0x2a, + 0x19, 0x26, 0xf0, 0x1a, 0x8c, 0xfb, 0xce, 0x3a, 0xf1, 0xa5, 0xf7, 0x37, 0x6b, 0x7e, 0x5d, 0xd7, + 0x91, 0xd8, 0xa4, 0xa5, 0x85, 0x37, 0x74, 0xe7, 0xb8, 0x50, 0x8d, 0x54, 0x61, 0xc3, 0x73, 0x8e, + 0x4d, 0x5a, 0x6a, 0x01, 0xdc, 0x77, 0x92, 0xd6, 0x96, 0x30, 0xcd, 0x54, 0x73, 0xef, 0x52, 0x20, + 0xe6, 0x38, 0xb4, 0x00, 0x93, 0x72, 0xc6, 0xde, 0xa1, 0x36, 0x7b, 0x18, 0x08, 0xb5, 0x51, 0x5d, + 0x84, 0xc4, 0x26, 0x1a, 0x67, 0xe9, 0xd1, 0x27, 0x61, 0x82, 0x0e, 0x4e, 0xd8, 0x49, 0x64, 0x10, + 0xc4, 0x20, 0x0b, 0x82, 0x60, 0x91, 0xac, 0x6b, 0x06, 0x06, 0x67, 0x28, 0xed, 0x2f, 0xc1, 0xc9, + 0xeb, 0xa1, 0xe3, 0x2e, 0x3a, 0xbe, 0x13, 0xb4, 0x48, 0xb4, 0x1a, 0x6c, 0x16, 0x9e, 0x17, 0xeb, + 0x67, 0xba, 0x95, 0xa2, 0x33, 0x5d, 0x3b, 0x02, 0xa4, 0x57, 0x20, 0xc2, 0x77, 0xde, 0x82, 0x61, + 0x8f, 0x57, 0x25, 0xa6, 0xed, 0xc5, 0x22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+ 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, 0x74, 0xf9, 0xd1, 0xc2, 0x79, 0x4e, 0xf5, 0xa1, + 0x3e, 0x9d, 0xea, 0x97, 0x00, 0x44, 0xaf, 0xe5, 0x5c, 0xae, 0xa6, 0x5f, 0xed, 0x8a, 0xc2, 0x60, + 0x8d, 0x8a, 0x9a, 0xe4, 0xad, 0x88, 0x38, 0xd2, 0x6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x08, + 0xc0, 0x3e, 0x97, 0x09, 0xc0, 0x9e, 0xd2, 0x69, 0x1f, 0x4d, 0xfc, 0xb5, 0xc8, 0x1b, 0xc5, 0x1e, + 0x04, 0x38, 0x64, 0xec, 0xb5, 0x91, 0x37, 0x4a, 0x31, 0xc2, 0x26, 0xdf, 0x3f, 0x4b, 0x31, 0xd7, + 0xff, 0xcb, 0x82, 0x89, 0x46, 0xe8, 0xd2, 0x09, 0xfa, 0x67, 0x69, 0x36, 0xea, 0xd9, 0xa6, 0x86, + 0x0e, 0xc8, 0x36, 0xf5, 0x0f, 0x2d, 0x18, 0x6e, 0x84, 0xee, 0x31, 0xb8, 0x13, 0x57, 0x4c, 0x77, + 0xe2, 0x53, 0x85, 0x92, 0xb7, 0x87, 0x07, 0xf1, 0x37, 0xaa, 0x30, 0x4e, 0x5b, 0x1c, 0x6e, 0xca, + 0xef, 0x65, 0x8c, 0x8d, 0x55, 0x62, 0x6c, 0xa8, 0x4a, 0x18, 0xfa, 0x7e, 0x78, 0x3f, 0xfb, 0xed, + 0x56, 0x18, 0x14, 0x0b, 0x2c, 0xba, 0x00, 0x23, 0xed, 0x88, 0xec, 0x78, 0x61, 0x27, 0xce, 0x5e, + 0x8e, 0x6b, 0x08, 0x38, 0x56, 0x14, 0xe8, 0x65, 0x18, 0x8b, 0xbd, 0xa0, 0x45, 0x64, 0xd8, 0xc1, + 0x00, 0x0b, 0x3b, 0xe0, 0x89, 0xfd, 0x34, 0x38, 0x36, 0xa8, 0xd0, 0x5d, 0xa8, 0xb1, 0xff, 0x6c, + 0x05, 0xf5, 0x9f, 0xa9, 0x9d, 0x67, 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,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0x43, 0x9f, 0xaf, 0xec, 0x5c, 0xfc, + 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x11, 0x03, 0x70, 0xb9, 0x1d, 0xb8, 0x00, 0x00, } diff --git a/pkg/api/v1/generated.proto b/pkg/api/v1/generated.proto index 00e26331ae3..d5ffcae707a 100644 --- a/pkg/api/v1/generated.proto +++ b/pkg/api/v1/generated.proto @@ -141,7 +141,7 @@ message Binding { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The target object that you want to bind to the standard object. optional ObjectReference target = 2; @@ -240,7 +240,7 @@ message ComponentStatus { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // List of component conditions observed // +optional @@ -263,7 +263,7 @@ message ConfigMap { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data contains the configuration data. // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. @@ -767,7 +767,7 @@ message Endpoints { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The set of all endpoints is the union of all subsets. Addresses are placed into // subsets according to the IPs they share. A single address with multiple ports, @@ -848,7 +848,7 @@ message EnvVarSource { message Event { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The object that this event is about. optional ObjectReference involvedObject = 2; @@ -1195,7 +1195,7 @@ message LimitRange { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the limits enforced. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -1347,7 +1347,7 @@ message Namespace { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of the Namespace. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -1394,7 +1394,7 @@ message Node { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a node. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -1652,6 +1652,8 @@ message ObjectFieldSelector { // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. +// +k8s:openapi-gen=false message ObjectMeta { // Name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name @@ -1848,7 +1850,7 @@ message PersistentVolume { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. @@ -1869,7 +1871,7 @@ message PersistentVolumeClaim { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired characteristics of a volume requested by a pod author. // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims @@ -2111,7 +2113,7 @@ message Pod { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2607,7 +2609,7 @@ message PodStatusResult { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Most recently observed status of the pod. // This data may not be up to date. @@ -2623,7 +2625,7 @@ message PodTemplate { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Template defines the pods that will be created from this pod template. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2647,7 +2649,7 @@ message PodTemplateSpec { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2806,7 +2808,7 @@ message RangeAllocation { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Range is string that identifies the range represented by 'data'. optional string range = 2; @@ -2821,7 +2823,7 @@ message ReplicationController { // be the same as the Pod(s) that the replication controller manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the replication controller. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2947,7 +2949,7 @@ message ResourceQuota { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired quota. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3037,7 +3039,7 @@ message Secret { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // or leading dot followed by valid DNS_SUBDOMAIN. @@ -3169,7 +3171,7 @@ message Service { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a service. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3192,7 +3194,7 @@ message ServiceAccount { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. // More info: http://kubernetes.io/docs/user-guide/secrets diff --git a/pkg/api/v1/types.generated.go b/pkg/api/v1/types.generated.go index 3bc5cf241b7..c81bbab7c5f 100644 --- a/pkg/api/v1/types.generated.go +++ b/pkg/api/v1/types.generated.go @@ -5935,7 +5935,13 @@ func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -5945,7 +5951,13 @@ func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -6069,24 +6081,30 @@ func (x *PersistentVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PersistentVolumeSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PersistentVolumeStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -6099,16 +6117,16 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6116,21 +6134,21 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6138,38 +6156,44 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6177,16 +6201,16 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PersistentVolumeSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6194,21 +6218,21 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PersistentVolumeStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8602,7 +8626,13 @@ func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -8612,7 +8642,13 @@ func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -8736,24 +8772,30 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromMap(l int, d *codec1978.Decod } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PersistentVolumeClaimSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PersistentVolumeClaimStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -8766,16 +8808,16 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8783,21 +8825,21 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8805,38 +8847,44 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8844,16 +8892,16 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = PersistentVolumeClaimSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8861,21 +8909,21 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = PersistentVolumeClaimStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32190,7 +32238,13 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -32200,7 +32254,13 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -32307,17 +32367,23 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv9 := &x.Status - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Status + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -32330,16 +32396,16 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32347,21 +32413,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32369,38 +32435,44 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32408,21 +32480,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv16 := &x.Status - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Status + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32516,7 +32588,13 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -32526,7 +32604,13 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -32650,24 +32734,30 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -32680,16 +32770,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32697,21 +32787,21 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32719,38 +32809,44 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32758,16 +32854,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32775,21 +32871,21 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33198,7 +33294,13 @@ func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[0] { yy4 := &x.ObjectMeta - yy4.CodecEncodeSelf(e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } } else { r.EncodeNil() } @@ -33208,7 +33310,13 @@ func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy6 := &x.ObjectMeta - yy6.CodecEncodeSelf(e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } } } if yyr2 || yy2arr2 { @@ -33291,17 +33399,23 @@ func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { switch yys3 { case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv4 := &x.ObjectMeta - yyv4.CodecDecodeSelf(d) + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv5 := &x.Spec - yyv5.CodecDecodeSelf(d) + yyv6 := &x.Spec + yyv6.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -33314,33 +33428,39 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv7 := &x.ObjectMeta - yyv7.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33348,21 +33468,21 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv8 := &x.Spec - yyv8.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj6-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33455,7 +33575,13 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -33465,7 +33591,13 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -33572,17 +33704,23 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "template": if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv9 := &x.Template - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Template + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -33595,16 +33733,16 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33612,21 +33750,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33634,38 +33772,44 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33673,21 +33817,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv16 := &x.Template - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35429,7 +35573,13 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -35439,7 +35589,13 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -35563,24 +35719,30 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -35593,16 +35755,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35610,21 +35772,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35632,38 +35794,44 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35671,16 +35839,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35688,21 +35856,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37938,7 +38106,13 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -37948,7 +38122,13 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -38072,24 +38252,30 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -38102,16 +38288,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38119,21 +38305,21 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38141,38 +38327,44 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38180,16 +38372,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38197,21 +38389,21 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38673,7 +38865,13 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -38683,7 +38881,13 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -38839,33 +39043,39 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "secrets": if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv9 := &x.Secrets - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Secrets + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv9), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv10), d) } } case "imagePullSecrets": if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv11 := &x.ImagePullSecrets - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.ImagePullSecrets + yym13 := z.DecBinary() + _ = yym13 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv11), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv12), d) } } default: @@ -38879,16 +39089,16 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38896,21 +39106,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38918,38 +39128,44 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38957,21 +39173,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv19 := &x.Secrets - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Secrets + yym22 := z.DecBinary() + _ = yym22 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv19), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv21), d) } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38979,26 +39195,26 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv21 := &x.ImagePullSecrets - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.ImagePullSecrets + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv21), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv23), d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39458,7 +39674,13 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -39468,7 +39690,13 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -39585,21 +39813,27 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subsets": if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv9 := &x.Subsets - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Subsets + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv9), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv10), d) } } default: @@ -39613,16 +39847,16 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39630,21 +39864,21 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39652,38 +39886,44 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39691,26 +39931,26 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv17 := &x.Subsets - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Subsets + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv17), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45204,7 +45444,13 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -45214,7 +45460,13 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -45338,24 +45590,30 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -45368,16 +45626,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45385,21 +45643,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45407,38 +45665,44 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45446,16 +45710,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45463,21 +45727,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46341,7 +46605,13 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -46351,7 +46621,13 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -46475,24 +46751,30 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -46505,16 +46787,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46522,21 +46804,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46544,38 +46826,44 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46583,16 +46871,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46600,21 +46888,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47074,7 +47362,13 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -47084,7 +47378,13 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -47185,17 +47485,23 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "target": if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv9 := &x.Target - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Target + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -47208,16 +47514,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47225,21 +47531,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47247,38 +47553,44 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47286,21 +47598,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv16 := &x.Target - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Target + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52719,13 +53031,25 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) @@ -53016,105 +53340,111 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "involvedObject": if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv9 := &x.InvolvedObject - yyv9.CodecDecodeSelf(d) + yyv10 := &x.InvolvedObject + yyv10.CodecDecodeSelf(d) } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - yyv10 := &x.Reason - yym11 := z.DecBinary() - _ = yym11 + yyv11 := &x.Reason + yym12 := z.DecBinary() + _ = yym12 if false { } else { - *((*string)(yyv10)) = r.DecodeString() + *((*string)(yyv11)) = r.DecodeString() } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - yyv12 := &x.Message - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Message + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } case "source": if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv14 := &x.Source - yyv14.CodecDecodeSelf(d) + yyv15 := &x.Source + yyv15.CodecDecodeSelf(d) } case "firstTimestamp": if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_v1.Time{} } else { - yyv15 := &x.FirstTimestamp - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.FirstTimestamp + yym17 := z.DecBinary() + _ = yym17 if false { - } else if z.HasExtensions() && z.DecExt(yyv15) { - } else if yym16 { - z.DecBinaryUnmarshal(yyv15) - } else if !yym16 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv15) + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else if yym17 { + z.DecBinaryUnmarshal(yyv16) + } else if !yym17 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv16) } else { - z.DecFallback(yyv15, false) + z.DecFallback(yyv16, false) } } case "lastTimestamp": if r.TryDecodeAsNil() { x.LastTimestamp = pkg2_v1.Time{} } else { - yyv17 := &x.LastTimestamp - yym18 := z.DecBinary() - _ = yym18 + yyv18 := &x.LastTimestamp + yym19 := z.DecBinary() + _ = yym19 if false { - } else if z.HasExtensions() && z.DecExt(yyv17) { - } else if yym18 { - z.DecBinaryUnmarshal(yyv17) - } else if !yym18 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv17) + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else if yym19 { + z.DecBinaryUnmarshal(yyv18) + } else if !yym19 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv18) } else { - z.DecFallback(yyv17, false) + z.DecFallback(yyv18, false) } } case "count": if r.TryDecodeAsNil() { x.Count = 0 } else { - yyv19 := &x.Count - yym20 := z.DecBinary() - _ = yym20 + yyv20 := &x.Count + yym21 := z.DecBinary() + _ = yym21 if false { } else { - *((*int32)(yyv19)) = int32(r.DecodeInt(32)) + *((*int32)(yyv20)) = int32(r.DecodeInt(32)) } } case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - yyv21 := &x.Type - yym22 := z.DecBinary() - _ = yym22 + yyv22 := &x.Type + yym23 := z.DecBinary() + _ = yym23 if false { } else { - *((*string)(yyv21)) = r.DecodeString() + *((*string)(yyv22)) = r.DecodeString() } } default: @@ -53128,16 +53458,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj23 int - var yyb23 bool - var yyhl23 bool = l >= 0 - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + var yyj24 int + var yyb24 bool + var yyhl24 bool = l >= 0 + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53145,21 +53475,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv24 := &x.Kind - yym25 := z.DecBinary() - _ = yym25 + yyv25 := &x.Kind + yym26 := z.DecBinary() + _ = yym26 if false { } else { - *((*string)(yyv24)) = r.DecodeString() + *((*string)(yyv25)) = r.DecodeString() } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53167,38 +53497,44 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv26 := &x.APIVersion - yym27 := z.DecBinary() - _ = yym27 + yyv27 := &x.APIVersion + yym28 := z.DecBinary() + _ = yym28 if false { } else { - *((*string)(yyv26)) = r.DecodeString() + *((*string)(yyv27)) = r.DecodeString() } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv28 := &x.ObjectMeta - yyv28.CodecDecodeSelf(d) + yyv29 := &x.ObjectMeta + yym30 := z.DecBinary() + _ = yym30 + if false { + } else if z.HasExtensions() && z.DecExt(yyv29) { + } else { + z.DecFallback(yyv29, false) + } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53206,16 +53542,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv29 := &x.InvolvedObject - yyv29.CodecDecodeSelf(d) + yyv31 := &x.InvolvedObject + yyv31.CodecDecodeSelf(d) } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53223,29 +53559,7 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Reason = "" } else { - yyv30 := &x.Reason - yym31 := z.DecBinary() - _ = yym31 - if false { - } else { - *((*string)(yyv30)) = r.DecodeString() - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - yyv32 := &x.Message + yyv32 := &x.Reason yym33 := z.DecBinary() _ = yym33 if false { @@ -53253,13 +53567,35 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv32)) = r.DecodeString() } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv34 := &x.Message + yym35 := z.DecBinary() + _ = yym35 + if false { + } else { + *((*string)(yyv34)) = r.DecodeString() + } + } + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l + } else { + yyb24 = r.CheckBreak() + } + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53267,16 +53603,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv34 := &x.Source - yyv34.CodecDecodeSelf(d) + yyv36 := &x.Source + yyv36.CodecDecodeSelf(d) } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53284,34 +53620,7 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_v1.Time{} } else { - yyv35 := &x.FirstTimestamp - yym36 := z.DecBinary() - _ = yym36 - if false { - } else if z.HasExtensions() && z.DecExt(yyv35) { - } else if yym36 { - z.DecBinaryUnmarshal(yyv35) - } else if !yym36 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv35) - } else { - z.DecFallback(yyv35, false) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTimestamp = pkg2_v1.Time{} - } else { - yyv37 := &x.LastTimestamp + yyv37 := &x.FirstTimestamp yym38 := z.DecBinary() _ = yym38 if false { @@ -53324,13 +53633,40 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { z.DecFallback(yyv37, false) } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTimestamp = pkg2_v1.Time{} + } else { + yyv39 := &x.LastTimestamp + yym40 := z.DecBinary() + _ = yym40 + if false { + } else if z.HasExtensions() && z.DecExt(yyv39) { + } else if yym40 { + z.DecBinaryUnmarshal(yyv39) + } else if !yym40 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv39) + } else { + z.DecFallback(yyv39, false) + } + } + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l + } else { + yyb24 = r.CheckBreak() + } + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53338,21 +53674,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Count = 0 } else { - yyv39 := &x.Count - yym40 := z.DecBinary() - _ = yym40 + yyv41 := &x.Count + yym42 := z.DecBinary() + _ = yym42 if false { } else { - *((*int32)(yyv39)) = int32(r.DecodeInt(32)) + *((*int32)(yyv41)) = int32(r.DecodeInt(32)) } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53360,26 +53696,26 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - yyv41 := &x.Type - yym42 := z.DecBinary() - _ = yym42 + yyv43 := &x.Type + yym44 := z.DecBinary() + _ = yym44 if false { } else { - *((*string)(yyv41)) = r.DecodeString() + *((*string)(yyv43)) = r.DecodeString() } } for { - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj23-1, "") + z.DecStructFieldNotFound(yyj24-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54817,7 +55153,13 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -54827,7 +55169,13 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -54934,17 +55282,23 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -54957,16 +55311,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54974,21 +55328,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54996,38 +55350,44 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55035,21 +55395,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv16 := &x.Spec - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55991,7 +56351,13 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -56001,7 +56367,13 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -56125,24 +56497,30 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -56155,16 +56533,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56172,21 +56550,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56194,38 +56572,44 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56233,16 +56617,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56250,21 +56634,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56727,7 +57111,13 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -56737,7 +57127,13 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -56908,41 +57304,47 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv9 := &x.Data - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv9), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv10), d) } } case "stringData": if r.TryDecodeAsNil() { x.StringData = nil } else { - yyv11 := &x.StringData - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.StringData + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - yyv13 := &x.Type - yyv13.CodecDecodeSelf(d) + yyv14 := &x.Type + yyv14.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -56955,16 +57357,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + var yyj15 int + var yyb15 bool + var yyhl15 bool = l >= 0 + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56972,21 +57374,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv15 := &x.Kind - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.Kind + yym17 := z.DecBinary() + _ = yym17 if false { } else { - *((*string)(yyv15)) = r.DecodeString() + *((*string)(yyv16)) = r.DecodeString() } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56994,38 +57396,44 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv17 := &x.APIVersion - yym18 := z.DecBinary() - _ = yym18 + yyv18 := &x.APIVersion + yym19 := z.DecBinary() + _ = yym19 if false { } else { - *((*string)(yyv17)) = r.DecodeString() + *((*string)(yyv18)) = r.DecodeString() } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv19 := &x.ObjectMeta - yyv19.CodecDecodeSelf(d) + yyv20 := &x.ObjectMeta + yym21 := z.DecBinary() + _ = yym21 + if false { + } else if z.HasExtensions() && z.DecExt(yyv20) { + } else { + z.DecFallback(yyv20, false) + } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57033,21 +57441,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv20 := &x.Data - yym21 := z.DecBinary() - _ = yym21 + yyv22 := &x.Data + yym23 := z.DecBinary() + _ = yym23 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv20), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv22), d) } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57055,21 +57463,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.StringData = nil } else { - yyv22 := &x.StringData - yym23 := z.DecBinary() - _ = yym23 + yyv24 := &x.StringData + yym25 := z.DecBinary() + _ = yym25 if false { } else { - z.F.DecMapStringStringX(yyv22, false, d) + z.F.DecMapStringStringX(yyv24, false, d) } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57077,21 +57485,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - yyv24 := &x.Type - yyv24.CodecDecodeSelf(d) + yyv26 := &x.Type + yyv26.CodecDecodeSelf(d) } for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj14-1, "") + z.DecStructFieldNotFound(yyj15-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57578,7 +57986,13 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -57588,7 +58002,13 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -57711,21 +58131,27 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv9 := &x.Data - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - z.F.DecMapStringStringX(yyv9, false, d) + z.F.DecMapStringStringX(yyv10, false, d) } } default: @@ -57739,16 +58165,16 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57756,21 +58182,21 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57778,38 +58204,44 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57817,26 +58249,26 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv17 := &x.Data - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Data + yym20 := z.DecBinary() + _ = yym20 if false { } else { - z.F.DecMapStringStringX(yyv17, false, d) + z.F.DecMapStringStringX(yyv19, false, d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58630,7 +59062,13 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -58640,7 +59078,13 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -58763,21 +59207,27 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "conditions": if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv9 := &x.Conditions - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Conditions + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv9), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv10), d) } } default: @@ -58791,16 +59241,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -58808,21 +59258,21 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -58830,38 +59280,44 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -58869,26 +59325,26 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv17 := &x.Conditions - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Conditions + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv17), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60885,7 +61341,13 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -60895,7 +61357,13 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -61031,33 +61499,39 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "range": if r.TryDecodeAsNil() { x.Range = "" } else { - yyv9 := &x.Range - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Range + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv11 := &x.Data - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Data + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false) + *yyv12 = r.DecodeBytes(*(*[]byte)(yyv12), false, false) } } default: @@ -61071,16 +61545,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61088,21 +61562,21 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61110,38 +61584,44 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61149,21 +61629,21 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Range = "" } else { - yyv19 := &x.Range - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Range + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61171,26 +61651,26 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Data = nil } else { - yyv21 := &x.Data - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Data + yym24 := z.DecBinary() + _ = yym24 if false { } else { - *yyv21 = r.DecodeBytes(*(*[]byte)(yyv21), false, false) + *yyv23 = r.DecodeBytes(*(*[]byte)(yyv23), false, false) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/api/v1/types_swagger_doc_generated.go b/pkg/api/v1/types_swagger_doc_generated.go index c15d1992ca9..010bfb7f4c8 100644 --- a/pkg/api/v1/types_swagger_doc_generated.go +++ b/pkg/api/v1/types_swagger_doc_generated.go @@ -964,7 +964,7 @@ func (ObjectFieldSelector) SwaggerDoc() map[string]string { } var map_ObjectMeta = map[string]string{ - "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.", "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency", "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", diff --git a/pkg/api/v1/zz_generated.conversion.go b/pkg/api/v1/zz_generated.conversion.go index c29f809d760..c2c783b6437 100644 --- a/pkg/api/v1/zz_generated.conversion.go +++ b/pkg/api/v1/zz_generated.conversion.go @@ -489,9 +489,7 @@ func Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in *api.Azure } func autoConvert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Target, &out.Target, s); err != nil { return err } @@ -503,9 +501,7 @@ func Convert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversi } func autoConvert_api_Binding_To_v1_Binding(in *api.Binding, out *Binding, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Target, &out.Target, s); err != nil { return err } @@ -611,9 +607,7 @@ func Convert_api_ComponentCondition_To_v1_ComponentCondition(in *api.ComponentCo } func autoConvert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out *api.ComponentStatus, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Conditions = *(*[]api.ComponentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -623,9 +617,7 @@ func Convert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out } func autoConvert_api_ComponentStatus_To_v1_ComponentStatus(in *api.ComponentStatus, out *ComponentStatus, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Conditions = *(*[]ComponentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -655,9 +647,7 @@ func Convert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.Component } func autoConvert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) return nil } @@ -667,9 +657,7 @@ func Convert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s } func autoConvert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) return nil } @@ -1175,9 +1163,7 @@ func Convert_api_EndpointSubset_To_v1_EndpointSubset(in *api.EndpointSubset, out } func autoConvert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Subsets = *(*[]api.EndpointSubset)(unsafe.Pointer(&in.Subsets)) return nil } @@ -1187,9 +1173,7 @@ func Convert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s } func autoConvert_api_Endpoints_To_v1_Endpoints(in *api.Endpoints, out *Endpoints, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Subsets = *(*[]EndpointSubset)(unsafe.Pointer(&in.Subsets)) return nil } @@ -1285,9 +1269,7 @@ func Convert_api_EnvVarSource_To_v1_EnvVarSource(in *api.EnvVarSource, out *EnvV } func autoConvert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil { return err } @@ -1308,9 +1290,7 @@ func Convert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope } func autoConvert_api_Event_To_v1_Event(in *api.Event, out *Event, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil { return err } @@ -1683,9 +1663,7 @@ func Convert_api_Lifecycle_To_v1_Lifecycle(in *api.Lifecycle, out *Lifecycle, s } func autoConvert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1697,9 +1675,7 @@ func Convert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange } func autoConvert_api_LimitRange_To_v1_LimitRange(in *api.LimitRange, out *LimitRange, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1929,9 +1905,7 @@ func Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in *api.NFSVolumeSource, } func autoConvert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_NamespaceSpec_To_api_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1946,9 +1920,7 @@ func Convert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s } func autoConvert_api_Namespace_To_v1_Namespace(in *api.Namespace, out *Namespace, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_NamespaceSpec_To_v1_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2019,9 +1991,7 @@ func Convert_api_NamespaceStatus_To_v1_NamespaceStatus(in *api.NamespaceStatus, } func autoConvert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_NodeSpec_To_api_NodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2036,9 +2006,7 @@ func Convert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) er } func autoConvert_api_Node_To_v1_Node(in *api.Node, out *Node, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_NodeSpec_To_v1_NodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2457,9 +2425,7 @@ func Convert_api_ObjectReference_To_v1_ObjectReference(in *api.ObjectReference, } func autoConvert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, out *api.PersistentVolume, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2474,9 +2440,7 @@ func Convert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, o } func autoConvert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolume, out *PersistentVolume, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2491,9 +2455,7 @@ func Convert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolum } func autoConvert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *PersistentVolumeClaim, out *api.PersistentVolumeClaim, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2508,9 +2470,7 @@ func Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *Persisten } func autoConvert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in *api.PersistentVolumeClaim, out *PersistentVolumeClaim, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2777,9 +2737,7 @@ func Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolu } func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2790,9 +2748,7 @@ func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) er } func autoConvert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3190,9 +3146,7 @@ func Convert_api_PodStatus_To_v1_PodStatus(in *api.PodStatus, out *PodStatus, s } func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodStatus_To_api_PodStatus(&in.Status, &out.Status, s); err != nil { return err } @@ -3200,9 +3154,7 @@ func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, } func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *PodStatusResult, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodStatus_To_v1_PodStatus(&in.Status, &out.Status, s); err != nil { return err } @@ -3210,9 +3162,7 @@ func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResu } func autoConvert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemplate, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -3224,9 +3174,7 @@ func Convert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemp } func autoConvert_api_PodTemplate_To_v1_PodTemplate(in *api.PodTemplate, out *PodTemplate, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -3278,9 +3226,7 @@ func Convert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateList, } func autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3288,9 +3234,7 @@ func autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, } func autoConvert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec, out *PodTemplateSpec, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3458,9 +3402,7 @@ func Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, } func autoConvert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out *api.RangeAllocation, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Range = in.Range out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil @@ -3471,9 +3413,7 @@ func Convert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out } func autoConvert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, out *RangeAllocation, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Range = in.Range out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil @@ -3484,9 +3424,7 @@ func Convert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, } func autoConvert_v1_ReplicationController_To_api_ReplicationController(in *ReplicationController, out *api.ReplicationController, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3501,9 +3439,7 @@ func Convert_v1_ReplicationController_To_api_ReplicationController(in *Replicati } func autoConvert_api_ReplicationController_To_v1_ReplicationController(in *api.ReplicationController, out *ReplicationController, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3670,9 +3606,7 @@ func Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in *api.Resou } func autoConvert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.ResourceQuota, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3687,9 +3621,7 @@ func Convert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.R } func autoConvert_api_ResourceQuota_To_v1_ResourceQuota(in *api.ResourceQuota, out *ResourceQuota, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3808,9 +3740,7 @@ func Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in *api.SELinuxOptions, out } func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) // INFO: in.StringData opted out of conversion generation out.Type = api.SecretType(in.Type) @@ -3818,9 +3748,7 @@ func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversi } func autoConvert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) out.Type = SecretType(in.Type) return nil @@ -3967,9 +3895,7 @@ func Convert_api_SerializedReference_To_v1_SerializedReference(in *api.Serialize } func autoConvert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ServiceSpec_To_api_ServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3984,9 +3910,7 @@ func Convert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversi } func autoConvert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ServiceSpec_To_v1_ServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -4001,9 +3925,7 @@ func Convert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversi } func autoConvert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *api.ServiceAccount, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Secrets = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Secrets)) out.ImagePullSecrets = *(*[]api.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) return nil @@ -4014,9 +3936,7 @@ func Convert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *ap } func autoConvert_api_ServiceAccount_To_v1_ServiceAccount(in *api.ServiceAccount, out *ServiceAccount, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Secrets = *(*[]ObjectReference)(unsafe.Pointer(&in.Secrets)) out.ImagePullSecrets = *(*[]LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) return nil diff --git a/pkg/api/v1/zz_generated.deepcopy.go b/pkg/api/v1/zz_generated.deepcopy.go index aeab418f372..e666f2516f8 100644 --- a/pkg/api/v1/zz_generated.deepcopy.go +++ b/pkg/api/v1/zz_generated.deepcopy.go @@ -301,8 +301,10 @@ func DeepCopy_v1_Binding(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Binding) out := out.(*Binding) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } return nil } @@ -373,8 +375,10 @@ func DeepCopy_v1_ComponentStatus(in interface{}, out interface{}, c *conversion. in := in.(*ComponentStatus) out := out.(*ComponentStatus) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -410,8 +414,10 @@ func DeepCopy_v1_ConfigMap(in interface{}, out interface{}, c *conversion.Cloner in := in.(*ConfigMap) out := out.(*ConfigMap) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -821,8 +827,10 @@ func DeepCopy_v1_Endpoints(in interface{}, out interface{}, c *conversion.Cloner in := in.(*Endpoints) out := out.(*Endpoints) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Subsets != nil { in, out := &in.Subsets, &out.Subsets @@ -921,8 +929,10 @@ func DeepCopy_v1_Event(in interface{}, out interface{}, c *conversion.Cloner) er in := in.(*Event) out := out.(*Event) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } out.FirstTimestamp = in.FirstTimestamp.DeepCopy() out.LastTimestamp = in.LastTimestamp.DeepCopy() @@ -1160,8 +1170,10 @@ func DeepCopy_v1_LimitRange(in interface{}, out interface{}, c *conversion.Clone in := in.(*LimitRange) out := out.(*LimitRange) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1332,8 +1344,10 @@ func DeepCopy_v1_Namespace(in interface{}, out interface{}, c *conversion.Cloner in := in.(*Namespace) out := out.(*Namespace) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1390,8 +1404,10 @@ func DeepCopy_v1_Node(in interface{}, out interface{}, c *conversion.Cloner) err in := in.(*Node) out := out.(*Node) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_NodeStatus(&in.Status, &out.Status, c); err != nil { return err @@ -1700,8 +1716,10 @@ func DeepCopy_v1_PersistentVolume(in interface{}, out interface{}, c *conversion in := in.(*PersistentVolume) out := out.(*PersistentVolume) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1715,8 +1733,10 @@ func DeepCopy_v1_PersistentVolumeClaim(in interface{}, out interface{}, c *conve in := in.(*PersistentVolumeClaim) out := out.(*PersistentVolumeClaim) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1981,8 +2001,10 @@ func DeepCopy_v1_Pod(in interface{}, out interface{}, c *conversion.Cloner) erro in := in.(*Pod) out := out.(*Pod) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2331,8 +2353,10 @@ func DeepCopy_v1_PodStatusResult(in interface{}, out interface{}, c *conversion. in := in.(*PodStatusResult) out := out.(*PodStatusResult) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodStatus(&in.Status, &out.Status, c); err != nil { return err @@ -2346,8 +2370,10 @@ func DeepCopy_v1_PodTemplate(in interface{}, out interface{}, c *conversion.Clon in := in.(*PodTemplate) out := out.(*PodTemplate) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -2379,8 +2405,10 @@ func DeepCopy_v1_PodTemplateSpec(in interface{}, out interface{}, c *conversion. in := in.(*PodTemplateSpec) out := out.(*PodTemplateSpec) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2473,8 +2501,10 @@ func DeepCopy_v1_RangeAllocation(in interface{}, out interface{}, c *conversion. in := in.(*RangeAllocation) out := out.(*RangeAllocation) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2490,8 +2520,10 @@ func DeepCopy_v1_ReplicationController(in interface{}, out interface{}, c *conve in := in.(*ReplicationController) out := out.(*ReplicationController) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2592,8 +2624,10 @@ func DeepCopy_v1_ResourceQuota(in interface{}, out interface{}, c *conversion.Cl in := in.(*ResourceQuota) out := out.(*ResourceQuota) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2706,8 +2740,10 @@ func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) e in := in.(*Secret) out := out.(*Secret) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2836,8 +2872,10 @@ func DeepCopy_v1_Service(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Service) out := out.(*Service) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ServiceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2854,8 +2892,10 @@ func DeepCopy_v1_ServiceAccount(in interface{}, out interface{}, c *conversion.C in := in.(*ServiceAccount) out := out.(*ServiceAccount) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets diff --git a/pkg/api/validation/events_test.go b/pkg/api/validation/events_test.go index d7ef8abbac6..870f41b4382 100644 --- a/pkg/api/validation/events_test.go +++ b/pkg/api/validation/events_test.go @@ -19,8 +19,8 @@ package validation import ( "testing" - "k8s.io/kubernetes/pkg/api" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubernetes/pkg/api" ) func TestValidateEvent(t *testing.T) { @@ -30,7 +30,7 @@ func TestValidateEvent(t *testing.T) { }{ { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Namespace: "foo", }, @@ -42,7 +42,7 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test2", Namespace: "aoeu-_-aoeu", }, @@ -54,7 +54,7 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test3", Namespace: api.NamespaceDefault, }, @@ -66,7 +66,7 @@ func TestValidateEvent(t *testing.T) { true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test4", Namespace: api.NamespaceDefault, }, @@ -78,7 +78,7 @@ func TestValidateEvent(t *testing.T) { true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test5", Namespace: api.NamespaceDefault, }, @@ -91,7 +91,7 @@ func TestValidateEvent(t *testing.T) { true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test6", Namespace: api.NamespaceDefault, }, @@ -104,7 +104,7 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test7", Namespace: api.NamespaceDefault, }, @@ -117,7 +117,7 @@ func TestValidateEvent(t *testing.T) { true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test8", Namespace: api.NamespaceDefault, }, @@ -130,7 +130,7 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test9", Namespace: "foo", }, @@ -143,7 +143,7 @@ func TestValidateEvent(t *testing.T) { true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test10", Namespace: api.NamespaceDefault, }, @@ -156,7 +156,7 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test11", Namespace: "foo", }, @@ -171,7 +171,7 @@ func TestValidateEvent(t *testing.T) { }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test12", Namespace: "foo", }, @@ -185,7 +185,7 @@ func TestValidateEvent(t *testing.T) { }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test13", Namespace: "", }, @@ -199,7 +199,7 @@ func TestValidateEvent(t *testing.T) { }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test14", Namespace: "foo", }, diff --git a/pkg/api/validation/genericvalidation/BUILD b/pkg/api/validation/genericvalidation/BUILD index 152de45d868..55feb408709 100644 --- a/pkg/api/validation/genericvalidation/BUILD +++ b/pkg/api/validation/genericvalidation/BUILD @@ -34,7 +34,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/validation", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", diff --git a/pkg/api/validation/genericvalidation/objectmeta.go b/pkg/api/validation/genericvalidation/objectmeta.go index c6046e3b16b..43f1a61be5d 100644 --- a/pkg/api/validation/genericvalidation/objectmeta.go +++ b/pkg/api/validation/genericvalidation/objectmeta.go @@ -142,7 +142,7 @@ func ValidateImmutableField(newVal, oldVal interface{}, fldPath *field.Path) fie // ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already // been performed. // It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. -func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn apimachineyvalidation.ValidateNameFunc, fldPath *field.Path) field.ErrorList { +func ValidateObjectMeta(meta *metav1.ObjectMeta, requiresNamespace bool, nameFn apimachineyvalidation.ValidateNameFunc, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if len(meta.GenerateName) != 0 { @@ -189,7 +189,7 @@ func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn api } // ValidateObjectMetaUpdate validates an object's metadata when updated -func ValidateObjectMetaUpdate(newMeta, oldMeta *api.ObjectMeta, fldPath *field.Path) field.ErrorList { +func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if !RepairMalformedUpdates && newMeta.UID != oldMeta.UID { diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index 631119f5c83..b2e6c89d567 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -62,8 +62,8 @@ var volumeModeErrorMsg string = "must be a number between 0 and 0777 (octal), bo // BannedOwners is a black list of object that are not allowed to be owners. var BannedOwners = genericvalidation.BannedOwners -// ValidateHasLabel requires that api.ObjectMeta has a Label with key and expectedValue -func ValidateHasLabel(meta api.ObjectMeta, fldPath *field.Path, key, expectedValue string) field.ErrorList { +// ValidateHasLabel requires that metav1.ObjectMeta has a Label with key and expectedValue +func ValidateHasLabel(meta metav1.ObjectMeta, fldPath *field.Path, key, expectedValue string) field.ErrorList { allErrs := field.ErrorList{} actualValue, found := meta.Labels[key] if !found { @@ -289,12 +289,12 @@ func ValidateImmutableAnnotation(newVal string, oldVal string, annotation string // been performed. // It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. // TODO: Remove calls to this method scattered in validations of specific resources, e.g., ValidatePodUpdate. -func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { +func ValidateObjectMeta(meta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { return genericvalidation.ValidateObjectMeta(meta, requiresNamespace, apimachineryvalidation.ValidateNameFunc(nameFn), fldPath) } // ValidateObjectMetaUpdate validates an object's metadata when updated -func ValidateObjectMetaUpdate(newMeta, oldMeta *api.ObjectMeta, fldPath *field.Path) field.ErrorList { +func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList { return genericvalidation.ValidateObjectMetaUpdate(newMeta, oldMeta, fldPath) } diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 4d062ea7aef..f9265eb2d00 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -53,7 +53,7 @@ func expectPrefix(t *testing.T, prefix string, errs field.ErrorList) { } func testVolume(name string, namespace string, spec api.PersistentVolumeSpec) *api.PersistentVolume { - objMeta := api.ObjectMeta{Name: name} + objMeta := metav1.ObjectMeta{Name: name} if namespace != "" { objMeta.Namespace = namespace } @@ -221,7 +221,7 @@ func TestValidatePersistentVolumes(t *testing.T) { func testVolumeClaim(name string, namespace string, spec api.PersistentVolumeClaimSpec) *api.PersistentVolumeClaim { return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: spec, } } @@ -232,7 +232,7 @@ func testVolumeClaimStorageClass(name string, namespace string, annval string, s } return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, Annotations: annotations, @@ -247,7 +247,7 @@ func testVolumeClaimAnnotation(name string, namespace string, ann string, annval } return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, Annotations: annotations, @@ -3089,7 +3089,7 @@ func TestValidatePod(t *testing.T) { successCases := []api.Pod{ { // Basic fields. - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, @@ -3098,7 +3098,7 @@ func TestValidatePod(t *testing.T) { }, }, { // Just about everything. - ObjectMeta: api.ObjectMeta{Name: "abc.123.do-re-mi", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc.123.do-re-mi", Namespace: "ns"}, Spec: api.PodSpec{ Volumes: []api.Volume{ {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, @@ -3113,7 +3113,7 @@ func TestValidatePod(t *testing.T) { }, }, { // Serialized node affinity requirements. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3166,7 +3166,7 @@ func TestValidatePod(t *testing.T) { ), }, { // Serialized pod affinity in affinity requirements in annotations. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", // TODO: Uncomment and move this block into Annotations map once @@ -3222,7 +3222,7 @@ func TestValidatePod(t *testing.T) { }), }, { // Serialized pod anti affinity with different Label Operators in affinity requirements in annotations. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", // TODO: Uncomment and move this block into Annotations map once @@ -3276,7 +3276,7 @@ func TestValidatePod(t *testing.T) { }), }, { // populate tolerations equal operator in annotations. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3292,7 +3292,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // populate tolerations exists operator in annotations. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3307,7 +3307,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // empty operator is ok for toleration - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3322,7 +3322,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // empty efffect is ok for toleration - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3337,7 +3337,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // docker default seccomp profile - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3347,7 +3347,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // unconfined seccomp profile - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3357,7 +3357,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // localhost seccomp profile - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3367,7 +3367,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // localhost seccomp profile for a container - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3377,7 +3377,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // default AppArmor profile for a container - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3387,7 +3387,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // default AppArmor profile for an init container - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3402,7 +3402,7 @@ func TestValidatePod(t *testing.T) { }, }, { // localhost AppArmor profile for a container - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3412,7 +3412,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // syntactically valid sysctls - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3423,7 +3423,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // valid opaque integer resources for init container - ObjectMeta: api.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -3446,7 +3446,7 @@ func TestValidatePod(t *testing.T) { }, }, { // valid opaque integer resources for regular container - ObjectMeta: api.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, Spec: api.PodSpec{ InitContainers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, Containers: []api.Container{ @@ -3477,7 +3477,7 @@ func TestValidatePod(t *testing.T) { errorCases := map[string]api.Pod{ "bad name": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: "ns"}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, @@ -3485,7 +3485,7 @@ func TestValidatePod(t *testing.T) { }, }, "bad namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: ""}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: ""}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, @@ -3493,13 +3493,13 @@ func TestValidatePod(t *testing.T) { }, }, "bad spec": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "ns"}, Spec: api.PodSpec{ Containers: []api.Container{{}}, }, }, "bad label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "ns", Labels: map[string]string{ @@ -3513,7 +3513,7 @@ func TestValidatePod(t *testing.T) { }, }, "invalid node selector requirement in node affinity, operator can't be null": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3535,7 +3535,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid preferredSchedulingTerm in node affinity, weight should be in range 1-100": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3559,7 +3559,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid requiredDuringSchedulingIgnoredDuringExecution node selector, nodeSelectorTerms must have at least one term": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3572,7 +3572,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid requiredDuringSchedulingIgnoredDuringExecution node selector term, matchExpressions must have at least one node selector requirement": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3589,7 +3589,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid weight in preferredDuringSchedulingIgnoredDuringExecution in pod affinity annotations, weight should be in range 1-100": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3617,7 +3617,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid labelSelector in preferredDuringSchedulingIgnoredDuringExecution in podaffinity annotations, values should be empty if the operator is Exists": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3645,7 +3645,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid name space in preferredDuringSchedulingIgnoredDuringExecution in podaffinity annotations, name space shouldbe valid": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3672,7 +3672,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid pod affinity, empty topologyKey is not allowed for hard pod affinity": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3696,7 +3696,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid pod anti-affinity, empty topologyKey is not allowed for hard pod anti-affinity": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3720,7 +3720,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid pod anti-affinity, empty topologyKey is not allowed for soft pod affinity": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3747,7 +3747,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid toleration key": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3763,7 +3763,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid toleration operator": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3779,7 +3779,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "value must be empty when `operator` is 'Exists'": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3795,7 +3795,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a valid pod seccomp profile": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3805,7 +3805,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a valid container seccomp profile": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3815,7 +3815,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a non-empty container name in seccomp annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3825,7 +3825,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a non-empty container profile in seccomp annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3835,7 +3835,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a relative path in a node-local seccomp profile annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3845,7 +3845,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must not start with '../'": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3855,7 +3855,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "AppArmor profile must apply to a container": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3872,7 +3872,7 @@ func TestValidatePod(t *testing.T) { }, }, "AppArmor profile format must be valid": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3882,7 +3882,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "only default AppArmor profile may start with runtime/": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3892,7 +3892,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid sysctl annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3902,7 +3902,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid comma-separated sysctl annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3912,7 +3912,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid unsafe sysctl annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3922,7 +3922,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "intersecting safe sysctls and unsafe sysctls annotations": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3933,7 +3933,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid opaque integer resource requirement: request must be <= limit": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -3955,7 +3955,7 @@ func TestValidatePod(t *testing.T) { }, }, "invalid fractional opaque integer resource in container request": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -3974,7 +3974,7 @@ func TestValidatePod(t *testing.T) { }, }, "invalid fractional opaque integer resource in init container request": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -3994,7 +3994,7 @@ func TestValidatePod(t *testing.T) { }, }, "invalid fractional opaque integer resource in container limit": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4016,7 +4016,7 @@ func TestValidatePod(t *testing.T) { }, }, "invalid fractional opaque integer resource in init container limit": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4067,17 +4067,17 @@ func TestValidatePodUpdate(t *testing.T) { {api.Pod{}, api.Pod{}, true, "nothing"}, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, }, false, "ids", }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "foo": "bar", @@ -4085,7 +4085,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "bar": "foo", @@ -4097,7 +4097,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ "foo": "bar", @@ -4105,7 +4105,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ "bar": "foo", @@ -4117,7 +4117,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -4129,7 +4129,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4146,7 +4146,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -4158,7 +4158,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4175,11 +4175,11 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", DeletionTimestamp: &now}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now}, Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, }, true, @@ -4187,11 +4187,11 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace}, Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace2}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace2}, Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, }, false, @@ -4199,7 +4199,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4209,7 +4209,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4223,7 +4223,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4233,7 +4233,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4247,7 +4247,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {}, @@ -4255,7 +4255,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4269,7 +4269,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ {}, @@ -4277,7 +4277,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4413,7 +4413,7 @@ func TestValidatePodUpdate(t *testing.T) { { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4426,7 +4426,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4443,7 +4443,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4456,7 +4456,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4473,7 +4473,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "foo": "bar", @@ -4481,7 +4481,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "Bar": "foo", @@ -4511,7 +4511,7 @@ func TestValidatePodUpdate(t *testing.T) { func makeValidService() api.Service { return api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid", Namespace: "valid", Labels: map[string]string{}, @@ -5122,7 +5122,7 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -5139,7 +5139,7 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { successCases := []rcUpdateTest{ { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, @@ -5149,7 +5149,7 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 3, Selector: validSelector, @@ -5171,7 +5171,7 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { errorCases := map[string]rcUpdateTest{ "negative replicas": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, @@ -5181,7 +5181,7 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: validSelector, @@ -5205,7 +5205,7 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -5217,7 +5217,7 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -5235,7 +5235,7 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidSelector, }, }, @@ -5247,14 +5247,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { successCases := []rcUpdateTest{ { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 3, Selector: validSelector, @@ -5264,14 +5264,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { }, { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 1, Selector: validSelector, @@ -5290,14 +5290,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { errorCases := map[string]rcUpdateTest{ "more than one read/write": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: validSelector, @@ -5307,14 +5307,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { }, "invalid selector": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: invalidSelector, @@ -5324,14 +5324,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { }, "invalid pod": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: validSelector, @@ -5341,14 +5341,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { }, "negative replicas": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: -1, Selector: validSelector, @@ -5368,7 +5368,7 @@ func TestValidateReplicationController(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -5380,7 +5380,7 @@ func TestValidateReplicationController(t *testing.T) { } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -5398,28 +5398,28 @@ func TestValidateReplicationController(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidSelector, }, }, } successCases := []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 1, Selector: validSelector, @@ -5435,40 +5435,40 @@ func TestValidateReplicationController(t *testing.T) { errorCases := map[string]api.ReplicationController{ "zero-length ID": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, "missing-namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, "empty selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Template: &validPodTemplate.Template, }, }, "selector_doesnt_match": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, Template: &validPodTemplate.Template, }, }, "invalid manifest": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, }, }, "read-write persistent disk with > 1 pod": { - ObjectMeta: api.ObjectMeta{Name: "abc"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc"}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: validSelector, @@ -5476,14 +5476,14 @@ func TestValidateReplicationController(t *testing.T) { }, }, "negative_replicas": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: -1, Selector: validSelector, }, }, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Labels: map[string]string{ @@ -5496,7 +5496,7 @@ func TestValidateReplicationController(t *testing.T) { }, }, "invalid_label 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Labels: map[string]string{ @@ -5508,7 +5508,7 @@ func TestValidateReplicationController(t *testing.T) { }, }, "invalid_annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Annotations: map[string]string{ @@ -5521,7 +5521,7 @@ func TestValidateReplicationController(t *testing.T) { }, }, "invalid restart policy 1": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, }, @@ -5533,14 +5533,14 @@ func TestValidateReplicationController(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, }, }, }, "invalid restart policy 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, }, @@ -5552,7 +5552,7 @@ func TestValidateReplicationController(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, }, @@ -5588,7 +5588,7 @@ func TestValidateNode(t *testing.T) { invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} successCases := []api.Node{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Labels: validSelector, }, @@ -5607,7 +5607,7 @@ func TestValidateNode(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", }, Status: api.NodeStatus{ @@ -5624,7 +5624,7 @@ func TestValidateNode(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node1", // Add a valid taint to a node Annotations: map[string]string{ @@ -5650,7 +5650,7 @@ func TestValidateNode(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -5695,7 +5695,7 @@ func TestValidateNode(t *testing.T) { errorCases := map[string]api.Node{ "zero-length Name": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "", Labels: validSelector, }, @@ -5711,7 +5711,7 @@ func TestValidateNode(t *testing.T) { }, }, "invalid-labels": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Labels: invalidSelector, }, @@ -5726,7 +5726,7 @@ func TestValidateNode(t *testing.T) { }, }, "missing-external-id": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Labels: validSelector, }, @@ -5738,7 +5738,7 @@ func TestValidateNode(t *testing.T) { }, }, "missing-taint-key": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node1", // Add a taint with an empty key to a node Annotations: map[string]string{ @@ -5755,7 +5755,7 @@ func TestValidateNode(t *testing.T) { }, }, "bad-taint-key": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node1", // Add a taint with an empty key to a node Annotations: map[string]string{ @@ -5772,7 +5772,7 @@ func TestValidateNode(t *testing.T) { }, }, "bad-taint-value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node2", Annotations: map[string]string{ api.TaintsAnnotationKey: ` @@ -5798,7 +5798,7 @@ func TestValidateNode(t *testing.T) { }, }, "missing-taint-effect": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node3", // Add a taint with an empty effect to a node Annotations: map[string]string{ @@ -5824,7 +5824,7 @@ func TestValidateNode(t *testing.T) { }, }, "invalide-taint-effect": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node3", // Add a taint with an empty effect to a node Annotations: map[string]string{ @@ -5850,7 +5850,7 @@ func TestValidateNode(t *testing.T) { }, }, "duplicated-taints-with-same-key-effect": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node1", // Add two taints to the node with the same key and effect; should be rejected. Annotations: map[string]string{ @@ -5871,7 +5871,7 @@ func TestValidateNode(t *testing.T) { }, }, "missing-podSignature": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -5897,7 +5897,7 @@ func TestValidateNode(t *testing.T) { }, }, "invalid-podController": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -5968,53 +5968,53 @@ func TestValidateNodeUpdate(t *testing.T) { }{ {api.Node{}, api.Node{}, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar"}, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar"}, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "foo"}, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ PodCIDR: "", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ @@ -6022,14 +6022,14 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ PodCIDR: "192.123.0.0/16", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ @@ -6037,7 +6037,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.NodeStatus{ @@ -6047,7 +6047,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.NodeStatus{ @@ -6058,7 +6058,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "foo"}, }, @@ -6069,7 +6069,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "fooobaz"}, }, @@ -6081,7 +6081,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "foo"}, }, @@ -6091,31 +6091,31 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "fooobaz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "baz"}, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"Foo": "baz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ Unschedulable: false, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ @@ -6123,14 +6123,14 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ Unschedulable: false, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.NodeStatus{ @@ -6141,14 +6141,14 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ Unschedulable: false, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.NodeStatus{ @@ -6159,11 +6159,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -6191,11 +6191,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -6211,11 +6211,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -6240,11 +6240,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-opaque-int-resources", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-opaque-int-resources", }, Status: api.NodeStatus{ @@ -6257,11 +6257,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "invalid-fractional-opaque-int-capacity", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "invalid-fractional-opaque-int-capacity", }, Status: api.NodeStatus{ @@ -6273,11 +6273,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "invalid-fractional-opaque-int-allocatable", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "invalid-fractional-opaque-int-allocatable", }, Status: api.NodeStatus{ @@ -6893,7 +6893,7 @@ func TestValidateLimitRange(t *testing.T) { } for _, successCase := range successCases { - limitRange := &api.LimitRange{ObjectMeta: api.ObjectMeta{Name: successCase.name, Namespace: "foo"}, Spec: successCase.spec} + limitRange := &api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: successCase.name, Namespace: "foo"}, Spec: successCase.spec} if errs := ValidateLimitRange(limitRange); len(errs) != 0 { t.Errorf("Case %v, unexpected error: %v", successCase.name, errs) } @@ -6904,23 +6904,23 @@ func TestValidateLimitRange(t *testing.T) { D string }{ "zero-length-name": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, "name or generateName is required", }, "zero-length-namespace": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: ""}, Spec: api.LimitRangeSpec{}}, + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: ""}, Spec: api.LimitRangeSpec{}}, "", }, "invalid-name": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, dnsSubdomainLabelErrMsg, }, "invalid-namespace": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: api.LimitRangeSpec{}}, + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: api.LimitRangeSpec{}}, dnsLabelErrMsg, }, "duplicate-limit-type": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -6936,7 +6936,7 @@ func TestValidateLimitRange(t *testing.T) { "", }, "default-limit-type-pod": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -6949,7 +6949,7 @@ func TestValidateLimitRange(t *testing.T) { "may not be specified when `type` is 'Pod'", }, "default-request-limit-type-pod": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -6962,7 +6962,7 @@ func TestValidateLimitRange(t *testing.T) { "may not be specified when `type` is 'Pod'", }, "min value 100m is greater than max value 10m": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -6974,7 +6974,7 @@ func TestValidateLimitRange(t *testing.T) { "min value 100m is greater than max value 10m", }, "invalid spec default outside range": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypeContainer, @@ -6987,7 +6987,7 @@ func TestValidateLimitRange(t *testing.T) { "default value 2 is greater than max value 1", }, "invalid spec defaultrequest outside range": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypeContainer, @@ -7000,7 +7000,7 @@ func TestValidateLimitRange(t *testing.T) { "default request value 2 is greater than max value 1", }, "invalid spec defaultrequest more than default": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypeContainer, @@ -7014,7 +7014,7 @@ func TestValidateLimitRange(t *testing.T) { "default request value 800m is greater than default limit value 500m", }, "invalid spec maxLimitRequestRatio less than 1": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -7025,7 +7025,7 @@ func TestValidateLimitRange(t *testing.T) { "ratio 800m is less than 1", }, "invalid spec maxLimitRequestRatio greater than max/min": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypeContainer, @@ -7038,7 +7038,7 @@ func TestValidateLimitRange(t *testing.T) { "ratio 10 is greater than max/min = 4.000000", }, "invalid non standard limit type": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: "foo", @@ -7053,7 +7053,7 @@ func TestValidateLimitRange(t *testing.T) { "must be a standard limit type or fully qualified", }, "min and max values missing, one required": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePersistentVolumeClaim, @@ -7063,7 +7063,7 @@ func TestValidateLimitRange(t *testing.T) { "either minimum or maximum storage value is required, but neither was provided", }, "invalid min greater than max": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePersistentVolumeClaim, @@ -7196,42 +7196,42 @@ func TestValidateResourceQuota(t *testing.T) { successCases := []api.ResourceQuota{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: spec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: fractionalComputeSpec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: terminatingSpec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: nonTerminatingSpec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: bestEffortSpec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, @@ -7250,43 +7250,43 @@ func TestValidateResourceQuota(t *testing.T) { D string }{ "zero-length Name": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "", Namespace: "foo"}, Spec: spec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: "foo"}, Spec: spec}, "name or generateName is required", }, "zero-length Namespace": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: ""}, Spec: spec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: ""}, Spec: spec}, "", }, "invalid Name": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: spec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: spec}, dnsSubdomainLabelErrMsg, }, "invalid Namespace": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: spec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: spec}, dnsLabelErrMsg, }, "negative-limits": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: negativeSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: negativeSpec}, isNegativeErrorMsg, }, "fractional-api-resource": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: fractionalPodSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: fractionalPodSpec}, isNotIntegerErrorMsg, }, "invalid-quota-resource": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidQuotaResourceSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidQuotaResourceSpec}, isInvalidQuotaResource, }, "invalid-quota-terminating-pair": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidTerminatingScopePairsSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidTerminatingScopePairsSpec}, "conflicting scopes", }, "invalid-quota-besteffort-pair": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidBestEffortScopePairsSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidBestEffortScopePairsSpec}, "conflicting scopes", }, "invalid-quota-scope-name": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidScopeNameSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidScopeNameSpec}, "unsupported scope", }, } @@ -7308,10 +7308,10 @@ func TestValidateNamespace(t *testing.T) { invalidLabels := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} successCases := []api.Namespace{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Labels: validLabels}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Labels: validLabels}, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"example.com/something", "example.com/other"}, }, @@ -7327,15 +7327,15 @@ func TestValidateNamespace(t *testing.T) { D string }{ "zero-length name": { - api.Namespace{ObjectMeta: api.ObjectMeta{Name: ""}}, + api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ""}}, "", }, "defined-namespace": { - api.Namespace{ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: "makesnosense"}}, + api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: "makesnosense"}}, "", }, "invalid-labels": { - api.Namespace{ObjectMeta: api.ObjectMeta{Name: "abc", Labels: invalidLabels}}, + api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "abc", Labels: invalidLabels}}, "", }, } @@ -7355,38 +7355,38 @@ func TestValidateNamespaceFinalizeUpdate(t *testing.T) { }{ {api.Namespace{}, api.Namespace{}, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"Foo"}, }, }, false}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"foo.com/bar"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"foo.com/bar", "what.com/bar"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "fooemptyfinalizer"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"foo.com/bar"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "fooemptyfinalizer"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"", "foo.com/bar", "what.com/bar"}, @@ -7422,10 +7422,10 @@ func TestValidateNamespaceStatusUpdate(t *testing.T) { }, true}, // Cannot set deletionTimestamp via status update {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now}, Status: api.NamespaceStatus{ @@ -7434,11 +7434,11 @@ func TestValidateNamespaceStatusUpdate(t *testing.T) { }, false}, // Can update phase via status update {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now}, Status: api.NamespaceStatus{ @@ -7446,20 +7446,20 @@ func TestValidateNamespaceStatusUpdate(t *testing.T) { }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}, Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating, }, }, false}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar"}, Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating, @@ -7488,62 +7488,62 @@ func TestValidateNamespaceUpdate(t *testing.T) { }{ {api.Namespace{}, api.Namespace{}, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo1"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar1"}, }, false}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Labels: map[string]string{"foo": "bar"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo4", Labels: map[string]string{"bar": "foo"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo4", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo5", Labels: map[string]string{"foo": "baz"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo5", Labels: map[string]string{"Foo": "baz"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo6", Labels: map[string]string{"foo": "baz"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo6", Labels: map[string]string{"Foo": "baz"}, }, @@ -7573,7 +7573,7 @@ func TestValidateSecret(t *testing.T) { // Opaque secret validation validSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Data: map[string][]byte{ "data-1": []byte("bar"), }, @@ -7607,7 +7607,7 @@ func TestValidateSecret(t *testing.T) { // kubernetes.io/service-account-token secret validation validServiceAccountTokenSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", Annotations: map[string]string{ @@ -7664,7 +7664,7 @@ func TestValidateSecret(t *testing.T) { func TestValidateDockerConfigSecret(t *testing.T) { validDockerSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Type: api.SecretTypeDockercfg, Data: map[string][]byte{ api.DockerConfigKey: []byte(`{"https://index.docker.io/v1/": {"auth": "Y2x1ZWRyb29sZXIwMDAxOnBhc3N3b3Jk","email": "fake@example.com"}}`), @@ -7673,7 +7673,7 @@ func TestValidateDockerConfigSecret(t *testing.T) { } validDockerSecret2 := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Type: api.SecretTypeDockerConfigJson, Data: map[string][]byte{ api.DockerConfigJsonKey: []byte(`{"auths":{"https://index.docker.io/v1/": {"auth": "Y2x1ZWRyb29sZXIwMDAxOnBhc3N3b3Jk","email": "fake@example.com"}}}`), @@ -7725,7 +7725,7 @@ func TestValidateDockerConfigSecret(t *testing.T) { func TestValidateBasicAuthSecret(t *testing.T) { validBasicAuthSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Type: api.SecretTypeBasicAuth, Data: map[string][]byte{ api.BasicAuthUsernameKey: []byte("username"), @@ -7775,7 +7775,7 @@ func TestValidateBasicAuthSecret(t *testing.T) { func TestValidateSSHAuthSecret(t *testing.T) { validSSHAuthSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Type: api.SecretTypeSSHAuth, Data: map[string][]byte{ api.SSHAuthPrivateKey: []byte("foo-bar-baz"), @@ -7809,7 +7809,7 @@ func TestValidateSSHAuthSecret(t *testing.T) { func TestValidateEndpoints(t *testing.T) { successCases := map[string]api.Endpoints{ "simple endpoint": { - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}, {IP: "10.10.2.2"}}, @@ -7822,10 +7822,10 @@ func TestValidateEndpoints(t *testing.T) { }, }, "empty subsets": { - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, }, "no name required for singleton port": { - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7847,26 +7847,26 @@ func TestValidateEndpoints(t *testing.T) { errorDetail string }{ "missing namespace": { - endpoints: api.Endpoints{ObjectMeta: api.ObjectMeta{Name: "mysvc"}}, + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "mysvc"}}, errorType: "FieldValueRequired", }, "missing name": { - endpoints: api.Endpoints{ObjectMeta: api.ObjectMeta{Namespace: "namespace"}}, + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Namespace: "namespace"}}, errorType: "FieldValueRequired", }, "invalid namespace": { - endpoints: api.Endpoints{ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "no@#invalid.;chars\"allowed"}}, + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "no@#invalid.;chars\"allowed"}}, errorType: "FieldValueInvalid", errorDetail: dnsLabelErrMsg, }, "invalid name": { - endpoints: api.Endpoints{ObjectMeta: api.ObjectMeta{Name: "-_Invliad^&Characters", Namespace: "namespace"}}, + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "-_Invliad^&Characters", Namespace: "namespace"}}, errorType: "FieldValueInvalid", errorDetail: dnsSubdomainLabelErrMsg, }, "empty addresses": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Ports: []api.EndpointPort{{Name: "a", Port: 93, Protocol: "TCP"}}, @@ -7877,7 +7877,7 @@ func TestValidateEndpoints(t *testing.T) { }, "empty ports": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.3.3"}}, @@ -7888,7 +7888,7 @@ func TestValidateEndpoints(t *testing.T) { }, "invalid IP": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "[2001:0db8:85a3:0042:1000:8a2e:0370:7334]"}}, @@ -7901,7 +7901,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Multiple ports, one without name": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7913,7 +7913,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Invalid port number": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7926,7 +7926,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Invalid protocol": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7938,7 +7938,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Address missing IP": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{}}, @@ -7951,7 +7951,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Port missing number": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7964,7 +7964,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Port missing protocol": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7976,7 +7976,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Address is loopback": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, @@ -7989,7 +7989,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Address is link-local": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "169.254.169.254"}}, @@ -8002,7 +8002,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Address is link-local multicast": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "224.0.0.1"}}, @@ -8025,7 +8025,7 @@ func TestValidateEndpoints(t *testing.T) { func TestValidateTLSSecret(t *testing.T) { successCases := map[string]api.Secret{ "emtpy certificate chain": { - ObjectMeta: api.ObjectMeta{Name: "tls-cert", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "tls-cert", Namespace: "namespace"}, Data: map[string][]byte{ api.TLSCertKey: []byte("public key"), api.TLSPrivateKeyKey: []byte("private key"), @@ -8044,7 +8044,7 @@ func TestValidateTLSSecret(t *testing.T) { }{ "missing public key": { secrets: api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "tls-cert"}, + ObjectMeta: metav1.ObjectMeta{Name: "tls-cert"}, Data: map[string][]byte{ api.TLSCertKey: []byte("public key"), }, @@ -8053,7 +8053,7 @@ func TestValidateTLSSecret(t *testing.T) { }, "missing private key": { secrets: api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "tls-cert"}, + ObjectMeta: metav1.ObjectMeta{Name: "tls-cert"}, Data: map[string][]byte{ api.TLSCertKey: []byte("public key"), }, @@ -8188,7 +8188,7 @@ func TestValidPodLogOptions(t *testing.T) { func TestValidateConfigMap(t *testing.T) { newConfigMap := func(name, namespace string, data map[string]string) api.ConfigMap { return api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -8244,7 +8244,7 @@ func TestValidateConfigMap(t *testing.T) { func TestValidateConfigMapUpdate(t *testing.T) { newConfigMap := func(version, name, namespace string, data map[string]string) api.ConfigMap { return api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, ResourceVersion: version, @@ -8290,7 +8290,7 @@ func TestValidateConfigMapUpdate(t *testing.T) { } func TestValidateHasLabel(t *testing.T) { - successCase := api.ObjectMeta{ + successCase := metav1.ObjectMeta{ Name: "123", Namespace: "ns", Labels: map[string]string{ @@ -8302,7 +8302,7 @@ func TestValidateHasLabel(t *testing.T) { t.Errorf("expected success: %v", errs) } - missingCase := api.ObjectMeta{ + missingCase := metav1.ObjectMeta{ Name: "123", Namespace: "ns", Labels: map[string]string{ @@ -8313,7 +8313,7 @@ func TestValidateHasLabel(t *testing.T) { t.Errorf("expected failure") } - wrongValueCase := api.ObjectMeta{ + wrongValueCase := metav1.ObjectMeta{ Name: "123", Namespace: "ns", Labels: map[string]string{ @@ -8416,7 +8416,7 @@ func TestValidateSysctls(t *testing.T) { func newNodeNameEndpoint(nodeName string) *api.Endpoints { ep := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, ResourceVersion: "1", diff --git a/pkg/api/zz_generated.deepcopy.go b/pkg/api/zz_generated.deepcopy.go index 8b7ab3bafd6..ea9dccd5ccb 100644 --- a/pkg/api/zz_generated.deepcopy.go +++ b/pkg/api/zz_generated.deepcopy.go @@ -21,13 +21,14 @@ limitations under the License. package api import ( + reflect "reflect" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" labels "k8s.io/apimachinery/pkg/labels" runtime "k8s.io/apimachinery/pkg/runtime" types "k8s.io/apimachinery/pkg/types" fields "k8s.io/kubernetes/pkg/fields" - reflect "reflect" ) func init() { diff --git a/pkg/apimachinery/tests/api_meta_help_test.go b/pkg/apimachinery/tests/api_meta_help_test.go index 48d4cd64840..4f690c6b629 100644 --- a/pkg/apimachinery/tests/api_meta_help_test.go +++ b/pkg/apimachinery/tests/api_meta_help_test.go @@ -49,34 +49,34 @@ func TestIsList(t *testing.T) { func TestExtractList(t *testing.T) { list1 := []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, - &api.Service{ObjectMeta: api.ObjectMeta{Name: "2"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + &api.Service{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, } list2 := &v1.List{ Items: []runtime.RawExtension{ {Raw: []byte("foo")}, {Raw: []byte("bar")}, - {Object: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "other"}}}, + {Object: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "other"}}}, }, } list3 := &fakePtrValueList{ Items: []*api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "1"}}, - {ObjectMeta: api.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, }, } list4 := &api.PodList{ Items: []api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "1"}}, - {ObjectMeta: api.ObjectMeta{Name: "2"}}, - {ObjectMeta: api.ObjectMeta{Name: "3"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "3"}}, }, } list5 := &v1.PodList{ Items: []v1.Pod{ - {ObjectMeta: v1.ObjectMeta{Name: "1"}}, - {ObjectMeta: v1.ObjectMeta{Name: "2"}}, - {ObjectMeta: v1.ObjectMeta{Name: "3"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "3"}}, }, } @@ -142,34 +142,34 @@ func TestExtractList(t *testing.T) { func TestEachListItem(t *testing.T) { list1 := []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, - &api.Service{ObjectMeta: api.ObjectMeta{Name: "2"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + &api.Service{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, } list2 := &v1.List{ Items: []runtime.RawExtension{ {Raw: []byte("foo")}, {Raw: []byte("bar")}, - {Object: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "other"}}}, + {Object: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "other"}}}, }, } list3 := &fakePtrValueList{ Items: []*api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "1"}}, - {ObjectMeta: api.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, }, } list4 := &api.PodList{ Items: []api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "1"}}, - {ObjectMeta: api.ObjectMeta{Name: "2"}}, - {ObjectMeta: api.ObjectMeta{Name: "3"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "3"}}, }, } list5 := &v1.PodList{ Items: []v1.Pod{ - {ObjectMeta: v1.ObjectMeta{Name: "1"}}, - {ObjectMeta: v1.ObjectMeta{Name: "2"}}, - {ObjectMeta: v1.ObjectMeta{Name: "3"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "3"}}, }, } @@ -262,9 +262,9 @@ func (obj fakePtrValueList) GetObjectKind() schema.ObjectKind { func TestSetList(t *testing.T) { pl := &api.PodList{} list := []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "2"}}, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "3"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "3"}}, } err := meta.SetList(pl, list) if err != nil { @@ -283,9 +283,9 @@ func TestSetList(t *testing.T) { func TestSetListToRuntimeObjectArray(t *testing.T) { pl := &api.List{} list := []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "2"}}, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "3"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "3"}}, } err := meta.SetList(pl, list) if err != nil { diff --git a/pkg/apimachinery/tests/api_meta_meta_test.go b/pkg/apimachinery/tests/api_meta_meta_test.go index c59e809f5b0..f0489fc04e1 100644 --- a/pkg/apimachinery/tests/api_meta_meta_test.go +++ b/pkg/apimachinery/tests/api_meta_meta_test.go @@ -28,13 +28,12 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" ) func TestAPIObjectMeta(t *testing.T) { j := &api.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: "/a", Kind: "b"}, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "bar", Name: "foo", GenerateName: "prefix", @@ -333,7 +332,7 @@ func TestTypeMetaSelfLinker(t *testing.T) { type MyAPIObject2 struct { metav1.TypeMeta - v1.ObjectMeta + metav1.ObjectMeta } func getObjectMetaAndOwnerRefereneces() (myAPIObject2 MyAPIObject2, metaOwnerReferences []metav1.OwnerReference) { @@ -396,7 +395,7 @@ func TestAccessOwnerReferences(t *testing.T) { func BenchmarkAccessorSetFastPath(b *testing.B) { obj := &api.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: "/a", Kind: "b"}, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "bar", Name: "foo", GenerateName: "prefix", diff --git a/pkg/apimachinery/tests/apis_meta_v1_unstructed_unstructure_test.go b/pkg/apimachinery/tests/apis_meta_v1_unstructed_unstructure_test.go index ba5ad0ce40b..ac74def8bf9 100644 --- a/pkg/apimachinery/tests/apis_meta_v1_unstructed_unstructure_test.go +++ b/pkg/apimachinery/tests/apis_meta_v1_unstructed_unstructure_test.go @@ -37,7 +37,7 @@ func TestDecodeUnstructured(t *testing.T) { rawJson := fmt.Sprintf(`{"kind":"Pod","apiVersion":"%s","metadata":{"name":"test"}}`, groupVersionString) pl := &api.List{ Items: []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, &runtime.Unknown{ TypeMeta: runtime.TypeMeta{Kind: "Pod", APIVersion: groupVersionString}, Raw: []byte(rawJson), diff --git a/pkg/apimachinery/tests/runtime_helper_test.go b/pkg/apimachinery/tests/runtime_helper_test.go index d30ae1d0764..e83d116791d 100644 --- a/pkg/apimachinery/tests/runtime_helper_test.go +++ b/pkg/apimachinery/tests/runtime_helper_test.go @@ -19,6 +19,7 @@ package tests import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" @@ -27,7 +28,7 @@ import ( func TestDecodeList(t *testing.T) { pl := &api.List{ Items: []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, &runtime.Unknown{ TypeMeta: runtime.TypeMeta{Kind: "Pod", APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()}, Raw: []byte(`{"kind":"Pod","apiVersion":"` + api.Registry.GroupOrDie(api.GroupName).GroupVersion.String() + `","metadata":{"name":"test"}}`), diff --git a/pkg/apimachinery/tests/runtime_serializer_protobuf_protobuf_test.go b/pkg/apimachinery/tests/runtime_serializer_protobuf_protobuf_test.go index 01ad63bd5e2..87ff680264c 100644 --- a/pkg/apimachinery/tests/runtime_serializer_protobuf_protobuf_test.go +++ b/pkg/apimachinery/tests/runtime_serializer_protobuf_protobuf_test.go @@ -24,6 +24,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/protobuf" @@ -273,7 +274,7 @@ func TestProtobufDecode(t *testing.T) { func TestDecodeObjects(t *testing.T) { obj1 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "cool", }, Spec: v1.PodSpec{ diff --git a/pkg/apis/apps/v1beta1/generated.pb.go b/pkg/apis/apps/v1beta1/generated.pb.go index 59869f2f7dc..a94798b88ff 100644 --- a/pkg/apis/apps/v1beta1/generated.pb.go +++ b/pkg/apis/apps/v1beta1/generated.pb.go @@ -343,7 +343,7 @@ func (this *StatefulSet) String() string { return "nil" } s := strings.Join([]string{`&StatefulSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1034,45 +1034,45 @@ var ( var fileDescriptorGenerated = []byte{ // 645 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x53, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x8d, 0x93, 0xa6, 0x84, 0x4d, 0xf9, 0x5a, 0x2a, 0x14, 0x55, 0xc8, 0xad, 0x72, 0x21, 0x48, - 0xed, 0x5a, 0x69, 0x0b, 0x54, 0x1c, 0x8d, 0x04, 0x42, 0x02, 0x8a, 0x1c, 0x54, 0x41, 0x81, 0xc3, - 0xda, 0x99, 0xa6, 0x4b, 0xfc, 0x25, 0xef, 0x38, 0x12, 0x37, 0x2e, 0x1c, 0xb8, 0xf1, 0x2f, 0xf8, - 0x07, 0xfc, 0x86, 0x8a, 0x53, 0x8f, 0x9c, 0x2a, 0x1a, 0xfe, 0x08, 0xf2, 0x66, 0x93, 0x18, 0x9c, - 0xd0, 0xaa, 0x37, 0xcf, 0xee, 0xbc, 0xf7, 0x66, 0xde, 0x3e, 0x93, 0x07, 0xfd, 0x1d, 0xc9, 0x44, - 0x64, 0xf5, 0x53, 0x17, 0x92, 0x10, 0x10, 0xa4, 0x15, 0xf7, 0x7b, 0x16, 0x8f, 0x85, 0xb4, 0x78, - 0x1c, 0x4b, 0x6b, 0xd0, 0x76, 0x01, 0x79, 0xdb, 0xea, 0x41, 0x08, 0x09, 0x47, 0xe8, 0xb2, 0x38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08, + 0x52, 0xbb, 0x26, 0x6d, 0x81, 0x8a, 0xa3, 0x91, 0x40, 0x48, 0x40, 0x91, 0x83, 0x2a, 0x51, 0x40, + 0x62, 0xed, 0x4c, 0xd3, 0x25, 0xfe, 0x92, 0x77, 0x1c, 0x89, 0x1b, 0x17, 0x0e, 0xdc, 0x78, 0x13, + 0x6e, 0x3c, 0x43, 0xc5, 0xa9, 0x47, 0x4e, 0x15, 0x0d, 0x2f, 0x82, 0xbc, 0xd9, 0x24, 0x06, 0x27, + 0x6a, 0xd5, 0x5b, 0x66, 0x3d, 0xff, 0xdf, 0xcc, 0xfc, 0x67, 0x42, 0x1e, 0xf6, 0x77, 0x24, 0x13, + 0x91, 0xd5, 0x4f, 0x5d, 0x48, 0x42, 0x40, 0x90, 0x56, 0xdc, 0xef, 0x59, 0x3c, 0x16, 0xd2, 0xe2, + 0x71, 0x2c, 0xad, 0x41, 0xdb, 0x05, 0xe4, 0x6d, 0xab, 0x07, 0x21, 0x24, 0x1c, 0xa1, 0xcb, 0xe2, + 0x24, 0xc2, 0x88, 0xde, 0x19, 0x09, 0xd9, 0x54, 0xc8, 0xe2, 0x7e, 0x8f, 0x65, 0x42, 0x96, 0x09, + 0x99, 0x16, 0xae, 0x6c, 0xf4, 0x04, 0x1e, 0xa6, 0x2e, 0xf3, 0xa2, 0xc0, 0xea, 0x45, 0xbd, 0xc8, + 0x52, 0x7a, 0x37, 0x3d, 0x50, 0x91, 0x0a, 0xd4, 0xaf, 0x11, 0x77, 0x65, 0x5b, 0x37, 0xc4, 0x63, + 0x11, 0x70, 0xef, 0x50, 0x84, 0x90, 0x7c, 0x9a, 0xb6, 0x14, 0x00, 0x72, 0x6b, 0x50, 0xe8, 0x66, + 0xc5, 0x9a, 0xa7, 0x4a, 0xd2, 0x10, 0x45, 0x00, 0x05, 0xc1, 0x83, 0xb3, 0x04, 0xd2, 0x3b, 0x84, + 0x80, 0x17, 0x74, 0x9b, 0x73, 0xfd, 0xb2, 0x12, 0x90,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94, + 0x33, 0x22, 0x36, 0x7f, 0x54, 0xfe, 0x19, 0x26, 0xb3, 0x92, 0xb6, 0x48, 0x2d, 0x81, 0xd8, 0x17, + 0x1e, 0x97, 0x6a, 0x98, 0xaa, 0xbd, 0x94, 0x35, 0xe6, 0xe8, 0x37, 0x67, 0xf2, 0x95, 0xbe, 0x27, + 0x35, 0x09, 0x3e, 0x78, 0x18, 0x25, 0x7a, 0x9d, 0x5b, 0xe7, 0x1c, 0x9b, 0xbb, 0xe0, 0x77, 0xb4, + 0x74, 0x84, 0x1f, 0x47, 0xce, 0x04, 0x49, 0xdf, 0x92, 0x1a, 0x42, 0x10, 0xfb, 0x1c, 0x41, 0xef, + 0x73, 0x63, 0xfe, 0xe8, 0x19, 0xf6, 0x55, 0xd4, 0x7d, 0xad, 0x05, 0xea, 0x44, 0x26, 0xa6, 0x8e, + 0x5f, 0x9d, 0x09, 0x90, 0x7e, 0x31, 0xc8, 0xf2, 0x20, 0xf2, 0xd3, 0x00, 0x1e, 0xfb, 0x5c, 0x04, + 0xe3, 0x0c, 0xd9, 0x58, 0x50, 0x26, 0x6f, 0x9d, 0x51, 0x09, 0x12, 0x29, 0x24, 0x42, 0x88, 0x7b, + 0x53, 0x86, 0x7d, 0x5b, 0xd7, 0x5b, 0xde, 0x9b, 0x01, 0x76, 0x66, 0x96, 0xa3, 0xf7, 0x49, 0x5d, + 0x42, 0x32, 0x10, 0x1e, 0xbc, 0xe4, 0x01, 0x34, 0xaa, 0x6b, 0x46, 0xeb, 0xb2, 0x7d, 0x53, 0x83, + 0xea, 0x9d, 0xe9, 0x27, 0x27, 0x9f, 0xd7, 0xfc, 0x6a, 0x90, 0x1b, 0x85, 0x9b, 0xa5, 0x4f, 0x08, + 0x8d, 0xdc, 0x2c, 0x0d, 0xba, 0x4f, 0x47, 0x7f, 0x74, 0x11, 0x85, 0x6a, 0x89, 0x15, 0xfb, 0xd6, + 0xf0, 0x64, 0x95, 0xee, 0x16, 0xbe, 0x3a, 0x33, 0x14, 0x74, 0x3d, 0x77, 0x02, 0x65, 0x75, 0x02, + 0x13, 0x2b, 0x8b, 0x67, 0x60, 0xdf, 0x3d, 0x3a, 0x35, 0x4b, 0xc7, 0xa7, 0x66, 0xe9, 0xd7, 0xa9, + 0x59, 0xfa, 0x3c, 0x34, 0x8d, 0xa3, 0xa1, 0x69, 0x1c, 0x0f, 0x4d, 0xe3, 0xf7, 0xd0, 0x34, 0xbe, + 0xfd, 0x31, 0x4b, 0xfb, 0x97, 0xf4, 0x45, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x5a, 0x18, + 0x81, 0x34, 0x06, 0x00, 0x00, } diff --git a/pkg/apis/apps/v1beta1/generated.proto b/pkg/apis/apps/v1beta1/generated.proto index 249af7dc21c..e7555c9d609 100644 --- a/pkg/apis/apps/v1beta1/generated.proto +++ b/pkg/apis/apps/v1beta1/generated.proto @@ -39,7 +39,7 @@ option go_package = "v1beta1"; // map to the same storage identity. message StatefulSet { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired identities of pods in this set. // +optional diff --git a/pkg/apis/apps/v1beta1/types.generated.go b/pkg/apis/apps/v1beta1/types.generated.go index 17fa65e901a..0f60d56948d 100644 --- a/pkg/apis/apps/v1beta1/types.generated.go +++ b/pkg/apis/apps/v1beta1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" + pkg2_types "k8s.io/apimachinery/pkg/types" pkg4_resource "k8s.io/kubernetes/pkg/api/resource" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID + var v1 pkg2_types.UID var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v3 pkg3_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -164,7 +164,13 @@ func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -174,7 +180,13 @@ func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -298,24 +310,30 @@ func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = StatefulSetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = StatefulSetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -328,16 +346,16 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -345,21 +363,21 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -367,38 +385,44 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -406,16 +430,16 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = StatefulSetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -423,21 +447,21 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = StatefulSetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -566,7 +590,7 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym17 if false { } else { - h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) } } } else { @@ -584,7 +608,7 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym18 if false { } else { - h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) } } } @@ -704,7 +728,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv8 := &x.Template yyv8.CodecDecodeSelf(d) @@ -718,7 +742,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { _ = yym10 if false { } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv9), d) + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv9), d) } } case "serviceName": @@ -812,7 +836,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv18 := &x.Template yyv18.CodecDecodeSelf(d) @@ -836,7 +860,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) _ = yym20 if false { } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv19), d) + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv19), d) } } yyj13++ @@ -1497,7 +1521,7 @@ func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg2_v1.PersistentVolumeClaim, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg3_v1.PersistentVolumeClaim, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -1510,7 +1534,7 @@ func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg2_v1.Persistent z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.PersistentVolumeClaim, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg3_v1.PersistentVolumeClaim, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -1521,7 +1545,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten _ = yyc1 if yyl1 == 0 { if yyv1 == nil { - yyv1 = []pkg2_v1.PersistentVolumeClaim{} + yyv1 = []pkg3_v1.PersistentVolumeClaim{} yyc1 = true } else if len(yyv1) != 0 { yyv1 = yyv1[:0] @@ -1541,10 +1565,10 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { - yyv1 = make([]pkg2_v1.PersistentVolumeClaim, yyrl1) + yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1) } } else { - yyv1 = make([]pkg2_v1.PersistentVolumeClaim, yyrl1) + yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1) } yyc1 = true yyrr1 = len(yyv1) @@ -1559,7 +1583,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten for ; yyj1 < yyrr1; yyj1++ { yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{} + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} } else { yyv2 := &yyv1[yyj1] yyv2.CodecDecodeSelf(d) @@ -1568,10 +1592,10 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten } if yyrt1 { for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, pkg2_v1.PersistentVolumeClaim{}) + yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{} + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} } else { yyv3 := &yyv1[yyj1] yyv3.CodecDecodeSelf(d) @@ -1585,13 +1609,13 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten for ; !r.CheckBreak(); yyj1++ { if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, pkg2_v1.PersistentVolumeClaim{}) // var yyz1 pkg2_v1.PersistentVolumeClaim + yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) // var yyz1 pkg3_v1.PersistentVolumeClaim yyc1 = true } yyh1.ElemContainerState(yyj1) if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{} + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} } else { yyv4 := &yyv1[yyj1] yyv4.CodecDecodeSelf(d) @@ -1606,7 +1630,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []pkg2_v1.PersistentVolumeClaim{} + yyv1 = []pkg3_v1.PersistentVolumeClaim{} yyc1 = true } } diff --git a/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/pkg/apis/apps/v1beta1/zz_generated.conversion.go index 4a5d376ec00..5dbc4970e90 100644 --- a/pkg/apis/apps/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/apps/v1beta1/zz_generated.conversion.go @@ -50,10 +50,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -68,10 +65,7 @@ func Convert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps. } func autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go b/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go index 3ebaa3ae7de..8cc9161b4d1 100644 --- a/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" + api_v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -48,8 +48,10 @@ func DeepCopy_v1beta1_StatefulSet(in interface{}, out interface{}, c *conversion in := in.(*StatefulSet) out := out.(*StatefulSet) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -94,17 +96,17 @@ func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conver if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } if in.VolumeClaimTemplates != nil { in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) + *out = make([]api_v1.PersistentVolumeClaim, len(*in)) for i := range *in { - if err := v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { + if err := api_v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { return err } } diff --git a/pkg/apis/apps/validation/validation_test.go b/pkg/apis/apps/validation/validation_test.go index 6b507504d26..66094b9ce1f 100644 --- a/pkg/apis/apps/validation/validation_test.go +++ b/pkg/apis/apps/validation/validation_test.go @@ -29,7 +29,7 @@ func TestValidateStatefulSet(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -46,21 +46,21 @@ func TestValidateStatefulSet(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidLabels, }, }, } successCases := []apps.StatefulSet{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, @@ -75,47 +75,47 @@ func TestValidateStatefulSet(t *testing.T) { errorCases := map[string]apps.StatefulSet{ "zero-length ID": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, "missing-namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, "empty selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Template: validPodTemplate.Template, }, }, "selector_doesnt_match": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, Template: validPodTemplate.Template, }, }, "invalid manifest": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "negative_replicas": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: -1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Labels: map[string]string{ @@ -128,7 +128,7 @@ func TestValidateStatefulSet(t *testing.T) { }, }, "invalid_label 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Labels: map[string]string{ @@ -140,7 +140,7 @@ func TestValidateStatefulSet(t *testing.T) { }, }, "invalid_annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Annotations: map[string]string{ @@ -153,7 +153,7 @@ func TestValidateStatefulSet(t *testing.T) { }, }, "invalid restart policy 1": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, }, @@ -165,14 +165,14 @@ func TestValidateStatefulSet(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, }, }, }, "invalid restart policy 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, }, @@ -184,7 +184,7 @@ func TestValidateStatefulSet(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, }, @@ -219,7 +219,7 @@ func TestValidateStatefulSetUpdate(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -231,7 +231,7 @@ func TestValidateStatefulSetUpdate(t *testing.T) { } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -249,7 +249,7 @@ func TestValidateStatefulSetUpdate(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidLabels, }, }, @@ -261,14 +261,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { successCases := []psUpdateTest{ { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -287,14 +287,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { errorCases := map[string]psUpdateTest{ "more than one read/write": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -304,14 +304,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { }, "updates to a field other than spec.Replicas": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -321,14 +321,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { }, "invalid selector": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: invalidLabels}, @@ -338,14 +338,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { }, "invalid pod": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -355,14 +355,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { }, "negative replicas": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: -1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, diff --git a/pkg/apis/apps/zz_generated.deepcopy.go b/pkg/apis/apps/zz_generated.deepcopy.go index c1d826e447a..f11bb27a7c4 100644 --- a/pkg/apis/apps/zz_generated.deepcopy.go +++ b/pkg/apis/apps/zz_generated.deepcopy.go @@ -21,11 +21,12 @@ limitations under the License. package apps import ( + reflect "reflect" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/apis/authentication/v1beta1/generated.pb.go b/pkg/apis/authentication/v1beta1/generated.pb.go index acb697f7e85..0dff3532423 100644 --- a/pkg/apis/authentication/v1beta1/generated.pb.go +++ b/pkg/apis/authentication/v1beta1/generated.pb.go @@ -390,7 +390,7 @@ func (this *TokenReview) String() string { return "nil" } s := strings.Join([]string{`&TokenReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1236,46 +1236,47 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 656 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0xb5, 0xf3, 0xd3, 0x2f, 0x99, 0x7c, 0x85, 0x32, 0x12, 0x52, 0x14, 0x09, 0x27, 0x0a, 0x9b, - 0x20, 0x95, 0xb1, 0x52, 0xa1, 0x52, 0xb5, 0x62, 0x51, 0xab, 0x05, 0x75, 0x81, 0x90, 0xa6, 0x14, - 0x21, 0x24, 0x16, 0x13, 0xe7, 0xd6, 0x31, 0xae, 0x7f, 0x34, 0x1e, 0xa7, 0x74, 0xd7, 0x47, 0x60, - 0xc9, 0x92, 0xf7, 0xe0, 0x05, 0xba, 0xec, 0x82, 0x05, 0x0b, 0x14, 0x91, 0xf0, 0x22, 0x68, 0xc6, - 0x43, 0x93, 0x36, 0x8d, 0x10, 0xed, 0xce, 0x73, 0xe6, 0x9e, 0x73, 0xee, 0x3d, 0xe3, 0x8b, 0xb6, - 0x83, 0x8d, 0x94, 0xf8, 0xb1, 0x1d, 0x64, 0x3d, 0xe0, 0x11, 0x08, 0x48, 0xed, 0x24, 0xf0, 0x6c, - 0x96, 0xf8, 0xa9, 0xcd, 0x32, 0x31, 0x80, 0x48, 0xf8, 0x2e, 0x13, 0x7e, 0x1c, 0xd9, 0xc3, 0x6e, - 0x0f, 0x04, 0xeb, 0xda, 0x1e, 0x44, 0xc0, 0x99, 0x80, 0x3e, 0x49, 0x78, 0x2c, 0x62, 0xdc, 0xcd, - 0x25, 0xc8, 0x54, 0x82, 0x24, 0x81, 0x47, 0xa4, 0x04, 0xb9, 0x2c, 0x41, 0xb4, 0x44, 0xe3, 0xb1, - 0xe7, 0x8b, 0x41, 0xd6, 0x23, 0x6e, 0x1c, 0xda, 0x5e, 0xec, 0xc5, 0xb6, 0x52, 0xea, 0x65, 0x87, - 0xea, 0xa4, 0x0e, 0xea, 0x2b, 0x77, 0x68, 0x3c, 0xd1, 0x4d, 0xb2, 0xc4, 0x0f, 0x99, 0x3b, 0xf0, - 0x23, 0xe0, 0x27, 0xd3, 0x36, 0x43, 0x10, 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0x80, 0xa8, 0x65, 0xda, 0x8d, 0x04, 0x3f, 0x99, 0x19, 0x55, 0x62, 0x34, 0xf7, 0x68, 0x1c, 0xeb, - 0x85, 0x53, 0x35, 0x78, 0x05, 0x15, 0x03, 0x38, 0xc9, 0xc7, 0xa4, 0xf2, 0x13, 0xef, 0xa3, 0xf2, - 0x50, 0xee, 0xa2, 0x7e, 0x8f, 0x67, 0x37, 0x68, 0x66, 0xba, 0xd0, 0x34, 0xd7, 0xda, 0x2c, 0x6c, - 0x98, 0xce, 0xa3, 0xb3, 0xb1, 0x65, 0x9c, 0x8f, 0x2d, 0xe3, 0xfb, 0xd8, 0x32, 0x4e, 0x27, 0x96, - 0x79, 0x36, 0xb1, 0xcc, 0xf3, 0x89, 0x65, 0xfe, 0x9c, 0x58, 0xe6, 0xa7, 0x5f, 0x96, 0xf1, 0xee, - 0x3f, 0x2d, 0xf0, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xec, 0x29, 0x42, 0xc3, 0xee, 0x05, 0x00, 0x00, + // 660 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0xf6, 0x07, 0xb6, 0x53, 0x51, 0x9c, 0xc4, 0xa4, 0x69, 0xe2, 0xb6, 0xa9, 0x17, 0x4c, + 0x70, 0xd6, 0x12, 0x83, 0x04, 0xe2, 0x81, 0x0d, 0x68, 0x38, 0x18, 0x93, 0x41, 0x3c, 0x98, 0x98, + 0x38, 0xdd, 0x3e, 0xb6, 0xe3, 0xb2, 0x3f, 0x32, 0x3b, 0x5b, 0xe4, 0xc6, 0x9f, 0xe0, 0xd1, 0xa3, + 0xff, 0x8b, 0x17, 0x8e, 0x1c, 0x3c, 0x78, 0x30, 0xc4, 0xd6, 0x7f, 0xc4, 0xcc, 0xec, 0x48, 0x0b, + 0x85, 0x18, 0xe1, 0xb6, 0xf3, 0xcd, 0xfb, 0xbe, 0xef, 0xbd, 0x6f, 0xf6, 0xa1, 0x8d, 0x60, 0x35, + 0x25, 0x3c, 0x76, 0x82, 0xac, 0x07, 0x22, 0x02, 0x09, 0xa9, 0x93, 0x04, 0xbe, 0xc3, 0x12, 0x9e, + 0x3a, 0x2c, 0x93, 0x03, 0x88, 0x24, 0xf7, 0x98, 0xe4, 0x71, 0xe4, 0x0c, 0xbb, 0x3d, 0x90, 0xac, + 0xeb, 0xf8, 0x10, 0x81, 0x60, 0x12, 0xfa, 0x24, 0x11, 0xb1, 0x8c, 0x71, 0x37, 0x97, 0x20, 0x13, + 0x09, 0x92, 0x04, 0x3e, 0x51, 0x12, 0xe4, 0xbc, 0x04, 0x31, 0x12, 0xcd, 0xc7, 0x3e, 0x97, 0x83, + 0xac, 0x47, 0xbc, 0x38, 0x74, 0xfc, 0xd8, 0x8f, 0x1d, 0xad, 0xd4, 0xcb, 0xf6, 0xf4, 0x49, 0x1f, + 0xf4, 0x57, 0xee, 0xd0, 0x7c, 0x6a, 0x9a, 0x64, 0x09, 0x0f, 0x99, 0x37, 0xe0, 0x11, 0x88, 0xc3, + 0x49, 0x9b, 0x21, 0x48, 0xe6, 0x0c, 0x67, 0xfa, 0x6a, 0x3a, 0x57, 0xb1, 0x44, 0x16, 0x49, 0x1e, + 0xc2, 0x0c, 0x61, 0xe5, 0x5f, 0x84, 0xd4, 0x1b, 0x40, 0xc8, 0x66, 0x78, 0xcb, 0x57, 0x66, 0xe8, + 0x08, 0x48, 0xe3, 0x4c, 0x78, 0xb3, 0x5e, 0x4b, 0x57, 0x73, 0x2e, 0x19, 0xa5, 0x7b, 0x79, 0x75, + 0x26, 0xf9, 0xbe, 0xc3, 0x23, 0x99, 0x4a, 0x71, 0x91, 0xd2, 0x79, 0x86, 0xd0, 0xd6, 0x27, 0x29, + 0xd8, 0x5b, 0xb6, 0x9f, 0x01, 0x6e, 0xa1, 0x0a, 0x97, 0x10, 0xa6, 0x0d, 0xab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 0xc9, 0xd8, 0xb6, 0x7e, 0x8d, 0x6d, 0xeb, 0xf3, + 0x6f, 0xbb, 0xf0, 0xee, 0x96, 0x11, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x29, 0x85, 0x06, 0x53, + 0xf6, 0x05, 0x00, 0x00, } diff --git a/pkg/apis/authentication/v1beta1/generated.proto b/pkg/apis/authentication/v1beta1/generated.proto index 7df6a8d7d1b..96c1504b046 100644 --- a/pkg/apis/authentication/v1beta1/generated.proto +++ b/pkg/apis/authentication/v1beta1/generated.proto @@ -45,7 +45,7 @@ message ExtraValue { // plugin in the kube-apiserver. message TokenReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated optional TokenReviewSpec spec = 2; diff --git a/pkg/apis/authentication/v1beta1/types.generated.go b/pkg/apis/authentication/v1beta1/types.generated.go index dc81a013aaf..b8990af180c 100644 --- a/pkg/apis/authentication/v1beta1/types.generated.go +++ b/pkg/apis/authentication/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -287,24 +297,30 @@ func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = TokenReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = TokenReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -317,16 +333,16 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -334,21 +350,21 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -356,38 +372,44 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -395,16 +417,16 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = TokenReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -412,21 +434,21 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = TokenReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/authentication/v1beta1/zz_generated.conversion.go b/pkg/apis/authentication/v1beta1/zz_generated.conversion.go index 960ffb34a89..69f0fc8a71e 100644 --- a/pkg/apis/authentication/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/authentication/v1beta1/zz_generated.conversion.go @@ -47,10 +47,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -65,10 +62,7 @@ func Convert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, } func autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go b/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go index f7d417ac9cb..01260cc1334 100644 --- a/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion in := in.(*TokenReview) out := out.(*TokenReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil { return err diff --git a/pkg/apis/authentication/zz_generated.deepcopy.go b/pkg/apis/authentication/zz_generated.deepcopy.go index fafe595b3b6..64fd7e81e2b 100644 --- a/pkg/apis/authentication/zz_generated.deepcopy.go +++ b/pkg/apis/authentication/zz_generated.deepcopy.go @@ -21,10 +21,11 @@ limitations under the License. package authentication import ( + reflect "reflect" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/apis/authorization/v1beta1/generated.pb.go b/pkg/apis/authorization/v1beta1/generated.pb.go index 93771098d8b..44c464ca28b 100644 --- a/pkg/apis/authorization/v1beta1/generated.pb.go +++ b/pkg/apis/authorization/v1beta1/generated.pb.go @@ -670,7 +670,7 @@ func (this *LocalSubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&LocalSubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -709,7 +709,7 @@ func (this *SelfSubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&SelfSubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -732,7 +732,7 @@ func (this *SubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&SubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -2283,61 +2283,62 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 891 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x8f, 0x93, 0x78, 0x37, 0x99, 0x05, 0xb6, 0x4c, 0x55, 0xd6, 0x5d, 0x24, 0x27, 0x0a, 0x12, - 0xda, 0x4a, 0xc5, 0x66, 0x57, 0xfc, 0xa9, 0x2a, 0x0e, 0xac, 0xc5, 0xaa, 0xaa, 0xa0, 0x05, 0xcd, - 0xc2, 0x0a, 0xc1, 0x69, 0xec, 0x7d, 0x4d, 0x4c, 0x12, 0x8f, 0x35,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1d, 0x8d, 0xd8, 0x7d, 0x38, 0x55, 0x5c, 0x5a, 0xe5, 0x18, 0x3d, 0x2c, - 0xcc, 0x64, 0xe6, 0xc7, 0xaf, 0xa3, 0x0d, 0x0e, 0x54, 0xb0, 0x48, 0x8f, 0xee, 0xb9, 0xda, 0x89, - 0xb2, 0x12, 0xed, 0xc5, 0x87, 0x68, 0x1b, 0xf2, 0xf2, 0x8a, 0xdc, 0x11, 0xe7, 0x8c, 0xeb, 0x23, - 0xdb, 0xd1, 0x09, 0xdb, 0x47, 0x8b, 0x6e, 0xf2, 0x64, 0xbc, 0x77, 0xed, 0xec, 0xdc, 0xae, 0x3d, - 0x3a, 0xb7, 0x6b, 0xbf, 0x9e, 0xdb, 0xb5, 0x07, 0x99, 0x6d, 0x9c, 0x65, 0xb6, 0xf1, 0x28, 0xb3, - 0x8d, 0x3f, 0x32, 0xdb, 0xf8, 0xee, 0x4f, 0xbb, 0xf6, 0xc5, 0xa6, 0xde, 0xf4, 0xdf, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x1f, 0x8b, 0xf7, 0x94, 0x5d, 0x0c, 0x00, 0x00, + // 897 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x5f, 0xef, 0x9f, 0x64, 0x77, 0x02, 0xa4, 0x4c, 0x55, 0xe2, 0x06, 0xc9, 0xbb, 0x5a, 0x24, + 0x94, 0x4a, 0xc5, 0x6e, 0x22, 0xfe, 0x54, 0x15, 0x07, 0x62, 0x11, 0x55, 0x15, 0xb4, 0xa0, 0x09, + 0xe4, 0x00, 0x17, 0xc6, 0xce, 0xeb, 0xae, 0xd9, 0x5d, 0x8f, 0x35, 0x33, 0x76, 0x09, 0xa7, 0x7e, + 0x00, 0x0e, 0x1c, 0x7b, 0xe4, 0x2b, 0xf0, 0x05, 0xb8, 0x92, 0x63, 0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, 0x63, 0x75, 0xbf, 0x30, 0x93, 0x99, 0x1f, 0xbf, 0x89, 0xd6, 0x38, 0x50, 0xc1, + 0x62, 0x33, 0xca, 0xe7, 0xdd, 0x4e, 0xb4, 0x95, 0x18, 0x2f, 0xde, 0x47, 0x9b, 0xa0, 0xd2, 0x6b, + 0x71, 0x07, 0x9c, 0x33, 0x6e, 0xb6, 0x6c, 0xcb, 0x04, 0x6c, 0x1e, 0x2c, 0xba, 0xc9, 0x93, 0x78, + 0xff, 0xda, 0xe9, 0x99, 0x53, 0x7b, 0x7c, 0xe6, 0xd4, 0x7e, 0x39, 0x73, 0x6a, 0x0f, 0x73, 0xc7, + 0x3a, 0xcd, 0x1d, 0xeb, 0x71, 0xee, 0x58, 0xbf, 0xe7, 0x8e, 0xf5, 0xfd, 0x1f, 0x4e, 0xed, 0x8b, + 0x75, 0xb3, 0xe8, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x31, 0x9f, 0xbd, 0x1e, 0x75, 0x0c, 0x00, + 0x00, } diff --git a/pkg/apis/authorization/v1beta1/generated.proto b/pkg/apis/authorization/v1beta1/generated.proto index 6afbfb663ae..26d2b835efa 100644 --- a/pkg/apis/authorization/v1beta1/generated.proto +++ b/pkg/apis/authorization/v1beta1/generated.proto @@ -45,7 +45,7 @@ message ExtraValue { // checking. message LocalSubjectAccessReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. @@ -106,7 +106,7 @@ message ResourceAttributes { // to check whether they can perform an action message SelfSubjectAccessReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated. user and groups must be empty optional SelfSubjectAccessReviewSpec spec = 2; @@ -131,7 +131,7 @@ message SelfSubjectAccessReviewSpec { // SubjectAccessReview checks whether or not a user or group can perform an action. message SubjectAccessReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated optional SubjectAccessReviewSpec spec = 2; diff --git a/pkg/apis/authorization/v1beta1/types.generated.go b/pkg/apis/authorization/v1beta1/types.generated.go index e58a9d5f568..939603c58a9 100644 --- a/pkg/apis/authorization/v1beta1/types.generated.go +++ b/pkg/apis/authorization/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -287,24 +297,30 @@ func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -317,16 +333,16 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -334,21 +350,21 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -356,38 +372,44 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -395,16 +417,16 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -412,21 +434,21 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -519,7 +541,13 @@ func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -529,7 +557,13 @@ func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -647,24 +681,30 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Dec } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SelfSubjectAccessReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -677,16 +717,16 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -694,21 +734,21 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -716,38 +756,44 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -755,16 +801,16 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = SelfSubjectAccessReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -772,21 +818,21 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -879,7 +925,13 @@ func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -889,7 +941,13 @@ func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1007,24 +1065,30 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.De } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1037,16 +1101,16 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1054,21 +1118,21 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1076,38 +1140,44 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1115,16 +1185,16 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1132,21 +1202,21 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/authorization/v1beta1/zz_generated.conversion.go b/pkg/apis/authorization/v1beta1/zz_generated.conversion.go index 4e96aaf5c26..92ed181ae12 100644 --- a/pkg/apis/authorization/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/authorization/v1beta1/zz_generated.conversion.go @@ -55,10 +55,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -73,10 +70,7 @@ func Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAcces } func autoConvert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -141,10 +135,7 @@ func Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in * } func autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -159,10 +150,7 @@ func Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessR } func autoConvert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -197,10 +185,7 @@ func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAcc } func autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -215,10 +200,7 @@ func Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in } func autoConvert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go b/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go index 76c0200e774..2bbd414ad21 100644 --- a/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -51,8 +51,10 @@ func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, in := in.(*LocalSubjectAccessReview) out := out.(*LocalSubjectAccessReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -84,8 +86,10 @@ func DeepCopy_v1beta1_SelfSubjectAccessReview(in interface{}, out interface{}, c in := in.(*SelfSubjectAccessReview) out := out.(*SelfSubjectAccessReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -118,8 +122,10 @@ func DeepCopy_v1beta1_SubjectAccessReview(in interface{}, out interface{}, c *co in := in.(*SubjectAccessReview) out := out.(*SubjectAccessReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/pkg/apis/authorization/validation/BUILD b/pkg/apis/authorization/validation/BUILD index 18bb6b82f0f..57851286302 100644 --- a/pkg/apis/authorization/validation/BUILD +++ b/pkg/apis/authorization/validation/BUILD @@ -15,6 +15,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authorization:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], ) @@ -25,8 +26,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/authorization:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], ) diff --git a/pkg/apis/authorization/zz_generated.deepcopy.go b/pkg/apis/authorization/zz_generated.deepcopy.go index de1e59498a6..dd6a3b3451f 100644 --- a/pkg/apis/authorization/zz_generated.deepcopy.go +++ b/pkg/apis/authorization/zz_generated.deepcopy.go @@ -21,10 +21,11 @@ limitations under the License. package authorization import ( + reflect "reflect" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/apis/autoscaling/v1/generated.pb.go b/pkg/apis/autoscaling/v1/generated.pb.go index 45982ab9d4d..a839f9934cb 100644 --- a/pkg/apis/autoscaling/v1/generated.pb.go +++ b/pkg/apis/autoscaling/v1/generated.pb.go @@ -543,7 +543,7 @@ func (this *HorizontalPodAutoscaler) String() string { return "nil" } s := strings.Join([]string{`&HorizontalPodAutoscaler{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -593,7 +593,7 @@ func (this *Scale) String() string { return "nil" } s := strings.Join([]string{`&Scale{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1731,58 +1731,58 @@ var ( var fileDescriptorGenerated = []byte{ // 855 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6f, 0xdc, 0x44, - 0x14, 0x5f, 0xef, 0x47, 0x95, 0x8e, 0x49, 0x02, 0x83, 0xd4, 0xae, 0x52, 0x61, 0x47, 0x0b, 0x87, - 0x80, 0x8a, 0xad, 0x5d, 0x95, 0x8a, 0x1e, 0xe3, 0xa0, 0xd2, 0x8a, 0x86, 0x46, 0x93, 0xb6, 0x42, - 0x08, 0x21, 0xcd, 0x7a, 0x5f, 0x9d, 0xe9, 0xae, 0x3d, 0xd6, 0xcc, 0x78, 0x05, 0x3d, 0x71, 0xe2, - 0xcc, 0x85, 0x03, 0x7f, 0x0e, 0xb7, 0xdc, 0xe8, 0x91, 0xd3, 0x8a, 0x18, 0xfe, 0x0c, 0x0e, 0xc8, - 0xb3, 0x13, 0xef, 0x57, 0xbc, 0x49, 0x04, 0xdc, 0x76, 0xe6, 0xfd, 0x3e, 0xde, 0xbc, 0xf7, 0xfc, - 0x16, 0x3d, 0x18, 0x7e, 0x2a, 0x3d, 0xc6, 0xfd, 0x61, 0xd6, 0x07, 0x91, 0x80, 0x02, 0xe9, 0xa7, - 0xc3, 0xc8, 0xa7, 0x29, 0x93, 0x3e, 0xcd, 0x14, 0x97, 0x21, 0x1d, 0xb1, 0x24, 0xf2, 0xc7, 0x5d, - 0x3f, 0x82, 0x04, 0x04, 0x55, 0x30, 0xf0, 0x52, 0xc1, 0x15, 0xc7, 0x1f, 0x4e, 0xa9, 0xde, 0x8c, - 0xea, 0xa5, 0xc3, 0xc8, 0x2b, 0xa8, 0xde, 0x1c, 0xd5, 0x1b, 0x77, 0x77, 0x3e, 0x8e, 0x98, 0x3a, - 0xc9, 0xfa, 0x5e, 0xc8, 0x63, 0x3f, 0xe2, 0x11, 0xf7, 0xb5, 0x42, 0x3f, 0x7b, 0xa9, 0x4f, 0xfa, - 0xa0, 0x7f, 0x4d, 0x95, 0x77, 0xee, 0x99, 0xa4, 0x68, 0xca, 0x62, 0x1a, 0x9e, 0xb0, 0x04, 0xc4, - 0xf7, 0xb3, 0xb4, 0x62, 0x50, 0xf4, 0x82, 0x7c, 0x76, 0xfc, 0x2a, 0x96, 0xc8, 0x12, 0xc5, 0x62, - 0x58, 0x21, 0xdc, 0xbf, 0x8c, 0x20, 0xc3, 0x13, 0x88, 0xe9, 0x0a, 0xaf, 0x57, 0x59, 0x33, 0x5f, - 0x80, 0xe4, 0x99, 0x08, 0x57, 0xbd, 0xee, 0x56, 0x73, 0x2e, 0x78, 0x4a, 0xf7, 0x62, 0x74, 0xa6, - 0xd8, 0xc8, 0x67, 0x89, 0x92, 0x4a, 0x2c, 0x53, 0x3a, 0x3f, 0x5b, 0xe8, 0xce, 0x81, 0xe0, 0x52, - 0xbe, 0x00, 0x21, 0x19, 0x4f, 0x9e, 0xf6, 0x5f, 0x41, 0xa8, 0x08, 0xbc, 0x04, 0x01, 0x49, 0x08, - 0x78, 0x17, 0x35, 0x87, 0x2c, 0x19, 0xb4, 0xad, 0x5d, 0x6b, 0xef, 0x66, 0xf0, 0xd6, 0xe9, 0xc4, - 0xad, 0xe5, 0x13, 0xb7, 0xf9, 0x05, 0x4b, 0x06, 0x44, 0x47, 0x0a, 0x44, 0x42, 0x63, 0x68, 0xd7, - 0x17, 0x11, 0x5f, 0xd2, 0x18, 0x88, 0x8e, 0xe0, 0x1e, 0x42, 0x34, 0x65, 0xc6, 0xa0, 0xdd, 0xd0, - 0x38, 0x6c, 0x70, 0x68, 0xff, 0xe8, 0xb1, 0x89, 0x90, 0x39, 0x54, 0xe7, 0xb7, 0x3a, 0xba, 0xfd, - 0x88, 0x0b, 0xf6, 0x9a, 0x27, 0x8a, 0x8e, 0x8e, 0xf8, 0x60, 0xdf, 0x8c, 0x06, 0x08, 0xfc, 0x15, - 0xda, 0x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0x10, 0x48, 0x47, 0x2c, 0xa4, 0x52, 0x8f, 0x5c, 0x2b, - 0xd8, 0xce, 0x27, 0xae, 0x7d, 0x38, 0xbb, 0x26, 0xf3, 0x18, 0xfc, 0x09, 0xb2, 0x63, 0xfa, 0x5d, - 0x49, 0x69, 0x68, 0xca, 0xbb, 0xc6, 0xcf, 0x3e, 0x9c, 0x85, 0xc8, 0x3c, 0x0e, 0xbf, 0x42, 0x8e, - 0xd2, 0xb6, 0x07, 0x47, 0xcf, 0x9f, 0x2b, 0x36, 0x62, 0xaf, 0xa9, 0x62, 0x3c, 0x39, 0x02, 0x11, - 0x42, 0xa2, 0x68, 0x04, 0xed, 0xa6, 0x56, 0xea, 0xe4, 0x13, 0xd7, 0x79, 0xb6, 0x16, 0x49, 0x2e, - 0x51, 0xea, 0xfc, 0xda, 0x40, 0xef, 0xad, 0x9d, 0x4f, 0xfc, 0x10, 0x61, 0xde, 0x97, 0x20, 0xc6, - 0x30, 0xf8, 0x7c, 0xba, 0x8c, 0x8a, 0xad, 0x50, 0xf4, 0xa0, 0x11, 0xdc, 0xca, 0x27, 0x2e, 0x7e, - 0xba, 0x12, 0x25, 0x17, 0x30, 0x70, 0x88, 0x36, 0x47, 0x54, 0xaa, 0x69, 0x95, 0x99, 0x59, 0x40, - 0x76, 0xef, 0xa3, 0xab, 0x0d, 0x6d, 0xc1, 0x08, 0xde, 0xc9, 0x27, 0xee, 0xe6, 0x93, 0x79, 0x11, - 0xb2, 0xa8, 0x89, 0xf7, 0xd1, 0x76, 0x98, 0x09, 0x01, 0x89, 0x5a, 0xaa, 0xfa, 0x6d, 0x53, 0xf5, - 0xed, 0x83, 0xc5, 0x30, 0x59, 0xc6, 0x17, 0x12, 0x03, 0x90, 0x4c, 0xc0, 0xa0, 0x94, 0x68, 0x2e, - 0x4a, 0x7c, 0xb6, 0x18, 0x26, 0xcb, 0x78, 0x1c, 0x23, 0xd7, 0xa8, 0x56, 0x76, 0xb0, 0xa5, 0x25, - 0xdf,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 0x1b, 0x51, 0xae, 0xc2, 0xb2, 0xa9, 0x25, 0xa2, 0xc3, + 0x90, 0x3d, 0xe7, 0x70, 0x35, 0x72, 0x81, 0x96, 0x30, 0x82, 0x50, 0x71, 0x61, 0xfe, 0x79, 0x4b, + 0xf4, 0x91, 0xb9, 0x27, 0x25, 0x22, 0xf8, 0xe0, 0xe4, 0xd4, 0xa9, 0xbd, 0x3e, 0x75, 0x6a, 0x7f, + 0x9c, 0x3a, 0xb5, 0x1f, 0x73, 0xc7, 0x3a, 0xc9, 0x1d, 0xeb, 0x75, 0xee, 0x58, 0x7f, 0xe6, 0x8e, + 0xf5, 0xf3, 0x5f, 0x4e, 0xed, 0xeb, 0xfa, 0xb8, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81, + 0xf7, 0x9a, 0x52, 0xd5, 0x09, 0x00, 0x00, } diff --git a/pkg/apis/autoscaling/v1/generated.proto b/pkg/apis/autoscaling/v1/generated.proto index e84fdd96c9f..4d4fa8e6030 100644 --- a/pkg/apis/autoscaling/v1/generated.proto +++ b/pkg/apis/autoscaling/v1/generated.proto @@ -48,7 +48,7 @@ message CrossVersionObjectReference { message HorizontalPodAutoscaler { // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -115,7 +115,7 @@ message HorizontalPodAutoscalerStatus { message Scale { // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional diff --git a/pkg/apis/autoscaling/v1/types.generated.go b/pkg/apis/autoscaling/v1/types.generated.go index 2a79a1c6233..41e91bad42a 100644 --- a/pkg/apis/autoscaling/v1/types.generated.go +++ b/pkg/apis/autoscaling/v1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.Time - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -1291,7 +1289,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1301,7 +1305,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1425,24 +1435,30 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Dec } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1455,16 +1471,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1472,21 +1488,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1494,38 +1510,44 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1533,16 +1555,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1550,21 +1572,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2026,7 +2048,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -2036,7 +2064,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -2160,24 +2194,30 @@ func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -2190,16 +2230,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2207,21 +2247,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2229,38 +2269,44 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2268,16 +2314,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2285,21 +2331,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/autoscaling/v1/types.go b/pkg/apis/autoscaling/v1/types.go index 7686f2ad8b4..2e867c9c069 100644 --- a/pkg/apis/autoscaling/v1/types.go +++ b/pkg/apis/autoscaling/v1/types.go @@ -16,10 +16,7 @@ limitations under the License. package v1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReference struct { diff --git a/pkg/apis/autoscaling/v1/zz_generated.conversion.go b/pkg/apis/autoscaling/v1/zz_generated.conversion.go index b89c66578ab..139c6c84dfe 100644 --- a/pkg/apis/autoscaling/v1/zz_generated.conversion.go +++ b/pkg/apis/autoscaling/v1/zz_generated.conversion.go @@ -78,10 +78,7 @@ func Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectRef } func autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -96,10 +93,7 @@ func Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(i } func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -188,10 +182,7 @@ func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutosc } func autoConvert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -206,10 +197,7 @@ func Convert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s } func autoConvert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go b/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go index fe31487e694..f5c104d8c19 100644 --- a/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go +++ b/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go @@ -24,7 +24,6 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api_v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -61,8 +60,10 @@ func DeepCopy_v1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *con in := in.(*HorizontalPodAutoscaler) out := out.(*HorizontalPodAutoscaler) *out = *in - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -140,8 +141,10 @@ func DeepCopy_v1_Scale(in interface{}, out interface{}, c *conversion.Cloner) er in := in.(*Scale) out := out.(*Scale) *out = *in - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } return nil } diff --git a/pkg/apis/autoscaling/validation/BUILD b/pkg/apis/autoscaling/validation/BUILD index 3dd4c7d0e8c..95de3f420df 100644 --- a/pkg/apis/autoscaling/validation/BUILD +++ b/pkg/apis/autoscaling/validation/BUILD @@ -31,6 +31,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/controller/podautoscaler:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/apis/autoscaling/validation/validation_test.go b/pkg/apis/autoscaling/validation/validation_test.go index 956480baa9e..cd57ac72938 100644 --- a/pkg/apis/autoscaling/validation/validation_test.go +++ b/pkg/apis/autoscaling/validation/validation_test.go @@ -20,16 +20,16 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/controller/podautoscaler" ) func TestValidateScale(t *testing.T) { successCases := []autoscaling.Scale{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", Namespace: api.NamespaceDefault, }, @@ -38,7 +38,7 @@ func TestValidateScale(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", Namespace: api.NamespaceDefault, }, @@ -47,7 +47,7 @@ func TestValidateScale(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", Namespace: api.NamespaceDefault, }, @@ -69,7 +69,7 @@ func TestValidateScale(t *testing.T) { }{ { scale: autoscaling.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", Namespace: api.NamespaceDefault, }, @@ -93,7 +93,7 @@ func TestValidateScale(t *testing.T) { func TestValidateHorizontalPodAutoscaler(t *testing.T) { successCases := []autoscaling.HorizontalPodAutoscaler{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, }, @@ -108,7 +108,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, }, @@ -122,7 +122,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, Annotations: map[string]string{ @@ -151,7 +151,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }{ { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{Name: "myrc"}, MinReplicas: newInt32(1), @@ -163,7 +163,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{Kind: "..", Name: "myrc"}, MinReplicas: newInt32(1), @@ -175,7 +175,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{Kind: "ReplicationController"}, MinReplicas: newInt32(1), @@ -187,7 +187,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{Kind: "ReplicationController", Name: ".."}, MinReplicas: newInt32(1), @@ -199,7 +199,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, }, @@ -213,7 +213,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, }, @@ -227,7 +227,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, }, @@ -242,7 +242,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, Annotations: map[string]string{ @@ -262,7 +262,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, Annotations: map[string]string{ @@ -282,7 +282,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, Annotations: map[string]string{ @@ -302,7 +302,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", Namespace: api.NamespaceDefault, Annotations: map[string]string{ diff --git a/pkg/apis/autoscaling/zz_generated.deepcopy.go b/pkg/apis/autoscaling/zz_generated.deepcopy.go index eee5fd43e1d..9774a760de0 100644 --- a/pkg/apis/autoscaling/zz_generated.deepcopy.go +++ b/pkg/apis/autoscaling/zz_generated.deepcopy.go @@ -21,11 +21,12 @@ limitations under the License. package autoscaling import ( + reflect "reflect" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/apis/batch/v1/BUILD b/pkg/apis/batch/v1/BUILD index 44960a30f1e..9271847ced6 100644 --- a/pkg/apis/batch/v1/BUILD +++ b/pkg/apis/batch/v1/BUILD @@ -50,6 +50,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/apis/batch/install:go_default_library", "//pkg/apis/batch/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/pkg/apis/batch/v1/generated.pb.go b/pkg/apis/batch/v1/generated.pb.go index 7dbda3e3c4e..4ac5dc089f7 100644 --- a/pkg/apis/batch/v1/generated.pb.go +++ b/pkg/apis/batch/v1/generated.pb.go @@ -468,7 +468,7 @@ func (this *Job) String() string { return "nil" } s := strings.Join([]string{`&Job{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1520,60 +1520,61 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 879 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x6f, 0xe3, 0x44, - 0x14, 0xcf, 0x47, 0xd3, 0x4d, 0xa6, 0x1f, 0xbb, 0x8c, 0x54, 0x29, 0xf4, 0x90, 0xac, 0x02, 0x42, - 0x0b, 0xda, 0xb5, 0x95, 0xee, 0x0a, 0x21, 0x0e, 0x48, 0xb8, 0x08, 0x89, 0xaa, 0x65, 0xab, 0x49, - 0x05, 0x88, 0x8f, 0xc3, 0xd8, 0x7e, 0x4d, 0x87, 0xda, 0x1e, 0xcb, 0x33, 0x8e, 0xd4, 0x1b, 0x37, - 0xae, 0xfc, 0x31, 0x08, 0xf1, 0x27, 0xf4, 0xd8, 0x23, 0xa7, 0x88, 0x9a, 0xff, 0x62, 0x4f, 0x68, - 0xc6, 0xe3, 0x8f, 0x34, 0x69, 0xc9, 0x72, 0xb3, 0xdf, 0xbc, 0xdf, 0xef, 0x7d, 0xfd, 0xde, 0x43, - 0x2f, 0x2f, 0x3f, 0x11, 0x16, 0xe3, 0xf6, 0x65, 0xea, 0x42, 0x12, 0x81, 0x04, 0x61, 0xc7, 0x97, - 0x53, 0x9b, 0xc6, 0x4c, 0xd8, 0x2e, 0x95, 0xde, 0x85, 0x3d, 0x1b, 0xdb, 0x53, 0x88, 0x20, 0xa1, - 0x12, 0x7c, 0x2b, 0x4e, 0xb8, 0xe4, 0xf8, 0xbd, 0x1c, 0x64, 0x55, 0x20, 0x2b, 0xbe, 0x9c, 0x5a, - 0x0a, 0x64, 0x69, 0x90, 0x35, 0x1b, 0xef, 0xbf, 0x98, 0x32, 0x79, 0x91, 0xba, 0x96, 0xc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x95, 0x4a, 0x28, 0xac, 0xa4, 0x24, 0x1c, 0xfd, 0xde, 0x46, 0xbd, 0xf2, 0xd8, 0x60, 0x40, - 0xc8, 0x2b, 0x16, 0x5a, 0xf4, 0x9b, 0x5a, 0x1c, 0xe3, 0x75, 0xc5, 0x51, 0x9e, 0x82, 0xea, 0xc2, - 0x96, 0x26, 0x41, 0x6a, 0xc4, 0xf8, 0x5b, 0xd4, 0x13, 0x92, 0x26, 0x52, 0xaf, 0x6a, 0xeb, 0xad, - 0x57, 0x75, 0x27, 0x9b, 0x0f, 0x7b, 0x93, 0x82, 0x80, 0x54, 0x5c, 0xf8, 0x1c, 0xed, 0x56, 0x2a, - 0xf9, 0x9f, 0x67, 0x47, 0x8f, 0xe4, 0x70, 0x81, 0x85, 0xdc, 0x61, 0x55, 0xcb, 0x9f, 0xcb, 0x48, - 0x6b, 0xa5, 0x53, 0x2d, 0x7f, 0xae, 0x39, 0x62, 0x5e, 0xb1, 0x8d, 0x7a, 0x22, 0xf5, 0x3c, 0x00, - 0x1f, 0x7c, 0x3d, 0xf1, 0x8e, 0xf3, 0x8e, 0x71, 0xed, 0x4d, 0x8a, 0x07, 0x52, 0xf9, 0x28, 0xe2, - 0x73, 0xca, 0x02, 0xf0, 0xf5, 0xa4, 0x6b, 0xc4, 0x5f, 0x6a, 0x2b, 0x31, 0xaf, 0xce, 0xfb, 0xd7, - 0xb7, 0x83, 0xc6, 0xcd, 0xed, 0xa0, 0xf1, 0xd7, 0xed, 0xa0, 0xf1, 0x4b, 0x36, 0x68, 0x5e, 0x67, - 0x83, 0xe6, 0x4d, 0x36, 0x68, 0xfe, 0x9d, 0x0d, 0x9a, 0xbf, 0xfd, 0x33, 0x68, 0x7c, 0xdf, 0x9a, - 0x8d, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x15, 0xe7, 0x70, 0xeb, 0x08, 0x00, 0x00, + // 881 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x54, 0xdd, 0x6e, 0xe3, 0x44, + 0x14, 0xce, 0x4f, 0xd3, 0x26, 0x93, 0xb6, 0xbb, 0x8c, 0x54, 0x29, 0xf4, 0x22, 0x59, 0x05, 0x84, + 0x0a, 0xda, 0xb5, 0x49, 0x77, 0x85, 0x10, 0x17, 0x48, 0xb8, 0x08, 0x89, 0xaa, 0x65, 0xab, 0x49, + 0x05, 0x12, 0x3f, 0x12, 0x63, 0xfb, 0x34, 0x1d, 0x6a, 0x7b, 0x2c, 0xcf, 0x38, 0x52, 0xef, 0x78, + 0x03, 0x78, 0x18, 0x84, 0x78, 0x84, 0x5e, 0xf6, 0x92, 0xab, 0x88, 0x9a, 0xb7, 0xd8, 0x2b, 0x34, + 0xe3, 0x89, 0xed, 0x34, 0x29, 0xa4, 0xdc, 0xd9, 0x67, 0xbe, 0xef, 0x3b, 0x67, 0xce, 0xf9, 0xce, + 0xa0, 0x97, 0x57, 0x1f, 0x0b, 0x8b, 0x71, 0xfb, 0x2a, 0x75, 0x21, 0x89, 0x40, 0x82, 0xb0, 0xe3, + 0xab, 0x89, 0x4d, 0x63, 0x26, 0x6c, 0x97, 0x4a, 0xef, 0xd2, 0x9e, 0x8e, 0xec, 0x09, 0x44, 0x90, + 0x50, 0x09, 0xbe, 0x15, 0x27, 0x5c, 0x72, 0xfc, 0x4e, 0x4e, 0xb2, 0x4a, 0x92, 0x15, 0x5f, 0x4d, + 0x2c, 0x45, 0xb2, 0x34, 0xc9, 0x9a, 0x8e, 0xf6, 0x5f, 0x4c, 0x98, 0xbc, 0x4c, 0x5d, 0xcb, 0xe3, + 0xa1, 0x3d, 0xe1, 0x13, 0x6e, 0x6b, 0xae, 0x9b, 0x5e, 0xe8, 0x3f, 0xfd, 0xa3, 0xbf, 0x72, 0xcd, + 0xfd, 0x57, 0xa6, 0x10, 0x1a, 0xb3, 0x90, 0x7a, 0x97, 0x2c, 0x82, 0xe4, 0x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0x0a, 0xca, + 0x17, 0xb6, 0x08, 0x09, 0x52, 0x11, 0xc6, 0xdf, 0xa0, 0x8e, 0x90, 0x34, 0x91, 0x7a, 0x55, 0x1b, + 0x8f, 0x5e, 0xd5, 0x9d, 0x6c, 0x36, 0xe8, 0x8c, 0xe7, 0x02, 0xa4, 0xd4, 0xc2, 0x17, 0x68, 0xb7, + 0x74, 0xc9, 0xff, 0x7c, 0x76, 0xf4, 0x48, 0x8e, 0x16, 0x54, 0xc8, 0x3d, 0x55, 0xb5, 0xfc, 0xb9, + 0x8d, 0xb4, 0x57, 0x5a, 0xe5, 0xf2, 0xe7, 0x9e, 0x23, 0xe6, 0x14, 0xdb, 0xa8, 0x23, 0x52, 0xcf, + 0x03, 0xf0, 0xc1, 0xd7, 0x13, 0x6f, 0x39, 0x6f, 0x19, 0x68, 0x67, 0x3c, 0x3f, 0x20, 0x25, 0x46, + 0x09, 0x5f, 0x50, 0x16, 0x80, 0xaf, 0x27, 0x5d, 0x11, 0xfe, 0x42, 0x47, 0x89, 0x39, 0x75, 0xde, + 0xbd, 0xb9, 0xeb, 0xd7, 0x6e, 0xef, 0xfa, 0xb5, 0x3f, 0xef, 0xfa, 0xb5, 0x9f, 0xb3, 0x7e, 0xfd, + 0x26, 0xeb, 0xd7, 0x6f, 0xb3, 0x7e, 0xfd, 0xaf, 0xac, 0x5f, 0xff, 0xf5, 0xef, 0x7e, 0xed, 0xdb, + 0xc6, 0x74, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x9a, 0xe5, 0xae, 0xf3, 0x08, 0x00, + 0x00, } diff --git a/pkg/apis/batch/v1/generated.proto b/pkg/apis/batch/v1/generated.proto index f159250bdec..2d84a5001d1 100644 --- a/pkg/apis/batch/v1/generated.proto +++ b/pkg/apis/batch/v1/generated.proto @@ -36,7 +36,7 @@ message Job { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/pkg/apis/batch/v1/types.generated.go b/pkg/apis/batch/v1/types.generated.go index 3510c59c724..6c0848fcc3b 100644 --- a/pkg/apis/batch/v1/types.generated.go +++ b/pkg/apis/batch/v1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" + pkg2_types "k8s.io/apimachinery/pkg/types" pkg4_resource "k8s.io/kubernetes/pkg/api/resource" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID + var v1 pkg2_types.UID var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v3 pkg3_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -164,7 +164,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -174,7 +180,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -298,24 +310,30 @@ func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -328,16 +346,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -345,21 +363,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -367,38 +385,44 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -406,16 +430,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -423,21 +447,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1175,7 +1199,7 @@ func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv14 := &x.Template yyv14.CodecDecodeSelf(d) @@ -1337,7 +1361,7 @@ func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv26 := &x.Template yyv26.CodecDecodeSelf(d) diff --git a/pkg/apis/batch/v1/zz_generated.conversion.go b/pkg/apis/batch/v1/zz_generated.conversion.go index e8bdd154884..e90b252881f 100644 --- a/pkg/apis/batch/v1/zz_generated.conversion.go +++ b/pkg/apis/batch/v1/zz_generated.conversion.go @@ -52,10 +52,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -70,10 +67,7 @@ func Convert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) er } func autoConvert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/pkg/apis/batch/v1/zz_generated.deepcopy.go b/pkg/apis/batch/v1/zz_generated.deepcopy.go index ed95a29b506..a5f0163a4e1 100644 --- a/pkg/apis/batch/v1/zz_generated.deepcopy.go +++ b/pkg/apis/batch/v1/zz_generated.deepcopy.go @@ -49,8 +49,10 @@ func DeepCopy_v1_Job(in interface{}, out interface{}, c *conversion.Cloner) erro in := in.(*Job) out := out.(*Job) *out = *in - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/pkg/apis/batch/v2alpha1/BUILD b/pkg/apis/batch/v2alpha1/BUILD index 2e5b2ddb076..74289a4b556 100644 --- a/pkg/apis/batch/v2alpha1/BUILD +++ b/pkg/apis/batch/v2alpha1/BUILD @@ -50,6 +50,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/apis/batch/install:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/pkg/apis/batch/v2alpha1/generated.pb.go b/pkg/apis/batch/v2alpha1/generated.pb.go index f50fd8d9de5..0b46e65e074 100644 --- a/pkg/apis/batch/v2alpha1/generated.pb.go +++ b/pkg/apis/batch/v2alpha1/generated.pb.go @@ -821,7 +821,7 @@ func (this *CronJob) String() string { return "nil" } s := strings.Join([]string{`&CronJob{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CronJobSpec", "CronJobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CronJobStatus", "CronJobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -869,7 +869,7 @@ func (this *Job) String() string { return "nil" } s := strings.Join([]string{`&Job{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -937,7 +937,7 @@ func (this *JobTemplate) String() string { return "nil" } s := strings.Join([]string{`&JobTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -948,7 +948,7 @@ func (this *JobTemplateSpec) String() string { return "nil" } s := strings.Join([]string{`&JobTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -2708,77 +2708,77 @@ var ( var fileDescriptorGenerated = []byte{ // 1158 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x56, 0x4b, 0x6f, 0x23, 0x45, - 0x10, 0xce, 0xd8, 0x89, 0x1f, 0xed, 0xcd, 0xab, 0x21, 0x5a, 0x13, 0x24, 0x3b, 0xb2, 0x04, 0xca, - 0xae, 0x76, 0x67, 0x14, 0x13, 0x2d, 0xcb, 0x1e, 0x90, 0x76, 0x82, 0x90, 0x88, 0x12, 0x6d, 0xd4, - 0xce, 0xb2, 0x2b, 0x08, 0x12, 0xed, 0x71, 0xc7, 0x9e, 0xcd, 0xcc, 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c6, 0xcf, 0x79, 0x50, 0x4e, 0xb7, 0xc6, 0x09, 0x00, - 0x56, 0xfc, 0xac, 0x99, 0xda, 0x1c, 0x1f, 0xce, 0x26, 0x91, 0x64, 0x2c, 0xa4, 0x93, 0x37, 0x31, - 0x31, 0x94, 0xa1, 0x87, 0x2f, 0x40, 0x59, 0xee, 0x71, 0xf9, 0x6c, 0x73, 0x33, 0x3f, 0xdb, 0xc5, - 0xa8, 0x5f, 0x2f, 0xb7, 0x62, 0x02, 0x94, 0x72, 0xc1, 0x63, 0xb0, 0x94, 0x6a, 0xe5, 0x96, 0x23, - 0x48, 0x36, 0x66, 0x67, 0x88, 0x05, 0x8d, 0xb0, 0x8a, 0x41, 0xa0, 0x76, 0xec, 0xbc, 0x94, 0xec, - 0xb4, 0xa5, 0x69, 0x80, 0x32, 0x0b, 0x2d, 0x8b, 0x90, 0x0e, 0xe9, 0xc8, 0xbe, 0x2f, 0x98, 0xab, - 0xca, 0xb5, 0xdc, 0x8a, 0x0f, 0x50, 0xea, 0x23, 0x88, 0x8f, 0xb1, 0xed, 0x90, 0x8e, 0xec, 0x77, - 0x86, 0xf8, 0x53, 0x69, 0x45, 0xea, 0xb4, 0xf1, 0xbb, 0x06, 0xb2, 0xff, 0x09, 0xde, 0xe0, 0x9e, - 0xec, 0x65, 0x34, 0x98, 0xfb, 0xd7, 0x7f, 0x68, 0xae, 0x13, 0xe4, 0xaf, 0x1a, 0x58, 0x1e, 0xf1, - 0xff, 0xbf, 0xed, 0x7f, 0xf3, 0xfe, 0xf9, 0x65, 0x6d, 0xee, 0xe2, 0xb2, 0x36, 0xf7, 0xe7, 0x65, - 0x6d, 0xee, 0xdb, 0xa8, 0xa6, 0x9d, 0x47, 0x35, 0xed, 0x22, 0xaa, 0x69, 0x7f, 0x45, 0x35, 0xed, - 0xfb, 0xbf, 0x6b, 0x73, 0x5f, 0x94, 0x62, 0x9e, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x00, 0x9d, - 0xf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 0xc5, 0xdc, 0x7f, 0xfe, 0xc1, 0xb9, 0x4e, 0x98, 0xbf, 0x2b, 0x60, 0x65, 0xc4, 0xff, + 0xff, 0xfa, 0x3f, 0xa0, 0x3f, 0x38, 0xbf, 0xac, 0xcd, 0x5d, 0x5c, 0xd6, 0xe6, 0xfe, 0xbc, 0xac, + 0xcd, 0x7d, 0x17, 0xd6, 0x94, 0xf3, 0xb0, 0xa6, 0x5c, 0x84, 0x35, 0xe5, 0xef, 0xb0, 0xa6, 0xfc, + 0xf0, 0x4f, 0x6d, 0xee, 0xab, 0x52, 0xcc, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0x36, + 0x56, 0x74, 0x1a, 0x0f, 0x00, 0x00, } diff --git a/pkg/apis/batch/v2alpha1/generated.proto b/pkg/apis/batch/v2alpha1/generated.proto index 67194ebb393..1654920fb56 100644 --- a/pkg/apis/batch/v2alpha1/generated.proto +++ b/pkg/apis/batch/v2alpha1/generated.proto @@ -36,7 +36,7 @@ message CronJob { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job, including the schedule. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -100,7 +100,7 @@ message Job { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -235,7 +235,7 @@ message JobTemplate { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Template defines jobs that will be created from this template // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -248,7 +248,7 @@ message JobTemplateSpec { // Standard object's metadata of the jobs created from this template. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/pkg/apis/batch/v2alpha1/types.generated.go b/pkg/apis/batch/v2alpha1/types.generated.go index 81bef84aeaa..582786d71fa 100644 --- a/pkg/apis/batch/v2alpha1/types.generated.go +++ b/pkg/apis/batch/v2alpha1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" + pkg2_types "k8s.io/apimachinery/pkg/types" pkg4_resource "k8s.io/kubernetes/pkg/api/resource" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID + var v1 pkg2_types.UID var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v3 pkg3_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -164,7 +164,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -174,7 +180,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -298,24 +310,30 @@ func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -328,16 +346,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -345,21 +363,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -367,38 +385,44 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -406,16 +430,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -423,21 +447,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -898,7 +922,13 @@ func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -908,7 +938,13 @@ func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1015,17 +1051,23 @@ func (x *JobTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "template": if r.TryDecodeAsNil() { x.Template = JobTemplateSpec{} } else { - yyv9 := &x.Template - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Template + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1038,16 +1080,16 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1055,21 +1097,21 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1077,38 +1119,44 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1116,21 +1164,21 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = JobTemplateSpec{} } else { - yyv16 := &x.Template - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1171,7 +1219,13 @@ func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[0] { yy4 := &x.ObjectMeta - yy4.CodecEncodeSelf(e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } } else { r.EncodeNil() } @@ -1181,7 +1235,13 @@ func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy6 := &x.ObjectMeta - yy6.CodecEncodeSelf(e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } } } if yyr2 || yy2arr2 { @@ -1264,17 +1324,23 @@ func (x *JobTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { switch yys3 { case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv4 := &x.ObjectMeta - yyv4.CodecDecodeSelf(d) + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv5 := &x.Spec - yyv5.CodecDecodeSelf(d) + yyv6 := &x.Spec + yyv6.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1287,33 +1353,39 @@ func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv7 := &x.ObjectMeta - yyv7.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1321,21 +1393,21 @@ func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv8 := &x.Spec - yyv8.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj6-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1705,7 +1777,7 @@ func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv14 := &x.Template yyv14.CodecDecodeSelf(d) @@ -1867,7 +1939,7 @@ func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv26 := &x.Template yyv26.CodecDecodeSelf(d) @@ -3037,7 +3109,13 @@ func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -3047,7 +3125,13 @@ func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -3171,24 +3255,30 @@ func (x *CronJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = CronJobSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = CronJobStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -3201,16 +3291,16 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3218,21 +3308,21 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3240,38 +3330,44 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3279,16 +3375,16 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = CronJobSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3296,21 +3392,21 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = CronJobStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4156,7 +4252,7 @@ func (x *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym4 if false { } else { - h.encSlicev1_ObjectReference(([]pkg2_v1.ObjectReference)(x.Active), e) + h.encSlicev1_ObjectReference(([]pkg3_v1.ObjectReference)(x.Active), e) } } } else { @@ -4174,7 +4270,7 @@ func (x *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym5 if false { } else { - h.encSlicev1_ObjectReference(([]pkg2_v1.ObjectReference)(x.Active), e) + h.encSlicev1_ObjectReference(([]pkg3_v1.ObjectReference)(x.Active), e) } } } @@ -4292,7 +4388,7 @@ func (x *CronJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { _ = yym5 if false { } else { - h.decSlicev1_ObjectReference((*[]pkg2_v1.ObjectReference)(yyv4), d) + h.decSlicev1_ObjectReference((*[]pkg3_v1.ObjectReference)(yyv4), d) } } case "lastScheduleTime": @@ -4349,7 +4445,7 @@ func (x *CronJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { _ = yym10 if false { } else { - h.decSlicev1_ObjectReference((*[]pkg2_v1.ObjectReference)(yyv9), d) + h.decSlicev1_ObjectReference((*[]pkg3_v1.ObjectReference)(yyv9), d) } } yyj8++ @@ -4756,7 +4852,7 @@ func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) { } } -func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg2_v1.ObjectReference, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg3_v1.ObjectReference, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -4769,7 +4865,7 @@ func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg2_v1.ObjectReference, z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg3_v1.ObjectReference, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -4780,7 +4876,7 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference _ = yyc1 if yyl1 == 0 { if yyv1 == nil { - yyv1 = []pkg2_v1.ObjectReference{} + yyv1 = []pkg3_v1.ObjectReference{} yyc1 = true } else if len(yyv1) != 0 { yyv1 = yyv1[:0] @@ -4800,10 +4896,10 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { - yyv1 = make([]pkg2_v1.ObjectReference, yyrl1) + yyv1 = make([]pkg3_v1.ObjectReference, yyrl1) } } else { - yyv1 = make([]pkg2_v1.ObjectReference, yyrl1) + yyv1 = make([]pkg3_v1.ObjectReference, yyrl1) } yyc1 = true yyrr1 = len(yyv1) @@ -4818,7 +4914,7 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference for ; yyj1 < yyrr1; yyj1++ { yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.ObjectReference{} + yyv1[yyj1] = pkg3_v1.ObjectReference{} } else { yyv2 := &yyv1[yyj1] yyv2.CodecDecodeSelf(d) @@ -4827,10 +4923,10 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference } if yyrt1 { for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, pkg2_v1.ObjectReference{}) + yyv1 = append(yyv1, pkg3_v1.ObjectReference{}) yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.ObjectReference{} + yyv1[yyj1] = pkg3_v1.ObjectReference{} } else { yyv3 := &yyv1[yyj1] yyv3.CodecDecodeSelf(d) @@ -4844,13 +4940,13 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference for ; !r.CheckBreak(); yyj1++ { if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, pkg2_v1.ObjectReference{}) // var yyz1 pkg2_v1.ObjectReference + yyv1 = append(yyv1, pkg3_v1.ObjectReference{}) // var yyz1 pkg3_v1.ObjectReference yyc1 = true } yyh1.ElemContainerState(yyj1) if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.ObjectReference{} + yyv1[yyj1] = pkg3_v1.ObjectReference{} } else { yyv4 := &yyv1[yyj1] yyv4.CodecDecodeSelf(d) @@ -4865,7 +4961,7 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []pkg2_v1.ObjectReference{} + yyv1 = []pkg3_v1.ObjectReference{} yyc1 = true } } diff --git a/pkg/apis/batch/v2alpha1/zz_generated.conversion.go b/pkg/apis/batch/v2alpha1/zz_generated.conversion.go index 6d12fb0f90d..efea0a5aa0a 100644 --- a/pkg/apis/batch/v2alpha1/zz_generated.conversion.go +++ b/pkg/apis/batch/v2alpha1/zz_generated.conversion.go @@ -64,10 +64,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -82,10 +79,7 @@ func Convert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, } func autoConvert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -190,10 +184,7 @@ func Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStat } func autoConvert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -208,10 +199,7 @@ func Convert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Sco } func autoConvert_batch_Job_To_v2alpha1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -346,10 +334,7 @@ func Convert_batch_JobStatus_To_v2alpha1_JobStatus(in *batch.JobStatus, out *Job } func autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -361,10 +346,7 @@ func Convert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *bat } func autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -376,10 +358,7 @@ func Convert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, ou } func autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -391,10 +370,7 @@ func Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSp } func autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go b/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go index 5022416bc16..ed3558b8fab 100644 --- a/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v2alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" + api_v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -55,8 +55,10 @@ func DeepCopy_v2alpha1_CronJob(in interface{}, out interface{}, c *conversion.Cl in := in.(*CronJob) out := out.(*CronJob) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -115,14 +117,14 @@ func DeepCopy_v2alpha1_CronJobStatus(in interface{}, out interface{}, c *convers *out = *in if in.Active != nil { in, out := &in.Active, &out.Active - *out = make([]v1.ObjectReference, len(*in)) + *out = make([]api_v1.ObjectReference, len(*in)) for i := range *in { (*out)[i] = (*in)[i] } } if in.LastScheduleTime != nil { in, out := &in.LastScheduleTime, &out.LastScheduleTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } return nil @@ -134,8 +136,10 @@ func DeepCopy_v2alpha1_Job(in interface{}, out interface{}, c *conversion.Cloner in := in.(*Job) out := out.(*Job) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -201,7 +205,7 @@ func DeepCopy_v2alpha1_JobSpec(in interface{}, out interface{}, c *conversion.Cl if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } if in.ManualSelector != nil { @@ -209,7 +213,7 @@ func DeepCopy_v2alpha1_JobSpec(in interface{}, out interface{}, c *conversion.Cl *out = new(bool) **out = **in } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -232,12 +236,12 @@ func DeepCopy_v2alpha1_JobStatus(in interface{}, out interface{}, c *conversion. } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } if in.CompletionTime != nil { in, out := &in.CompletionTime, &out.CompletionTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } return nil @@ -249,8 +253,10 @@ func DeepCopy_v2alpha1_JobTemplate(in interface{}, out interface{}, c *conversio in := in.(*JobTemplate) out := out.(*JobTemplate) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -264,8 +270,10 @@ func DeepCopy_v2alpha1_JobTemplateSpec(in interface{}, out interface{}, c *conve in := in.(*JobTemplateSpec) out := out.(*JobTemplateSpec) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/pkg/apis/batch/validation/validation_test.go b/pkg/apis/batch/validation/validation_test.go index b34f28d3b51..bd687642aa8 100644 --- a/pkg/apis/batch/validation/validation_test.go +++ b/pkg/apis/batch/validation/validation_test.go @@ -34,7 +34,7 @@ func getValidManualSelector() *metav1.LabelSelector { func getValidPodTemplateSpecForManual(selector *metav1.LabelSelector) api.PodTemplateSpec { return api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: selector.MatchLabels, }, Spec: api.PodSpec{ @@ -53,7 +53,7 @@ func getValidGeneratedSelector() *metav1.LabelSelector { func getValidPodTemplateSpecForGenerated(selector *metav1.LabelSelector) api.PodTemplateSpec { return api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: selector.MatchLabels, }, Spec: api.PodSpec{ @@ -72,7 +72,7 @@ func TestValidateJob(t *testing.T) { successCases := map[string]batch.Job{ "manual selector": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -84,7 +84,7 @@ func TestValidateJob(t *testing.T) { }, }, "generated selector": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -104,7 +104,7 @@ func TestValidateJob(t *testing.T) { negative64 := int64(-1) errorCases := map[string]batch.Job{ "spec.parallelism:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -116,7 +116,7 @@ func TestValidateJob(t *testing.T) { }, }, "spec.completions:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -128,7 +128,7 @@ func TestValidateJob(t *testing.T) { }, }, "spec.activeDeadlineSeconds:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -140,7 +140,7 @@ func TestValidateJob(t *testing.T) { }, }, "spec.selector:Required value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -150,7 +150,7 @@ func TestValidateJob(t *testing.T) { }, }, "spec.template.metadata.labels: Invalid value: {\"y\":\"z\"}: `selector` does not match template `labels`": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -159,7 +159,7 @@ func TestValidateJob(t *testing.T) { Selector: validManualSelector, ManualSelector: newBool(true), Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"y": "z"}, }, Spec: api.PodSpec{ @@ -171,7 +171,7 @@ func TestValidateJob(t *testing.T) { }, }, "spec.template.metadata.labels: Invalid value: {\"controller-uid\":\"4d5e6f\"}: `selector` does not match template `labels`": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -180,7 +180,7 @@ func TestValidateJob(t *testing.T) { Selector: validManualSelector, ManualSelector: newBool(true), Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"controller-uid": "4d5e6f"}, }, Spec: api.PodSpec{ @@ -192,7 +192,7 @@ func TestValidateJob(t *testing.T) { }, }, "spec.template.spec.restartPolicy: Unsupported value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -201,7 +201,7 @@ func TestValidateJob(t *testing.T) { Selector: validManualSelector, ManualSelector: newBool(true), Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validManualSelector.MatchLabels, }, Spec: api.PodSpec{ @@ -237,7 +237,7 @@ func TestValidateJobUpdateStatus(t *testing.T) { successCases := []testcase{ { old: batch.Job{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Status: batch.JobStatus{ Active: 1, Succeeded: 2, @@ -245,7 +245,7 @@ func TestValidateJobUpdateStatus(t *testing.T) { }, }, update: batch.Job{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Status: batch.JobStatus{ Active: 1, Succeeded: 1, @@ -266,7 +266,7 @@ func TestValidateJobUpdateStatus(t *testing.T) { errorCases := map[string]testcase{ "[status.active: Invalid value: -1: must be greater than or equal to 0, status.succeeded: Invalid value: -2: must be greater than or equal to 0]": { old: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -278,7 +278,7 @@ func TestValidateJobUpdateStatus(t *testing.T) { }, }, update: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -311,7 +311,7 @@ func TestValidateCronJob(t *testing.T) { successCases := map[string]batch.CronJob{ "basic scheduled job": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -327,7 +327,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "non-standard scheduled": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -354,7 +354,7 @@ func TestValidateCronJob(t *testing.T) { errorCases := map[string]batch.CronJob{ "spec.schedule: Invalid value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -370,7 +370,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.schedule: Required value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -386,7 +386,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.startingDeadlineSeconds:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -403,7 +403,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.concurrencyPolicy: Required value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -418,7 +418,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.parallelism:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -435,7 +435,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.completions:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -453,7 +453,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.activeDeadlineSeconds:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -470,7 +470,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.selector: Invalid value: {\"matchLabels\":{\"a\":\"b\"}}: `selector` will be auto-generated": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -487,7 +487,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.manualSelector: Unsupported value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), @@ -504,7 +504,7 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.template.spec.restartPolicy: Unsupported value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, UID: types.UID("1a2b3c"), diff --git a/pkg/apis/batch/zz_generated.deepcopy.go b/pkg/apis/batch/zz_generated.deepcopy.go index 11e44c96c8e..0e2a64916ae 100644 --- a/pkg/apis/batch/zz_generated.deepcopy.go +++ b/pkg/apis/batch/zz_generated.deepcopy.go @@ -21,11 +21,12 @@ limitations under the License. package batch import ( + reflect "reflect" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/apis/certificates/types.go b/pkg/apis/certificates/types.go index f87370e7907..4aee19f2c5a 100644 --- a/pkg/apis/certificates/types.go +++ b/pkg/apis/certificates/types.go @@ -16,10 +16,7 @@ limitations under the License. package certificates -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true // +nonNamespaced=true diff --git a/pkg/apis/certificates/v1alpha1/generated.pb.go b/pkg/apis/certificates/v1alpha1/generated.pb.go index aaf4adc5135..2a25a26a667 100644 --- a/pkg/apis/certificates/v1alpha1/generated.pb.go +++ b/pkg/apis/certificates/v1alpha1/generated.pb.go @@ -431,7 +431,7 @@ func (this *CertificateSigningRequest) String() string { return "nil" } s := strings.Join([]string{`&CertificateSigningRequest{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CertificateSigningRequestSpec", "CertificateSigningRequestSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CertificateSigningRequestStatus", "CertificateSigningRequestStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1328,51 +1328,51 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 735 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0xbf, 0x4f, 0x1b, 0x49, - 0x14, 0xf6, 0xda, 0xc6, 0xd8, 0x63, 0x0e, 0x4e, 0xa3, 0x13, 0xf2, 0x21, 0xb1, 0x46, 0xd6, 0xdd, - 0xc9, 0x87, 0xb8, 0xdd, 0xb3, 0x15, 0x45, 0x94, 0xd1, 0x12, 0x29, 0x42, 0x80, 0x50, 0x06, 0x2c, - 0x45, 0x51, 0x9a, 0xf1, 0xfa, 0xb1, 0x1e, 0xcc, 0xfe, 0x60, 0x67, 0x16, 0xc9, 0x5d, 0xca, 0x94, - 0xf9, 0x07, 0xf2, 0xff, 0x50, 0x52, 0xa6, 0x72, 0x82, 0x29, 0x53, 0xa4, 0xa7, 0x8a, 0x66, 0x3c, - 0x6b, 0x3b, 0x18, 0x87, 0x44, 0xa2, 0xf3, 0x7c, 0xf3, 0xde, 0xf7, 0xbd, 0xf9, 0xde, 0xb7, 0x46, - 0xcf, 0x7a, 0xdb, 0xdc, 0x62, 0xa1, 0xdd, 0x4b, 0xda, 0x10, 0x07, 0x20, 0x80, 0xdb, 0x51, 0xcf, - 0xb3, 0x69, 0xc4, 0xb8, 0xed, 0x42, 0x2c, 0xd8, 0x09, 0x73, 0xa9, 0x44, 0x2f, 0x1a, 0xf4, 0x2c, - 0xea, 0xd2, 0x86, 0xed, 0x41, 0x00, 0x31, 0x15, 0xd0, 0xb1, 0xa2, 0x38, 0x14, 0x21, 0xfe, 0x7f, - 0xc4, 0x60, 0x4d, 0x18, 0xac, 0xa8, 0xe7, 0x59, 0x92, 0xc1, 0x9a, 0x66, 0xb0, 0x52, 0x86, 0xb5, - 0xff, 0x3c, 0x26, 0xba, 0x49, 0xdb, 0x72, 0x43, 0xdf, 0xf6, 0x42, 0x2f, 0xb4, 0x15, 0x51, 0x3b, - 0x39, 0x51, 0x27, 0x75, 0x50, 0xbf, 0x46, 0x02, 0x6b, 0x4f, 0xf4, 0x88, 0x34, 0x62, 0x3e, 0x75, - 0xbb, 0x2c, 0x80, 0xb8, 0x3f, 0x19, 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 0x0e, 0xa8, 0x0f, 0x7a, 0xf7, 0xe3, 0x87, 0xb6, 0x34, 0x4e, 0xc6, 0x15, - 0x78, 0x1d, 0xe5, 0x12, 0xd6, 0xd1, 0xbb, 0x2f, 0xeb, 0xc2, 0x5c, 0x6b, 0xf7, 0x39, 0x91, 0x38, - 0xae, 0xa1, 0x82, 0x17, 0x87, 0x49, 0xc4, 0x2b, 0xf9, 0x8d, 0x5c, 0xbd, 0xe4, 0x20, 0x19, 0xa1, - 0x17, 0x0a, 0x21, 0xfa, 0x06, 0x37, 0x51, 0xb1, 0x07, 0xfd, 0x96, 0xca, 0xd0, 0x82, 0xaa, 0x5a, - 0x95, 0x55, 0x0a, 0xe0, 0xb7, 0x83, 0x6a, 0x71, 0x4f, 0xdf, 0x92, 0x71, 0x5d, 0xed, 0x93, 0x81, - 0xaa, 0x0f, 0x7c, 0x3b, 0xf8, 0x9d, 0x81, 0x90, 0x9b, 0x46, 0x9b, 0x57, 0x0c, 0xb5, 0x89, 0xe3, - 0x47, 0xdc, 0xc4, 0xf8, 0xbb, 0x99, 0xfc, 0x35, 0x8d, 0x21, 0x4e, 0xa6, 0xb4, 0x71, 0x03, 0x95, - 0xa7, 0xb8, 0x95, 0xad, 0x4b, 0xce, 0xca, 0x70, 0x50, 0x2d, 0x4f, 0x91, 0x93, 0xe9, 0x1a, 0x67, - 0xf3, 0xf2, 0xda, 0xcc, 0x5c, 0x5d, 0x9b, 0x99, 0x8f, 0xd7, 0x66, 0xe6, 0xed, 0xd0, 0x34, 0x2e, - 0x87, 0xa6, 0x71, 0x35, 0x34, 0x8d, 0xcf, 0x43, 0xd3, 0x78, 0x7f, 0x63, 0x66, 0x5e, 0x17, 0xd3, - 0x09, 0xbf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x55, 0xe5, 0xc0, 0xfd, 0x4b, 0x07, 0x00, 0x00, + // 729 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88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0x28, 0x9f, 0x70, 0x88, 0x03, 0xea, + 0x83, 0xde, 0xfd, 0xb0, 0xd1, 0xba, 0xc6, 0xc9, 0x90, 0x81, 0x97, 0x51, 0x26, 0x61, 0x4d, 0xbd, + 0xfb, 0xa2, 0x26, 0x66, 0xea, 0xdb, 0x6f, 0x88, 0xc4, 0x71, 0x05, 0xe5, 0xbc, 0x38, 0x4c, 0x22, + 0x5e, 0xca, 0xae, 0x64, 0x56, 0x0b, 0x0e, 0x92, 0x27, 0xf4, 0x56, 0x21, 0x44, 0x47, 0x70, 0x0d, + 0xe5, 0xdb, 0xd0, 0xa9, 0xab, 0x1b, 0x9a, 0x51, 0xac, 0x45, 0xc9, 0x52, 0x00, 0xbf, 0xee, 0x96, + 0xf3, 0x3b, 0x3a, 0x4a, 0x86, 0xbc, 0xca, 0x77, 0x03, 0x95, 0xef, 0xf8, 0x76, 0xf0, 0x67, 0x03, + 0x21, 0x77, 0x70, 0xda, 0xbc, 0x64, 0xa8, 0x4d, 0x1c, 0x3e, 0xe0, 0x26, 0x86, 0xdf, 0xcd, 0xe8, + 0xaf, 0x69, 0x08, 0x71, 0x32, 0xe6, 0x8d, 0xab, 0xa8, 0x38, 0xa6, 0xad, 0xc6, 0x3a, 0xe7, 0x2c, + 0xf4, 0xba, 0xe5, 0xe2, 0x98, 0x38, 0x19, 0xe7, 0x38, 0x6b, 0xe7, 0x97, 0x66, 0xea, 0xe2, 0xd2, + 0x4c, 0x7d, 0xbb, 0x34, 0x53, 0x9f, 0x7a, 0xa6, 0x71, 0xde, 0x33, 0x8d, 0x8b, 0x9e, 0x69, 0xfc, + 0xe8, 0x99, 0xc6, 0x97, 0x9f, 0x66, 0xea, 0x7d, 0x7e, 0x50, 0xe1, 0xef, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x5d, 0xda, 0xe2, 0x20, 0x53, 0x07, 0x00, 0x00, } diff --git a/pkg/apis/certificates/v1alpha1/generated.proto b/pkg/apis/certificates/v1alpha1/generated.proto index eb0ef771f90..f8bb067ff43 100644 --- a/pkg/apis/certificates/v1alpha1/generated.proto +++ b/pkg/apis/certificates/v1alpha1/generated.proto @@ -34,7 +34,7 @@ option go_package = "v1alpha1"; // Describes a certificate signing request message CertificateSigningRequest { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The certificate request itself and any additional information. // +optional diff --git a/pkg/apis/certificates/v1alpha1/types.generated.go b/pkg/apis/certificates/v1alpha1/types.generated.go index 88a8313390c..a8e21162ca6 100644 --- a/pkg/apis/certificates/v1alpha1/types.generated.go +++ b/pkg/apis/certificates/v1alpha1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -160,7 +158,13 @@ func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -170,7 +174,13 @@ func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -294,24 +304,30 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.D } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = CertificateSigningRequestSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = CertificateSigningRequestStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -324,16 +340,16 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -341,21 +357,21 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -363,38 +379,44 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -402,16 +424,16 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Spec = CertificateSigningRequestSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -419,21 +441,21 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Status = CertificateSigningRequestStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go b/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go index 3b25e69e85c..165c102717d 100644 --- a/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go @@ -49,10 +49,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -67,10 +64,7 @@ func Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigni } func autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go index 9bacf3501fd..5f8b4de7213 100644 --- a/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -48,8 +48,10 @@ func DeepCopy_v1alpha1_CertificateSigningRequest(in interface{}, out interface{} in := in.(*CertificateSigningRequest) out := out.(*CertificateSigningRequest) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/pkg/apis/certificates/zz_generated.deepcopy.go b/pkg/apis/certificates/zz_generated.deepcopy.go index 3e5d42edace..aa0fabde39a 100644 --- a/pkg/apis/certificates/zz_generated.deepcopy.go +++ b/pkg/apis/certificates/zz_generated.deepcopy.go @@ -21,10 +21,11 @@ limitations under the License. package certificates import ( + reflect "reflect" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/apis/extensions/v1beta1/defaults_test.go b/pkg/apis/extensions/v1beta1/defaults_test.go index a47d33d6c01..33119c13f33 100644 --- a/pkg/apis/extensions/v1beta1/defaults_test.go +++ b/pkg/apis/extensions/v1beta1/defaults_test.go @@ -41,7 +41,7 @@ func TestSetDefaultDaemonSet(t *testing.T) { SecurityContext: &v1.PodSecurityContext{}, TerminationGracePeriodSeconds: &period, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: defaultLabels, }, } @@ -64,7 +64,7 @@ func TestSetDefaultDaemonSet(t *testing.T) { }, }, expected: &DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: defaultLabels, }, Spec: DaemonSetSpec{ @@ -77,7 +77,7 @@ func TestSetDefaultDaemonSet(t *testing.T) { }, { // Labels change/defaulting test. original: &DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, @@ -87,7 +87,7 @@ func TestSetDefaultDaemonSet(t *testing.T) { }, }, expected: &DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, @@ -293,7 +293,7 @@ func TestSetDefaultReplicaSet(t *testing.T) { rs: &ReplicaSet{ Spec: ReplicaSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -306,14 +306,14 @@ func TestSetDefaultReplicaSet(t *testing.T) { }, { rs: &ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, }, Spec: ReplicaSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -326,7 +326,7 @@ func TestSetDefaultReplicaSet(t *testing.T) { }, { rs: &ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, @@ -338,7 +338,7 @@ func TestSetDefaultReplicaSet(t *testing.T) { }, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -358,7 +358,7 @@ func TestSetDefaultReplicaSet(t *testing.T) { }, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -405,7 +405,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { rs: ReplicaSet{ Spec: ReplicaSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -420,7 +420,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { Spec: ReplicaSetSpec{ Replicas: newInt32(0), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -435,7 +435,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { Spec: ReplicaSetSpec{ Replicas: newInt32(3), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -478,7 +478,7 @@ func TestDefaultRequestIsNotSetForReplicaSet(t *testing.T) { Spec: ReplicaSetSpec{ Replicas: newInt32(3), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, diff --git a/pkg/apis/extensions/v1beta1/generated.pb.go b/pkg/apis/extensions/v1beta1/generated.pb.go index 57c3ba63494..ffc4a2f9674 100644 --- a/pkg/apis/extensions/v1beta1/generated.pb.go +++ b/pkg/apis/extensions/v1beta1/generated.pb.go @@ -3780,7 +3780,7 @@ func (this *DaemonSet) String() string { return "nil" } s := strings.Join([]string{`&DaemonSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -3828,7 +3828,7 @@ func (this *Deployment) String() string { return "nil" } s := strings.Join([]string{`&Deployment{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -3965,7 +3965,7 @@ func (this *HorizontalPodAutoscaler) String() string { return "nil" } s := strings.Join([]string{`&HorizontalPodAutoscaler{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4037,7 +4037,7 @@ func (this *Ingress) String() string { return "nil" } s := strings.Join([]string{`&Ingress{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressSpec", "IngressSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "IngressStatus", "IngressStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4125,7 +4125,7 @@ func (this *NetworkPolicy) String() string { return "nil" } s := strings.Join([]string{`&NetworkPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4191,7 +4191,7 @@ func (this *PodSecurityPolicy) String() string { return "nil" } s := strings.Join([]string{`&PodSecurityPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySpec", "PodSecurityPolicySpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4236,7 +4236,7 @@ func (this *ReplicaSet) String() string { return "nil" } s := strings.Join([]string{`&ReplicaSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicaSetSpec", "ReplicaSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicaSetStatus", "ReplicaSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4353,7 +4353,7 @@ func (this *Scale) String() string { return "nil" } s := strings.Join([]string{`&Scale{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4421,7 +4421,7 @@ func (this *ThirdPartyResource) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResource{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Description:` + fmt.Sprintf("%v", this.Description) + `,`, `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "APIVersion", "APIVersion", 1), `&`, ``, 1) + `,`, `}`, @@ -4433,7 +4433,7 @@ func (this *ThirdPartyResourceData) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResourceData{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + valueToStringGenerated(this.Data) + `,`, `}`, }, "") @@ -12526,229 +12526,229 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 3576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6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, 0x60, 0x5f, 0x31, 0xa8, - 0xdd, 0x0a, 0x57, 0xac, 0x93, 0x00, 0xa7, 0x28, 0x84, 0xde, 0x01, 0xb0, 0x05, 0xe6, 0x9a, 0x29, - 0x42, 0x40, 0xaf, 0x51, 0xc6, 0x57, 0x6a, 0xc1, 0x34, 0x36, 0xd5, 0x66, 0x18, 0xd0, 0x70, 0x00, - 0x8c, 0x23, 0x42, 0x66, 0xae, 0xc0, 0x99, 0x0c, 0xed, 0xd1, 0x69, 0xc8, 0x6f, 0x93, 0x96, 0xe7, - 0x56, 0xcc, 0xfe, 0x44, 0x53, 0xd1, 0x22, 0x75, 0x58, 0x54, 0x98, 0x97, 0x72, 0xcf, 0x48, 0xf2, - 0x57, 0x85, 0xe8, 0x5e, 0xe3, 0x49, 0xfe, 0x1c, 0x0c, 0xd9, 0xc4, 0xd2, 0xd4, 0xba, 0xe2, 0x88, - 0x34, 0xc8, 0xf3, 0x35, 0x16, 0x63, 0x38, 0x98, 0x8d, 0x95, 0x03, 0xb9, 0xa3, 0x2d, 0x07, 0xf2, - 0x87, 0x5c, 0x0e, 0x20, 0x13, 0x86, 0x1c, 0xca, 0x8e, 0x6e, 0x4d, 0x2f, 0xf7, 0xf5, 0x5e, 0x46, - 0x47, 0x63, 0xb6, 0x07, 0x14, 0x0a, 0xf4, 0x47, 0x70, 0x20, 0x04, 0xcd, 0xc3, 0xb8, 0xae, 0x1a, - 0x3c, 0x89, 0xd6, 0x48, 0xdd, 0x34, 0x1a, 0x0e, 0x0f, 0x76, 0x85, 0xca, 0x19, 0xc1, 0x34, 0xbe, - 0x1a, 0x9f, 0xc6, 0x49, 0x7a, 0xb4, 0x02, 0x53, 0x36, 0xd9, 0x51, 0x99, 0x1a, 0xd7, 0x54, 0x87, - 0x9a, 0x76, 0x6b, 0x45, 0xd5, 0x55, 0xca, 0x43, 0x60, 0xa1, 0x52, 0xdc, 0x6b, 0x97, 0xa6, 0x70, - 0xca, 0x3c, 0x4e, 0xe5, 0x62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0x53, 0x1e, 0x84, - 0x01, 0x8e, 0xca, 0xbc, 0x71, 0xca, 0xbb, 0x04, 0x67, 0x12, 0x31, 0x1f, 0x95, 0xbf, 0x92, 0x60, - 0x26, 0x5d, 0xa5, 0x63, 0x38, 0x6d, 0xdc, 0x8a, 0x9f, 0x36, 0x7a, 0xbd, 0x51, 0x48, 0xd7, 0x3b, - 0xe3, 0xe4, 0xd1, 0x4e, 0xf5, 0xfd, 0x31, 0x18, 0xb9, 0x19, 0x37, 0x72, 0xfe, 0xc0, 0x46, 0xa6, - 0x1b, 0x58, 0x79, 0xfc, 0xf6, 0x9d, 0xd9, 0x13, 0x5f, 0xdc, 0x99, 0x3d, 0xf1, 0xc7, 0x3b, 0xb3, - 0x27, 0x3e, 0xdc, 0x9b, 0x95, 0x6e, 0xef, 0xcd, 0x4a, 0x5f, 0xec, 0xcd, 0x4a, 0x7f, 0xde, 0x9b, - 0x95, 0x3e, 0xfe, 0xcb, 0xec, 0x89, 0xd7, 0x06, 0x05, 0xe6, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x09, 0x2f, 0xde, 0x45, 0x6e, 0x3f, 0x00, 0x00, + // 3580 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x5b, 0x4f, 0x6c, 0x1b, 0xc7, + 0xd5, 0xf7, 0x92, 0xa2, 0x45, 0x3d, 0x59, 0x92, 0x35, 0x52, 0x64, 0x46, 0x49, 0x44, 0x67, 0x83, + 0x2f, 0x71, 0x3e, 0x24, 0xd4, 0x67, 0xe7, 0x73, 0xbe, 0xc4, 0x49, 0x9c, 0x88, 0x92, 0x65, 0x2b, + 0x9f, 0x64, 0x33, 0x43, 0xc9, 0x4d, 0xf3, 0xb7, 0x2b, 0x72, 0x44, 0xad, 0xb5, 0xff, 0xb2, 0x3b, + 0xab, 0x88, 0x09, 0x8a, 0x04, 0x28, 0x7a, 0x6d, 0x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, 0x99, 0xdc, 0x65, 0x33, 0x92, 0x1a, 0xa9, 0x97, 0xa4, 0x06, + 0x3d, 0x16, 0x59, 0x36, 0x5e, 0xc6, 0x17, 0xcc, 0x86, 0x94, 0xa5, 0x33, 0x07, 0x63, 0x22, 0x8e, + 0xf8, 0x9d, 0x22, 0xad, 0x0b, 0x66, 0xc3, 0x5a, 0xbc, 0x1b, 0x27, 0xe9, 0xd1, 0x65, 0x18, 0x57, + 0xb6, 0x15, 0x55, 0x53, 0xd6, 0x35, 0x12, 0x80, 0x78, 0xe9, 0xdc, 0xbd, 0x02, 0x64, 0x7c, 0x2e, + 0x49, 0x80, 0x3b, 0x79, 0xd0, 0x0a, 0x4c, 0xb8, 0x46, 0x27, 0x94, 0x37, 0x3b, 0xef, 0x13, 0x50, + 0x13, 0x6b, 0x9d, 0x24, 0x38, 0x8d, 0x0f, 0x6d, 0x03, 0x34, 0xfc, 0x84, 0xc0, 0x29, 0x1d, 0xe7, + 0xb1, 0xba, 0xda, 0xf3, 0xda, 0x0a, 0x72, 0x8b, 0x30, 0x22, 0x06, 0x4d, 0x0e, 0x8e, 0x48, 0x42, + 0xcf, 0xc0, 0x88, 0xcd, 0xf3, 0x56, 0xdf, 0x80, 0x41, 0x6e, 0xc0, 0x3d, 0x82, 0x6d, 0x04, 0x47, + 0x3b, 0x71, 0x9c, 0x56, 0xfe, 0xbd, 0x14, 0xdd, 0xa2, 0xfc, 0xe5, 0x8b, 0x2e, 0xc4, 0xd2, 0xaa, + 0x87, 0x13, 0x69, 0xd5, 0x54, 0x27, 0x47, 0x24, 0xab, 0x7a, 0x0f, 0x46, 0xd8, 0xb4, 0x56, 0x8d, + 0x96, 0x37, 0x94, 0x22, 0x44, 0x2e, 0xf6, 0xb0, 0x74, 0x02, 0x8c, 0xc8, 0x56, 0x3b, 0xce, 0x6d, + 0x8a, 0x76, 0xe2, 0xb8, 0x3c, 0xf9, 0x13, 0x09, 0xa6, 0x16, 0xeb, 0x97, 0x6d, 0xd3,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f, 0x43, 0x53, 0x58, 0x3a, 0xc5, 0xb2, 0xbd, 0x4d, 0xd3, 0xa1, 0xc9, 0x6c, 0x8f, 0xad, + 0x34, 0xcc, 0x7b, 0xd0, 0xb7, 0x25, 0x38, 0xa9, 0x26, 0x12, 0x30, 0xe1, 0xe9, 0xe7, 0x7b, 0x53, + 0x2d, 0x80, 0x09, 0x9f, 0x5b, 0x93, 0x3d, 0xb8, 0x43, 0xa4, 0xec, 0x42, 0x07, 0x15, 0x52, 0x60, + 0x60, 0x93, 0x52, 0xab, 0xc7, 0x1d, 0x33, 0x2d, 0xb5, 0xac, 0x16, 0xb9, 0xf9, 0xab, 0xab, 0x35, + 0xcc, 0xa1, 0xe5, 0x8f, 0x73, 0x81, 0xc3, 0xea, 0xde, 0x12, 0x09, 0x92, 0x5f, 0xe9, 0x28, 0x92, + 0xdf, 0xe1, 0xb4, 0xc4, 0x17, 0xbd, 0x0c, 0x79, 0xaa, 0xf5, 0x7a, 0x43, 0x28, 0x24, 0xac, 0x2e, + 0xd7, 0xc3, 0x70, 0xb5, 0xba, 0x5c, 0xc7, 0x0c, 0x12, 0xbd, 0x09, 0x05, 0x76, 0xb4, 0x60, 0x2b, + 0x3c, 0xdf, 0x7b, 0x04, 0x61, 0xfe, 0x0a, 0x67, 0x18, 0xfb, 0x72, 0xb0, 0x87, 0x2b, 0xbf, 0x0b, + 0x23, 0xb1, 0x30, 0x80, 0x6e, 0xc0, 0x09, 0xcd, 0x54, 0x9a, 0x55, 0x45, 0x53, 0x8c, 0x06, 0xb1, + 0x93, 0x81, 0x31, 0xfd, 0x72, 0x69, 0x39, 0xc2, 0x21, 0xc2, 0x49, 0xf0, 0xe4, 0x1d, 0xed, 0xc3, + 0x31, 0x6c, 0x59, 0x01, 0x08, 0xad, 0x47, 0x65, 0x28, 0xb0, 0x29, 0xec, 0x1d, 0x13, 0x86, 0xaa, + 0x43, 0x4c, 0x57, 0x36, 0xb3, 0x1d, 0xec, 0xb5, 0xa3, 0x73, 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a, 0x9c, 0x94, 0xe2, 0x98, 0x81, 0xee, 0x8a, 0x63, 0xe4, 0xcf, 0xf3, 0x70, 0x32, + 0xb9, 0x62, 0x63, 0x45, 0x19, 0xd2, 0x1d, 0x8b, 0x32, 0x6a, 0x30, 0xb9, 0xe1, 0x6a, 0x5a, 0x9b, + 0x3b, 0x24, 0xf2, 0x0e, 0xe1, 0xdd, 0xd8, 0xdf, 0x2f, 0x38, 0x27, 0x17, 0x53, 0x68, 0x70, 0x2a, + 0x67, 0x46, 0x81, 0x49, 0xbe, 0xa7, 0x02, 0x93, 0x8e, 0xfa, 0x86, 0x81, 0x83, 0xd7, 0x37, 0xa4, + 0x17, 0x8b, 0x14, 0x7a, 0x28, 0x16, 0x39, 0x8a, 0xea, 0x8e, 0x94, 0xc0, 0x77, 0xa7, 0xea, 0x0e, + 0xf9, 0x7e, 0x98, 0x16, 0x6c, 0xec, 0x7b, 0xde, 0x34, 0xa8, 0x6d, 0x6a, 0x1a, 0xb1, 0x17, 0x5c, + 0x5d, 0x6f, 0xcb, 0x17, 0x61, 0x34, 0x5e, 0x62, 0xe4, 0x8d, 0xbc, 0x57, 0xf5, 0x24, 0xde, 0x51, + 0x22, 0x23, 0xef, 0xb5, 0xe3, 0x80, 0x42, 0xfe, 0x42, 0x82, 0x53, 0x19, 0x85, 0x16, 0xe8, 0x06, + 0x8c, 0xea, 0xca, 0x4e, 0xa4, 0xfc, 0x25, 0x19, 0x58, 0x0e, 0x78, 0xe0, 0xe6, 0xcf, 0x82, 0x2b, + 0x31, 0x24, 0x9c, 0x40, 0x46, 0x2f, 0x43, 0x51, 0x57, 0x76, 0xea, 0xae, 0xdd, 0x22, 0x3d, 0x1e, + 0xeb, 0xf9, 0xf2, 0x5d, 0x11, 0x18, 0x38, 0x40, 0x93, 0x3f, 0x91, 0xa0, 0x94, 0x95, 0x82, 0xa1, + 0xf3, 0xb1, 0x72, 0x90, 0x07, 0x13, 0xe5, 0x20, 0xe3, 0x1d, 0x7c, 0x7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0xbf, 0x37, 0x23, 0xdd, 0xdc, 0x9b, 0x91, 0x3e, 0xdb, 0x9b, + 0x91, 0xfe, 0xb2, 0x37, 0x23, 0x7d, 0xf0, 0xd7, 0x99, 0x63, 0xaf, 0x0c, 0x0a, 0xcc, 0x7f, 0x05, + 0x00, 0x00, 0xff, 0xff, 0x15, 0x10, 0x78, 0x1f, 0xbe, 0x3f, 0x00, 0x00, } diff --git a/pkg/apis/extensions/v1beta1/generated.proto b/pkg/apis/extensions/v1beta1/generated.proto index 692588b5e8e..d6a2751c6cc 100644 --- a/pkg/apis/extensions/v1beta1/generated.proto +++ b/pkg/apis/extensions/v1beta1/generated.proto @@ -74,7 +74,7 @@ message DaemonSet { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -148,7 +148,7 @@ message DaemonSetStatus { message Deployment { // Standard object metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the Deployment. // +optional @@ -341,7 +341,7 @@ message HTTPIngressRuleValue { message HorizontalPodAutoscaler { // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -431,7 +431,7 @@ message Ingress { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -553,7 +553,7 @@ message NetworkPolicy { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior for this NetworkPolicy. // +optional @@ -652,7 +652,7 @@ message PodSecurityPolicy { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // spec defines the policy enforced. // +optional @@ -741,7 +741,7 @@ message ReplicaSet { // be the same as the Pod(s) that the ReplicaSet manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the ReplicaSet. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -911,7 +911,7 @@ message SELinuxStrategyOptions { message Scale { // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -984,7 +984,7 @@ message SupplementalGroupsStrategyOptions { message ThirdPartyResource { // Standard object metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Description is the description of this object. // +optional @@ -999,7 +999,7 @@ message ThirdPartyResource { message ThirdPartyResourceData { // Standard object metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data is the raw JSON data for this data. // +optional diff --git a/pkg/apis/extensions/v1beta1/types.generated.go b/pkg/apis/extensions/v1beta1/types.generated.go index cdcefdcaec5..c5e48e49076 100644 --- a/pkg/apis/extensions/v1beta1/types.generated.go +++ b/pkg/apis/extensions/v1beta1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg4_resource "k8s.io/kubernetes/pkg/api/resource" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg3_resource "k8s.io/kubernetes/pkg/api/resource" + pkg4_v1 "k8s.io/kubernetes/pkg/api/v1" pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v1 pkg2_types.UID + var v2 pkg3_resource.Quantity + var v3 pkg4_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -647,7 +647,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -657,7 +663,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -781,24 +793,30 @@ func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -811,16 +829,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -828,21 +846,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -850,38 +868,44 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -889,16 +913,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -906,21 +930,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1852,7 +1876,7 @@ func (x *CustomMetricTarget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "value": if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} + x.TargetValue = pkg3_resource.Quantity{} } else { yyv6 := &x.TargetValue yym7 := z.DecBinary() @@ -1913,7 +1937,7 @@ func (x *CustomMetricTarget) codecDecodeSelfFromArray(l int, d *codec1978.Decode } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} + x.TargetValue = pkg3_resource.Quantity{} } else { yyv11 := &x.TargetValue yym12 := z.DecBinary() @@ -2275,7 +2299,7 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromMap(l int, d *codec1978.D } case "value": if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} + x.CurrentValue = pkg3_resource.Quantity{} } else { yyv6 := &x.CurrentValue yym7 := z.DecBinary() @@ -2336,7 +2360,7 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromArray(l int, d *codec1978 } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} + x.CurrentValue = pkg3_resource.Quantity{} } else { yyv11 := &x.CurrentValue yym12 := z.DecBinary() @@ -3458,7 +3482,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -3468,7 +3498,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -3592,24 +3628,30 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Dec } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -3622,16 +3664,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3639,21 +3681,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3661,38 +3703,44 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3700,16 +3748,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3717,21 +3765,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4193,7 +4241,13 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -4203,7 +4257,13 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -4351,33 +4411,39 @@ func (x *ThirdPartyResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "description": if r.TryDecodeAsNil() { x.Description = "" } else { - yyv9 := &x.Description - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Description + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "versions": if r.TryDecodeAsNil() { x.Versions = nil } else { - yyv11 := &x.Versions - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Versions + yym13 := z.DecBinary() + _ = yym13 if false { } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv11), d) + h.decSliceAPIVersion((*[]APIVersion)(yyv12), d) } } default: @@ -4391,16 +4457,16 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4408,21 +4474,21 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4430,38 +4496,44 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4469,21 +4541,21 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Description = "" } else { - yyv19 := &x.Description - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Description + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4491,26 +4563,26 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Versions = nil } else { - yyv21 := &x.Versions - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Versions + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv21), d) + h.decSliceAPIVersion((*[]APIVersion)(yyv23), d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5152,7 +5224,13 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -5162,7 +5240,13 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -5285,21 +5369,27 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromMap(l int, d *codec1978.Deco } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv9 := &x.Data - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *yyv9 = r.DecodeBytes(*(*[]byte)(yyv9), false, false) + *yyv10 = r.DecodeBytes(*(*[]byte)(yyv10), false, false) } } default: @@ -5313,16 +5403,16 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5330,21 +5420,21 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5352,38 +5442,44 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5391,26 +5487,26 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Data = nil } else { - yyv17 := &x.Data - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Data + yym20 := z.DecBinary() + _ = yym20 if false { } else { - *yyv17 = r.DecodeBytes(*(*[]byte)(yyv17), false, false) + *yyv19 = r.DecodeBytes(*(*[]byte)(yyv19), false, false) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5504,7 +5600,13 @@ func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -5514,7 +5616,13 @@ func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -5638,24 +5746,30 @@ func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = DeploymentSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = DeploymentStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -5668,16 +5782,16 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5685,21 +5799,21 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5707,38 +5821,44 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5746,16 +5866,16 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = DeploymentSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5763,21 +5883,21 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = DeploymentStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6157,7 +6277,7 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv8 := &x.Template yyv8.CodecDecodeSelf(d) @@ -6315,7 +6435,7 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv24 := &x.Template yyv24.CodecDecodeSelf(d) @@ -9161,7 +9281,7 @@ func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv6 := &x.Template yyv6.CodecDecodeSelf(d) @@ -9219,7 +9339,7 @@ func (x *DaemonSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv10 := &x.Template yyv10.CodecDecodeSelf(d) @@ -9722,7 +9842,13 @@ func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -9732,7 +9858,13 @@ func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -9856,24 +9988,30 @@ func (x *DaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = DaemonSetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = DaemonSetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -9886,16 +10024,16 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9903,21 +10041,21 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9925,38 +10063,44 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9964,16 +10108,16 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = DaemonSetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9981,21 +10125,21 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = DaemonSetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -10825,7 +10969,13 @@ func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -10835,7 +10985,13 @@ func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -10959,24 +11115,30 @@ func (x *Ingress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = IngressSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = IngressStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -10989,16 +11151,16 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11006,21 +11168,21 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11028,38 +11190,44 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11067,16 +11235,16 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = IngressSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11084,21 +11252,21 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = IngressStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12144,7 +12312,7 @@ func (x *IngressStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { switch yys3 { case "loadBalancer": if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_v1.LoadBalancerStatus{} + x.LoadBalancer = pkg4_v1.LoadBalancerStatus{} } else { yyv4 := &x.LoadBalancer yyv4.CodecDecodeSelf(d) @@ -12175,7 +12343,7 @@ func (x *IngressStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_v1.LoadBalancerStatus{} + x.LoadBalancer = pkg4_v1.LoadBalancerStatus{} } else { yyv6 := &x.LoadBalancer yyv6.CodecDecodeSelf(d) @@ -13358,7 +13526,13 @@ func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -13368,7 +13542,13 @@ func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -13492,24 +13672,30 @@ func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicaSetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicaSetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -13522,16 +13708,16 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13539,21 +13725,21 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13561,38 +13747,44 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13600,16 +13792,16 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ReplicaSetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13617,21 +13809,21 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ReplicaSetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14258,7 +14450,7 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv10 := &x.Template yyv10.CodecDecodeSelf(d) @@ -14364,7 +14556,7 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv18 := &x.Template yyv18.CodecDecodeSelf(d) @@ -15372,7 +15564,13 @@ func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -15382,7 +15580,13 @@ func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -15489,17 +15693,23 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSecurityPolicySpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -15512,16 +15722,16 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15529,21 +15739,21 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15551,38 +15761,44 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15590,21 +15806,21 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Spec = PodSecurityPolicySpec{} } else { - yyv16 := &x.Spec - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15684,7 +15900,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym7 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.DefaultAddCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e) } } } else { @@ -15702,7 +15918,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym8 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.DefaultAddCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e) } } } @@ -15717,7 +15933,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym10 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.RequiredDropCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e) } } } else { @@ -15735,7 +15951,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym11 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.RequiredDropCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e) } } } @@ -15750,7 +15966,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym13 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.AllowedCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e) } } } else { @@ -15768,7 +15984,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym14 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.AllowedCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e) } } } @@ -16065,7 +16281,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod _ = yym7 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv6), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv6), d) } } case "requiredDropCapabilities": @@ -16077,7 +16293,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod _ = yym9 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv8), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv8), d) } } case "allowedCapabilities": @@ -16089,7 +16305,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod _ = yym11 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv10), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv10), d) } } case "volumes": @@ -16247,7 +16463,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec _ = yym32 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv31), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv31), d) } } yyj28++ @@ -16269,7 +16485,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec _ = yym34 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv33), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv33), d) } } yyj28++ @@ -16291,7 +16507,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec _ = yym36 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv35), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv35), d) } } yyj28++ @@ -16901,7 +17117,7 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } else { if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) + x.SELinuxOptions = new(pkg4_v1.SELinuxOptions) } x.SELinuxOptions.CodecDecodeSelf(d) } @@ -16953,7 +17169,7 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.De } } else { if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) + x.SELinuxOptions = new(pkg4_v1.SELinuxOptions) } x.SELinuxOptions.CodecDecodeSelf(d) } @@ -18440,7 +18656,13 @@ func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -18450,7 +18672,13 @@ func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -18557,17 +18785,23 @@ func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NetworkPolicySpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -18580,16 +18814,16 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18597,21 +18831,21 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18619,38 +18853,44 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18658,21 +18898,21 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NetworkPolicySpec{} } else { - yyv16 := &x.Spec - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19348,7 +19588,7 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } else { if x.Protocol == nil { - x.Protocol = new(pkg2_v1.Protocol) + x.Protocol = new(pkg4_v1.Protocol) } x.Protocol.CodecDecodeSelf(d) } @@ -19402,7 +19642,7 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } } else { if x.Protocol == nil { - x.Protocol = new(pkg2_v1.Protocol) + x.Protocol = new(pkg4_v1.Protocol) } x.Protocol.CodecDecodeSelf(d) } @@ -21885,7 +22125,7 @@ func (x codecSelfer1234) decSliceReplicaSetCondition(v *[]ReplicaSetCondition, d } } -func (x codecSelfer1234) encSlicev1_Capability(v []pkg2_v1.Capability, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_Capability(v []pkg4_v1.Capability, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -21898,7 +22138,7 @@ func (x codecSelfer1234) encSlicev1_Capability(v []pkg2_v1.Capability, e *codec1 z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg4_v1.Capability, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -21909,7 +22149,7 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec _ = yyc1 if yyl1 == 0 { if yyv1 == nil { - yyv1 = []pkg2_v1.Capability{} + yyv1 = []pkg4_v1.Capability{} yyc1 = true } else if len(yyv1) != 0 { yyv1 = yyv1[:0] @@ -21927,10 +22167,10 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { - yyv1 = make([]pkg2_v1.Capability, yyrl1) + yyv1 = make([]pkg4_v1.Capability, yyrl1) } } else { - yyv1 = make([]pkg2_v1.Capability, yyrl1) + yyv1 = make([]pkg4_v1.Capability, yyrl1) } yyc1 = true yyrr1 = len(yyv1) @@ -21968,7 +22208,7 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec for ; !r.CheckBreak(); yyj1++ { if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, "") // var yyz1 pkg2_v1.Capability + yyv1 = append(yyv1, "") // var yyz1 pkg4_v1.Capability yyc1 = true } yyh1.ElemContainerState(yyj1) @@ -21989,7 +22229,7 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []pkg2_v1.Capability{} + yyv1 = []pkg4_v1.Capability{} yyc1 = true } } diff --git a/pkg/apis/extensions/v1beta1/zz_generated.conversion.go b/pkg/apis/extensions/v1beta1/zz_generated.conversion.go index a2556396394..cbd5cee3878 100644 --- a/pkg/apis/extensions/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/extensions/v1beta1/zz_generated.conversion.go @@ -258,10 +258,7 @@ func Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList } func autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -276,10 +273,7 @@ func Convert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *exten } func autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -384,10 +378,7 @@ func Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in *extension } func autoConvert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *extensions.Deployment, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -402,10 +393,7 @@ func Convert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *ex } func autoConvert_extensions_Deployment_To_v1beta1_Deployment(in *extensions.Deployment, out *Deployment, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -672,10 +660,7 @@ func Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in } func autoConvert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -690,10 +675,7 @@ func Convert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutosca } func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -830,10 +812,7 @@ func Convert_extensions_IDRange_To_v1beta1_IDRange(in *extensions.IDRange, out * } func autoConvert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_IngressSpec_To_extensions_IngressSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -848,10 +827,7 @@ func Convert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions. } func autoConvert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out *Ingress, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_IngressSpec_To_v1beta1_IngressSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1014,10 +990,7 @@ func Convert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressT } func autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1029,10 +1002,7 @@ func Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy } func autoConvert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1144,10 +1114,7 @@ func Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *exten } func autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1159,10 +1126,7 @@ func Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSe } func autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1294,10 +1258,7 @@ func Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(i } func autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1312,10 +1273,7 @@ func Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *ex } func autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1534,10 +1492,7 @@ func Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions } func autoConvert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1552,10 +1507,7 @@ func Convert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, } func autoConvert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1621,10 +1573,7 @@ func Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_Supplementa } func autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Description = in.Description out.Versions = *(*[]extensions.APIVersion)(unsafe.Pointer(&in.Versions)) return nil @@ -1635,10 +1584,7 @@ func Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *Thi } func autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Description = in.Description out.Versions = *(*[]APIVersion)(unsafe.Pointer(&in.Versions)) return nil @@ -1649,10 +1595,7 @@ func Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *ext } func autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil } @@ -1662,10 +1605,7 @@ func Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData } func autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil } diff --git a/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go b/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go index b8790b065b1..76f43bca433 100644 --- a/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" + api_v1 "k8s.io/kubernetes/pkg/api/v1" intstr "k8s.io/kubernetes/pkg/util/intstr" reflect "reflect" ) @@ -181,8 +181,10 @@ func DeepCopy_v1beta1_DaemonSet(in interface{}, out interface{}, c *conversion.C in := in.(*DaemonSet) out := out.(*DaemonSet) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -219,10 +221,10 @@ func DeepCopy_v1beta1_DaemonSetSpec(in interface{}, out interface{}, c *conversi if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -243,8 +245,10 @@ func DeepCopy_v1beta1_Deployment(in interface{}, out interface{}, c *conversion. in := in.(*Deployment) out := out.(*Deployment) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -316,10 +320,10 @@ func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *convers if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil { @@ -424,8 +428,10 @@ func DeepCopy_v1beta1_HorizontalPodAutoscaler(in interface{}, out interface{}, c in := in.(*HorizontalPodAutoscaler) out := out.(*HorizontalPodAutoscaler) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -486,7 +492,7 @@ func DeepCopy_v1beta1_HorizontalPodAutoscalerStatus(in interface{}, out interfac } if in.LastScaleTime != nil { in, out := &in.LastScaleTime, &out.LastScaleTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } if in.CurrentCPUUtilizationPercentage != nil { @@ -521,8 +527,10 @@ func DeepCopy_v1beta1_Ingress(in interface{}, out interface{}, c *conversion.Clo in := in.(*Ingress) out := out.(*Ingress) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_IngressSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -626,7 +634,7 @@ func DeepCopy_v1beta1_IngressStatus(in interface{}, out interface{}, c *conversi in := in.(*IngressStatus) out := out.(*IngressStatus) *out = *in - if err := v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { + if err := api_v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { return err } return nil @@ -652,8 +660,10 @@ func DeepCopy_v1beta1_NetworkPolicy(in interface{}, out interface{}, c *conversi in := in.(*NetworkPolicy) out := out.(*NetworkPolicy) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -717,7 +727,7 @@ func DeepCopy_v1beta1_NetworkPolicyPeer(in interface{}, out interface{}, c *conv if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } if in.NamespaceSelector != nil { @@ -725,7 +735,7 @@ func DeepCopy_v1beta1_NetworkPolicyPeer(in interface{}, out interface{}, c *conv if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } return nil @@ -739,7 +749,7 @@ func DeepCopy_v1beta1_NetworkPolicyPort(in interface{}, out interface{}, c *conv *out = *in if in.Protocol != nil { in, out := &in.Protocol, &out.Protocol - *out = new(v1.Protocol) + *out = new(api_v1.Protocol) **out = **in } if in.Port != nil { @@ -759,7 +769,7 @@ func DeepCopy_v1beta1_NetworkPolicySpec(in interface{}, out interface{}, c *conv if newVal, err := c.DeepCopy(&in.PodSelector); err != nil { return err } else { - out.PodSelector = *newVal.(*meta_v1.LabelSelector) + out.PodSelector = *newVal.(*v1.LabelSelector) } if in.Ingress != nil { in, out := &in.Ingress, &out.Ingress @@ -779,8 +789,10 @@ func DeepCopy_v1beta1_PodSecurityPolicy(in interface{}, out interface{}, c *conv in := in.(*PodSecurityPolicy) out := out.(*PodSecurityPolicy) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -814,21 +826,21 @@ func DeepCopy_v1beta1_PodSecurityPolicySpec(in interface{}, out interface{}, c * *out = *in if in.DefaultAddCapabilities != nil { in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities - *out = make([]v1.Capability, len(*in)) + *out = make([]api_v1.Capability, len(*in)) for i := range *in { (*out)[i] = (*in)[i] } } if in.RequiredDropCapabilities != nil { in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities - *out = make([]v1.Capability, len(*in)) + *out = make([]api_v1.Capability, len(*in)) for i := range *in { (*out)[i] = (*in)[i] } } if in.AllowedCapabilities != nil { in, out := &in.AllowedCapabilities, &out.AllowedCapabilities - *out = make([]v1.Capability, len(*in)) + *out = make([]api_v1.Capability, len(*in)) for i := range *in { (*out)[i] = (*in)[i] } @@ -868,8 +880,10 @@ func DeepCopy_v1beta1_ReplicaSet(in interface{}, out interface{}, c *conversion. in := in.(*ReplicaSet) out := out.(*ReplicaSet) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -924,10 +938,10 @@ func DeepCopy_v1beta1_ReplicaSetSpec(in interface{}, out interface{}, c *convers if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -1012,7 +1026,7 @@ func DeepCopy_v1beta1_SELinuxStrategyOptions(in interface{}, out interface{}, c *out = *in if in.SELinuxOptions != nil { in, out := &in.SELinuxOptions, &out.SELinuxOptions - *out = new(v1.SELinuxOptions) + *out = new(api_v1.SELinuxOptions) **out = **in } return nil @@ -1024,8 +1038,10 @@ func DeepCopy_v1beta1_Scale(in interface{}, out interface{}, c *conversion.Clone in := in.(*Scale) out := out.(*Scale) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ScaleStatus(&in.Status, &out.Status, c); err != nil { return err @@ -1089,8 +1105,10 @@ func DeepCopy_v1beta1_ThirdPartyResource(in interface{}, out interface{}, c *con in := in.(*ThirdPartyResource) out := out.(*ThirdPartyResource) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Versions != nil { in, out := &in.Versions, &out.Versions @@ -1108,8 +1126,10 @@ func DeepCopy_v1beta1_ThirdPartyResourceData(in interface{}, out interface{}, c in := in.(*ThirdPartyResourceData) out := out.(*ThirdPartyResourceData) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data diff --git a/pkg/apis/extensions/validation/validation_test.go b/pkg/apis/extensions/validation/validation_test.go index 70b996e562f..915a0289b3d 100644 --- a/pkg/apis/extensions/validation/validation_test.go +++ b/pkg/apis/extensions/validation/validation_test.go @@ -40,7 +40,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { successCases := []dsUpdateTest{ { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Status: extensions.DaemonSetStatus{ CurrentNumberScheduled: 1, NumberMisscheduled: 2, @@ -49,7 +49,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Status: extensions.DaemonSetStatus{ CurrentNumberScheduled: 1, NumberMisscheduled: 1, @@ -70,7 +70,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { errorCases := map[string]dsUpdateTest{ "negative values": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -84,7 +84,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -100,7 +100,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative CurrentNumberScheduled": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -114,7 +114,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -130,7 +130,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative NumberMisscheduled": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -144,7 +144,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -160,7 +160,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative DesiredNumberScheduled": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -174,7 +174,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -190,7 +190,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative NumberReady": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -204,7 +204,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -220,7 +220,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative ObservedGeneration": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -234,7 +234,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -288,7 +288,7 @@ func TestValidateDaemonSetUpdate(t *testing.T) { validPodTemplateAbc := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: validPodSpecAbc, @@ -296,7 +296,7 @@ func TestValidateDaemonSetUpdate(t *testing.T) { } validPodTemplateNodeSelector := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: validPodSpecNodeSelector, @@ -304,7 +304,7 @@ func TestValidateDaemonSetUpdate(t *testing.T) { } validPodTemplateAbc2 := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector2, }, Spec: validPodSpecAbc, @@ -312,7 +312,7 @@ func TestValidateDaemonSetUpdate(t *testing.T) { } validPodTemplateDef := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector2, }, Spec: validPodSpecDef, @@ -324,14 +324,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidSelector, }, }, } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: validPodSpecVolume, @@ -345,14 +345,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { successCases := []dsUpdateTest{ { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, @@ -361,14 +361,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector2}, Template: validPodTemplateAbc2.Template, @@ -377,14 +377,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateNodeSelector.Template, @@ -402,14 +402,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { errorCases := map[string]dsUpdateTest{ "change daemon name": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, @@ -418,14 +418,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "invalid selector": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: invalidSelector}, Template: validPodTemplateAbc.Template, @@ -434,14 +434,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "invalid pod": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: invalidPodTemplate.Template, @@ -450,14 +450,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "change container image": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateDef.Template, @@ -466,14 +466,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "read-write volume": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: readWriteVolumePodTemplate.Template, @@ -482,14 +482,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "invalid update strategy": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: invalidSelector}, Template: validPodTemplateAbc.Template, @@ -508,7 +508,7 @@ func TestValidateDaemonSet(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -525,21 +525,21 @@ func TestValidateDaemonSet(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidSelector, }, }, } successCases := []extensions.DaemonSet{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, @@ -554,47 +554,47 @@ func TestValidateDaemonSet(t *testing.T) { errorCases := map[string]extensions.DaemonSet{ "zero-length ID": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, }, }, "missing-namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, }, }, "nil selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Template: validPodTemplate.Template, }, }, "empty selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{}, Template: validPodTemplate.Template, }, }, "selector_doesnt_match": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, Template: validPodTemplate.Template, }, }, "invalid template": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, }, }, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Labels: map[string]string{ @@ -607,7 +607,7 @@ func TestValidateDaemonSet(t *testing.T) { }, }, "invalid_label 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Labels: map[string]string{ @@ -619,7 +619,7 @@ func TestValidateDaemonSet(t *testing.T) { }, }, "invalid_annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Annotations: map[string]string{ @@ -632,7 +632,7 @@ func TestValidateDaemonSet(t *testing.T) { }, }, "invalid restart policy 1": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, }, @@ -644,14 +644,14 @@ func TestValidateDaemonSet(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, }, }, }, "invalid restart policy 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, }, @@ -663,7 +663,7 @@ func TestValidateDaemonSet(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, }, @@ -695,7 +695,7 @@ func TestValidateDaemonSet(t *testing.T) { func validDeployment() *extensions.Deployment { return &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, }, @@ -713,7 +713,7 @@ func validDeployment() *extensions.Deployment { }, }, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: api.NamespaceDefault, Labels: map[string]string{ @@ -751,7 +751,7 @@ func TestValidateDeployment(t *testing.T) { errorCases := map[string]*extensions.Deployment{} errorCases["metadata.name: Required value"] = &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, }, } @@ -885,7 +885,7 @@ func TestValidateIngress(t *testing.T) { newValid := func() extensions.Ingress { return extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -989,7 +989,7 @@ func TestValidateIngressTLS(t *testing.T) { newValid := func() extensions.Ingress { return extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -1059,7 +1059,7 @@ func TestValidateIngressStatusUpdate(t *testing.T) { newValid := func() extensions.Ingress { return extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, ResourceVersion: "9", @@ -1146,7 +1146,7 @@ func TestValidateIngressStatusUpdate(t *testing.T) { func TestValidateScale(t *testing.T) { successCases := []extensions.Scale{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", Namespace: api.NamespaceDefault, }, @@ -1155,7 +1155,7 @@ func TestValidateScale(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", Namespace: api.NamespaceDefault, }, @@ -1164,7 +1164,7 @@ func TestValidateScale(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", Namespace: api.NamespaceDefault, }, @@ -1186,7 +1186,7 @@ func TestValidateScale(t *testing.T) { }{ { scale: extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", Namespace: api.NamespaceDefault, }, @@ -1211,7 +1211,7 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -1228,7 +1228,7 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { successCases := []rcUpdateTest{ { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, @@ -1238,7 +1238,7 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1260,7 +1260,7 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { errorCases := map[string]rcUpdateTest{ "negative replicas": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, @@ -1270,7 +1270,7 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1294,7 +1294,7 @@ func TestValidateReplicaSetUpdate(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -1306,7 +1306,7 @@ func TestValidateReplicaSetUpdate(t *testing.T) { } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -1324,7 +1324,7 @@ func TestValidateReplicaSetUpdate(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidLabels, }, }, @@ -1336,14 +1336,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { successCases := []rcUpdateTest{ { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1353,14 +1353,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { }, { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1379,14 +1379,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { errorCases := map[string]rcUpdateTest{ "more than one read/write": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1396,14 +1396,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { }, "invalid selector": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: invalidLabels}, @@ -1413,14 +1413,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { }, "invalid pod": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1430,14 +1430,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { }, "negative replicas": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: -1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1457,7 +1457,7 @@ func TestValidateReplicaSet(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -1469,7 +1469,7 @@ func TestValidateReplicaSet(t *testing.T) { } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -1487,28 +1487,28 @@ func TestValidateReplicaSet(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidLabels, }, }, } successCases := []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1524,40 +1524,40 @@ func TestValidateReplicaSet(t *testing.T) { errorCases := map[string]extensions.ReplicaSet{ "zero-length ID": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, "missing-namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, "empty selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Template: validPodTemplate.Template, }, }, "selector_doesnt_match": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, Template: validPodTemplate.Template, }, }, "invalid manifest": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "read-write persistent disk with > 1 pod": { - ObjectMeta: api.ObjectMeta{Name: "abc"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc"}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1565,14 +1565,14 @@ func TestValidateReplicaSet(t *testing.T) { }, }, "negative_replicas": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: -1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Labels: map[string]string{ @@ -1585,7 +1585,7 @@ func TestValidateReplicaSet(t *testing.T) { }, }, "invalid_label 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Labels: map[string]string{ @@ -1597,7 +1597,7 @@ func TestValidateReplicaSet(t *testing.T) { }, }, "invalid_annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, Annotations: map[string]string{ @@ -1610,7 +1610,7 @@ func TestValidateReplicaSet(t *testing.T) { }, }, "invalid restart policy 1": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, }, @@ -1622,14 +1622,14 @@ func TestValidateReplicaSet(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, }, }, }, "invalid restart policy 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Namespace: api.NamespaceDefault, }, @@ -1641,7 +1641,7 @@ func TestValidateReplicaSet(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, }, @@ -1675,7 +1675,7 @@ func TestValidateReplicaSet(t *testing.T) { func TestValidatePodSecurityPolicy(t *testing.T) { validPSP := func() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{}, }, @@ -1998,7 +1998,7 @@ func TestValidatePodSecurityPolicy(t *testing.T) { func TestValidatePSPVolumes(t *testing.T) { validPSP := func() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: extensions.PodSecurityPolicySpec{ SELinux: extensions.SELinuxStrategyOptions{ Rule: extensions.SELinuxStrategyRunAsAny, @@ -2033,7 +2033,7 @@ func TestValidatePSPVolumes(t *testing.T) { func TestValidateNetworkPolicy(t *testing.T) { successCases := []extensions.NetworkPolicy{ { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2042,7 +2042,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2056,7 +2056,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2075,7 +2075,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2105,7 +2105,7 @@ func TestValidateNetworkPolicy(t *testing.T) { invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} errorCases := map[string]extensions.NetworkPolicy{ "namespaceSelector and podSelector": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2127,7 +2127,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, "invalid spec.podSelector": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: invalidSelector, @@ -2146,7 +2146,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, "invalid ingress.from.podSelector": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{ @@ -2163,7 +2163,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, "invalid ingress.from.namespaceSelector": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{ @@ -2197,7 +2197,7 @@ func TestValidateNetworkPolicyUpdate(t *testing.T) { successCases := []npUpdateTest{ { old: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2206,7 +2206,7 @@ func TestValidateNetworkPolicyUpdate(t *testing.T) { }, }, update: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2227,14 +2227,14 @@ func TestValidateNetworkPolicyUpdate(t *testing.T) { errorCases := map[string]npUpdateTest{ "change name": { old: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{}, }, }, update: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{}, @@ -2243,14 +2243,14 @@ func TestValidateNetworkPolicyUpdate(t *testing.T) { }, "change spec": { old: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{}, }, }, update: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, diff --git a/pkg/apis/extensions/zz_generated.deepcopy.go b/pkg/apis/extensions/zz_generated.deepcopy.go index ca292c1ba63..e5c5040129c 100644 --- a/pkg/apis/extensions/zz_generated.deepcopy.go +++ b/pkg/apis/extensions/zz_generated.deepcopy.go @@ -21,12 +21,13 @@ limitations under the License. package extensions import ( + reflect "reflect" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" intstr "k8s.io/kubernetes/pkg/util/intstr" - reflect "reflect" ) func init() { diff --git a/pkg/apis/imagepolicy/v1alpha1/generated.pb.go b/pkg/apis/imagepolicy/v1alpha1/generated.pb.go index 42ce22c38e6..2688a9e59b9 100644 --- a/pkg/apis/imagepolicy/v1alpha1/generated.pb.go +++ b/pkg/apis/imagepolicy/v1alpha1/generated.pb.go @@ -316,7 +316,7 @@ func (this *ImageReview) String() string { return "nil" } s := strings.Join([]string{`&ImageReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ImageReviewSpec", "ImageReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ImageReviewStatus", "ImageReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1019,42 +1019,43 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x92, 0xbf, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0x73, 0x49, 0x7f, 0xc5, 0x01, 0xda, 0x1a, 0x86, 0x28, 0xc3, 0xb5, 0x0a, 0x12, 0x2a, - 0x08, 0x6c, 0xa5, 0x42, 0xa8, 0x62, 0xa0, 0xf4, 0x10, 0x43, 0x07, 0x40, 0x98, 0x05, 0xb1, 0x39, - 0xd7, 0xd7, 0x8b, 0x9b, 0x3b, 0xfb, 0x74, 0xf6, 0xa5, 0xca, 0x80, 0xc4, 0xc8, 0xc0, 0xc0, 0x7f, - 0xc3, 0xbf, 0xd0, 0xb1, 0x23, 0x53, 0x45, 0xc3, 0x3f, 0x82, 0xce, 0x77, 0xe9, 0x1d, 0x4d, 0x23, - 0x84, 0xb2, 0xf9, 0xf9, 0xf9, 0x7d, 0xbe, 0x5f, 0xbf, 0xf7, 0xd0, 0xfe, 0x70, 0x4f, 0x13, 0xa1, - 0xe8, 0x30, 0xed, 0x43, 0x22, 0xc1, 0x80, 0xa6, 0xf1, 0x30, 0xa0, 0x3c, 0x16, 0x9a, 0x8a, 0x88, - 0x07, 0x10, 0xab, 0x50, 0xf8, 0x63, 0x3a, 0xea, 0xf1, 0x30, 0x1e, 0xf0, 0x1e, 0x0d, 0x40, 0x42, - 0xc2, 0x0d, 0x1c, 0x91, 0x38, 0x51, 0x46, 0x61, 0x9a, 0x03, 0x48, 0x09, 0x20, 0xf1, 0x30, 0x20, - 0x19, 0x80, 0x54, 0x00, 0x64, 0x0a, 0xe8, 0x3c, 0x09, 0x84, 0x19, 0xa4, 0x7d, 0xe2, 0xab, 0x88, - 0x06, 0x2a, 0x50, 0xd4, 0x72, 0xfa, 0xe9, 0xb1, 0x8d, 0x6c, 0x60, 0x4f, 0x39, 0xbf, 0xf3, 0xb4, - 0x30, 0xc8, 0x63, 0x11, 0x71, 0x7f, 0x20, 0x24, 0x24, 0xe3, 0xd2, 0x62, 0x04, 0x86, 0xd3, 0xd1, - 0x8c, 0xab, 0x0e, 0x9d, 0x57, 0x95, 0xa4, 0xd2, 0x88, 0x08, 0x66, 0x0a, 0x9e, 0xfd, 0xab, 0x40, - 0xfb, 0x03, 0x88, 0xf8, 0x4c, 0xdd, 0xee, 0xdc, 0xfe, 0xd1, 0x04, 0xb4, 0x4a, 0x13, 0x7f, 0x56, - 0xeb, 0xf1, 0xfc, 0x9a, 0x1b, 0xbe, 0xd2, 0xbb, 0xf9, 0x75, 0x6a, 0x44, 0x48, 0x85, 0x34, 0xda, - 0x24, 0xd7, 0x4b, 0xba, 0x3f, 0xea, 0xa8, 0x75, 0x98, 0xf5, 0x9e, 0xc1, 0x48, 0xc0, 0x29, 0xfe, - 0x88, 0xd6, 0xb2, 0x46, 0x1d, 0x71, 0xc3, 0xdb, 0xce, 0xb6, 0xb3, 0xd3, 0xda, 0xdd, 0x21, 0x73, - 0xc7, 0x46, 0x46, 0x3d, 0xf2, 0xae, 0x7f, 0x02, 0xbe, 0x79, 0x03, 0x86, 0x7b, 0xf8, 0xec, 0x62, - 0xab, 0x36, 0xb9, 0xd8, 0x42, 0xe5, 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0x61, 0x9c, 0x4f, 0x81, 0x65, - 0x47, 0x7c, 0x0f, 0x2d, 0x8f, 0x78, 0x98, 0x82, 0x5d, 0xc3, 0x26, 0xcb, 0x83, 0xe7, 0xf5, 0x3d, - 0xa7, 0x7b, 0x8c, 0x36, 0x67, 0x86, 0x8f, 0x1f, 0xa2, 0x55, 0x1e, 0x86, 0xea, 0x14, 0x8e, 0x2c, - 0x64, 0xcd, 0x5b, 0x2f, 0x3c, 0xac, 0x1e, 0xe4, 0xd7, 0x6c, 0x9a, 0xc7, 0x0f, 0xd0, 0x4a, 0x02, - 0x5c, 0x2b, 0x99, 0xa3, 0xcb, 0xbd, 0x61, 0xf6, 0x96, 0x15, 0x59, 0xef, 0xd1, 0xd9, 0xa5, 0x5b, - 0x3b, 0xbf, 0x74, 0x6b, 0x3f, 0x2f, 0xdd, 0xda, 0x97, 0x89, 0xeb, 0x9c, 0x4d, 0x5c, 0xe7, 0x7c, - 0xe2, 0x3a, 0xbf, 0x26, 0xae, 0xf3, 0xfd, 0xb7, 0x5b, 0xfb, 0xb4, 0x36, 0xed, 0xe3, 0x9f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x85, 0x95, 0xf8, 0x16, 0x73, 0x05, 0x00, 0x00, + // 594 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x92, 0x3f, 0x6f, 0x13, 0x4d, + 0x10, 0xc6, 0x7d, 0x76, 0xfe, 0x79, 0xfd, 0xbe, 0x24, 0x59, 0x28, 0x4e, 0x2e, 0x2e, 0x91, 0x91, + 0x50, 0x40, 0xb0, 0x8b, 0x23, 0x84, 0x22, 0x0a, 0x42, 0x0e, 0x51, 0xa4, 0x00, 0xc4, 0xd2, 0x51, + 0xb1, 0xbe, 0x4c, 0xce, 0x1b, 0xdf, 0xed, 0x9e, 0x6e, 0xf7, 0x1c, 0xb9, 0x40, 0xa2, 0xa4, 0xa0, + 0xe0, 0x1b, 0xd1, 0xa6, 0x4c, 0x49, 0x15, 0x11, 0xf3, 0x45, 0xd0, 0xed, 0x9d, 0x73, 0x47, 0x9c, + 0x08, 0xa1, 0x74, 0x3b, 0x3b, 0x3b, 0xbf, 0xe7, 0x99, 0x99, 0x45, 0xbb, 0xa3, 0x1d, 0x4d, 0x84, + 0xa2, 0xa3, 0x6c, 0x00, 0xa9, 0x04, 0x03, 0x9a, 0x26, 0xa3, 0x90, 0xf2, 0x44, 0x68, 0x2a, 0x62, + 0x1e, 0x42, 0xa2, 0x22, 0x11, 0x4c, 0xe8, 0xb8, 0xcf, 0xa3, 0x64, 0xc8, 0xfb, 0x34, 0x04, 0x09, + 0x29, 0x37, 0x70, 0x40, 0x92, 0x54, 0x19, 0x85, 0x69, 0x01, 0x20, 0x15, 0x80, 0x24, 0xa3, 0x90, + 0xe4, 0x00, 0x52, 0x03, 0x90, 0x19, 0xa0, 0xfb, 0x28, 0x14, 0x66, 0x98, 0x0d, 0x48, 0xa0, 0x62, + 0x1a, 0xaa, 0x50, 0x51, 0xcb, 0x19, 0x64, 0x87, 0x36, 0xb2, 0x81, 0x3d, 0x15, 0xfc, 0xee, 0x93, + 0xd2, 0x20, 0x4f, 0x44, 0xcc, 0x83, 0xa1, 0x90, 0x90, 0x4e, 0x2a, 0x8b, 0x31, 0x18, 0x4e, 0xc7, + 0x73, 0xae, 0xba, 0xf4, 0xba, 0xaa, 0x34, 0x93, 0x46, 0xc4, 0x30, 0x57, 0xf0, 0xf4, 0x6f, 0x05, + 0x3a, 0x18, 0x42, 0xcc, 0xe7, 0xea, 0xb6, 0xaf, 0x9d, 0x1f, 0x4d, 0x41, 0xab, 0x2c, 0x0d, 0xe6, + 0xb5, 0x1e, 0x5e, 0x5f, 0x73, 0x45, 0x2b, 0xfd, 0xab, 0x5f, 0x67, 0x46, 0x44, 0x54, 0x48, 0xa3, + 0x4d, 0x7a, 0xb9, 0xa4, 0xf7, 0xbd, 0x89, 0x3a, 0xfb,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xbb, + 0xe9, 0xae, 0xc8, 0x5e, 0xc5, 0x7c, 0x25, 0x4d, 0x3a, 0xf1, 0x6f, 0x97, 0x46, 0x3a, 0xb5, 0x0c, + 0xab, 0x4b, 0x63, 0x8a, 0xda, 0x92, 0xc7, 0xa0, 0x13, 0x1e, 0x80, 0xdd, 0x66, 0xdb, 0x5f, 0x2f, + 0x8b, 0xda, 0x6f, 0x66, 0x09, 0x56, 0xbd, 0xe9, 0x3e, 0x47, 0x6b, 0x97, 0x65, 0xf0, 0x1a, 0x6a, + 0x8d, 0x60, 0x52, 0x6c, 0x81, 0xe5, 0x47, 0x7c, 0x07, 0x2d, 0x8e, 0x79, 0x94, 0x81, 0xfd, 0x86, + 0x6d, 0x56, 0x04, 0xcf, 0x9a, 0x3b, 0x4e, 0xef, 0x10, 0xad, 0xcf, 0x2d, 0x1f, 0xdf, 0x47, 0xcb, + 0x3c, 0x8a, 0xd4, 0x31, 0x1c, 0x58, 0xc8, 0x8a, 0xbf, 0x5a, 0x7a, 0x58, 0xde, 0x2b, 0xae, 0xd9, + 0x2c, 0x8f, 0xef, 0xa1, 0xa5, 0x14, 0xb8, 0x56, 0xb2, 0x40, 0x57, 0xff, 0x86, 0xd9, 0x5b, 0x56, + 0x66, 0xfd, 0x07, 0x27, 0xe7, 0x5e, 0xe3, 0xf4, 0xdc, 0x6b, 0xfc, 0x38, 0xf7, 0x1a, 0x9f, 0xa7, + 0x9e, 0x73, 0x32, 0xf5, 0x9c, 0xd3, 0xa9, 0xe7, 0xfc, 0x9c, 0x7a, 0xce, 0xb7, 0x5f, 0x5e, 0xe3, + 0xc3, 0xca, 0x6c, 0x8e, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x81, 0x72, 0x5a, 0x7b, 0x05, + 0x00, 0x00, } diff --git a/pkg/apis/imagepolicy/v1alpha1/generated.proto b/pkg/apis/imagepolicy/v1alpha1/generated.proto index 8e72f540400..42d5a606573 100644 --- a/pkg/apis/imagepolicy/v1alpha1/generated.proto +++ b/pkg/apis/imagepolicy/v1alpha1/generated.proto @@ -34,7 +34,7 @@ option go_package = "v1alpha1"; // ImageReview checks if the set of images in a pod are allowed. message ImageReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the pod being evaluated optional ImageReviewSpec spec = 2; diff --git a/pkg/apis/imagepolicy/v1alpha1/types.generated.go b/pkg/apis/imagepolicy/v1alpha1/types.generated.go index acd80e63e35..3a4372e3682 100644 --- a/pkg/apis/imagepolicy/v1alpha1/types.generated.go +++ b/pkg/apis/imagepolicy/v1alpha1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -287,24 +297,30 @@ func (x *ImageReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ImageReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ImageReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -317,16 +333,16 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -334,21 +350,21 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -356,38 +372,44 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -395,16 +417,16 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ImageReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -412,21 +434,21 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ImageReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go b/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go index 6b08859b07b..520423b7384 100644 --- a/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go @@ -47,10 +47,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, out *imagepolicy.ImageReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -65,10 +62,7 @@ func Convert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, ou } func autoConvert_imagepolicy_ImageReview_To_v1alpha1_ImageReview(in *imagepolicy.ImageReview, out *ImageReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go index 5fc919a5da8..ec1e375f0c8 100644 --- a/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_v1alpha1_ImageReview(in interface{}, out interface{}, c *conversio in := in.(*ImageReview) out := out.(*ImageReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/pkg/apis/imagepolicy/zz_generated.deepcopy.go b/pkg/apis/imagepolicy/zz_generated.deepcopy.go index 7ff4d65e035..3355fef99a5 100644 --- a/pkg/apis/imagepolicy/zz_generated.deepcopy.go +++ b/pkg/apis/imagepolicy/zz_generated.deepcopy.go @@ -21,10 +21,11 @@ limitations under the License. package imagepolicy import ( + reflect "reflect" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/apis/policy/v1beta1/generated.pb.go b/pkg/apis/policy/v1beta1/generated.pb.go index 6120c60aa8d..2f466f39649 100644 --- a/pkg/apis/policy/v1beta1/generated.pb.go +++ b/pkg/apis/policy/v1beta1/generated.pb.go @@ -407,7 +407,7 @@ func (this *Eviction) String() string { return "nil" } s := strings.Join([]string{`&Eviction{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_kubernetes_pkg_api_v1.DeleteOptions", 1) + `,`, `}`, }, "") @@ -418,7 +418,7 @@ func (this *PodDisruptionBudget) String() string { return "nil" } s := strings.Join([]string{`&PodDisruptionBudget{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1324,54 +1324,54 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 777 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x94, 0x4d, 0x6f, 0xe3, 0x44, + // 776 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x94, 0x4d, 0x6f, 0xe3, 0x44, 0x18, 0xc7, 0xe3, 0x26, 0x29, 0x61, 0x9a, 0x54, 0x65, 0xa0, 0x10, 0x22, 0xe1, 0xa2, 0x9c, 0x5a, - 0x5e, 0xc6, 0x4a, 0x41, 0xa8, 0x70, 0xa8, 0xa8, 0x49, 0x05, 0x45, 0x54, 0xa9, 0x5c, 0x24, 0x10, - 0x82, 0xc3, 0xd8, 0x7e, 0x70, 0x86, 0xf8, 0x4d, 0x33, 0xe3, 0x40, 0x6e, 0x7c, 0x84, 0x3d, 0xec, - 0x37, 0xda, 0x4b, 0xb5, 0xa7, 0x1e, 0xf7, 0xb0, 0xaa, 0xb6, 0xd9, 0xcf, 0xb0, 0xf7, 0x95, 0xed, - 0xc9, 0x8b, 0xf3, 0xb2, 0x5b, 0xa9, 0xbb, 0x37, 0xcf, 0xcc, 0xf3, 0xfb, 0xff, 0x9f, 0xe7, 0x99, - 0x67, 0x8c, 0xbe, 0x1d, 0x1c, 0x09, 0xc2, 0x22, 0x63, 0x90, 0xd8, 0xc0, 0x43, 0x90, 0x20, 0x8c, - 0x78, 0xe0, 0x19, 0x34, 0x66, 0xc2, 0x88, 0x23, 0x9f, 0x39, 0x23, 0x63, 0xd8, 0xb1, 0x41, 0xd2, - 0x8e, 0xe1, 0x41, 0x08, 0x9c, 0x4a, 0x70, 0x49, 0xcc, 0x23, 0x19, 0xe1, 0x83, 0x1c, 0x25, 0x33, - 0x94, 0xc4, 0x03, 0x8f, 0xa4, 0x28, 0xc9, 0x51, 0xa2, 0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 0xdf, 0xb5, - 0xd2, 0x4f, 0xfc, 0x3d, 0xaa, 0x0e, 0xa9, 0x9f, 0x80, 0x9a, 0xc6, 0xcf, 0xee, 0x36, 0x8d, 0xbf, - 0xb2, 0x00, 0xac, 0x1c, 0xfc, 0x6e, 0xe3, 0x48, 0x33, 0x0f, 0xae, 0x6e, 0xf5, 0xd2, 0xf5, 0xad, - 0x5e, 0x7a, 0x72, 0xab, 0x97, 0xfe, 0x1f, 0xeb, 0xda, 0xd5, 0x58, 0xd7, 0xae, 0xc7, 0xba, 0xf6, - 0x6c, 0xac, 0x6b, 0x0f, 0x9e, 0xeb, 0xa5, 0x3f, 0xde, 0x51, 0x97, 0xfe, 0x32, 0x00, 0x00, 0xff, - 0xff, 0xf9, 0xf8, 0x35, 0x20, 0x43, 0x08, 0x00, 0x00, + 0x5e, 0xc6, 0xa4, 0x20, 0x54, 0x38, 0x54, 0xd4, 0xa4, 0x82, 0x22, 0xaa, 0x54, 0x2e, 0x12, 0x12, + 0x02, 0x89, 0xb1, 0xfd, 0xe0, 0x0c, 0xf1, 0x9b, 0x66, 0xc6, 0x81, 0xdc, 0xf8, 0x08, 0x1c, 0xf8, + 0x50, 0x95, 0xb8, 0x54, 0x7b, 0xda, 0xc3, 0xaa, 0xda, 0x66, 0x3f, 0xc3, 0xde, 0x57, 0xb6, 0x27, + 0x2f, 0xce, 0x8b, 0x36, 0x52, 0x57, 0x7b, 0xcb, 0xcc, 0x3c, 0xbf, 0xff, 0xff, 0x79, 0x73, 0xd0, + 0x57, 0x83, 0x13, 0x41, 0x58, 0x64, 0x0c, 0x12, 0x1b, 0x78, 0x08, 0x12, 0x84, 0x11, 0x0f, 0x3c, + 0x83, 0xc6, 0x4c, 0x18, 0x71, 0xe4, 0x33, 0x67, 0x64, 0x0c, 0x3b, 0x36, 0x48, 0xda, 0x31, 0x3c, + 0x08, 0x81, 0x53, 0x09, 0x2e, 0x89, 0x79, 0x24, 0x23, 0x7c, 0x94, 0xa3, 0x64, 0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f, 0x56, 0x21, 0xb2, + 0xe5, 0x23, 0xbc, 0xdc, 0x44, 0xbc, 0x87, 0xca, 0x03, 0x18, 0x65, 0x23, 0x7f, 0xd3, 0x4a, 0x7f, + 0xe2, 0x6f, 0x50, 0x75, 0x48, 0xfd, 0x04, 0xd4, 0x36, 0x7e, 0xb4, 0xd9, 0x36, 0xfe, 0xc4, 0x02, + 0xb0, 0x72, 0xf0, 0xeb, 0xad, 0x13, 0xcd, 0x3c, 0xba, 0xb9, 0xd7, 0x4b, 0xb7, 0xf7, 0x7a, 0xe9, + 0xf1, 0xbd, 0x5e, 0xfa, 0x67, 0xac, 0x6b, 0x37, 0x63, 0x5d, 0xbb, 0x1d, 0xeb, 0xda, 0xd3, 0xb1, + 0xae, 0xfd, 0xfb, 0x4c, 0x2f, 0xfd, 0xf2, 0x86, 0x1a, 0xfa, 0x8b, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x9b, 0xdc, 0x98, 0x55, 0x53, 0x08, 0x00, 0x00, } diff --git a/pkg/apis/policy/v1beta1/generated.proto b/pkg/apis/policy/v1beta1/generated.proto index 8f172d3b947..51e1451c447 100644 --- a/pkg/apis/policy/v1beta1/generated.proto +++ b/pkg/apis/policy/v1beta1/generated.proto @@ -36,7 +36,7 @@ option go_package = "v1beta1"; // created by POSTing to .../pods//evictions. message Eviction { // ObjectMeta describes the pod that is being evicted. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // DeleteOptions may be provided optional k8s.io.kubernetes.pkg.api.v1.DeleteOptions deleteOptions = 2; @@ -44,7 +44,7 @@ message Eviction { // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods message PodDisruptionBudget { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the PodDisruptionBudget. optional PodDisruptionBudgetSpec spec = 2; diff --git a/pkg/apis/policy/v1beta1/types.generated.go b/pkg/apis/policy/v1beta1/types.generated.go index 078c7a6f218..ba6c04e6b88 100644 --- a/pkg/apis/policy/v1beta1/types.generated.go +++ b/pkg/apis/policy/v1beta1/types.generated.go @@ -26,8 +26,8 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg4_types "k8s.io/apimachinery/pkg/types" - pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_types "k8s.io/apimachinery/pkg/types" + pkg4_v1 "k8s.io/kubernetes/pkg/api/v1" pkg1_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -65,8 +65,8 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg2_v1.LabelSelector - var v1 pkg4_types.UID - var v2 pkg3_v1.ObjectMeta + var v1 pkg3_types.UID + var v2 pkg4_v1.DeleteOptions var v3 pkg1_intstr.IntOrString var v4 time.Time _, _, _, _, _ = v0, v1, v2, v3, v4 @@ -891,7 +891,13 @@ func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -901,7 +907,13 @@ func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1025,24 +1037,30 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodDisruptionBudgetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodDisruptionBudgetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1055,16 +1073,16 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1072,21 +1090,21 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1094,38 +1112,44 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1133,16 +1157,16 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Spec = PodDisruptionBudgetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1150,21 +1174,21 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Status = PodDisruptionBudgetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1625,7 +1649,13 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1635,7 +1665,13 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1748,10 +1784,16 @@ func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "deleteOptions": if r.TryDecodeAsNil() { @@ -1760,7 +1802,7 @@ func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_v1.DeleteOptions) + x.DeleteOptions = new(pkg4_v1.DeleteOptions) } x.DeleteOptions.CodecDecodeSelf(d) } @@ -1775,16 +1817,16 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1792,21 +1834,21 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1814,38 +1856,44 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1856,22 +1904,22 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_v1.DeleteOptions) + x.DeleteOptions = new(pkg4_v1.DeleteOptions) } x.DeleteOptions.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/policy/v1beta1/zz_generated.conversion.go b/pkg/apis/policy/v1beta1/zz_generated.conversion.go index 2aa739da3f0..492daf560f3 100644 --- a/pkg/apis/policy/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/policy/v1beta1/zz_generated.conversion.go @@ -52,10 +52,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.DeleteOptions = (*api.DeleteOptions)(unsafe.Pointer(in.DeleteOptions)) return nil } @@ -65,10 +62,7 @@ func Convert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Evict } func autoConvert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions)) return nil } @@ -78,10 +72,7 @@ func Convert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Evict } func autoConvert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -96,10 +87,7 @@ func Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDi } func autoConvert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go b/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go index 2d75a4d6b90..86fa78338b6 100644 --- a/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" + api_v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -49,13 +49,15 @@ func DeepCopy_v1beta1_Eviction(in interface{}, out interface{}, c *conversion.Cl in := in.(*Eviction) out := out.(*Eviction) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.DeleteOptions != nil { in, out := &in.DeleteOptions, &out.DeleteOptions - *out = new(v1.DeleteOptions) - if err := v1.DeepCopy_v1_DeleteOptions(*in, *out, c); err != nil { + *out = new(api_v1.DeleteOptions) + if err := api_v1.DeepCopy_v1_DeleteOptions(*in, *out, c); err != nil { return err } } @@ -68,8 +70,10 @@ func DeepCopy_v1beta1_PodDisruptionBudget(in interface{}, out interface{}, c *co in := in.(*PodDisruptionBudget) out := out.(*PodDisruptionBudget) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -109,7 +113,7 @@ func DeepCopy_v1beta1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } return nil @@ -123,7 +127,7 @@ func DeepCopy_v1beta1_PodDisruptionBudgetStatus(in interface{}, out interface{}, *out = *in if in.DisruptedPods != nil { in, out := &in.DisruptedPods, &out.DisruptedPods - *out = make(map[string]meta_v1.Time) + *out = make(map[string]v1.Time) for key, val := range *in { (*out)[key] = val.DeepCopy() } diff --git a/pkg/apis/policy/zz_generated.deepcopy.go b/pkg/apis/policy/zz_generated.deepcopy.go index 3278f271b4b..ee9174908bc 100644 --- a/pkg/apis/policy/zz_generated.deepcopy.go +++ b/pkg/apis/policy/zz_generated.deepcopy.go @@ -21,11 +21,12 @@ limitations under the License. package policy import ( + reflect "reflect" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/apis/rbac/v1alpha1/generated.pb.go b/pkg/apis/rbac/v1alpha1/generated.pb.go index bfe80ced3c9..cbe1c038d44 100644 --- a/pkg/apis/rbac/v1alpha1/generated.pb.go +++ b/pkg/apis/rbac/v1alpha1/generated.pb.go @@ -906,7 +906,7 @@ func (this *ClusterRole) String() string { return "nil" } s := strings.Join([]string{`&ClusterRole{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -917,7 +917,7 @@ func (this *ClusterRoleBinding) String() string { return "nil" } s := strings.Join([]string{`&ClusterRoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, `}`, @@ -986,7 +986,7 @@ func (this *Role) String() string { return "nil" } s := strings.Join([]string{`&Role{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -997,7 +997,7 @@ func (this *RoleBinding) String() string { return "nil" } s := strings.Join([]string{`&RoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, `}`, @@ -2801,61 +2801,61 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 895 bytes of a gzipped FileDescriptorProto + // 894 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x55, 0xcf, 0x8b, 0x23, 0x45, - 0x14, 0x4e, 0x4d, 0x12, 0x27, 0x79, 0xe3, 0x30, 0x4e, 0xc9, 0x4a, 0x3b, 0x60, 0x32, 0xe4, 0x14, - 0x74, 0xb7, 0x9b, 0x0c, 0xab, 0xee, 0x41, 0x0f, 0xd3, 0x22, 0x32, 0xb8, 0x8e, 0x43, 0x2d, 0x2e, - 0xba, 0x2c, 0x48, 0xa5, 0x53, 0x9b, 0x94, 0xe9, 0x74, 0x37, 0x55, 0xd5, 0xa3, 0x8b, 0x08, 0x22, - 0x1e, 0x3c, 0xfa, 0x57, 0xec, 0xcd, 0x8b, 0x57, 0xf1, 0xe2, 0x69, 0xc0, 0xcb, 0x1e, 0xf5, 0x12, - 0x9c, 0xf8, 0x8f, 0x48, 0x75, 0xaa, 0x7f, 0xcc, 0x76, 0x87, 0xf9, 0x21, 0x0e, 0x08, 0x7b, 0x4a, - 0xea, 0xbd, 0xef, 0x7b, 0xf5, 0xbd,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x41, + 0x4f, 0xe6, 0x1d, 0xf4, 0xf7, 0xbc, 0x83, 0x7e, 0xf8, 0xa7, 0x53, 0x7b, 0xd0, 0x4a, 0x0f, 0xfe, + 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, 0xef, 0xa7, 0x73, 0x08, 0x0d, 0x00, 0x00, } diff --git a/pkg/apis/rbac/v1alpha1/generated.proto b/pkg/apis/rbac/v1alpha1/generated.proto index 8e6d40135a2..7dbdd5d0d5d 100644 --- a/pkg/apis/rbac/v1alpha1/generated.proto +++ b/pkg/apis/rbac/v1alpha1/generated.proto @@ -35,7 +35,7 @@ option go_package = "v1alpha1"; message ClusterRole { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Rules holds all the PolicyRules for this ClusterRole repeated PolicyRule rules = 2; @@ -46,7 +46,7 @@ message ClusterRole { message ClusterRoleBinding { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. repeated Subject subjects = 2; @@ -128,7 +128,7 @@ message PolicyRuleBuilder { message Role { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Rules holds all the PolicyRules for this Role repeated PolicyRule rules = 2; @@ -140,7 +140,7 @@ message Role { message RoleBinding { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. repeated Subject subjects = 2; diff --git a/pkg/apis/rbac/v1alpha1/helpers.go b/pkg/apis/rbac/v1alpha1/helpers.go index 6e3570ed164..81ecaef20bb 100644 --- a/pkg/apis/rbac/v1alpha1/helpers.go +++ b/pkg/apis/rbac/v1alpha1/helpers.go @@ -100,7 +100,7 @@ type ClusterRoleBindingBuilder struct { func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { return &ClusterRoleBindingBuilder{ ClusterRoleBinding: ClusterRoleBinding{ - ObjectMeta: v1.ObjectMeta{Name: clusterRoleName}, + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, RoleRef: RoleRef{ APIGroup: GroupName, Kind: "ClusterRole", diff --git a/pkg/apis/rbac/v1alpha1/types.generated.go b/pkg/apis/rbac/v1alpha1/types.generated.go index bb305b8693b..480383c48f8 100644 --- a/pkg/apis/rbac/v1alpha1/types.generated.go +++ b/pkg/apis/rbac/v1alpha1/types.generated.go @@ -27,8 +27,7 @@ import ( codec1978 "github.com/ugorji/go/codec" pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkg1_runtime "k8s.io/apimachinery/pkg/runtime" - pkg4_types "k8s.io/apimachinery/pkg/types" - pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -66,10 +65,9 @@ func init() { if false { // reference the types, but skip this branch at build/run time var v0 pkg2_v1.TypeMeta var v1 pkg1_runtime.RawExtension - var v2 pkg4_types.UID - var v3 pkg3_v1.ObjectMeta - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 + var v2 pkg3_types.UID + var v3 time.Time + _, _, _, _ = v0, v1, v2, v3 } } @@ -1315,7 +1313,13 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1325,7 +1329,13 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1442,21 +1452,27 @@ func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "rules": if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv9 := &x.Rules - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv9), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) } } default: @@ -1470,16 +1486,16 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1487,21 +1503,21 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1509,38 +1525,44 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1548,26 +1570,26 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv17 := &x.Rules - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv17), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1659,7 +1681,13 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1669,7 +1697,13 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1797,29 +1831,35 @@ func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subjects": if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv9 := &x.Subjects - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceSubject((*[]Subject)(yyv9), d) + h.decSliceSubject((*[]Subject)(yyv10), d) } } case "roleRef": if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv11 := &x.RoleRef - yyv11.CodecDecodeSelf(d) + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1832,16 +1872,16 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1849,21 +1889,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv13 := &x.Kind - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1871,38 +1911,44 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv15 := &x.APIVersion - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 if false { } else { - *((*string)(yyv15)) = r.DecodeString() + *((*string)(yyv16)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv17 := &x.ObjectMeta - yyv17.CodecDecodeSelf(d) + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1910,21 +1956,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv18 := &x.Subjects - yym19 := z.DecBinary() - _ = yym19 + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSliceSubject((*[]Subject)(yyv18), d) + h.decSliceSubject((*[]Subject)(yyv20), d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1932,21 +1978,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv20 := &x.RoleRef - yyv20.CodecDecodeSelf(d) + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) } for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj12-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2774,7 +2820,13 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -2784,7 +2836,13 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -2901,21 +2959,27 @@ func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "rules": if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv9 := &x.Rules - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv9), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) } } default: @@ -2929,16 +2993,16 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2946,21 +3010,21 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2968,38 +3032,44 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3007,26 +3077,26 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv17 := &x.Rules - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv17), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3118,7 +3188,13 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -3128,7 +3204,13 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -3256,29 +3338,35 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subjects": if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv9 := &x.Subjects - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceSubject((*[]Subject)(yyv9), d) + h.decSliceSubject((*[]Subject)(yyv10), d) } } case "roleRef": if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv11 := &x.RoleRef - yyv11.CodecDecodeSelf(d) + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -3291,16 +3379,16 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3308,21 +3396,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv13 := &x.Kind - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3330,38 +3418,44 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv15 := &x.APIVersion - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 if false { } else { - *((*string)(yyv15)) = r.DecodeString() + *((*string)(yyv16)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv17 := &x.ObjectMeta - yyv17.CodecDecodeSelf(d) + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3369,21 +3463,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv18 := &x.Subjects - yym19 := z.DecBinary() - _ = yym19 + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSliceSubject((*[]Subject)(yyv18), d) + h.decSliceSubject((*[]Subject)(yyv20), d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3391,21 +3485,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv20 := &x.RoleRef - yyv20.CodecDecodeSelf(d) + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) } for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj12-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go b/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go index 3ec38549d1e..57576fcd22b 100644 --- a/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go @@ -65,10 +65,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]rbac.PolicyRule, len(*in)) @@ -88,10 +85,7 @@ func Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac } func autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]PolicyRule, len(*in)) @@ -111,10 +105,7 @@ func Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out } func autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]rbac.Subject, len(*in)) @@ -137,10 +128,7 @@ func Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterR } func autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) @@ -319,10 +307,7 @@ func Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in *rbac.Polic } func autoConvert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]rbac.PolicyRule, len(*in)) @@ -342,10 +327,7 @@ func Convert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.S } func autoConvert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]PolicyRule, len(*in)) @@ -365,10 +347,7 @@ func Convert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.S } func autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]rbac.Subject, len(*in)) @@ -391,10 +370,7 @@ func Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac } func autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) diff --git a/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go index 43d115098cc..00710f50429 100644 --- a/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -54,8 +54,10 @@ func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversio in := in.(*ClusterRole) out := out.(*ClusterRole) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -75,8 +77,10 @@ func DeepCopy_v1alpha1_ClusterRoleBinding(in interface{}, out interface{}, c *co in := in.(*ClusterRoleBinding) out := out.(*ClusterRoleBinding) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects @@ -169,8 +173,10 @@ func DeepCopy_v1alpha1_Role(in interface{}, out interface{}, c *conversion.Clone in := in.(*Role) out := out.(*Role) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -190,8 +196,10 @@ func DeepCopy_v1alpha1_RoleBinding(in interface{}, out interface{}, c *conversio in := in.(*RoleBinding) out := out.(*RoleBinding) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects diff --git a/pkg/apis/rbac/validation/BUILD b/pkg/apis/rbac/validation/BUILD index 44341728113..ff9ff4a6e60 100644 --- a/pkg/apis/rbac/validation/BUILD +++ b/pkg/apis/rbac/validation/BUILD @@ -28,6 +28,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], ) diff --git a/pkg/apis/rbac/validation/validation_test.go b/pkg/apis/rbac/validation/validation_test.go index c19596fe811..92615af4e01 100644 --- a/pkg/apis/rbac/validation/validation_test.go +++ b/pkg/apis/rbac/validation/validation_test.go @@ -28,7 +28,7 @@ import ( func TestValidateClusterRoleBinding(t *testing.T) { errs := ValidateClusterRoleBinding( &rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{ {Name: "validsaname", Namespace: "foo", Kind: rbac.ServiceAccountKind}, @@ -48,7 +48,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }{ "bad group": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: "rbac.GroupName", Kind: "ClusterRole", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -56,7 +56,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "bad kind": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Type", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -64,7 +64,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "reference role": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -72,7 +72,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "zero-length name": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, }, T: field.ErrorTypeRequired, @@ -80,7 +80,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "bad role": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole"}, }, T: field.ErrorTypeRequired, @@ -88,7 +88,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "bad subject kind": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{{Name: "subject"}}, }, @@ -97,7 +97,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "bad subject name": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{{Namespace: "foo", Name: "subject:bad", Kind: rbac.ServiceAccountKind}}, }, @@ -106,7 +106,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "missing SA namespace": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{{Name: "good", Kind: rbac.ServiceAccountKind}}, }, @@ -115,7 +115,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "missing subject name": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{{Namespace: "foo", Kind: rbac.ServiceAccountKind}}, }, @@ -143,7 +143,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { func TestValidateRoleBinding(t *testing.T) { errs := ValidateRoleBinding( &rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, Subjects: []rbac.Subject{ {Name: "validsaname", Kind: rbac.ServiceAccountKind}, @@ -163,7 +163,7 @@ func TestValidateRoleBinding(t *testing.T) { }{ "bad group": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: "rbac.GroupName", Kind: "ClusterRole", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -171,7 +171,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "bad kind": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Type", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -179,7 +179,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "zero-length namespace": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, }, T: field.ErrorTypeRequired, @@ -187,7 +187,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "zero-length name": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, }, T: field.ErrorTypeRequired, @@ -195,7 +195,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "bad role": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role"}, }, T: field.ErrorTypeRequired, @@ -203,7 +203,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "bad subject kind": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, Subjects: []rbac.Subject{{Name: "subject"}}, }, @@ -212,7 +212,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "bad subject name": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, Subjects: []rbac.Subject{{Name: "subject:bad", Kind: rbac.ServiceAccountKind}}, }, @@ -221,7 +221,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "missing subject name": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, Subjects: []rbac.Subject{{Kind: rbac.ServiceAccountKind}}, }, @@ -248,13 +248,13 @@ func TestValidateRoleBinding(t *testing.T) { func TestValidateRoleBindingUpdate(t *testing.T) { old := &rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master", ResourceVersion: "1"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, } errs := ValidateRoleBindingUpdate( &rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master", ResourceVersion: "1"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, }, old, @@ -270,7 +270,7 @@ func TestValidateRoleBindingUpdate(t *testing.T) { }{ "changedRef": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master", ResourceVersion: "1"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "changed"}, }, T: field.ErrorTypeInvalid, @@ -355,7 +355,7 @@ func (v ValidateClusterRoleTest) test(t *testing.T) { func TestValidateRoleZeroLengthNamespace(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, }, wantErr: true, errType: field.ErrorTypeRequired, @@ -366,7 +366,7 @@ func TestValidateRoleZeroLengthNamespace(t *testing.T) { func TestValidateRoleZeroLengthName(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{Namespace: "default"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "default"}, }, wantErr: true, errType: field.ErrorTypeRequired, @@ -377,7 +377,7 @@ func TestValidateRoleZeroLengthName(t *testing.T) { func TestValidateRoleValidRole(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "default", }, @@ -389,7 +389,7 @@ func TestValidateRoleValidRole(t *testing.T) { func TestValidateRoleValidRoleNoNamespace(t *testing.T) { ValidateClusterRoleTest{ role: rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", }, }, @@ -400,7 +400,7 @@ func TestValidateRoleValidRoleNoNamespace(t *testing.T) { func TestValidateRoleNonResourceURL(t *testing.T) { ValidateClusterRoleTest{ role: rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", }, Rules: []rbac.PolicyRule{ @@ -417,7 +417,7 @@ func TestValidateRoleNonResourceURL(t *testing.T) { func TestValidateRoleNamespacedNonResourceURL(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "default", }, @@ -438,7 +438,7 @@ func TestValidateRoleNamespacedNonResourceURL(t *testing.T) { func TestValidateRoleNonResourceURLNoVerbs(t *testing.T) { ValidateClusterRoleTest{ role: rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", }, Rules: []rbac.PolicyRule{ @@ -457,7 +457,7 @@ func TestValidateRoleNonResourceURLNoVerbs(t *testing.T) { func TestValidateRoleMixedNonResourceAndResource(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", Namespace: "default", }, @@ -479,7 +479,7 @@ func TestValidateRoleMixedNonResourceAndResource(t *testing.T) { func TestValidateRoleValidResource(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", Namespace: "default", }, @@ -498,7 +498,7 @@ func TestValidateRoleValidResource(t *testing.T) { func TestValidateRoleNoAPIGroup(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", Namespace: "default", }, @@ -518,7 +518,7 @@ func TestValidateRoleNoAPIGroup(t *testing.T) { func TestValidateRoleNoResources(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", Namespace: "default", }, diff --git a/pkg/apis/rbac/zz_generated.deepcopy.go b/pkg/apis/rbac/zz_generated.deepcopy.go index 1120b428da6..3518a1befa5 100644 --- a/pkg/apis/rbac/zz_generated.deepcopy.go +++ b/pkg/apis/rbac/zz_generated.deepcopy.go @@ -21,10 +21,11 @@ limitations under the License. package rbac import ( + reflect "reflect" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/apis/storage/types.go b/pkg/apis/storage/types.go index 55218cc4faa..3d589de5c1c 100644 --- a/pkg/apis/storage/types.go +++ b/pkg/apis/storage/types.go @@ -16,10 +16,7 @@ limitations under the License. package storage -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true // +nonNamespaced=true diff --git a/pkg/apis/storage/util/BUILD b/pkg/apis/storage/util/BUILD index 98994e140f5..ae41502e2be 100644 --- a/pkg/apis/storage/util/BUILD +++ b/pkg/apis/storage/util/BUILD @@ -11,7 +11,10 @@ go_library( name = "go_default_library", srcs = ["helpers.go"], tags = ["automanaged"], - deps = ["//pkg/api:go_default_library"], + deps = [ + "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/pkg/apis/storage/util/helpers.go b/pkg/apis/storage/util/helpers.go index 64dc24d711d..8df24acbf0a 100644 --- a/pkg/apis/storage/util/helpers.go +++ b/pkg/apis/storage/util/helpers.go @@ -17,8 +17,8 @@ limitations under the License. package util import ( - "k8s.io/kubernetes/pkg/api" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubernetes/pkg/api" ) // IsDefaultStorageClassAnnotation represents a StorageClass annotation that @@ -76,7 +76,7 @@ func GetClaimStorageClass(claim *api.PersistentVolumeClaim) string { // GetStorageClassAnnotation returns the StorageClass value // if the annotation is set, empty string if not // TODO: remove Alpha and Beta when no longer used or needed -func GetStorageClassAnnotation(obj api.ObjectMeta) string { +func GetStorageClassAnnotation(obj metav1.ObjectMeta) string { if class, ok := obj.Annotations[StorageClassAnnotation]; ok { return class } @@ -93,7 +93,7 @@ func GetStorageClassAnnotation(obj api.ObjectMeta) string { // HasStorageClassAnnotation returns a boolean // if the annotation is set // TODO: remove Alpha and Beta when no longer used or needed -func HasStorageClassAnnotation(obj api.ObjectMeta) bool { +func HasStorageClassAnnotation(obj metav1.ObjectMeta) bool { if _, found := obj.Annotations[StorageClassAnnotation]; found { return found } @@ -111,7 +111,7 @@ func HasStorageClassAnnotation(obj api.ObjectMeta) bool { // IsDefaultAnnotationText returns a pretty Yes/No String if // the annotation is set // TODO: remove Beta when no longer needed -func IsDefaultAnnotationText(obj api.ObjectMeta) string { +func IsDefaultAnnotationText(obj metav1.ObjectMeta) string { if obj.Annotations[IsDefaultStorageClassAnnotation] == "true" { return "Yes" } @@ -125,7 +125,7 @@ func IsDefaultAnnotationText(obj api.ObjectMeta) string { // IsDefaultAnnotation returns a boolean if // the annotation is set // TODO: remove Beta when no longer needed -func IsDefaultAnnotation(obj api.ObjectMeta) bool { +func IsDefaultAnnotation(obj metav1.ObjectMeta) bool { if obj.Annotations[IsDefaultStorageClassAnnotation] == "true" { return true } diff --git a/pkg/apis/storage/v1beta1/generated.pb.go b/pkg/apis/storage/v1beta1/generated.pb.go index 284e1cb82eb..561cf5ab0ac 100644 --- a/pkg/apis/storage/v1beta1/generated.pb.go +++ b/pkg/apis/storage/v1beta1/generated.pb.go @@ -233,7 +233,7 @@ func (this *StorageClass) String() string { } mapStringForParameters += "}" s := strings.Join([]string{`&StorageClass{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`, `Parameters:` + mapStringForParameters + `,`, `}`, @@ -696,36 +696,36 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 483 bytes of a gzipped FileDescriptorProto + // 481 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0x8b, 0xd3, 0x40, 0x14, 0xc7, 0x93, 0x96, 0xe2, 0xee, 0x54, 0xb1, 0x44, 0x0f, 0xa5, 0x87, 0x6c, 0xd9, 0x53, 0x15, - 0x9d, 0xa1, 0x45, 0xa5, 0x2c, 0x78, 0xa9, 0x08, 0x0a, 0x8a, 0x4b, 0xbc, 0x88, 0xe8, 0x61, 0x92, - 0x7d, 0xa6, 0x63, 0x9a, 0x4c, 0x98, 0x79, 0x09, 0x14, 0x3c, 0xf8, 0x27, 0xf8, 0x67, 0xf5, 0xe6, - 0x1e, 0x3d, 0xc8, 0x62, 0xe3, 0x3f, 0x22, 0xf9, 0xb1, 0x9b, 0xb0, 0x69, 0x51, 0xbc, 0xe5, 0xcd, - 0xbc, 0xcf, 0xf7, 0xbd, 0xef, 0x37, 0x43, 0x4e, 0x82, 0xb9, 0xa6, 0x42, 0xb2, 0x20, 0x71, 0x41, - 0x45, 0x80, 0xa0, 0x59, 0x1c, 0xf8, 0x8c, 0xc7, 0x42, 0x33, 0x8d, 0x52, 0x71, 0x1f, 0x58, 0x3a,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, 0x32, 0x68, 0xce, 0x7f, 0x2d, 0x34, 0x5a, 0x1f, 0x5a, 0x51, 0xd3, 0xab, 0x45, 0x9d, + 0xd3, 0x45, 0xd0, 0x83, 0xca, 0xf5, 0xde, 0xbf, 0x93, 0x46, 0xcc, 0x1f, 0x49, 0x4f, 0x20, 0x84, + 0x7a, 0xd8, 0x29, 0xa2, 0x9a, 0x5f, 0x37, 0xaa, 0xc5, 0xad, 0x6a, 0x48, 0xef, 0x55, 0x2e, 0xe7, + 0x94, 0xaa, 0x8b, 0x7b, 0x9b, 0xad, 0x6d, 0x9c, 0x6e, 0x6d, 0xe3, 0xe7, 0xd6, 0x36, 0xbe, 0x65, + 0xb6, 0xb9, 0xc9, 0x6c, 0xf3, 0x34, 0xb3, 0xcd, 0x5f, 0x99, 0x6d, 0x7e, 0xff, 0x6d, 0x1b, 0xef, + 0x6f, 0x54, 0x6a, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xb6, 0x02, 0x5f, 0x2f, 0x04, 0x00, + 0x00, } diff --git a/pkg/apis/storage/v1beta1/generated.proto b/pkg/apis/storage/v1beta1/generated.proto index 6b3c7b84b24..8c89490b490 100644 --- a/pkg/apis/storage/v1beta1/generated.proto +++ b/pkg/apis/storage/v1beta1/generated.proto @@ -40,7 +40,7 @@ message StorageClass { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Provisioner indicates the type of the provisioner. optional string provisioner = 2; diff --git a/pkg/apis/storage/v1beta1/types.generated.go b/pkg/apis/storage/v1beta1/types.generated.go index 98cffee4581..ddc516b28fb 100644 --- a/pkg/apis/storage/v1beta1/types.generated.go +++ b/pkg/apis/storage/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -311,33 +321,39 @@ func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "provisioner": if r.TryDecodeAsNil() { x.Provisioner = "" } else { - yyv9 := &x.Provisioner - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Provisioner + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "parameters": if r.TryDecodeAsNil() { x.Parameters = nil } else { - yyv11 := &x.Parameters - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Parameters + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } default: @@ -351,16 +367,16 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -368,21 +384,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -390,38 +406,44 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -429,21 +451,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Provisioner = "" } else { - yyv19 := &x.Provisioner - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Provisioner + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -451,26 +473,26 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Parameters = nil } else { - yyv21 := &x.Parameters - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Parameters + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecMapStringStringX(yyv21, false, d) + z.F.DecMapStringStringX(yyv23, false, d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/storage/v1beta1/util/BUILD b/pkg/apis/storage/v1beta1/util/BUILD index 452870c222e..3d639390135 100644 --- a/pkg/apis/storage/v1beta1/util/BUILD +++ b/pkg/apis/storage/v1beta1/util/BUILD @@ -11,7 +11,10 @@ go_library( name = "go_default_library", srcs = ["helpers.go"], tags = ["automanaged"], - deps = ["//pkg/api/v1:go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/pkg/apis/storage/v1beta1/util/helpers.go b/pkg/apis/storage/v1beta1/util/helpers.go index b603396f13d..39c4f6f3ed5 100644 --- a/pkg/apis/storage/v1beta1/util/helpers.go +++ b/pkg/apis/storage/v1beta1/util/helpers.go @@ -17,8 +17,8 @@ limitations under the License. package util import ( - "k8s.io/kubernetes/pkg/api/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubernetes/pkg/api/v1" ) // IsDefaultStorageClassAnnotation represents a StorageClass annotation that @@ -76,7 +76,7 @@ func GetClaimStorageClass(claim *v1.PersistentVolumeClaim) string { // GetStorageClassAnnotation returns the StorageClass value // if the annotation is set, empty string if not // TODO: remove Alpha and Beta when no longer used or needed -func GetStorageClassAnnotation(obj v1.ObjectMeta) string { +func GetStorageClassAnnotation(obj metav1.ObjectMeta) string { if class, ok := obj.Annotations[StorageClassAnnotation]; ok { return class } @@ -93,7 +93,7 @@ func GetStorageClassAnnotation(obj v1.ObjectMeta) string { // HasStorageClassAnnotation returns a boolean // if the annotation is set // TODO: remove Alpha and Beta when no longer used or needed -func HasStorageClassAnnotation(obj v1.ObjectMeta) bool { +func HasStorageClassAnnotation(obj metav1.ObjectMeta) bool { if _, found := obj.Annotations[StorageClassAnnotation]; found { return found } @@ -111,7 +111,7 @@ func HasStorageClassAnnotation(obj v1.ObjectMeta) bool { // IsDefaultAnnotationText returns a pretty Yes/No String if // the annotation is set // TODO: remove Beta when no longer needed -func IsDefaultAnnotationText(obj v1.ObjectMeta) string { +func IsDefaultAnnotationText(obj metav1.ObjectMeta) string { if obj.Annotations[IsDefaultStorageClassAnnotation] == "true" { return "Yes" } @@ -125,7 +125,7 @@ func IsDefaultAnnotationText(obj v1.ObjectMeta) string { // IsDefaultAnnotation returns a boolean if // the annotation is set // TODO: remove Beta when no longer needed -func IsDefaultAnnotation(obj v1.ObjectMeta) bool { +func IsDefaultAnnotation(obj metav1.ObjectMeta) bool { if obj.Annotations[IsDefaultStorageClassAnnotation] == "true" { return true } diff --git a/pkg/apis/storage/v1beta1/zz_generated.conversion.go b/pkg/apis/storage/v1beta1/zz_generated.conversion.go index d1c2111da59..55a2b744b4a 100644 --- a/pkg/apis/storage/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/storage/v1beta1/zz_generated.conversion.go @@ -43,10 +43,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Provisioner = in.Provisioner out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) return nil @@ -57,10 +54,7 @@ func Convert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out } func autoConvert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Provisioner = in.Provisioner out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) return nil diff --git a/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go b/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go index 00a860cf802..f2ea4f2fb15 100644 --- a/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -45,8 +45,10 @@ func DeepCopy_v1beta1_StorageClass(in interface{}, out interface{}, c *conversio in := in.(*StorageClass) out := out.(*StorageClass) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters diff --git a/pkg/apis/storage/validation/BUILD b/pkg/apis/storage/validation/BUILD index cc8689a959f..562a1d7ff06 100644 --- a/pkg/apis/storage/validation/BUILD +++ b/pkg/apis/storage/validation/BUILD @@ -26,8 +26,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/apis/storage/validation/validation_test.go b/pkg/apis/storage/validation/validation_test.go index f15e72d5c71..d113ea3922b 100644 --- a/pkg/apis/storage/validation/validation_test.go +++ b/pkg/apis/storage/validation/validation_test.go @@ -28,18 +28,18 @@ func TestValidateStorageClass(t *testing.T) { successCases := []storage.StorageClass{ { // empty parameters - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo-provisioner", Parameters: map[string]string{}, }, { // nil parameters - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo-provisioner", }, { // some parameters - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo-provisioner", Parameters: map[string]string{ "kubernetes.io/foo-parameter": "free/form/string", @@ -68,26 +68,26 @@ func TestValidateStorageClass(t *testing.T) { errorCases := map[string]storage.StorageClass{ "namespace is present": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Provisioner: "kubernetes.io/foo-provisioner", }, "invalid provisioner": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/invalid/provisioner", }, "invalid empty parameter name": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo", Parameters: map[string]string{ "": "value", }, }, "provisioner: Required value": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "", }, "too long parameters": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo", Parameters: longParameters, }, diff --git a/pkg/apis/storage/zz_generated.deepcopy.go b/pkg/apis/storage/zz_generated.deepcopy.go index 4eef11521eb..64bf6cb7248 100644 --- a/pkg/apis/storage/zz_generated.deepcopy.go +++ b/pkg/apis/storage/zz_generated.deepcopy.go @@ -21,10 +21,11 @@ limitations under the License. package storage import ( + reflect "reflect" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" - reflect "reflect" ) func init() { diff --git a/pkg/client/cache/controller_test.go b/pkg/client/cache/controller_test.go index d3d76f41b2c..8c51ba7bf1e 100644 --- a/pkg/client/cache/controller_test.go +++ b/pkg/client/cache/controller_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" @@ -101,7 +102,7 @@ func Example() { for _, name := range testIDs { // Note that these pods are not valid-- the fake source doesn't // call validation or anything. - source.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: name}}) + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) } // Let's wait for the controller to process the things we just added. @@ -158,7 +159,7 @@ func ExampleNewInformer() { for _, name := range testIDs { // Note that these pods are not valid-- the fake source doesn't // call validation or anything. - source.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: name}}) + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) } // Let's wait for the controller to process the things we just added. @@ -317,7 +318,7 @@ func TestUpdate(t *testing.T) { pod := func(name, check string, final bool) *v1.Pod { p := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{"check": check}, }, diff --git a/pkg/client/cache/index_test.go b/pkg/client/cache/index_test.go index debb7babf60..3d78b9b714e 100644 --- a/pkg/client/cache/index_test.go +++ b/pkg/client/cache/index_test.go @@ -20,6 +20,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" ) @@ -32,9 +33,9 @@ func testIndexFunc(obj interface{}) ([]string, error) { func TestGetIndexFuncValues(t *testing.T) { index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"testmodes": testIndexFunc}) - pod1 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}} - pod2 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}} - pod3 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}} + pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}} + pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}} + pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}} index.Add(pod1) index.Add(pod2) @@ -62,9 +63,9 @@ func testUsersIndexFunc(obj interface{}) ([]string, error) { func TestMultiIndexKeys(t *testing.T) { index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"byUser": testUsersIndexFunc}) - pod1 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}} - pod2 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}} - pod3 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}} + pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}} + pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}} + pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}} index.Add(pod1) index.Add(pod2) diff --git a/pkg/client/cache/listers.go b/pkg/client/cache/listers.go index dc43b118a57..eb435f4bbe1 100644 --- a/pkg/client/cache/listers.go +++ b/pkg/client/cache/listers.go @@ -65,7 +65,7 @@ func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selec return nil } - items, err := indexer.Index(NamespaceIndex, &v1.ObjectMeta{Namespace: namespace}) + items, err := indexer.Index(NamespaceIndex, &metav1.ObjectMeta{Namespace: namespace}) if err != nil { // Ignore error; do slow search without index. glog.Warningf("can not retrieve list of objects using index : %v", err) @@ -302,7 +302,7 @@ type StoreToPVFetcher struct { // GetPersistentVolumeInfo returns cached data for the PersistentVolume 'id'. func (s *StoreToPVFetcher) GetPersistentVolumeInfo(id string) (*v1.PersistentVolume, error) { - o, exists, err := s.Get(&v1.PersistentVolume{ObjectMeta: v1.ObjectMeta{Name: id}}) + o, exists, err := s.Get(&v1.PersistentVolume{ObjectMeta: metav1.ObjectMeta{Name: id}}) if err != nil { return nil, fmt.Errorf("error retrieving PersistentVolume '%v' from cache: %v", id, err) @@ -468,7 +468,7 @@ func (s *storageClassLister) List(selector labels.Selector) (ret []*storage.Stor // Get returns storage class with name 'name'. func (s *storageClassLister) Get(name string) (*storage.StorageClass, error) { - key := &storage.StorageClass{ObjectMeta: v1.ObjectMeta{Name: name}} + key := &storage.StorageClass{ObjectMeta: metav1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/cache/listers_test.go b/pkg/client/cache/listers_test.go index a133a0eb8a1..bda04ff98ab 100644 --- a/pkg/client/cache/listers_test.go +++ b/pkg/client/cache/listers_test.go @@ -31,7 +31,7 @@ func TestStoreToNodeLister(t *testing.T) { store := NewStore(MetaNamespaceKeyFunc) ids := sets.NewString("foo", "bar", "baz") for id := range ids { - store.Add(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: id}}) + store.Add(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: id}}) } sml := StoreToNodeLister{store} @@ -52,7 +52,7 @@ func TestStoreToNodeConditionLister(t *testing.T) { store := NewStore(MetaNamespaceKeyFunc) nodes := []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ { @@ -67,7 +67,7 @@ func TestStoreToNodeConditionLister(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ { @@ -78,7 +78,7 @@ func TestStoreToNodeConditionLister(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz"}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ { @@ -136,10 +136,10 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "Verify we can search all namespaces", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, }, { - ObjectMeta: v1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, + ObjectMeta: metav1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, }, }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { @@ -151,10 +151,10 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "Verify we can search a specific namespace", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, }, { - ObjectMeta: v1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, + ObjectMeta: metav1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, }, }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { @@ -165,7 +165,7 @@ func TestStoreToReplicationControllerLister(t *testing.T) { { description: "Basic listing with all labels and no selectors", inRCs: []*v1.ReplicationController{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { return lister.List(labels.Everything()) @@ -176,7 +176,7 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "No pod labels", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "baz"}, }, @@ -184,7 +184,7 @@ func TestStoreToReplicationControllerLister(t *testing.T) { }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: "ns"}, } return lister.GetPodControllers(pod) }, @@ -195,12 +195,12 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "No RC selectors", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, }, }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -215,13 +215,13 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "Matching labels to selectors and namespace", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, }, }, { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, }, @@ -229,7 +229,7 @@ func TestStoreToReplicationControllerLister(t *testing.T) { }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Labels: map[string]string{"foo": "bar"}, Namespace: "ns", @@ -290,7 +290,7 @@ func TestStoreToReplicaSetLister(t *testing.T) { // Basic listing with all labels and no selectors { inRSs: []*extensions.ReplicaSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, }, list: func() ([]*extensions.ReplicaSet, error) { return lister.List(labels.Everything()) @@ -301,7 +301,7 @@ func TestStoreToReplicaSetLister(t *testing.T) { { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "baz"}}, }, @@ -309,7 +309,7 @@ func TestStoreToReplicaSetLister(t *testing.T) { }, list: func() ([]*extensions.ReplicaSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: "ns"}, } return lister.GetPodReplicaSets(pod) }, @@ -320,12 +320,12 @@ func TestStoreToReplicaSetLister(t *testing.T) { { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, }, }, list: func() ([]*extensions.ReplicaSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -340,13 +340,13 @@ func TestStoreToReplicaSetLister(t *testing.T) { { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, }, { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, @@ -354,7 +354,7 @@ func TestStoreToReplicaSetLister(t *testing.T) { }, list: func() ([]*extensions.ReplicaSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Labels: map[string]string{"foo": "bar"}, Namespace: "ns", @@ -402,7 +402,7 @@ func TestStoreToDaemonSetLister(t *testing.T) { // Basic listing { inDSs: []*extensions.DaemonSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, }, list: func() ([]extensions.DaemonSet, error) { list, err := lister.List() @@ -413,9 +413,9 @@ func TestStoreToDaemonSetLister(t *testing.T) { // Listing multiple daemon sets { inDSs: []*extensions.DaemonSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, - {ObjectMeta: v1.ObjectMeta{Name: "complex"}}, - {ObjectMeta: v1.ObjectMeta{Name: "complex2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex2"}}, }, list: func() ([]extensions.DaemonSet, error) { list, err := lister.List() @@ -427,7 +427,7 @@ func TestStoreToDaemonSetLister(t *testing.T) { { inDSs: []*extensions.DaemonSet{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "baz"}}, }, @@ -435,7 +435,7 @@ func TestStoreToDaemonSetLister(t *testing.T) { }, list: func() ([]extensions.DaemonSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: "ns"}, } return lister.GetPodDaemonSets(pod) }, @@ -446,12 +446,12 @@ func TestStoreToDaemonSetLister(t *testing.T) { { inDSs: []*extensions.DaemonSet{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, }, }, list: func() ([]extensions.DaemonSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -466,13 +466,13 @@ func TestStoreToDaemonSetLister(t *testing.T) { { inDSs: []*extensions.DaemonSet{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, }, { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, @@ -480,7 +480,7 @@ func TestStoreToDaemonSetLister(t *testing.T) { }, list: func() ([]extensions.DaemonSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Labels: map[string]string{"foo": "bar"}, Namespace: "ns", @@ -528,7 +528,7 @@ func TestStoreToPodLister(t *testing.T) { ids := []string{"foo", "bar", "baz"} for _, id := range ids { store.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "other", Name: id, Labels: map[string]string{"name": id}, @@ -536,7 +536,7 @@ func TestStoreToPodLister(t *testing.T) { }) } store.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "quux", Namespace: v1.NamespaceDefault, Labels: map[string]string{"name": "quux"}, @@ -584,16 +584,16 @@ func TestStoreToPodLister(t *testing.T) { func TestStoreToServiceLister(t *testing.T) { store := NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc}) store.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, }, }) - store.Add(&v1.Service{ObjectMeta: v1.ObjectMeta{Name: "bar"}}) + store.Add(&v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) ssl := StoreToServiceLister{store} pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foopod", Labels: map[string]string{"role": "foo"}, }, diff --git a/pkg/client/cache/mutation_detector_test.go b/pkg/client/cache/mutation_detector_test.go index 77da4994bfd..fbe0a0893ed 100644 --- a/pkg/client/cache/mutation_detector_test.go +++ b/pkg/client/cache/mutation_detector_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api/v1" @@ -38,7 +39,7 @@ func TestMutationDetector(t *testing.T) { }, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "anything", Labels: map[string]string{"check": "foo"}, }, diff --git a/pkg/client/cache/reflector_test.go b/pkg/client/cache/reflector_test.go index 728d39a40ee..c34032203ca 100644 --- a/pkg/client/cache/reflector_test.go +++ b/pkg/client/cache/reflector_test.go @@ -47,7 +47,7 @@ func (t *testLW) Watch(options v1.ListOptions) (watch.Interface, error) { func TestCloseWatchChannelOnError(t *testing.T) { r := NewReflector(&testLW{}, &v1.Pod{}, NewStore(MetaNamespaceKeyFunc), 0) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} fw := watch.NewFake() r.listerWatcher = &testLW{ WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { @@ -86,7 +86,7 @@ func TestRunUntil(t *testing.T) { r.RunUntil(stopCh) // Synchronously add a dummy pod into the watch channel so we // know the RunUntil go routine is in the watch handler. - fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) close(stopCh) select { case _, ok := <-fw.ResultChan(): @@ -142,13 +142,13 @@ func TestReflectorWatchHandler(t *testing.T) { s := NewStore(MetaNamespaceKeyFunc) g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) fw := watch.NewFake() - s.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}) - s.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}}) + s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) + s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) go func() { - fw.Add(&v1.Service{ObjectMeta: v1.ObjectMeta{Name: "rejected"}}) - fw.Delete(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}) - fw.Modify(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar", ResourceVersion: "55"}}) - fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "baz", ResourceVersion: "32"}}) + fw.Add(&v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "rejected"}}) + fw.Delete(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) + fw.Modify(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "55"}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "baz", ResourceVersion: "32"}}) fw.Stop() }() var resumeRV string @@ -158,7 +158,7 @@ func TestReflectorWatchHandler(t *testing.T) { } mkPod := func(id string, rv string) *v1.Pod { - return &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: rv}} + return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} } table := []struct { @@ -242,7 +242,7 @@ func TestReflectorListAndWatch(t *testing.T) { fw = <-createdFakes } sendingRV := strconv.FormatUint(uint64(i+2), 10) - fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: sendingRV}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: sendingRV}}) if sendingRV == "3" { // Inject a failure. fw.Stop() @@ -268,7 +268,7 @@ func TestReflectorListAndWatch(t *testing.T) { func TestReflectorListAndWatchWithErrors(t *testing.T) { mkPod := func(id string, rv string) *v1.Pod { - return &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: rv}} + return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} } mkList := func(rv string, pods ...*v1.Pod) *v1.PodList { list := &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: rv}} diff --git a/pkg/client/leaderelection/leaderelection_test.go b/pkg/client/leaderelection/leaderelection_test.go index 9433379bcc2..4dfe81a05b7 100644 --- a/pkg/client/leaderelection/leaderelection_test.go +++ b/pkg/client/leaderelection/leaderelection_test.go @@ -84,7 +84,7 @@ func TestTryAcquireOrRenew(t *testing.T) { verb: "get", reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { return true, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: action.GetNamespace(), Name: action.(core.GetAction).GetName(), }, @@ -113,7 +113,7 @@ func TestTryAcquireOrRenew(t *testing.T) { verb: "get", reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { return true, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: action.GetNamespace(), Name: action.(core.GetAction).GetName(), Annotations: map[string]string{ @@ -147,7 +147,7 @@ func TestTryAcquireOrRenew(t *testing.T) { verb: "get", reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { return true, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: action.GetNamespace(), Name: action.(core.GetAction).GetName(), Annotations: map[string]string{ @@ -173,7 +173,7 @@ func TestTryAcquireOrRenew(t *testing.T) { verb: "get", reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { return true, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: action.GetNamespace(), Name: action.(core.GetAction).GetName(), Annotations: map[string]string{ @@ -205,7 +205,7 @@ func TestTryAcquireOrRenew(t *testing.T) { var reportedLeader string lock := rl.EndpointsLock{ - EndpointsMeta: v1.ObjectMeta{Namespace: "foo", Name: "bar"}, + EndpointsMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"}, LockConfig: rl.ResourceLockConfig{ Identity: "baz", EventRecorder: &record.FakeRecorder{}, diff --git a/pkg/client/leaderelection/resourcelock/endpointslock.go b/pkg/client/leaderelection/resourcelock/endpointslock.go index 7f7dc782285..5001438f807 100644 --- a/pkg/client/leaderelection/resourcelock/endpointslock.go +++ b/pkg/client/leaderelection/resourcelock/endpointslock.go @@ -29,7 +29,7 @@ import ( type EndpointsLock struct { // EndpointsMeta should contain a Name and a Namespace of an // Endpoints object that the LeaderElector will attempt to lead. - EndpointsMeta v1.ObjectMeta + EndpointsMeta metav1.ObjectMeta Client clientset.Interface LockConfig ResourceLockConfig e *v1.Endpoints @@ -60,7 +60,7 @@ func (el *EndpointsLock) Create(ler LeaderElectionRecord) error { return err } el.e, err = el.Client.Core().Endpoints(el.EndpointsMeta.Namespace).Create(&v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: el.EndpointsMeta.Name, Namespace: el.EndpointsMeta.Namespace, Annotations: map[string]string{ diff --git a/pkg/client/listers/authentication/internalversion/BUILD b/pkg/client/listers/authentication/internalversion/BUILD index 19a5809af77..0b9d8f645fe 100644 --- a/pkg/client/listers/authentication/internalversion/BUILD +++ b/pkg/client/listers/authentication/internalversion/BUILD @@ -15,10 +15,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/authentication:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/authentication/internalversion/tokenreview.go b/pkg/client/listers/authentication/internalversion/tokenreview.go index 029a0520367..24e319ed39e 100644 --- a/pkg/client/listers/authentication/internalversion/tokenreview.go +++ b/pkg/client/listers/authentication/internalversion/tokenreview.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" authentication "k8s.io/kubernetes/pkg/apis/authentication" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *tokenReviewLister) List(selector labels.Selector) (ret []*authenticatio // Get retrieves the TokenReview from the index for a given name. func (s *tokenReviewLister) Get(name string) (*authentication.TokenReview, error) { - key := &authentication.TokenReview{ObjectMeta: api.ObjectMeta{Name: name}} + key := &authentication.TokenReview{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/authentication/v1beta1/BUILD b/pkg/client/listers/authentication/v1beta1/BUILD index fa1c28fbf96..1f354802d09 100644 --- a/pkg/client/listers/authentication/v1beta1/BUILD +++ b/pkg/client/listers/authentication/v1beta1/BUILD @@ -15,11 +15,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/authentication:go_default_library", "//pkg/apis/authentication/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/authentication/v1beta1/tokenreview.go b/pkg/client/listers/authentication/v1beta1/tokenreview.go index 4ffaae2e575..c6e24128242 100644 --- a/pkg/client/listers/authentication/v1beta1/tokenreview.go +++ b/pkg/client/listers/authentication/v1beta1/tokenreview.go @@ -20,8 +20,8 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" authentication "k8s.io/kubernetes/pkg/apis/authentication" v1beta1 "k8s.io/kubernetes/pkg/apis/authentication/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/listers/authorization/internalversion/BUILD b/pkg/client/listers/authorization/internalversion/BUILD index 7d8019c2c28..938b60780ef 100644 --- a/pkg/client/listers/authorization/internalversion/BUILD +++ b/pkg/client/listers/authorization/internalversion/BUILD @@ -17,10 +17,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/authorization:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/authorization/internalversion/selfsubjectaccessreview.go b/pkg/client/listers/authorization/internalversion/selfsubjectaccessreview.go index 9ef42c52ed8..1e98ed014be 100644 --- a/pkg/client/listers/authorization/internalversion/selfsubjectaccessreview.go +++ b/pkg/client/listers/authorization/internalversion/selfsubjectaccessreview.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" authorization "k8s.io/kubernetes/pkg/apis/authorization" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *selfSubjectAccessReviewLister) List(selector labels.Selector) (ret []*a // Get retrieves the SelfSubjectAccessReview from the index for a given name. func (s *selfSubjectAccessReviewLister) Get(name string) (*authorization.SelfSubjectAccessReview, error) { - key := &authorization.SelfSubjectAccessReview{ObjectMeta: api.ObjectMeta{Name: name}} + key := &authorization.SelfSubjectAccessReview{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/authorization/internalversion/subjectaccessreview.go b/pkg/client/listers/authorization/internalversion/subjectaccessreview.go index 38f874ca0fc..3fb6fb6e8e4 100644 --- a/pkg/client/listers/authorization/internalversion/subjectaccessreview.go +++ b/pkg/client/listers/authorization/internalversion/subjectaccessreview.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" authorization "k8s.io/kubernetes/pkg/apis/authorization" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *subjectAccessReviewLister) List(selector labels.Selector) (ret []*autho // Get retrieves the SubjectAccessReview from the index for a given name. func (s *subjectAccessReviewLister) Get(name string) (*authorization.SubjectAccessReview, error) { - key := &authorization.SubjectAccessReview{ObjectMeta: api.ObjectMeta{Name: name}} + key := &authorization.SubjectAccessReview{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/authorization/v1beta1/BUILD b/pkg/client/listers/authorization/v1beta1/BUILD index 7d8c2c53aef..8bfaee5f94f 100644 --- a/pkg/client/listers/authorization/v1beta1/BUILD +++ b/pkg/client/listers/authorization/v1beta1/BUILD @@ -17,11 +17,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/authorization:go_default_library", "//pkg/apis/authorization/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/authorization/v1beta1/selfsubjectaccessreview.go b/pkg/client/listers/authorization/v1beta1/selfsubjectaccessreview.go index 98b55145c1d..9df1dbd60cb 100644 --- a/pkg/client/listers/authorization/v1beta1/selfsubjectaccessreview.go +++ b/pkg/client/listers/authorization/v1beta1/selfsubjectaccessreview.go @@ -20,8 +20,8 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" authorization "k8s.io/kubernetes/pkg/apis/authorization" v1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/listers/authorization/v1beta1/subjectaccessreview.go b/pkg/client/listers/authorization/v1beta1/subjectaccessreview.go index c8442726213..5211e4c5324 100644 --- a/pkg/client/listers/authorization/v1beta1/subjectaccessreview.go +++ b/pkg/client/listers/authorization/v1beta1/subjectaccessreview.go @@ -20,8 +20,8 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" authorization "k8s.io/kubernetes/pkg/apis/authorization" v1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/listers/batch/internalversion/job_test.go b/pkg/client/listers/batch/internalversion/job_test.go index 722fd2006a7..8fef7438afc 100644 --- a/pkg/client/listers/batch/internalversion/job_test.go +++ b/pkg/client/listers/batch/internalversion/job_test.go @@ -40,7 +40,7 @@ func TestJobLister(t *testing.T) { // Basic listing { inJobs: []*batch.Job{ - {ObjectMeta: api.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, }, list: func() ([]*batch.Job, error) { list, err := lister.List(labels.Everything()) @@ -52,9 +52,9 @@ func TestJobLister(t *testing.T) { // Listing multiple jobs { inJobs: []*batch.Job{ - {ObjectMeta: api.ObjectMeta{Name: "basic"}}, - {ObjectMeta: api.ObjectMeta{Name: "complex"}}, - {ObjectMeta: api.ObjectMeta{Name: "complex2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex2"}}, }, list: func() ([]*batch.Job, error) { list, err := lister.List(labels.Everything()) @@ -67,7 +67,7 @@ func TestJobLister(t *testing.T) { { inJobs: []*batch.Job{ { - ObjectMeta: api.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "baz"}, @@ -77,7 +77,7 @@ func TestJobLister(t *testing.T) { }, list: func() ([]*batch.Job, error) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "pod", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod", Namespace: "ns"}, } podJobs, err := lister.GetPodJobs(pod) jobs := make([]*batch.Job, 0, len(podJobs)) @@ -94,12 +94,12 @@ func TestJobLister(t *testing.T) { { inJobs: []*batch.Job{ { - ObjectMeta: api.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, }, }, list: func() ([]*batch.Job, error) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -120,7 +120,7 @@ func TestJobLister(t *testing.T) { { inJobs: []*batch.Job{ { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -128,7 +128,7 @@ func TestJobLister(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -138,7 +138,7 @@ func TestJobLister(t *testing.T) { }, list: func() ([]*batch.Job, error) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod", Labels: map[string]string{"foo": "bar"}, Namespace: "ns", @@ -158,7 +158,7 @@ func TestJobLister(t *testing.T) { { inJobs: []*batch.Job{ { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "foo"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -166,7 +166,7 @@ func TestJobLister(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "bar"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -176,7 +176,7 @@ func TestJobLister(t *testing.T) { }, list: func() ([]*batch.Job, error) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod", Labels: map[string]string{"foo": "bar"}, Namespace: "baz", diff --git a/pkg/client/listers/certificates/internalversion/BUILD b/pkg/client/listers/certificates/internalversion/BUILD index ee04747b2bd..d407af8cd8a 100644 --- a/pkg/client/listers/certificates/internalversion/BUILD +++ b/pkg/client/listers/certificates/internalversion/BUILD @@ -15,10 +15,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/certificates/internalversion/certificatesigningrequest.go b/pkg/client/listers/certificates/internalversion/certificatesigningrequest.go index a8689f4a0ed..5f9992b8ccc 100644 --- a/pkg/client/listers/certificates/internalversion/certificatesigningrequest.go +++ b/pkg/client/listers/certificates/internalversion/certificatesigningrequest.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" certificates "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret [] // Get retrieves the CertificateSigningRequest from the index for a given name. func (s *certificateSigningRequestLister) Get(name string) (*certificates.CertificateSigningRequest, error) { - key := &certificates.CertificateSigningRequest{ObjectMeta: api.ObjectMeta{Name: name}} + key := &certificates.CertificateSigningRequest{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/certificates/v1alpha1/BUILD b/pkg/client/listers/certificates/v1alpha1/BUILD index 8a914cd1b29..dc1f7284b0b 100644 --- a/pkg/client/listers/certificates/v1alpha1/BUILD +++ b/pkg/client/listers/certificates/v1alpha1/BUILD @@ -15,11 +15,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/apis/certificates/v1alpha1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/certificates/v1alpha1/certificatesigningrequest.go b/pkg/client/listers/certificates/v1alpha1/certificatesigningrequest.go index 551ea1ed0bd..e9b1bc02a97 100644 --- a/pkg/client/listers/certificates/v1alpha1/certificatesigningrequest.go +++ b/pkg/client/listers/certificates/v1alpha1/certificatesigningrequest.go @@ -20,8 +20,8 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" certificates "k8s.io/kubernetes/pkg/apis/certificates" v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/listers/core/internalversion/BUILD b/pkg/client/listers/core/internalversion/BUILD index c4266fe6883..0ba0b0fdc6c 100644 --- a/pkg/client/listers/core/internalversion/BUILD +++ b/pkg/client/listers/core/internalversion/BUILD @@ -33,6 +33,7 @@ go_library( "//pkg/api:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/core/internalversion/componentstatus.go b/pkg/client/listers/core/internalversion/componentstatus.go index e0fbfbe05d1..bc9e62d0cb2 100644 --- a/pkg/client/listers/core/internalversion/componentstatus.go +++ b/pkg/client/listers/core/internalversion/componentstatus.go @@ -20,7 +20,7 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" @@ -55,7 +55,7 @@ func (s *componentStatusLister) List(selector labels.Selector) (ret []*api.Compo // Get retrieves the ComponentStatus from the index for a given name. func (s *componentStatusLister) Get(name string) (*api.ComponentStatus, error) { - key := &api.ComponentStatus{ObjectMeta: api.ObjectMeta{Name: name}} + key := &api.ComponentStatus{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/core/internalversion/namespace.go b/pkg/client/listers/core/internalversion/namespace.go index 8fab1ab393f..8e3f88c5af1 100644 --- a/pkg/client/listers/core/internalversion/namespace.go +++ b/pkg/client/listers/core/internalversion/namespace.go @@ -20,7 +20,7 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" @@ -55,7 +55,7 @@ func (s *namespaceLister) List(selector labels.Selector) (ret []*api.Namespace, // Get retrieves the Namespace from the index for a given name. func (s *namespaceLister) Get(name string) (*api.Namespace, error) { - key := &api.Namespace{ObjectMeta: api.ObjectMeta{Name: name}} + key := &api.Namespace{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/core/internalversion/node.go b/pkg/client/listers/core/internalversion/node.go index 68ce009c46a..5ec09645914 100644 --- a/pkg/client/listers/core/internalversion/node.go +++ b/pkg/client/listers/core/internalversion/node.go @@ -20,7 +20,7 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" @@ -55,7 +55,7 @@ func (s *nodeLister) List(selector labels.Selector) (ret []*api.Node, err error) // Get retrieves the Node from the index for a given name. func (s *nodeLister) Get(name string) (*api.Node, error) { - key := &api.Node{ObjectMeta: api.ObjectMeta{Name: name}} + key := &api.Node{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/core/internalversion/persistentvolume.go b/pkg/client/listers/core/internalversion/persistentvolume.go index 252d5c9710a..fe3c1cfb794 100644 --- a/pkg/client/listers/core/internalversion/persistentvolume.go +++ b/pkg/client/listers/core/internalversion/persistentvolume.go @@ -20,7 +20,7 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" @@ -55,7 +55,7 @@ func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*api.Pers // Get retrieves the PersistentVolume from the index for a given name. func (s *persistentVolumeLister) Get(name string) (*api.PersistentVolume, error) { - key := &api.PersistentVolume{ObjectMeta: api.ObjectMeta{Name: name}} + key := &api.PersistentVolume{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/core/v1/BUILD b/pkg/client/listers/core/v1/BUILD index 6b966e8bdcf..6b65275e16d 100644 --- a/pkg/client/listers/core/v1/BUILD +++ b/pkg/client/listers/core/v1/BUILD @@ -34,6 +34,7 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/core/v1/componentstatus.go b/pkg/client/listers/core/v1/componentstatus.go index 83434d4bf8f..dd901792fcf 100644 --- a/pkg/client/listers/core/v1/componentstatus.go +++ b/pkg/client/listers/core/v1/componentstatus.go @@ -20,6 +20,7 @@ package v1 import ( "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" @@ -55,7 +56,7 @@ func (s *componentStatusLister) List(selector labels.Selector) (ret []*v1.Compon // Get retrieves the ComponentStatus from the index for a given name. func (s *componentStatusLister) Get(name string) (*v1.ComponentStatus, error) { - key := &v1.ComponentStatus{ObjectMeta: v1.ObjectMeta{Name: name}} + key := &v1.ComponentStatus{ObjectMeta: meta_v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/core/v1/namespace.go b/pkg/client/listers/core/v1/namespace.go index afd804154fb..8b1793189d6 100644 --- a/pkg/client/listers/core/v1/namespace.go +++ b/pkg/client/listers/core/v1/namespace.go @@ -20,6 +20,7 @@ package v1 import ( "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" @@ -55,7 +56,7 @@ func (s *namespaceLister) List(selector labels.Selector) (ret []*v1.Namespace, e // Get retrieves the Namespace from the index for a given name. func (s *namespaceLister) Get(name string) (*v1.Namespace, error) { - key := &v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: name}} + key := &v1.Namespace{ObjectMeta: meta_v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/core/v1/node.go b/pkg/client/listers/core/v1/node.go index 499d81e0dac..99c88a32e3e 100644 --- a/pkg/client/listers/core/v1/node.go +++ b/pkg/client/listers/core/v1/node.go @@ -20,6 +20,7 @@ package v1 import ( "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" @@ -55,7 +56,7 @@ func (s *nodeLister) List(selector labels.Selector) (ret []*v1.Node, err error) // Get retrieves the Node from the index for a given name. func (s *nodeLister) Get(name string) (*v1.Node, error) { - key := &v1.Node{ObjectMeta: v1.ObjectMeta{Name: name}} + key := &v1.Node{ObjectMeta: meta_v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/core/v1/persistentvolume.go b/pkg/client/listers/core/v1/persistentvolume.go index 784cd91d8cd..194c4a65d57 100644 --- a/pkg/client/listers/core/v1/persistentvolume.go +++ b/pkg/client/listers/core/v1/persistentvolume.go @@ -20,6 +20,7 @@ package v1 import ( "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" @@ -55,7 +56,7 @@ func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*v1.Persi // Get retrieves the PersistentVolume from the index for a given name. func (s *persistentVolumeLister) Get(name string) (*v1.PersistentVolume, error) { - key := &v1.PersistentVolume{ObjectMeta: v1.ObjectMeta{Name: name}} + key := &v1.PersistentVolume{ObjectMeta: meta_v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/extensions/internalversion/BUILD b/pkg/client/listers/extensions/internalversion/BUILD index 36ffd27f83a..077c14b92d2 100644 --- a/pkg/client/listers/extensions/internalversion/BUILD +++ b/pkg/client/listers/extensions/internalversion/BUILD @@ -22,10 +22,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/extensions/internalversion/podsecuritypolicy.go b/pkg/client/listers/extensions/internalversion/podsecuritypolicy.go index dceccbe5060..81bef2d0c03 100644 --- a/pkg/client/listers/extensions/internalversion/podsecuritypolicy.go +++ b/pkg/client/listers/extensions/internalversion/podsecuritypolicy.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*extensi // Get retrieves the PodSecurityPolicy from the index for a given name. func (s *podSecurityPolicyLister) Get(name string) (*extensions.PodSecurityPolicy, error) { - key := &extensions.PodSecurityPolicy{ObjectMeta: api.ObjectMeta{Name: name}} + key := &extensions.PodSecurityPolicy{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/extensions/internalversion/thirdpartyresource.go b/pkg/client/listers/extensions/internalversion/thirdpartyresource.go index c388ba83640..60fd9d31cfd 100644 --- a/pkg/client/listers/extensions/internalversion/thirdpartyresource.go +++ b/pkg/client/listers/extensions/internalversion/thirdpartyresource.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *thirdPartyResourceLister) List(selector labels.Selector) (ret []*extens // Get retrieves the ThirdPartyResource from the index for a given name. func (s *thirdPartyResourceLister) Get(name string) (*extensions.ThirdPartyResource, error) { - key := &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: name}} + key := &extensions.ThirdPartyResource{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/extensions/v1beta1/BUILD b/pkg/client/listers/extensions/v1beta1/BUILD index 17fd75de868..30efb7b6861 100644 --- a/pkg/client/listers/extensions/v1beta1/BUILD +++ b/pkg/client/listers/extensions/v1beta1/BUILD @@ -21,11 +21,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/extensions/v1beta1/podsecuritypolicy.go b/pkg/client/listers/extensions/v1beta1/podsecuritypolicy.go index ae5febee438..293b5ed3ae0 100644 --- a/pkg/client/listers/extensions/v1beta1/podsecuritypolicy.go +++ b/pkg/client/listers/extensions/v1beta1/podsecuritypolicy.go @@ -20,8 +20,8 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/listers/extensions/v1beta1/thirdpartyresource.go b/pkg/client/listers/extensions/v1beta1/thirdpartyresource.go index b8f5765efdb..53e7ac37f73 100644 --- a/pkg/client/listers/extensions/v1beta1/thirdpartyresource.go +++ b/pkg/client/listers/extensions/v1beta1/thirdpartyresource.go @@ -20,8 +20,8 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/listers/imagepolicy/internalversion/BUILD b/pkg/client/listers/imagepolicy/internalversion/BUILD index 50541cf521f..5d84b35a44f 100644 --- a/pkg/client/listers/imagepolicy/internalversion/BUILD +++ b/pkg/client/listers/imagepolicy/internalversion/BUILD @@ -15,10 +15,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/imagepolicy:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/imagepolicy/internalversion/imagereview.go b/pkg/client/listers/imagepolicy/internalversion/imagereview.go index 3b4c0de05b3..19d9c8be5ae 100644 --- a/pkg/client/listers/imagepolicy/internalversion/imagereview.go +++ b/pkg/client/listers/imagepolicy/internalversion/imagereview.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" imagepolicy "k8s.io/kubernetes/pkg/apis/imagepolicy" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *imageReviewLister) List(selector labels.Selector) (ret []*imagepolicy.I // Get retrieves the ImageReview from the index for a given name. func (s *imageReviewLister) Get(name string) (*imagepolicy.ImageReview, error) { - key := &imagepolicy.ImageReview{ObjectMeta: api.ObjectMeta{Name: name}} + key := &imagepolicy.ImageReview{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/imagepolicy/v1alpha1/BUILD b/pkg/client/listers/imagepolicy/v1alpha1/BUILD index 4b66242eb8b..4853abadf36 100644 --- a/pkg/client/listers/imagepolicy/v1alpha1/BUILD +++ b/pkg/client/listers/imagepolicy/v1alpha1/BUILD @@ -15,11 +15,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/imagepolicy:go_default_library", "//pkg/apis/imagepolicy/v1alpha1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/imagepolicy/v1alpha1/imagereview.go b/pkg/client/listers/imagepolicy/v1alpha1/imagereview.go index b3fc515f950..61a99434d17 100644 --- a/pkg/client/listers/imagepolicy/v1alpha1/imagereview.go +++ b/pkg/client/listers/imagepolicy/v1alpha1/imagereview.go @@ -20,8 +20,8 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" imagepolicy "k8s.io/kubernetes/pkg/apis/imagepolicy" v1alpha1 "k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/listers/rbac/internalversion/BUILD b/pkg/client/listers/rbac/internalversion/BUILD index 8e315a019c1..920805bd058 100644 --- a/pkg/client/listers/rbac/internalversion/BUILD +++ b/pkg/client/listers/rbac/internalversion/BUILD @@ -18,10 +18,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/rbac/internalversion/clusterrole.go b/pkg/client/listers/rbac/internalversion/clusterrole.go index b9897e8178f..4d5e457774e 100644 --- a/pkg/client/listers/rbac/internalversion/clusterrole.go +++ b/pkg/client/listers/rbac/internalversion/clusterrole.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *clusterRoleLister) List(selector labels.Selector) (ret []*rbac.ClusterR // Get retrieves the ClusterRole from the index for a given name. func (s *clusterRoleLister) Get(name string) (*rbac.ClusterRole, error) { - key := &rbac.ClusterRole{ObjectMeta: api.ObjectMeta{Name: name}} + key := &rbac.ClusterRole{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/rbac/internalversion/clusterrolebinding.go b/pkg/client/listers/rbac/internalversion/clusterrolebinding.go index edd3c5be1fc..c46349783f8 100644 --- a/pkg/client/listers/rbac/internalversion/clusterrolebinding.go +++ b/pkg/client/listers/rbac/internalversion/clusterrolebinding.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*rbac.C // Get retrieves the ClusterRoleBinding from the index for a given name. func (s *clusterRoleBindingLister) Get(name string) (*rbac.ClusterRoleBinding, error) { - key := &rbac.ClusterRoleBinding{ObjectMeta: api.ObjectMeta{Name: name}} + key := &rbac.ClusterRoleBinding{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/rbac/v1alpha1/BUILD b/pkg/client/listers/rbac/v1alpha1/BUILD index 8a61d820f3d..6bad9e0ce1d 100644 --- a/pkg/client/listers/rbac/v1alpha1/BUILD +++ b/pkg/client/listers/rbac/v1alpha1/BUILD @@ -18,11 +18,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/rbac/v1alpha1/clusterrole.go b/pkg/client/listers/rbac/v1alpha1/clusterrole.go index 2d632afcfb0..69a9f20e750 100644 --- a/pkg/client/listers/rbac/v1alpha1/clusterrole.go +++ b/pkg/client/listers/rbac/v1alpha1/clusterrole.go @@ -20,8 +20,8 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac "k8s.io/kubernetes/pkg/apis/rbac" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/listers/rbac/v1alpha1/clusterrolebinding.go b/pkg/client/listers/rbac/v1alpha1/clusterrolebinding.go index fdfd4804e58..679a7b7ec5c 100644 --- a/pkg/client/listers/rbac/v1alpha1/clusterrolebinding.go +++ b/pkg/client/listers/rbac/v1alpha1/clusterrolebinding.go @@ -20,8 +20,8 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac "k8s.io/kubernetes/pkg/apis/rbac" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/listers/storage/internalversion/BUILD b/pkg/client/listers/storage/internalversion/BUILD index f368232fab9..719e1045039 100644 --- a/pkg/client/listers/storage/internalversion/BUILD +++ b/pkg/client/listers/storage/internalversion/BUILD @@ -15,10 +15,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/storage/internalversion/storageclass.go b/pkg/client/listers/storage/internalversion/storageclass.go index 0549f48fd1d..bce75584944 100644 --- a/pkg/client/listers/storage/internalversion/storageclass.go +++ b/pkg/client/listers/storage/internalversion/storageclass.go @@ -20,8 +20,8 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" storage "k8s.io/kubernetes/pkg/apis/storage" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *storageClassLister) List(selector labels.Selector) (ret []*storage.Stor // Get retrieves the StorageClass from the index for a given name. func (s *storageClassLister) Get(name string) (*storage.StorageClass, error) { - key := &storage.StorageClass{ObjectMeta: api.ObjectMeta{Name: name}} + key := &storage.StorageClass{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/pkg/client/listers/storage/v1beta1/BUILD b/pkg/client/listers/storage/v1beta1/BUILD index bdb2e37827d..b376dfd5343 100644 --- a/pkg/client/listers/storage/v1beta1/BUILD +++ b/pkg/client/listers/storage/v1beta1/BUILD @@ -15,11 +15,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/pkg/client/listers/storage/v1beta1/storageclass.go b/pkg/client/listers/storage/v1beta1/storageclass.go index bbba07b784a..54a0fa1e5f1 100644 --- a/pkg/client/listers/storage/v1beta1/storageclass.go +++ b/pkg/client/listers/storage/v1beta1/storageclass.go @@ -20,8 +20,8 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" storage "k8s.io/kubernetes/pkg/apis/storage" v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/pkg/client/record/event.go b/pkg/client/record/event.go index 2b0bf5db574..6fef483676a 100644 --- a/pkg/client/record/event.go +++ b/pkg/client/record/event.go @@ -301,7 +301,7 @@ func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, eventtype, reas namespace = v1.NamespaceDefault } return &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()), Namespace: namespace, }, diff --git a/pkg/client/record/event_test.go b/pkg/client/record/event_test.go index bc13c7f2b45..34d32dafa42 100644 --- a/pkg/client/record/event_test.go +++ b/pkg/client/record/event_test.go @@ -103,7 +103,7 @@ func OnPatchFactory(testCache map[string]*v1.Event, patchEvent chan<- *v1.Event) func TestEventf(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -111,7 +111,7 @@ func TestEventf(t *testing.T) { }, } testPod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -140,7 +140,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -168,7 +168,7 @@ func TestEventf(t *testing.T) { messageFmt: "some other verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -195,7 +195,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -223,7 +223,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -251,7 +251,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -279,7 +279,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -307,7 +307,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -524,7 +524,7 @@ func TestLotsOfEvents(t *testing.T) { func TestEventfNoNamespace(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", UID: "bar", @@ -551,7 +551,7 @@ func TestEventfNoNamespace(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "default", }, @@ -621,7 +621,7 @@ func TestEventfNoNamespace(t *testing.T) { func TestMultiSinkCache(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -629,7 +629,7 @@ func TestMultiSinkCache(t *testing.T) { }, } testPod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -658,7 +658,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -686,7 +686,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some other verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -713,7 +713,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -741,7 +741,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -769,7 +769,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -797,7 +797,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -825,7 +825,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, diff --git a/pkg/client/record/events_cache.go b/pkg/client/record/events_cache.go index 182c10affb4..ae2dbf609b1 100644 --- a/pkg/client/record/events_cache.go +++ b/pkg/client/record/events_cache.go @@ -172,7 +172,7 @@ func (e *EventAggregator) EventAggregate(newEvent *v1.Event) (*v1.Event, error) // create a new aggregate event eventCopy := &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", newEvent.InvolvedObject.Name, now.UnixNano()), Namespace: newEvent.Namespace, }, diff --git a/pkg/client/restclient/request_test.go b/pkg/client/restclient/request_test.go index 72a58cccc73..631e7de0c82 100755 --- a/pkg/client/restclient/request_test.go +++ b/pkg/client/restclient/request_test.go @@ -1218,7 +1218,7 @@ func BenchmarkCheckRetryClosesBody(b *testing.B) { } func TestDoRequestNewWayReader(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + 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", @@ -1258,7 +1258,7 @@ func TestDoRequestNewWayReader(t *testing.T) { } func TestDoRequestNewWayObj(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + 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", @@ -1298,7 +1298,7 @@ func TestDoRequestNewWayObj(t *testing.T) { } func TestDoRequestNewWayFile(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + 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) @@ -1355,7 +1355,7 @@ func TestDoRequestNewWayFile(t *testing.T) { } func TestWasCreated(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + 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) @@ -1492,7 +1492,7 @@ func TestUnacceptableParamNames(t *testing.T) { func TestBody(t *testing.T) { const data = "test payload" - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} bodyExpected, _ := runtime.Encode(testapi.Default.Codec(), obj) f, err := ioutil.TempFile("", "test_body") @@ -1556,9 +1556,9 @@ func TestWatch(t *testing.T) { t watch.EventType obj runtime.Object }{ - {watch.Added, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "first"}}}, - {watch.Modified, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "second"}}}, - {watch.Deleted, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "last"}}}, + {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) { diff --git a/pkg/client/restclient/watch/decoder_test.go b/pkg/client/restclient/watch/decoder_test.go index f3af5bcd06b..a468929fe5b 100644 --- a/pkg/client/restclient/watch/decoder_test.go +++ b/pkg/client/restclient/watch/decoder_test.go @@ -40,7 +40,7 @@ func TestDecoder(t *testing.T) { codec := testapi.Default.Codec() decoder := restclientwatch.NewDecoder(streaming.NewDecoder(out, codec), codec) - expect := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + expect := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} encoder := json.NewEncoder(in) go func() { data, err := runtime.Encode(testapi.Default.Codec(), expect) diff --git a/pkg/client/restclient/watch/encoder_test.go b/pkg/client/restclient/watch/encoder_test.go index 5e204d70dc1..96b965bf052 100644 --- a/pkg/client/restclient/watch/encoder_test.go +++ b/pkg/client/restclient/watch/encoder_test.go @@ -21,6 +21,7 @@ import ( "io/ioutil" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer/streaming" "k8s.io/apimachinery/pkg/watch" @@ -37,17 +38,17 @@ func TestEncodeDecodeRoundTrip(t *testing.T) { }{ { watch.Added, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, testapi.Default.Codec(), }, { watch.Modified, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, testapi.Default.Codec(), }, { watch.Deleted, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, testapi.Default.Codec(), }, } diff --git a/pkg/client/testing/cache/BUILD b/pkg/client/testing/cache/BUILD index 1d94e261aab..934b93f5be2 100644 --- a/pkg/client/testing/cache/BUILD +++ b/pkg/client/testing/cache/BUILD @@ -16,6 +16,7 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//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/watch", @@ -30,6 +31,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/watch", ], ) diff --git a/pkg/client/testing/cache/fake_controller_source_test.go b/pkg/client/testing/cache/fake_controller_source_test.go index 4fe40a21b19..2538729f9ed 100644 --- a/pkg/client/testing/cache/fake_controller_source_test.go +++ b/pkg/client/testing/cache/fake_controller_source_test.go @@ -20,6 +20,7 @@ import ( "sync" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -51,7 +52,7 @@ func consume(t *testing.T, w watch.Interface, rvs []string, done *sync.WaitGroup func TestRCNumber(t *testing.T) { pod := func(name string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, } diff --git a/pkg/client/testing/core/fake_test.go b/pkg/client/testing/core/fake_test.go index 2d24a298732..72a42dee051 100644 --- a/pkg/client/testing/core/fake_test.go +++ b/pkg/client/testing/core/fake_test.go @@ -155,7 +155,7 @@ func TestFakeClientsetInheritsNamespace(t *testing.T) { func testSA(ns, name string) *api.ServiceAccount { return &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, }, @@ -164,7 +164,7 @@ func testSA(ns, name string) *api.ServiceAccount { func testPod(ns, name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, }, @@ -173,7 +173,7 @@ func testPod(ns, name string) *api.Pod { func testNamespace(ns string) *api.Namespace { return &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ns, }, } diff --git a/pkg/cloudprovider/providers/aws/aws_test.go b/pkg/cloudprovider/providers/aws/aws_test.go index 242317021f9..284e20a757c 100644 --- a/pkg/cloudprovider/providers/aws/aws_test.go +++ b/pkg/cloudprovider/providers/aws/aws_test.go @@ -1106,7 +1106,7 @@ func TestDescribeLoadBalancerOnDelete(t *testing.T) { c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices) awsServices.elb.expectDescribeLoadBalancers("aid") - c.EnsureLoadBalancerDeleted(TestClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "myservice", UID: "id"}}) + c.EnsureLoadBalancerDeleted(TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}) } func TestDescribeLoadBalancerOnUpdate(t *testing.T) { @@ -1114,7 +1114,7 @@ func TestDescribeLoadBalancerOnUpdate(t *testing.T) { c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices) awsServices.elb.expectDescribeLoadBalancers("aid") - c.UpdateLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) + c.UpdateLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) } func TestDescribeLoadBalancerOnGet(t *testing.T) { @@ -1122,7 +1122,7 @@ func TestDescribeLoadBalancerOnGet(t *testing.T) { c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices) awsServices.elb.expectDescribeLoadBalancers("aid") - c.GetLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "myservice", UID: "id"}}) + c.GetLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}) } func TestDescribeLoadBalancerOnEnsure(t *testing.T) { @@ -1130,7 +1130,7 @@ func TestDescribeLoadBalancerOnEnsure(t *testing.T) { c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices) awsServices.elb.expectDescribeLoadBalancers("aid") - c.EnsureLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) + c.EnsureLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) } func TestBuildListener(t *testing.T) { diff --git a/pkg/cloudprovider/providers/cloudstack/BUILD b/pkg/cloudprovider/providers/cloudstack/BUILD index 8452aeaf7b6..b67ee36add4 100644 --- a/pkg/cloudprovider/providers/cloudstack/BUILD +++ b/pkg/cloudprovider/providers/cloudstack/BUILD @@ -29,7 +29,10 @@ go_test( srcs = ["cloudstack_test.go"], library = ":go_default_library", tags = ["automanaged"], - deps = ["//pkg/api/v1:go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/pkg/cloudprovider/providers/cloudstack/cloudstack_test.go b/pkg/cloudprovider/providers/cloudstack/cloudstack_test.go index 25f6795b07d..3c2ca55afea 100644 --- a/pkg/cloudprovider/providers/cloudstack/cloudstack_test.go +++ b/pkg/cloudprovider/providers/cloudstack/cloudstack_test.go @@ -22,6 +22,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -111,7 +112,7 @@ func TestLoadBalancer(t *testing.T) { t.Fatalf("LoadBalancer() returned false") } - _, exists, err := lb.GetLoadBalancer(testClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "noexist"}}) + _, exists, err := lb.GetLoadBalancer(testClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "noexist"}}) if err != nil { t.Fatalf("GetLoadBalancer(\"noexist\") returned error: %s", err) } diff --git a/pkg/cloudprovider/providers/openstack/BUILD b/pkg/cloudprovider/providers/openstack/BUILD index 0ca9db5ce92..54f0abb9c1e 100644 --- a/pkg/cloudprovider/providers/openstack/BUILD +++ b/pkg/cloudprovider/providers/openstack/BUILD @@ -71,6 +71,7 @@ go_test( "//pkg/cloudprovider:go_default_library", "//vendor:github.com/rackspace/gophercloud", "//vendor:github.com/rackspace/gophercloud/openstack/compute/v2/servers", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/rand", ], diff --git a/pkg/cloudprovider/providers/openstack/openstack_test.go b/pkg/cloudprovider/providers/openstack/openstack_test.go index 66580076deb..c3a6fc04164 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_test.go +++ b/pkg/cloudprovider/providers/openstack/openstack_test.go @@ -27,6 +27,7 @@ import ( "github.com/rackspace/gophercloud" "github.com/rackspace/gophercloud/openstack/compute/v2/servers" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/rand" "k8s.io/kubernetes/pkg/api/v1" ) @@ -294,7 +295,7 @@ func TestLoadBalancer(t *testing.T) { t.Fatalf("LoadBalancer() returned false - perhaps your stack doesn't support Neutron?") } - _, exists, err := lb.GetLoadBalancer(testClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "noexist"}}) + _, exists, err := lb.GetLoadBalancer(testClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "noexist"}}) if err != nil { t.Fatalf("GetLoadBalancer(\"noexist\") returned error: %s", err) } diff --git a/pkg/controller/client_builder.go b/pkg/controller/client_builder.go index 76c52528b2b..459148519e9 100644 --- a/pkg/controller/client_builder.go +++ b/pkg/controller/client_builder.go @@ -108,14 +108,14 @@ func (b SAControllerClientBuilder) Config(name string) (*restclient.Config, erro // check to see if the namespace exists. If it isn't a NotFound, just try to create the SA. // It'll probably fail, but perhaps that will have a better message. if _, err := b.CoreClient.Namespaces().Get(b.Namespace, metav1.GetOptions{}); apierrors.IsNotFound(err) { - _, err = b.CoreClient.Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: b.Namespace}}) + _, err = b.CoreClient.Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: b.Namespace}}) if err != nil && !apierrors.IsAlreadyExists(err) { return nil, err } } sa, err = b.CoreClient.ServiceAccounts(b.Namespace).Create( - &v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Namespace: b.Namespace, Name: name}}) + &v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Namespace: b.Namespace, Name: name}}) if err != nil { return nil, err } diff --git a/pkg/controller/cloud/nodecontroller_test.go b/pkg/controller/cloud/nodecontroller_test.go index 93e9f62c75b..fd4fe84d1a6 100644 --- a/pkg/controller/cloud/nodecontroller_test.go +++ b/pkg/controller/cloud/nodecontroller_test.go @@ -39,7 +39,7 @@ import ( // and cloud provider says node is gone func TestNodeDeleted(t *testing.T) { pod0 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "pod0", }, @@ -57,7 +57,7 @@ func TestNodeDeleted(t *testing.T) { } pod1 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "pod1", }, @@ -77,7 +77,7 @@ func TestNodeDeleted(t *testing.T) { fnh := &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, diff --git a/pkg/controller/controller_ref_manager.go b/pkg/controller/controller_ref_manager.go index 5d147e37033..175f2ccfafb 100644 --- a/pkg/controller/controller_ref_manager.go +++ b/pkg/controller/controller_ref_manager.go @@ -31,7 +31,7 @@ import ( type PodControllerRefManager struct { podControl PodControlInterface - controllerObject v1.ObjectMeta + controllerObject metav1.ObjectMeta controllerSelector labels.Selector controllerKind schema.GroupVersionKind } @@ -40,7 +40,7 @@ type PodControllerRefManager struct { // methods to manage the controllerRef of pods. func NewPodControllerRefManager( podControl PodControlInterface, - controllerObject v1.ObjectMeta, + controllerObject metav1.ObjectMeta, controllerSelector labels.Selector, controllerKind schema.GroupVersionKind, ) *PodControllerRefManager { @@ -93,7 +93,7 @@ func (m *PodControllerRefManager) Classify(pods []*v1.Pod) ( // GetControllerOf returns the controllerRef if controllee has a controller, // otherwise returns nil. -func GetControllerOf(controllee *v1.ObjectMeta) *metav1.OwnerReference { +func GetControllerOf(controllee *metav1.ObjectMeta) *metav1.OwnerReference { for i := range controllee.OwnerReferences { owner := &controllee.OwnerReferences[i] // controlled by other controller @@ -153,7 +153,7 @@ func (m *PodControllerRefManager) ReleasePod(pod *v1.Pod) error { // for more details. type ReplicaSetControllerRefManager struct { rsControl RSControlInterface - controllerObject v1.ObjectMeta + controllerObject metav1.ObjectMeta controllerSelector labels.Selector controllerKind schema.GroupVersionKind } @@ -162,7 +162,7 @@ type ReplicaSetControllerRefManager struct { // methods to manage the controllerRef of ReplicaSets. func NewReplicaSetControllerRefManager( rsControl RSControlInterface, - controllerObject v1.ObjectMeta, + controllerObject metav1.ObjectMeta, controllerSelector labels.Selector, controllerKind schema.GroupVersionKind, ) *ReplicaSetControllerRefManager { diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index 077549dc8c6..852fa0e5efb 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -496,7 +496,7 @@ func GetPodFromTemplate(template *v1.PodTemplateSpec, parentObject runtime.Objec prefix := getPodsPrefix(accessor.GetName()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: desiredLabels, Annotations: desiredAnnotations, GenerateName: prefix, diff --git a/pkg/controller/controller_utils_test.go b/pkg/controller/controller_utils_test.go index 66a4d7d3943..007a50a5bd8 100644 --- a/pkg/controller/controller_utils_test.go +++ b/pkg/controller/controller_utils_test.go @@ -56,7 +56,7 @@ func NewFakeControllerExpectationsLookup(ttl time.Duration) (*ControllerExpectat func newReplicationController(replicas int) *v1.ReplicationController { rc := &v1.ReplicationController{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", Namespace: v1.NamespaceDefault, @@ -66,7 +66,7 @@ func newReplicationController(replicas int) *v1.ReplicationController { Replicas: func() *int32 { i := int32(replicas); return &i }(), Selector: map[string]string{"foo": "bar"}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "name": "foo", "type": "production", @@ -98,7 +98,7 @@ func newPodList(store cache.Store, count int, status v1.PodPhase, rc *v1.Replica pods := []v1.Pod{} for i := 0; i < count; i++ { newPod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("pod%d", i), Labels: rc.Spec.Selector, Namespace: rc.Namespace, @@ -239,7 +239,7 @@ func TestUIDExpectations(t *testing.T) { func TestCreatePods(t *testing.T) { ns := v1.NamespaceDefault - body := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "empty_pod"}}) + body := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "empty_pod"}}) fakeHandler := utiltesting.FakeHandler{ StatusCode: 200, ResponseBody: string(body), @@ -261,7 +261,7 @@ func TestCreatePods(t *testing.T) { } expectedPod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: controllerSpec.Spec.Template.Labels, GenerateName: fmt.Sprintf("%s-", controllerSpec.Name), }, diff --git a/pkg/controller/cronjob/cronjob_controller_test.go b/pkg/controller/cronjob/cronjob_controller_test.go index 6c037df3c5e..3ebf8a9fc24 100644 --- a/pkg/controller/cronjob/cronjob_controller_test.go +++ b/pkg/controller/cronjob/cronjob_controller_test.go @@ -83,7 +83,7 @@ func justAfterThePriorHour() time.Time { // returns a cronJob with some fields filled in. func cronJob() batch.CronJob { return batch.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: "snazzycats", UID: types.UID("1a2b3c"), @@ -94,7 +94,7 @@ func cronJob() batch.CronJob { Schedule: "* * * * ?", ConcurrencyPolicy: batch.AllowConcurrent, JobTemplate: batch.JobTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, Annotations: map[string]string{"x": "y"}, }, @@ -110,7 +110,7 @@ func jobSpec() batch.JobSpec { Parallelism: &one, Completions: &one, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -126,7 +126,7 @@ func jobSpec() batch.JobSpec { func newJob(UID string) batch.Job { return batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(UID), Name: "foobar", Namespace: v1.NamespaceDefault, diff --git a/pkg/controller/cronjob/utils.go b/pkg/controller/cronjob/utils.go index 9e4450e87a9..c599239568e 100644 --- a/pkg/controller/cronjob/utils.go +++ b/pkg/controller/cronjob/utils.go @@ -196,7 +196,7 @@ func getJobFromTemplate(sj *batch.CronJob, scheduledTime time.Time) (*batch.Job, name := fmt.Sprintf("%s-%d", sj.Name, getTimeHash(scheduledTime)) job := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, Annotations: annotations, Name: name, diff --git a/pkg/controller/cronjob/utils_test.go b/pkg/controller/cronjob/utils_test.go index 085be108c76..36b0bc02b11 100644 --- a/pkg/controller/cronjob/utils_test.go +++ b/pkg/controller/cronjob/utils_test.go @@ -35,7 +35,7 @@ func TestGetJobFromTemplate(t *testing.T) { var no bool = false sj := batch.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: "snazzycats", UID: types.UID("1a2b3c"), @@ -45,7 +45,7 @@ func TestGetJobFromTemplate(t *testing.T) { Schedule: "* * * * ?", ConcurrencyPolicy: batch.AllowConcurrent, JobTemplate: batch.JobTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, Annotations: map[string]string{"x": "y"}, }, @@ -53,7 +53,7 @@ func TestGetJobFromTemplate(t *testing.T) { ActiveDeadlineSeconds: &one, ManualSelector: &no, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -99,7 +99,7 @@ func TestGetJobFromTemplate(t *testing.T) { func TestGetParentUIDFromJob(t *testing.T) { j := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foobar", Namespace: v1.NamespaceDefault, }, @@ -108,7 +108,7 @@ func TestGetParentUIDFromJob(t *testing.T) { MatchLabels: map[string]string{"foo": "bar"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -173,7 +173,7 @@ func TestGroupJobsByParent(t *testing.T) { { // Case 2: there is one controller with no job. sjs := []batch.CronJob{ - {ObjectMeta: v1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, } js := []batch.Job{} jobsBySj := groupJobsByParent(sjs, js) @@ -185,10 +185,10 @@ func TestGroupJobsByParent(t *testing.T) { { // Case 3: there is one controller with one job it created. sjs := []batch.CronJob{ - {ObjectMeta: v1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, } js := []batch.Job{ - {ObjectMeta: v1.ObjectMeta{Name: "a", Namespace: "x", Annotations: createdBy1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "x", Annotations: createdBy1}}, } jobsBySj := groupJobsByParent(sjs, js) @@ -208,18 +208,18 @@ func TestGroupJobsByParent(t *testing.T) { // Case 4: Two namespaces, one has two jobs from one controller, other has 3 jobs from two controllers. // There are also two jobs with no created-by annotation. js := []batch.Job{ - {ObjectMeta: v1.ObjectMeta{Name: "a", Namespace: "x", Annotations: createdBy1}}, - {ObjectMeta: v1.ObjectMeta{Name: "b", Namespace: "x", Annotations: createdBy2}}, - {ObjectMeta: v1.ObjectMeta{Name: "c", Namespace: "x", Annotations: createdBy1}}, - {ObjectMeta: v1.ObjectMeta{Name: "d", Namespace: "x", Annotations: noCreatedBy}}, - {ObjectMeta: v1.ObjectMeta{Name: "a", Namespace: "y", Annotations: createdBy3}}, - {ObjectMeta: v1.ObjectMeta{Name: "b", Namespace: "y", Annotations: createdBy3}}, - {ObjectMeta: v1.ObjectMeta{Name: "d", Namespace: "y", Annotations: noCreatedBy}}, + {ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "x", Annotations: createdBy1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "b", Namespace: "x", Annotations: createdBy2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "c", Namespace: "x", Annotations: createdBy1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "d", Namespace: "x", Annotations: noCreatedBy}}, + {ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "y", Annotations: createdBy3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "b", Namespace: "y", Annotations: createdBy3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "d", Namespace: "y", Annotations: noCreatedBy}}, } sjs := []batch.CronJob{ - {ObjectMeta: v1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, - {ObjectMeta: v1.ObjectMeta{Name: "f", Namespace: "x", UID: uid2}}, - {ObjectMeta: v1.ObjectMeta{Name: "g", Namespace: "y", UID: uid3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "f", Namespace: "x", UID: uid2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "g", Namespace: "y", UID: uid3}}, } jobsBySj := groupJobsByParent(sjs, js) @@ -267,7 +267,7 @@ func TestGetRecentUnmetScheduleTimes(t *testing.T) { } sj := batch.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: v1.NamespaceDefault, UID: types.UID("1a2b3c"), diff --git a/pkg/controller/daemon/daemoncontroller_test.go b/pkg/controller/daemon/daemoncontroller_test.go index 018d1648ce4..93285505489 100644 --- a/pkg/controller/daemon/daemoncontroller_test.go +++ b/pkg/controller/daemon/daemoncontroller_test.go @@ -55,14 +55,14 @@ func getKey(ds *extensions.DaemonSet, t *testing.T) string { func newDaemonSet(name string) *extensions.DaemonSet { return &extensions.DaemonSet{ TypeMeta: metav1.TypeMeta{APIVersion: testapi.Extensions.GroupVersion().String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: v1.NamespaceDefault, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: v1.PodSpec{ @@ -84,7 +84,7 @@ func newDaemonSet(name string) *extensions.DaemonSet { func newNode(name string, label map[string]string) *v1.Node { return &v1.Node{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: label, Namespace: v1.NamespaceDefault, @@ -109,7 +109,7 @@ func addNodes(nodeStore cache.Store, startIndex, numNodes int, label map[string] func newPod(podName string, nodeName string, label map[string]string) *v1.Pod { pod := &v1.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: podName, Labels: label, Namespace: v1.NamespaceDefault, @@ -374,7 +374,7 @@ func TestPortConflictWithSameDaemonPodDoesNotDeletePod(t *testing.T) { node := newNode("port-conflict", nil) manager.nodeStore.Add(node) manager.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, Namespace: v1.NamespaceDefault, }, @@ -424,7 +424,7 @@ func TestPodIsNotDeletedByDaemonsetWithEmptyLabelSelector(t *testing.T) { manager.nodeStore.Store.Add(newNode("node1", nil)) // Create pod not controlled by a daemonset. manager.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"bang": "boom"}, Namespace: v1.NamespaceDefault, }, @@ -664,7 +664,7 @@ func TestNodeShouldRunDaemonPod(t *testing.T) { Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: resourcePodSpec("", "50M", "0.5"), @@ -680,7 +680,7 @@ func TestNodeShouldRunDaemonPod(t *testing.T) { Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: resourcePodSpec("", "200M", "0.5"), @@ -696,7 +696,7 @@ func TestNodeShouldRunDaemonPod(t *testing.T) { Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: resourcePodSpec("other-node", "50M", "0.5"), @@ -723,7 +723,7 @@ func TestNodeShouldRunDaemonPod(t *testing.T) { Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: v1.PodSpec{ diff --git a/pkg/controller/deployment/deployment_controller_test.go b/pkg/controller/deployment/deployment_controller_test.go index 6b2d6fa6aa4..d254d4666a6 100644 --- a/pkg/controller/deployment/deployment_controller_test.go +++ b/pkg/controller/deployment/deployment_controller_test.go @@ -44,7 +44,7 @@ var ( func rs(name string, replicas int, selector map[string]string, timestamp metav1.Time) *extensions.ReplicaSet { return &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, CreationTimestamp: timestamp, Namespace: v1.NamespaceDefault, @@ -68,7 +68,7 @@ func newRSWithStatus(name string, specReplicas, statusReplicas int, selector map func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSurge, maxUnavailable *intstr.IntOrString, selector map[string]string) *extensions.Deployment { d := extensions.Deployment{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(extensions.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: name, Namespace: v1.NamespaceDefault, @@ -85,7 +85,7 @@ func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSu Replicas: func() *int32 { i := int32(replicas); return &i }(), Selector: &metav1.LabelSelector{MatchLabels: selector}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: selector, }, Spec: v1.PodSpec{ @@ -110,7 +110,7 @@ func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSu func newReplicaSet(d *extensions.Deployment, name string, replicas int) *extensions.ReplicaSet { return &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: v1.NamespaceDefault, Labels: d.Spec.Selector.MatchLabels, @@ -554,7 +554,7 @@ func TestPodDeletionDoesntEnqueueRecreateDeployment(t *testing.T) { func generatePodFromRS(rs *extensions.ReplicaSet) *v1.Pod { trueVar := true return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rs.Name + "-pod", Namespace: rs.Namespace, Labels: rs.Spec.Selector.MatchLabels, diff --git a/pkg/controller/deployment/sync.go b/pkg/controller/deployment/sync.go index 9c75aaced1a..ba41759e04b 100644 --- a/pkg/controller/deployment/sync.go +++ b/pkg/controller/deployment/sync.go @@ -324,7 +324,7 @@ func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployme // Create new ReplicaSet newRS := extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ // Make the name deterministic, to ensure idempotence Name: deployment.Name + "-" + podTemplateSpecHash, Namespace: namespace, diff --git a/pkg/controller/deployment/util/deployment_util_test.go b/pkg/controller/deployment/util/deployment_util_test.go index 666c9b2c0d0..515ec51b839 100644 --- a/pkg/controller/deployment/util/deployment_util_test.go +++ b/pkg/controller/deployment/util/deployment_util_test.go @@ -102,7 +102,7 @@ func newPod(now time.Time, ready bool, beforeSec int) v1.Pod { // generatePodFromRS creates a pod, with the input ReplicaSet's selector and its template func generatePodFromRS(rs extensions.ReplicaSet) v1.Pod { return v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: rs.Labels, }, Spec: rs.Spec.Template.Spec, @@ -111,7 +111,7 @@ func generatePodFromRS(rs extensions.ReplicaSet) v1.Pod { func generatePod(labels map[string]string, image string) v1.Pod { return v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: v1.PodSpec{ @@ -129,7 +129,7 @@ func generatePod(labels map[string]string, image string) v1.Pod { func generateRSWithLabel(labels map[string]string, image string) extensions.ReplicaSet { return extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName("replicaset"), Labels: labels, }, @@ -137,7 +137,7 @@ func generateRSWithLabel(labels map[string]string, image string) extensions.Repl Replicas: func(i int32) *int32 { return &i }(1), Selector: &metav1.LabelSelector{MatchLabels: labels}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: v1.PodSpec{ @@ -159,7 +159,7 @@ func generateRSWithLabel(labels map[string]string, image string) extensions.Repl func generateRS(deployment extensions.Deployment) extensions.ReplicaSet { template := GetNewReplicaSetTemplate(&deployment) return extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName("replicaset"), Labels: template.Labels, }, @@ -176,7 +176,7 @@ func generateDeployment(image string) extensions.Deployment { podLabels := map[string]string{"name": image} terminationSec := int64(30) return extensions.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: image, Annotations: make(map[string]string), }, @@ -184,7 +184,7 @@ func generateDeployment(image string) extensions.Deployment { Replicas: func(i int32) *int32 { return &i }(1), Selector: &metav1.LabelSelector{MatchLabels: podLabels}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabels, }, Spec: v1.PodSpec{ @@ -364,7 +364,7 @@ func TestGetOldRCs(t *testing.T) { func generatePodTemplateSpec(name, nodeName string, annotations, labels map[string]string) v1.PodTemplateSpec { return v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Annotations: annotations, Labels: labels, diff --git a/pkg/controller/disruption/disruption_test.go b/pkg/controller/disruption/disruption_test.go index 207ff2d816d..e5e997a165c 100644 --- a/pkg/controller/disruption/disruption_test.go +++ b/pkg/controller/disruption/disruption_test.go @@ -118,7 +118,7 @@ func newPodDisruptionBudget(t *testing.T, minAvailable intstr.IntOrString) (*pol pdb := &policy.PodDisruptionBudget{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", Namespace: v1.NamespaceDefault, @@ -141,7 +141,7 @@ func newPodDisruptionBudget(t *testing.T, minAvailable intstr.IntOrString) (*pol func newPod(t *testing.T, name string) (*v1.Pod, string) { pod := &v1.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Annotations: make(map[string]string), Name: name, @@ -168,7 +168,7 @@ func newPod(t *testing.T, name string) (*v1.Pod, string) { func newReplicationController(t *testing.T, size int32) (*v1.ReplicationController, string) { rc := &v1.ReplicationController{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", Namespace: v1.NamespaceDefault, @@ -192,7 +192,7 @@ func newReplicationController(t *testing.T, size int32) (*v1.ReplicationControll func newDeployment(t *testing.T, size int32) (*extensions.Deployment, string) { d := &extensions.Deployment{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", Namespace: v1.NamespaceDefault, @@ -216,7 +216,7 @@ func newDeployment(t *testing.T, size int32) (*extensions.Deployment, string) { func newReplicaSet(t *testing.T, size int32) (*extensions.ReplicaSet, string) { rs := &extensions.ReplicaSet{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", Namespace: v1.NamespaceDefault, @@ -240,7 +240,7 @@ func newReplicaSet(t *testing.T, size int32) (*extensions.ReplicaSet, string) { func newStatefulSet(t *testing.T, size int32) (*apps.StatefulSet, string) { ss := &apps.StatefulSet{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", Namespace: v1.NamespaceDefault, diff --git a/pkg/controller/endpoint/endpoints_controller.go b/pkg/controller/endpoint/endpoints_controller.go index 7e8d0752755..bcd5e56e5b1 100644 --- a/pkg/controller/endpoint/endpoints_controller.go +++ b/pkg/controller/endpoint/endpoints_controller.go @@ -451,7 +451,7 @@ func (e *EndpointController) syncService(key string) error { if err != nil { if errors.IsNotFound(err) { currentEndpoints = &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: service.Name, Labels: service.Labels, }, diff --git a/pkg/controller/endpoint/endpoints_controller_test.go b/pkg/controller/endpoint/endpoints_controller_test.go index 2318daaa57b..ba8354a7f2f 100644 --- a/pkg/controller/endpoint/endpoints_controller_test.go +++ b/pkg/controller/endpoint/endpoints_controller_test.go @@ -43,7 +43,7 @@ func addPods(store cache.Store, namespace string, nPods int, nPorts int, nNotRea for i := 0; i < nPods+nNotReady; i++ { p := &v1.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: fmt.Sprintf("pod%d", i), Labels: map[string]string{"foo": "bar"}, @@ -96,7 +96,7 @@ func TestSyncEndpointsItemsPreserveNoSelector(t *testing.T) { ns := v1.NamespaceDefault testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -111,7 +111,7 @@ func TestSyncEndpointsItemsPreserveNoSelector(t *testing.T) { endpoints := NewEndpointControllerFromClient(client, controller.NoResyncPeriodFunc) endpoints.podStoreSynced = alwaysReady endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{Port: 80}}}, }) endpoints.syncService(ns + "/foo") @@ -128,7 +128,7 @@ func TestCheckLeftoverEndpoints(t *testing.T) { ResourceVersion: "1", }, Items: []v1.Endpoints{{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -158,7 +158,7 @@ func TestSyncEndpointsProtocolTCP(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -175,7 +175,7 @@ func TestSyncEndpointsProtocolTCP(t *testing.T) { addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, TargetPort: intstr.FromInt(8080), Protocol: "TCP"}}, @@ -184,7 +184,7 @@ func TestSyncEndpointsProtocolTCP(t *testing.T) { endpoints.syncService(ns + "/foo") endpointsHandler.ValidateRequestCount(t, 2) data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -201,7 +201,7 @@ func TestSyncEndpointsProtocolUDP(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -217,7 +217,7 @@ func TestSyncEndpointsProtocolUDP(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, TargetPort: intstr.FromInt(8080), Protocol: "UDP"}}, @@ -226,7 +226,7 @@ func TestSyncEndpointsProtocolUDP(t *testing.T) { endpoints.syncService(ns + "/foo") endpointsHandler.ValidateRequestCount(t, 2) data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -243,7 +243,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAll(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -256,7 +256,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAll(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, @@ -264,7 +264,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAll(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -281,7 +281,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllNotReady(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -294,7 +294,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllNotReady(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 0, 1, 1) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, @@ -302,7 +302,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllNotReady(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -319,7 +319,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllMixed(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -332,7 +332,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllMixed(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 1, 1, 1) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, @@ -340,7 +340,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllMixed(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -358,7 +358,7 @@ func TestSyncEndpointsItemsPreexisting(t *testing.T) { ns := "bar" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -374,7 +374,7 @@ func TestSyncEndpointsItemsPreexisting(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{"foo": "bar"}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, @@ -382,7 +382,7 @@ func TestSyncEndpointsItemsPreexisting(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -399,7 +399,7 @@ func TestSyncEndpointsItemsPreexistingIdentical(t *testing.T) { ns := v1.NamespaceDefault testServer, endpointsHandler := makeTestServer(t, v1.NamespaceDefault, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", Name: "foo", Namespace: ns, @@ -415,7 +415,7 @@ func TestSyncEndpointsItemsPreexistingIdentical(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, v1.NamespaceDefault, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: v1.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: v1.NamespaceDefault}, Spec: v1.ServiceSpec{ Selector: map[string]string{"foo": "bar"}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, @@ -436,7 +436,7 @@ func TestSyncEndpointsItems(t *testing.T) { addPods(endpoints.podStore.Indexer, ns, 3, 2, 0) addPods(endpoints.podStore.Indexer, "blah", 5, 2, 0) // make sure these aren't found! endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{"foo": "bar"}, Ports: []v1.ServicePort{ @@ -458,7 +458,7 @@ func TestSyncEndpointsItems(t *testing.T) { }, }} data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "", }, Subsets: endptspkg.SortSubsets(expectedSubsets), @@ -479,7 +479,7 @@ func TestSyncEndpointsItemsWithLabels(t *testing.T) { addPods(endpoints.podStore.Indexer, ns, 3, 2, 0) serviceLabels := map[string]string{"foo": "bar"} endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, Labels: serviceLabels, @@ -505,7 +505,7 @@ func TestSyncEndpointsItemsWithLabels(t *testing.T) { }, }} data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "", Labels: serviceLabels, }, @@ -520,7 +520,7 @@ func TestSyncEndpointsItemsPreexistingLabelsChange(t *testing.T) { ns := "bar" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -540,7 +540,7 @@ func TestSyncEndpointsItemsPreexistingLabelsChange(t *testing.T) { addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) serviceLabels := map[string]string{"baz": "blah"} endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, Labels: serviceLabels, @@ -552,7 +552,7 @@ func TestSyncEndpointsItemsPreexistingLabelsChange(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", diff --git a/pkg/controller/garbagecollector/garbagecollector.go b/pkg/controller/garbagecollector/garbagecollector.go index d579a423353..7ecde9e0f1e 100644 --- a/pkg/controller/garbagecollector/garbagecollector.go +++ b/pkg/controller/garbagecollector/garbagecollector.go @@ -678,7 +678,7 @@ func objectReferenceToMetadataOnlyObject(ref objectReference) *metaonly.Metadata APIVersion: ref.APIVersion, Kind: ref.Kind, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: ref.Namespace, UID: ref.UID, Name: ref.Name, diff --git a/pkg/controller/garbagecollector/garbagecollector_test.go b/pkg/controller/garbagecollector/garbagecollector_test.go index 20f197deec0..9e54bf2e0ae 100644 --- a/pkg/controller/garbagecollector/garbagecollector_test.go +++ b/pkg/controller/garbagecollector/garbagecollector_test.go @@ -126,7 +126,7 @@ func getPod(podName string, ownerReferences []metav1.OwnerReference) *v1.Pod { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: "ns1", OwnerReferences: ownerReferences, @@ -237,7 +237,7 @@ func createEvent(eventType eventType, selfUID string, owners []string) event { return event{ eventType: eventType, obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(selfUID), OwnerReferences: ownerReferences, }, diff --git a/pkg/controller/garbagecollector/metaonly/BUILD b/pkg/controller/garbagecollector/metaonly/BUILD index 1d4a87f5a2b..ee01ace1bb7 100644 --- a/pkg/controller/garbagecollector/metaonly/BUILD +++ b/pkg/controller/garbagecollector/metaonly/BUILD @@ -18,7 +18,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/pkg/controller/garbagecollector/metaonly/metaonly.go b/pkg/controller/garbagecollector/metaonly/metaonly.go index bdde245b493..cfe55b25ba7 100644 --- a/pkg/controller/garbagecollector/metaonly/metaonly.go +++ b/pkg/controller/garbagecollector/metaonly/metaonly.go @@ -34,7 +34,7 @@ type metaOnlyJSONScheme struct{} // This function can be extended to mapping different gvk to different MetadataOnlyObject, // which embedded with different version of ObjectMeta. Currently the system -// only supports v1.ObjectMeta. +// only supports metav1.ObjectMeta. func gvkToMetadataOnlyObject(gvk schema.GroupVersionKind) runtime.Object { if strings.HasSuffix(gvk.Kind, "List") { return &MetadataOnlyObjectList{} diff --git a/pkg/controller/garbagecollector/metaonly/metaonly_test.go b/pkg/controller/garbagecollector/metaonly/metaonly_test.go index e8135a4380a..7e69dfe5753 100644 --- a/pkg/controller/garbagecollector/metaonly/metaonly_test.go +++ b/pkg/controller/garbagecollector/metaonly/metaonly_test.go @@ -36,7 +36,7 @@ func getPod() *v1.Pod { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod", OwnerReferences: []metav1.OwnerReference{ {UID: "1234"}, diff --git a/pkg/controller/garbagecollector/metaonly/types.generated.go b/pkg/controller/garbagecollector/metaonly/types.generated.go index c34e234643c..8118255f52d 100644 --- a/pkg/controller/garbagecollector/metaonly/types.generated.go +++ b/pkg/controller/garbagecollector/metaonly/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -158,7 +156,13 @@ func (x *MetadataOnlyObject) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -168,7 +172,13 @@ func (x *MetadataOnlyObject) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -258,10 +268,16 @@ func (x *MetadataOnlyObject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } default: z.DecStructFieldNotFound(-1, yys3) @@ -274,16 +290,16 @@ func (x *MetadataOnlyObject) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb9 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb9 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -291,21 +307,21 @@ func (x *MetadataOnlyObject) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv10 := &x.Kind - yym11 := z.DecBinary() - _ = yym11 + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 if false { } else { - *((*string)(yyv10)) = r.DecodeString() + *((*string)(yyv11)) = r.DecodeString() } } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb9 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb9 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -313,43 +329,49 @@ func (x *MetadataOnlyObject) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv12 := &x.APIVersion - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.APIVersion + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb9 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb9 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv14 := &x.ObjectMeta - yyv14.CodecDecodeSelf(d) + yyv15 := &x.ObjectMeta + yym16 := z.DecBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.DecExt(yyv15) { + } else { + z.DecFallback(yyv15, false) + } } for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb9 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb9 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj9-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/controller/job/jobcontroller_test.go b/pkg/controller/job/jobcontroller_test.go index 5a75046bf86..23b2d3c3999 100644 --- a/pkg/controller/job/jobcontroller_test.go +++ b/pkg/controller/job/jobcontroller_test.go @@ -41,7 +41,7 @@ var alwaysReady = func() bool { return true } func newJob(parallelism, completions int32) *batch.Job { j := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foobar", Namespace: v1.NamespaceDefault, }, @@ -50,7 +50,7 @@ func newJob(parallelism, completions int32) *batch.Job { MatchLabels: map[string]string{"foo": "bar"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -99,7 +99,7 @@ func newPodList(count int32, status v1.PodPhase, job *batch.Job) []v1.Pod { pods := []v1.Pod{} for i := int32(0); i < count; i++ { newPod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("pod-%v", rand.String(10)), Labels: job.Spec.Selector.MatchLabels, Namespace: job.Namespace, @@ -523,17 +523,17 @@ func TestJobPodLookup(t *testing.T) { // pods without labels don't match any job { job: &batch.Job{ - ObjectMeta: v1.ObjectMeta{Name: "basic"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic"}, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "foo1", Namespace: v1.NamespaceAll}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: v1.NamespaceAll}, }, expectedName: "", }, // matching labels, different namespace { job: &batch.Job{ - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -541,7 +541,7 @@ func TestJobPodLookup(t *testing.T) { }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -552,7 +552,7 @@ func TestJobPodLookup(t *testing.T) { // matching ns and labels returns { job: &batch.Job{ - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchExpressions: []metav1.LabelSelectorRequirement{ @@ -566,7 +566,7 @@ func TestJobPodLookup(t *testing.T) { }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, diff --git a/pkg/controller/namespace/namespace_controller_test.go b/pkg/controller/namespace/namespace_controller_test.go index 78dcc10cf45..fa9b6baf0a5 100644 --- a/pkg/controller/namespace/namespace_controller_test.go +++ b/pkg/controller/namespace/namespace_controller_test.go @@ -58,7 +58,7 @@ func TestFinalized(t *testing.T) { func TestFinalizeNamespaceFunc(t *testing.T) { mockClient := &fake.Clientset{} testNamespace := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", ResourceVersion: "1", }, @@ -87,7 +87,7 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *metav1.APIVersio now := metav1.Now() namespaceName := "test" testNamespacePendingFinalize := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespaceName, ResourceVersion: "1", DeletionTimestamp: &now, @@ -100,7 +100,7 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *metav1.APIVersio }, } testNamespaceFinalizeComplete := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespaceName, ResourceVersion: "1", DeletionTimestamp: &now, @@ -233,7 +233,7 @@ func TestSyncNamespaceThatIsTerminatingV1Beta1(t *testing.T) { func TestSyncNamespaceThatIsActive(t *testing.T) { mockClient := &fake.Clientset{} testNamespace := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", ResourceVersion: "1", }, diff --git a/pkg/controller/node/cidr_allocator_test.go b/pkg/controller/node/cidr_allocator_test.go index 61861c5741f..77fcf584bb2 100644 --- a/pkg/controller/node/cidr_allocator_test.go +++ b/pkg/controller/node/cidr_allocator_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -55,7 +56,7 @@ func TestAllocateOrOccupyCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -75,7 +76,7 @@ func TestAllocateOrOccupyCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -99,7 +100,7 @@ func TestAllocateOrOccupyCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -185,7 +186,7 @@ func TestAllocateOrOccupyCIDRFailure(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -268,7 +269,7 @@ func TestReleaseCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -291,7 +292,7 @@ func TestReleaseCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -359,7 +360,7 @@ func TestReleaseCIDRSuccess(t *testing.T) { for _, cidrToRelease := range tc.cidrsToRelease { nodeToRelease := v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, } diff --git a/pkg/controller/node/nodecontroller_test.go b/pkg/controller/node/nodecontroller_test.go index 85d81bb02b8..a3946967980 100644 --- a/pkg/controller/node/nodecontroller_test.go +++ b/pkg/controller/node/nodecontroller_test.go @@ -124,7 +124,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: fakeNow, Labels: map[string]string{ @@ -134,7 +134,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -168,7 +168,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -188,7 +188,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -232,7 +232,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -252,7 +252,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -276,7 +276,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { &v1.PodList{ Items: []v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod0", Namespace: "default", Labels: map[string]string{"daemon": "yes"}, @@ -291,7 +291,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, daemonSets: []extensions.DaemonSet{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "ds0", Namespace: "default", }, @@ -323,7 +323,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -343,7 +343,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -387,7 +387,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -407,7 +407,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -451,7 +451,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -471,7 +471,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -594,7 +594,7 @@ func TestPodStatusChange(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -614,7 +614,7 @@ func TestPodStatusChange(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -749,7 +749,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -769,7 +769,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -804,7 +804,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -824,7 +824,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -866,7 +866,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -886,7 +886,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -927,7 +927,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -947,7 +947,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node-master", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -986,7 +986,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1006,7 +1006,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1048,7 +1048,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1068,7 +1068,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1088,7 +1088,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node2", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1108,7 +1108,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node3", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1128,7 +1128,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node4", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1245,7 +1245,7 @@ func TestCloudProviderNoRateLimit(t *testing.T) { fnh := &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1309,7 +1309,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1320,7 +1320,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { expectedRequestCount: 2, // List+Update expectedNodes: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1353,7 +1353,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: fakeNow, }, @@ -1370,7 +1370,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1429,7 +1429,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { }, expectedNodes: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1469,7 +1469,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1547,7 +1547,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: fakeNow, }, @@ -1563,7 +1563,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1597,7 +1597,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1667,7 +1667,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1772,7 +1772,7 @@ func TestNodeEventGeneration(t *testing.T) { fakeNodeHandler := &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", UID: "1234567890", CreationTimestamp: metav1.Date(2015, 8, 10, 0, 0, 0, 0, time.UTC), @@ -1839,70 +1839,70 @@ func TestCheckPod(t *testing.T) { { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: nil}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: nil}, Spec: v1.PodSpec{NodeName: "new"}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: nil}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: nil}, Spec: v1.PodSpec{NodeName: "old"}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: nil}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: nil}, Spec: v1.PodSpec{NodeName: ""}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: nil}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: nil}, Spec: v1.PodSpec{NodeName: "nonexistant"}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "new"}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "old"}, }, prune: true, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "older"}, }, prune: true, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "oldest"}, }, prune: true, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: ""}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "nonexistant"}, }, prune: false, @@ -1912,7 +1912,7 @@ func TestCheckPod(t *testing.T) { nc, _ := NewNodeControllerFromClient(nil, fake.NewSimpleClientset(), 0, 0, 0, 0, 0, 0, 0, 0, nil, nil, 0, false) nc.nodeStore.Store = cache.NewStore(cache.MetaNamespaceKeyFunc) nc.nodeStore.Store.Add(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "new", }, Status: v1.NodeStatus{ @@ -1922,7 +1922,7 @@ func TestCheckPod(t *testing.T) { }, }) nc.nodeStore.Store.Add(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "old", }, Status: v1.NodeStatus{ @@ -1932,7 +1932,7 @@ func TestCheckPod(t *testing.T) { }, }) nc.nodeStore.Store.Add(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "older", }, Status: v1.NodeStatus{ @@ -1942,7 +1942,7 @@ func TestCheckPod(t *testing.T) { }, }) nc.nodeStore.Store.Add(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "oldest", }, Status: v1.NodeStatus{ diff --git a/pkg/controller/node/testutil/test_utils.go b/pkg/controller/node/testutil/test_utils.go index 82c6fe20947..2a762c57e4e 100644 --- a/pkg/controller/node/testutil/test_utils.go +++ b/pkg/controller/node/testutil/test_utils.go @@ -266,7 +266,7 @@ func (f *FakeRecorder) makeEvent(ref *v1.ObjectReference, eventtype, reason, mes namespace = v1.NamespaceDefault } return &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()), Namespace: namespace, }, @@ -292,7 +292,7 @@ func NewFakeRecorder() *FakeRecorder { // NewNode is a helper function for creating Nodes for testing. func NewNode(name string) *v1.Node { return &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: v1.NodeSpec{ ExternalID: name, }, @@ -308,7 +308,7 @@ func NewNode(name string) *v1.Node { // NewPod is a helper function for creating Pods for testing. func NewPod(name, host string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: name, }, diff --git a/pkg/controller/podautoscaler/horizontal_test.go b/pkg/controller/podautoscaler/horizontal_test.go index b8b6fdc731c..1e45b8a3b16 100644 --- a/pkg/controller/podautoscaler/horizontal_test.go +++ b/pkg/controller/podautoscaler/horizontal_test.go @@ -153,7 +153,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { obj := &autoscaling.HorizontalPodAutoscalerList{ Items: []autoscaling.HorizontalPodAutoscaler{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: hpaName, Namespace: namespace, SelfLink: "experimental/v1/namespaces/" + namespace + "/horizontalpodautoscalers/" + hpaName, @@ -194,7 +194,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { defer tc.Unlock() obj := &extensions.Scale{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tc.resource.name, Namespace: namespace, }, @@ -214,7 +214,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { defer tc.Unlock() obj := &extensions.Scale{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tc.resource.name, Namespace: namespace, }, @@ -234,7 +234,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { defer tc.Unlock() obj := &extensions.Scale{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tc.resource.name, Namespace: namespace, }, @@ -270,7 +270,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { }, }, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: map[string]string{ @@ -304,7 +304,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { metrics := metricsapi.PodMetricsList{} for i, cpu := range tc.reportedLevels { podMetric := metricsapi.PodMetrics{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%d", podNamePrefix, i), Namespace: namespace, }, diff --git a/pkg/controller/podautoscaler/metrics/BUILD b/pkg/controller/podautoscaler/metrics/BUILD index 44c93eee9de..06e019aa87b 100644 --- a/pkg/controller/podautoscaler/metrics/BUILD +++ b/pkg/controller/podautoscaler/metrics/BUILD @@ -39,6 +39,7 @@ go_test( "//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", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/heapster/metrics/api/v1/types", diff --git a/pkg/controller/podautoscaler/metrics/metrics_client_test.go b/pkg/controller/podautoscaler/metrics/metrics_client_test.go index ab15981e763..50e4581841a 100644 --- a/pkg/controller/podautoscaler/metrics/metrics_client_test.go +++ b/pkg/controller/podautoscaler/metrics/metrics_client_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api/resource" @@ -105,7 +106,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { metrics := metricsapi.PodMetricsList{} for i, containers := range tc.reportedPodMetrics { metric := metricsapi.PodMetrics{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%d", podNamePrefix, i), Namespace: namespace, }, @@ -161,7 +162,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { func buildPod(namespace, podName string, podLabels map[string]string, phase v1.PodPhase, request string) v1.Pod { return v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: podLabels, diff --git a/pkg/controller/podautoscaler/replica_calculator_test.go b/pkg/controller/podautoscaler/replica_calculator_test.go index 48aa2441d1b..7dc7b0cb8be 100644 --- a/pkg/controller/podautoscaler/replica_calculator_test.go +++ b/pkg/controller/podautoscaler/replica_calculator_test.go @@ -100,7 +100,7 @@ func (tc *replicaCalcTestCase) prepareTestClient(t *testing.T) *fake.Clientset { }, }, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: testNamespace, Labels: map[string]string{ @@ -140,7 +140,7 @@ func (tc *replicaCalcTestCase) prepareTestClient(t *testing.T) *fake.Clientset { podName = tc.resource.podNames[i] } podMetric := metricsapi.PodMetrics{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: testNamespace, }, diff --git a/pkg/controller/podgc/gc_controller_test.go b/pkg/controller/podgc/gc_controller_test.go index f0a075b7279..d3a1ad72061 100644 --- a/pkg/controller/podgc/gc_controller_test.go +++ b/pkg/controller/podgc/gc_controller_test.go @@ -113,7 +113,7 @@ func TestGCTerminated(t *testing.T) { for _, pod := range test.pods { creationTime = creationTime.Add(1 * time.Hour) gcc.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}}, + ObjectMeta: metav1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}}, Status: v1.PodStatus{Phase: pod.phase}, Spec: v1.PodSpec{NodeName: "node"}, }) @@ -182,7 +182,7 @@ func TestGCOrphaned(t *testing.T) { for _, pod := range test.pods { creationTime = creationTime.Add(1 * time.Hour) gcc.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}}, + ObjectMeta: metav1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}}, Status: v1.PodStatus{Phase: pod.phase}, Spec: v1.PodSpec{NodeName: "node"}, }) @@ -261,7 +261,7 @@ func TestGCUnscheduledTerminating(t *testing.T) { for _, pod := range test.pods { creationTime = creationTime.Add(1 * time.Hour) gcc.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}, + ObjectMeta: metav1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}, DeletionTimestamp: pod.deletionTimeStamp}, Status: v1.PodStatus{Phase: pod.phase}, Spec: v1.PodSpec{NodeName: pod.nodeName}, diff --git a/pkg/controller/replicaset/replica_set_test.go b/pkg/controller/replicaset/replica_set_test.go index 2f880849804..2599aa0a4de 100644 --- a/pkg/controller/replicaset/replica_set_test.go +++ b/pkg/controller/replicaset/replica_set_test.go @@ -99,7 +99,7 @@ func getKey(rs *extensions.ReplicaSet, t *testing.T) string { func newReplicaSet(replicas int, selectorMap map[string]string) *extensions.ReplicaSet { rs := &extensions.ReplicaSet{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", Namespace: v1.NamespaceDefault, @@ -109,7 +109,7 @@ func newReplicaSet(replicas int, selectorMap map[string]string) *extensions.Repl Replicas: func() *int32 { i := int32(replicas); return &i }(), Selector: &metav1.LabelSelector{MatchLabels: selectorMap}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "name": "foo", "type": "production", @@ -147,7 +147,7 @@ func newPod(name string, rs *extensions.ReplicaSet, status v1.PodPhase, lastTran conditions = append(conditions, condition) } return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: rs.Namespace, Labels: rs.Spec.Selector.MatchLabels, @@ -463,22 +463,22 @@ func TestPodControllerLookup(t *testing.T) { // pods without labels don't match any ReplicaSets { inRSs: []*extensions.ReplicaSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo1", Namespace: v1.NamespaceAll}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: v1.NamespaceAll}}, outRSName: "", }, // Matching labels, not namespace { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Namespace: "ns", Labels: map[string]string{"foo": "bar"}}}, outRSName: "", }, @@ -486,14 +486,14 @@ func TestPodControllerLookup(t *testing.T) { { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", Namespace: "ns", Labels: map[string]string{"foo": "bar"}}}, outRSName: "bar", }, @@ -827,7 +827,7 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int) for _, key := range expectedDels.List() { nsName := strings.Split(key, "/") podsToDelete = append(podsToDelete, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName[1], Namespace: nsName[0], Labels: rsSpec.Spec.Selector.MatchLabels, @@ -868,7 +868,7 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int) } nsName := strings.Split(expectedDel.List()[0], "/") lastPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName[1], Namespace: nsName[0], Labels: rsSpec.Spec.Selector.MatchLabels, @@ -1082,7 +1082,7 @@ func TestDeletionTimestamp(t *testing.T) { // An update to the pod (including an update to the deletion timestamp) // should not be counted as a second delete. secondPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: pod.Namespace, Name: "secondPod", Labels: pod.Labels, diff --git a/pkg/controller/replication/replication_controller_test.go b/pkg/controller/replication/replication_controller_test.go index 1cde941c7e9..0a943f83c16 100644 --- a/pkg/controller/replication/replication_controller_test.go +++ b/pkg/controller/replication/replication_controller_test.go @@ -62,7 +62,7 @@ func getKey(rc *v1.ReplicationController, t *testing.T) string { func newReplicationController(replicas int) *v1.ReplicationController { rc := &v1.ReplicationController{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", Namespace: v1.NamespaceDefault, @@ -72,7 +72,7 @@ func newReplicationController(replicas int) *v1.ReplicationController { Replicas: func() *int32 { i := int32(replicas); return &i }(), Selector: map[string]string{"foo": "bar"}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "name": "foo", "type": "production", @@ -110,7 +110,7 @@ func newPod(name string, rc *v1.ReplicationController, status v1.PodPhase, lastT conditions = append(conditions, condition) } return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: rc.Spec.Selector, Namespace: rc.Namespace, @@ -397,22 +397,22 @@ func TestPodControllerLookup(t *testing.T) { // pods without labels don't match any rcs { inRCs: []*v1.ReplicationController{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo1", Namespace: v1.NamespaceAll}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: v1.NamespaceAll}}, outRCName: "", }, // Matching labels, not namespace { inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, }, }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Namespace: "ns", Labels: map[string]string{"foo": "bar"}}}, outRCName: "", }, @@ -420,14 +420,14 @@ func TestPodControllerLookup(t *testing.T) { { inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, }, }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", Namespace: "ns", Labels: map[string]string{"foo": "bar"}}}, outRCName: "bar", }, @@ -752,7 +752,7 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int) for _, key := range expectedDels.List() { nsName := strings.Split(key, "/") podsToDelete = append(podsToDelete, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName[1], Namespace: nsName[0], Labels: controllerSpec.Spec.Selector, @@ -793,7 +793,7 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int) } nsName := strings.Split(expectedDel.List()[0], "/") lastPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName[1], Namespace: nsName[0], Labels: controllerSpec.Spec.Selector, @@ -994,7 +994,7 @@ func TestDeletionTimestamp(t *testing.T) { // An update to the pod (including an update to the deletion timestamp) // should not be counted as a second delete. secondPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: pod.Namespace, Name: "secondPod", Labels: pod.Labels, @@ -1047,7 +1047,7 @@ func BenchmarkGetPodControllerMultiNS(b *testing.B) { for k := 0; k < 10; k++ { podName := fmt.Sprintf("pod-%d-%d", j, k) pods = append(pods, v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: ns, Labels: map[string]string{"rcName": rcName}, @@ -1062,7 +1062,7 @@ func BenchmarkGetPodControllerMultiNS(b *testing.B) { for j := 0; j < 10; j++ { rcName := fmt.Sprintf("rc-%d", j) manager.rcLister.Indexer.Add(&v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{Name: rcName, Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: rcName, Namespace: ns}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"rcName": rcName}, }, @@ -1092,7 +1092,7 @@ func BenchmarkGetPodControllerSingleNS(b *testing.B) { for j := 0; j < replicaNum; j++ { podName := fmt.Sprintf("pod-%d-%d", i, j) pods = append(pods, v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: "foo", Labels: map[string]string{"rcName": rcName}, @@ -1104,7 +1104,7 @@ func BenchmarkGetPodControllerSingleNS(b *testing.B) { for i := 0; i < rcNum; i++ { rcName := fmt.Sprintf("rc-%d", i) manager.rcLister.Indexer.Add(&v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{Name: rcName, Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: rcName, Namespace: "foo"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"rcName": rcName}, }, diff --git a/pkg/controller/resourcequota/BUILD b/pkg/controller/resourcequota/BUILD index d1a81efdeb6..150d22a400b 100644 --- a/pkg/controller/resourcequota/BUILD +++ b/pkg/controller/resourcequota/BUILD @@ -29,6 +29,7 @@ go_library( "//pkg/util/workqueue:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/runtime", @@ -55,6 +56,7 @@ go_test( "//pkg/quota/generic:go_default_library", "//pkg/quota/install:go_default_library", "//pkg/util/intstr:go_default_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/apimachinery/pkg/util/sets", diff --git a/pkg/controller/resourcequota/replenishment_controller_test.go b/pkg/controller/resourcequota/replenishment_controller_test.go index 667150ac03d..d6be0af3978 100644 --- a/pkg/controller/resourcequota/replenishment_controller_test.go +++ b/pkg/controller/resourcequota/replenishment_controller_test.go @@ -19,6 +19,7 @@ package resourcequota import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" @@ -47,11 +48,11 @@ func TestPodReplenishmentUpdateFunc(t *testing.T) { ResyncPeriod: controller.NoResyncPeriodFunc, } oldPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "pod"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "pod"}, Status: v1.PodStatus{Phase: v1.PodRunning}, } newPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "pod"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "pod"}, Status: v1.PodStatus{Phase: v1.PodFailed}, } updateFunc := PodReplenishmentUpdateFunc(&options) @@ -72,7 +73,7 @@ func TestObjectReplenishmentDeleteFunc(t *testing.T) { ResyncPeriod: controller.NoResyncPeriodFunc, } oldPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "pod"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "pod"}, Status: v1.PodStatus{Phase: v1.PodRunning}, } deleteFunc := ObjectReplenishmentDeleteFunc(&options) @@ -93,7 +94,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) { ResyncPeriod: controller.NoResyncPeriodFunc, } oldService := &v1.Service{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"}, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeNodePort, Ports: []v1.ServicePort{{ @@ -103,7 +104,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) { }, } newService := &v1.Service{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"}, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeClusterIP, Ports: []v1.ServicePort{{ @@ -127,7 +128,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) { ResyncPeriod: controller.NoResyncPeriodFunc, } oldService = &v1.Service{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"}, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeNodePort, Ports: []v1.ServicePort{{ @@ -137,7 +138,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) { }, } newService = &v1.Service{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"}, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeNodePort, Ports: []v1.ServicePort{{ diff --git a/pkg/controller/resourcequota/resource_quota_controller.go b/pkg/controller/resourcequota/resource_quota_controller.go index 55fd211dceb..21f92811295 100644 --- a/pkg/controller/resourcequota/resource_quota_controller.go +++ b/pkg/controller/resourcequota/resource_quota_controller.go @@ -21,6 +21,7 @@ import ( "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -300,7 +301,7 @@ func (rq *ResourceQuotaController) syncResourceQuota(v1ResourceQuota v1.Resource // Create a usage object that is based on the quota resource version that will handle updates // by default, we preserve the past usage observation, and set hard to the current spec usage := api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: resourceQuota.Name, Namespace: resourceQuota.Namespace, ResourceVersion: resourceQuota.ResourceVersion, diff --git a/pkg/controller/resourcequota/resource_quota_controller_test.go b/pkg/controller/resourcequota/resource_quota_controller_test.go index d60c4a6119c..d633e12ac12 100644 --- a/pkg/controller/resourcequota/resource_quota_controller_test.go +++ b/pkg/controller/resourcequota/resource_quota_controller_test.go @@ -20,6 +20,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api" @@ -54,7 +55,7 @@ func TestSyncResourceQuota(t *testing.T) { podList := v1.PodList{ Items: []v1.Pod{ { - ObjectMeta: v1.ObjectMeta{Name: "pod-running", Namespace: "testing"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod-running", Namespace: "testing"}, Status: v1.PodStatus{Phase: v1.PodRunning}, Spec: v1.PodSpec{ Volumes: []v1.Volume{{Name: "vol"}}, @@ -62,7 +63,7 @@ func TestSyncResourceQuota(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "pod-running-2", Namespace: "testing"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod-running-2", Namespace: "testing"}, Status: v1.PodStatus{Phase: v1.PodRunning}, Spec: v1.PodSpec{ Volumes: []v1.Volume{{Name: "vol"}}, @@ -70,7 +71,7 @@ func TestSyncResourceQuota(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "pod-failed", Namespace: "testing"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod-failed", Namespace: "testing"}, Status: v1.PodStatus{Phase: v1.PodFailed}, Spec: v1.PodSpec{ Volumes: []v1.Volume{{Name: "vol"}}, @@ -80,7 +81,7 @@ func TestSyncResourceQuota(t *testing.T) { }, } resourceQuota := v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{Name: "quota", Namespace: "testing"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "testing"}, Spec: v1.ResourceQuotaSpec{ Hard: v1.ResourceList{ v1.ResourceCPU: resource.MustParse("3"), @@ -159,7 +160,7 @@ func TestSyncResourceQuota(t *testing.T) { func TestSyncResourceQuotaSpecChange(t *testing.T) { resourceQuota := v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -245,7 +246,7 @@ func TestSyncResourceQuotaSpecChange(t *testing.T) { } func TestSyncResourceQuotaSpecHardChange(t *testing.T) { resourceQuota := v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -346,7 +347,7 @@ func TestSyncResourceQuotaSpecHardChange(t *testing.T) { func TestSyncResourceQuotaNoChange(t *testing.T) { resourceQuota := v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -424,7 +425,7 @@ func TestAddQuota(t *testing.T) { name: "no status", expectedPriority: true, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -439,7 +440,7 @@ func TestAddQuota(t *testing.T) { name: "status, no usage", expectedPriority: true, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -459,7 +460,7 @@ func TestAddQuota(t *testing.T) { name: "status, mismatch", expectedPriority: true, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -482,7 +483,7 @@ func TestAddQuota(t *testing.T) { name: "status, missing usage, but don't care", expectedPriority: false, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -502,7 +503,7 @@ func TestAddQuota(t *testing.T) { name: "ready", expectedPriority: false, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, diff --git a/pkg/controller/route/BUILD b/pkg/controller/route/BUILD index 1afcea6149f..932e2f0343b 100644 --- a/pkg/controller/route/BUILD +++ b/pkg/controller/route/BUILD @@ -44,6 +44,7 @@ go_test( "//pkg/client/testing/core:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers/fake:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/pkg/controller/route/routecontroller_test.go b/pkg/controller/route/routecontroller_test.go index 78ecdaf6790..8adb23e16b6 100644 --- a/pkg/controller/route/routecontroller_test.go +++ b/pkg/controller/route/routecontroller_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -70,9 +71,9 @@ func TestIsResponsibleForRoute(t *testing.T) { func TestReconcile(t *testing.T) { cluster := "my-k8s" - node1 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "node-1", UID: "01"}, Spec: v1.NodeSpec{PodCIDR: "10.120.0.0/24"}} - node2 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "node-2", UID: "02"}, Spec: v1.NodeSpec{PodCIDR: "10.120.1.0/24"}} - nodeNoCidr := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "node-2", UID: "02"}, Spec: v1.NodeSpec{PodCIDR: ""}} + node1 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node-1", UID: "01"}, Spec: v1.NodeSpec{PodCIDR: "10.120.0.0/24"}} + node2 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node-2", UID: "02"}, Spec: v1.NodeSpec{PodCIDR: "10.120.1.0/24"}} + nodeNoCidr := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node-2", UID: "02"}, Spec: v1.NodeSpec{PodCIDR: ""}} testCases := []struct { nodes []v1.Node diff --git a/pkg/controller/service/BUILD b/pkg/controller/service/BUILD index d0a925ca646..16284cef5db 100644 --- a/pkg/controller/service/BUILD +++ b/pkg/controller/service/BUILD @@ -45,6 +45,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/cloudprovider/providers/fake:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/pkg/controller/service/servicecontroller_test.go b/pkg/controller/service/servicecontroller_test.go index 70e78c35bc5..90549a8fc21 100644 --- a/pkg/controller/service/servicecontroller_test.go +++ b/pkg/controller/service/servicecontroller_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -30,7 +31,7 @@ import ( const region = "us-central" func newService(name string, uid types.UID, serviceType v1.ServiceType) *v1.Service { - return &v1.Service{ObjectMeta: v1.ObjectMeta{Name: name, Namespace: "namespace", UID: uid, SelfLink: testapi.Default.SelfLink("services", name)}, Spec: v1.ServiceSpec{Type: serviceType}} + return &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "namespace", UID: uid, SelfLink: testapi.Default.SelfLink("services", name)}, Spec: v1.ServiceSpec{Type: serviceType}} } func TestCreateExternalLoadBalancer(t *testing.T) { @@ -41,7 +42,7 @@ func TestCreateExternalLoadBalancer(t *testing.T) { }{ { service: &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "no-external-balancer", Namespace: "default", }, @@ -54,7 +55,7 @@ func TestCreateExternalLoadBalancer(t *testing.T) { }, { service: &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "udp-service", Namespace: "default", SelfLink: testapi.Default.SelfLink("services", "udp-service"), @@ -72,7 +73,7 @@ func TestCreateExternalLoadBalancer(t *testing.T) { }, { service: &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "basic-service1", Namespace: "default", SelfLink: testapi.Default.SelfLink("services", "basic-service1"), @@ -146,9 +147,9 @@ func TestCreateExternalLoadBalancer(t *testing.T) { // TODO: Finish converting and update comments func TestUpdateNodesInExternalLoadBalancer(t *testing.T) { nodes := []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "node0"}}, - {ObjectMeta: v1.ObjectMeta{Name: "node1"}}, - {ObjectMeta: v1.ObjectMeta{Name: "node73"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node0"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node73"}}, } table := []struct { services []*v1.Service diff --git a/pkg/controller/serviceaccount/BUILD b/pkg/controller/serviceaccount/BUILD index 03e0a287ad4..5e07e54d65d 100644 --- a/pkg/controller/serviceaccount/BUILD +++ b/pkg/controller/serviceaccount/BUILD @@ -68,6 +68,7 @@ go_test( "//vendor:github.com/davecgh/go-spew/spew", "//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/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/rand", diff --git a/pkg/controller/serviceaccount/serviceaccounts_controller.go b/pkg/controller/serviceaccount/serviceaccounts_controller.go index 0ff7c27d9d2..d7d553c8472 100644 --- a/pkg/controller/serviceaccount/serviceaccounts_controller.go +++ b/pkg/controller/serviceaccount/serviceaccounts_controller.go @@ -23,6 +23,7 @@ import ( "github.com/golang/glog" apierrs "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -62,7 +63,7 @@ type ServiceAccountsControllerOptions struct { func DefaultServiceAccountsControllerOptions() ServiceAccountsControllerOptions { return ServiceAccountsControllerOptions{ ServiceAccounts: []v1.ServiceAccount{ - {ObjectMeta: v1.ObjectMeta{Name: "default"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, }, } } diff --git a/pkg/controller/serviceaccount/serviceaccounts_controller_test.go b/pkg/controller/serviceaccount/serviceaccounts_controller_test.go index ab22b107aa1..7e1d7e3c396 100644 --- a/pkg/controller/serviceaccount/serviceaccounts_controller_test.go +++ b/pkg/controller/serviceaccount/serviceaccounts_controller_test.go @@ -20,6 +20,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" @@ -41,33 +42,33 @@ func TestServiceAccountCreation(t *testing.T) { managedName := "managed" activeNS := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{Name: ns}, + ObjectMeta: metav1.ObjectMeta{Name: ns}, Status: v1.NamespaceStatus{ Phase: v1.NamespaceActive, }, } terminatingNS := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{Name: ns}, + ObjectMeta: metav1.ObjectMeta{Name: ns}, Status: v1.NamespaceStatus{ Phase: v1.NamespaceTerminating, }, } defaultServiceAccount := &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: defaultName, Namespace: ns, ResourceVersion: "1", }, } managedServiceAccount := &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: managedName, Namespace: ns, ResourceVersion: "1", }, } unmanagedServiceAccount := &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "other-unmanaged", Namespace: ns, ResourceVersion: "1", @@ -160,8 +161,8 @@ func TestServiceAccountCreation(t *testing.T) { informers := informers.NewSharedInformerFactory(fake.NewSimpleClientset(), nil, controller.NoResyncPeriodFunc()) options := DefaultServiceAccountsControllerOptions() options.ServiceAccounts = []v1.ServiceAccount{ - {ObjectMeta: v1.ObjectMeta{Name: defaultName}}, - {ObjectMeta: v1.ObjectMeta{Name: managedName}}, + {ObjectMeta: metav1.ObjectMeta{Name: defaultName}}, + {ObjectMeta: metav1.ObjectMeta{Name: managedName}}, } controller := NewServiceAccountsController(informers.ServiceAccounts(), informers.Namespaces(), client, options) controller.saLister = &cache.StoreToServiceAccountLister{Indexer: cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})} diff --git a/pkg/controller/serviceaccount/tokens_controller.go b/pkg/controller/serviceaccount/tokens_controller.go index 57bc54fb41f..55991760b5e 100644 --- a/pkg/controller/serviceaccount/tokens_controller.go +++ b/pkg/controller/serviceaccount/tokens_controller.go @@ -258,7 +258,7 @@ func (e *TokensController) syncServiceAccount() { case sa == nil: // service account no longer exists, so delete related tokens glog.V(4).Infof("syncServiceAccount(%s/%s), service account deleted, removing tokens", saInfo.namespace, saInfo.name) - sa = &v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Namespace: saInfo.namespace, Name: saInfo.name, UID: saInfo.uid}} + sa = &v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Namespace: saInfo.namespace, Name: saInfo.name, UID: saInfo.uid}} if retriable, err := e.deleteTokens(sa); err != nil { glog.Errorf("error deleting serviceaccount tokens for %s/%s: %v", saInfo.namespace, saInfo.name, err) retry = retriable @@ -399,7 +399,7 @@ func (e *TokensController) ensureReferencedToken(serviceAccount *v1.ServiceAccou // Build the secret secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: secret.Strategy.GenerateName(fmt.Sprintf("%s-token-", serviceAccount.Name)), Namespace: serviceAccount.Namespace, Annotations: map[string]string{ diff --git a/pkg/controller/serviceaccount/tokens_controller_test.go b/pkg/controller/serviceaccount/tokens_controller_test.go index 2e065673962..67c1e714a7c 100644 --- a/pkg/controller/serviceaccount/tokens_controller_test.go +++ b/pkg/controller/serviceaccount/tokens_controller_test.go @@ -26,6 +26,7 @@ import ( "github.com/golang/glog" apierrors "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" utilrand "k8s.io/apimachinery/pkg/util/rand" @@ -81,7 +82,7 @@ func addNamedTokenSecretReference(refs []v1.ObjectReference, name string) []v1.O // serviceAccount returns a service account with the given secret refs func serviceAccount(secretRefs []v1.ObjectReference) *v1.ServiceAccount { return &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", UID: "12345", Namespace: "default", @@ -101,7 +102,7 @@ func updatedServiceAccount(secretRefs []v1.ObjectReference) *v1.ServiceAccount { // opaqueSecret returns a persisted non-ServiceAccountToken secret named "regular-secret-1" func opaqueSecret() *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "regular-secret-1", Namespace: "default", UID: "23456", @@ -123,7 +124,7 @@ func createdTokenSecret(overrideName ...string) *v1.Secret { // namedTokenSecret returns the ServiceAccountToken secret posted when creating a new token secret with the given name. func namedCreatedTokenSecret(name string) *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: "default", Annotations: map[string]string{ @@ -143,7 +144,7 @@ func namedCreatedTokenSecret(name string) *v1.Secret { // serviceAccountTokenSecret returns an existing ServiceAccountToken secret named "token-secret-1" func serviceAccountTokenSecret() *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "token-secret-1", Namespace: "default", UID: "23456", diff --git a/pkg/controller/statefulset/BUILD b/pkg/controller/statefulset/BUILD index 08cb490b72e..566676670b0 100644 --- a/pkg/controller/statefulset/BUILD +++ b/pkg/controller/statefulset/BUILD @@ -70,6 +70,7 @@ go_test( "//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", diff --git a/pkg/controller/statefulset/fakes.go b/pkg/controller/statefulset/fakes.go index 00440683d5e..a043046a4f2 100644 --- a/pkg/controller/statefulset/fakes.go +++ b/pkg/controller/statefulset/fakes.go @@ -38,7 +38,7 @@ func dec(i int64, exponent int) *inf.Dec { func newPVC(name string) v1.PersistentVolumeClaim { return v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PersistentVolumeClaimSpec{ @@ -75,7 +75,7 @@ func newStatefulSetWithVolumes(replicas int, name string, petMounts []v1.VolumeM Kind: "StatefulSet", APIVersion: "apps/v1beta1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: v1.NamespaceDefault, UID: types.UID("test"), diff --git a/pkg/controller/statefulset/statefulpod_test.go b/pkg/controller/statefulset/statefulpod_test.go index 2dda7a7b89b..252178495ec 100644 --- a/pkg/controller/statefulset/statefulpod_test.go +++ b/pkg/controller/statefulset/statefulpod_test.go @@ -21,6 +21,7 @@ import ( "net/http/httptest" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" @@ -88,7 +89,7 @@ func TestUpdatePetWithoutRetry(t *testing.T) { } for k, tc := range testCases { - body := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "empty_pod"}}) + body := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "empty_pod"}}) fakeHandler := utiltesting.FakeHandler{ StatusCode: 200, ResponseBody: string(body), diff --git a/pkg/controller/volume/attachdetach/testing/BUILD b/pkg/controller/volume/attachdetach/testing/BUILD index d22036168f7..b4a299c079b 100644 --- a/pkg/controller/volume/attachdetach/testing/BUILD +++ b/pkg/controller/volume/attachdetach/testing/BUILD @@ -16,6 +16,7 @@ go_library( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/volume: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/watch", diff --git a/pkg/controller/volume/attachdetach/testing/testvolumespec.go b/pkg/controller/volume/attachdetach/testing/testvolumespec.go index aa6b2254b83..fe446d1cde2 100644 --- a/pkg/controller/volume/attachdetach/testing/testvolumespec.go +++ b/pkg/controller/volume/attachdetach/testing/testvolumespec.go @@ -19,6 +19,7 @@ package testing import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" @@ -57,7 +58,7 @@ func CreateTestClient() *fake.Clientset { Status: v1.PodStatus{ Phase: v1.PodRunning, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: map[string]string{ @@ -106,7 +107,7 @@ func CreateTestClient() *fake.Clientset { // NewPod returns a test pod object func NewPod(uid, name string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(uid), Name: name, Namespace: name, diff --git a/pkg/controller/volume/persistentvolume/framework_test.go b/pkg/controller/volume/persistentvolume/framework_test.go index 98de0f28500..8a81b66289b 100644 --- a/pkg/controller/volume/persistentvolume/framework_test.go +++ b/pkg/controller/volume/persistentvolume/framework_test.go @@ -616,7 +616,7 @@ func newTestController(kubeClient clientset.Interface, volumeSource, claimSource // newVolume returns a new volume with given attributes func newVolume(name, capacity, boundToClaimUID, boundToClaimName string, phase v1.PersistentVolumePhase, reclaimPolicy v1.PersistentVolumeReclaimPolicy, annotations ...string) *v1.PersistentVolume { volume := v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, ResourceVersion: "1", }, @@ -722,7 +722,7 @@ func newVolumeArray(name, capacity, boundToClaimUID, boundToClaimName string, ph // newClaim returns a new claim with given attributes func newClaim(name, claimUID, capacity, boundToVolume string, phase v1.PersistentVolumeClaimPhase, annotations ...string) *v1.PersistentVolumeClaim { claim := v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: testNamespace, UID: types.UID(claimUID), @@ -1167,7 +1167,7 @@ func (plugin *mockVolumePlugin) Provision() (*v1.PersistentVolume, error) { capacity := plugin.provisionOptions.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] accessModes := plugin.provisionOptions.PVC.Spec.AccessModes pv = &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: plugin.provisionOptions.PVName, }, Spec: v1.PersistentVolumeSpec{ diff --git a/pkg/controller/volume/persistentvolume/index_test.go b/pkg/controller/volume/persistentvolume/index_test.go index c496d8d0134..089168767c3 100644 --- a/pkg/controller/volume/persistentvolume/index_test.go +++ b/pkg/controller/volume/persistentvolume/index_test.go @@ -40,7 +40,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-gce-10": { expectedMatch: "gce-pd-10", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -57,7 +57,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-nfs-5": { expectedMatch: "nfs-5", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -74,7 +74,7 @@ func TestMatchVolume(t *testing.T) { "successful-skip-1g-bound-volume": { expectedMatch: "gce-pd-5", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -91,7 +91,7 @@ func TestMatchVolume(t *testing.T) { "successful-no-match": { expectedMatch: "", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -108,7 +108,7 @@ func TestMatchVolume(t *testing.T) { "successful-no-match-due-to-label": { expectedMatch: "", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -130,7 +130,7 @@ func TestMatchVolume(t *testing.T) { "successful-no-match-due-to-size-constraint-with-label-selector": { expectedMatch: "", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -152,7 +152,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-due-with-constraint-and-label-selector": { expectedMatch: "gce-pd-2", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -174,7 +174,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-with-class": { expectedMatch: "gce-pd-silver1", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", Annotations: map[string]string{ @@ -199,7 +199,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-with-class-and-labels": { expectedMatch: "gce-pd-silver2", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", Annotations: map[string]string{ @@ -239,7 +239,7 @@ func TestMatchingWithBoundVolumes(t *testing.T) { volumeIndex := newPersistentVolumeOrderedIndex() // two similar volumes, one is bound pv1 := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-1", Name: "gce001", }, @@ -257,7 +257,7 @@ func TestMatchingWithBoundVolumes(t *testing.T) { } pv2 := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-2", Name: "gce002", }, @@ -276,7 +276,7 @@ func TestMatchingWithBoundVolumes(t *testing.T) { volumeIndex.store.Add(pv2) claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -362,7 +362,7 @@ func TestAllPossibleAccessModes(t *testing.T) { func TestFindingVolumeWithDifferentAccessModes(t *testing.T) { gce := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{UID: "001", Name: "gce"}, + ObjectMeta: metav1.ObjectMeta{UID: "001", Name: "gce"}, Spec: v1.PersistentVolumeSpec{ Capacity: v1.ResourceList{v1.ResourceName(v1.ResourceStorage): resource.MustParse("10G")}, PersistentVolumeSource: v1.PersistentVolumeSource{GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{}}, @@ -374,7 +374,7 @@ func TestFindingVolumeWithDifferentAccessModes(t *testing.T) { } ebs := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{UID: "002", Name: "ebs"}, + ObjectMeta: metav1.ObjectMeta{UID: "002", Name: "ebs"}, Spec: v1.PersistentVolumeSpec{ Capacity: v1.ResourceList{v1.ResourceName(v1.ResourceStorage): resource.MustParse("10G")}, PersistentVolumeSource: v1.PersistentVolumeSource{AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{}}, @@ -385,7 +385,7 @@ func TestFindingVolumeWithDifferentAccessModes(t *testing.T) { } nfs := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{UID: "003", Name: "nfs"}, + ObjectMeta: metav1.ObjectMeta{UID: "003", Name: "nfs"}, Spec: v1.PersistentVolumeSpec{ Capacity: v1.ResourceList{v1.ResourceName(v1.ResourceStorage): resource.MustParse("10G")}, PersistentVolumeSource: v1.PersistentVolumeSource{NFS: &v1.NFSVolumeSource{}}, @@ -398,7 +398,7 @@ func TestFindingVolumeWithDifferentAccessModes(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -467,7 +467,7 @@ func createTestVolumes() []*v1.PersistentVolume { // these volumes are deliberately out-of-order to test indexing and sorting return []*v1.PersistentVolume{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-10", Name: "gce003", }, @@ -485,7 +485,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-20", Name: "gce004", }, @@ -505,7 +505,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "nfs-5", Name: "nfs002", }, @@ -524,7 +524,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-1", Name: "gce001", }, @@ -544,7 +544,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "nfs-10", Name: "nfs003", }, @@ -563,7 +563,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-5", Name: "gce002", }, @@ -581,7 +581,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "nfs-1", Name: "nfs001", }, @@ -600,7 +600,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-2", Name: "gce0022", Labels: map[string]string{ @@ -620,7 +620,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-silver1", Name: "gce0023", Labels: map[string]string{ @@ -643,7 +643,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-silver2", Name: "gce0024", Annotations: map[string]string{ @@ -663,7 +663,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-gold", Name: "gce0025", Annotations: map[string]string{ @@ -687,7 +687,7 @@ func createTestVolumes() []*v1.PersistentVolume { func testVolume(name, size string) *v1.PersistentVolume { return &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Annotations: map[string]string{}, }, @@ -701,7 +701,7 @@ func testVolume(name, size string) *v1.PersistentVolume { func TestFindingPreboundVolumes(t *testing.T) { claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", SelfLink: testapi.Default.SelfLink("pvc", ""), diff --git a/pkg/controller/volume/persistentvolume/provision_test.go b/pkg/controller/volume/persistentvolume/provision_test.go index ec974639d9d..cc391bbac32 100644 --- a/pkg/controller/volume/persistentvolume/provision_test.go +++ b/pkg/controller/volume/persistentvolume/provision_test.go @@ -38,7 +38,7 @@ var storageClasses = []*storage.StorageClass{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "gold", }, @@ -49,7 +49,7 @@ var storageClasses = []*storage.StorageClass{ TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "silver", }, Provisioner: mockPluginName, @@ -59,7 +59,7 @@ var storageClasses = []*storage.StorageClass{ TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "external", }, Provisioner: "vendor.com/my-volume", @@ -69,7 +69,7 @@ var storageClasses = []*storage.StorageClass{ TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "unknown-internal", }, Provisioner: "kubernetes.io/unknown", diff --git a/pkg/controller/volume/persistentvolume/pv_controller.go b/pkg/controller/volume/persistentvolume/pv_controller.go index 0e65e9532ef..c5b529fd646 100644 --- a/pkg/controller/volume/persistentvolume/pv_controller.go +++ b/pkg/controller/volume/persistentvolume/pv_controller.go @@ -1498,7 +1498,7 @@ func (ctrl *PersistentVolumeController) findAlphaProvisionablePlugin() (vol.Prov TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "", }, Provisioner: ctrl.alphaProvisioner.GetPluginName(), diff --git a/pkg/controller/volume/persistentvolume/pv_controller_base.go b/pkg/controller/volume/persistentvolume/pv_controller_base.go index b2f4a690036..81066e3f899 100644 --- a/pkg/controller/volume/persistentvolume/pv_controller_base.go +++ b/pkg/controller/volume/persistentvolume/pv_controller_base.go @@ -23,6 +23,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/fieldpath/BUILD b/pkg/fieldpath/BUILD index cede08b241b..d6d29f73361 100644 --- a/pkg/fieldpath/BUILD +++ b/pkg/fieldpath/BUILD @@ -32,6 +32,7 @@ go_test( "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/fieldpath/fieldpath_test.go b/pkg/fieldpath/fieldpath_test.go index 6fa865edb11..c2794967f66 100644 --- a/pkg/fieldpath/fieldpath_test.go +++ b/pkg/fieldpath/fieldpath_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" ) @@ -44,7 +45,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - namespace", fieldPath: "metadata.namespace", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "object-namespace", }, }, @@ -54,7 +55,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - name", fieldPath: "metadata.name", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "object-name", }, }, @@ -64,7 +65,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - labels", fieldPath: "metadata.labels", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"key": "value"}, }, }, @@ -74,7 +75,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - labels bslash n", fieldPath: "metadata.labels", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"key": "value\n"}, }, }, @@ -84,7 +85,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - annotations", fieldPath: "metadata.annotations", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"builder": "john-doe"}, }, }, @@ -95,7 +96,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "invalid expression", fieldPath: "metadata.whoops", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "object-namespace", }, }, diff --git a/pkg/genericapiserver/api/apiserver_test.go b/pkg/genericapiserver/api/apiserver_test.go index 05821a38311..e58b8d69fb9 100644 --- a/pkg/genericapiserver/api/apiserver_test.go +++ b/pkg/genericapiserver/api/apiserver_test.go @@ -48,7 +48,6 @@ import ( "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/api/v1" - apiv1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/fields" genericapifilters "k8s.io/kubernetes/pkg/genericapiserver/api/filters" "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" @@ -314,7 +313,7 @@ func handleInternal(storage map[string]rest.Storage, admissionControl admission. } func TestSimpleSetupRight(t *testing.T) { - s := &genericapitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "aName"}} + s := &genericapitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "aName"}} wire, err := runtime.Encode(codec, s) if err != nil { t.Fatal(err) @@ -467,7 +466,7 @@ func (storage *SimpleRESTStorage) Delete(ctx request.Context, id string, options var obj runtime.Object = &metav1.Status{Status: metav1.StatusSuccess} var err error if storage.injectedFunction != nil { - obj, err = storage.injectedFunction(&genericapitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: id}}) + obj, err = storage.injectedFunction(&genericapitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: id}}) } return obj, err } @@ -1116,7 +1115,7 @@ func TestNonEmptyList(t *testing.T) { simpleStorage := SimpleRESTStorage{ list: []genericapitesting.Simple{ { - ObjectMeta: apiv1.ObjectMeta{Name: "something", Namespace: "other"}, + ObjectMeta: metav1.ObjectMeta{Name: "something", Namespace: "other"}, Other: "foo", }, }, @@ -1167,7 +1166,7 @@ func TestSelfLinkSkipsEmptyName(t *testing.T) { simpleStorage := SimpleRESTStorage{ list: []genericapitesting.Simple{ { - ObjectMeta: apiv1.ObjectMeta{Namespace: "other"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "other"}, Other: "foo", }, }, @@ -1241,7 +1240,7 @@ func TestExport(t *testing.T) { storage := map[string]rest.Storage{} simpleStorage := SimpleRESTStorage{ item: genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1234", CreationTimestamp: metav1.NewTime(time.Unix(10, 10)), }, @@ -2174,7 +2173,7 @@ func TestPatch(t *testing.T) { storage := map[string]rest.Storage{} ID := "id" item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "", // update should allow the client to send an empty namespace UID: "uid", @@ -2213,7 +2212,7 @@ func TestPatchRequiresMatchingName(t *testing.T) { storage := map[string]rest.Storage{} ID := "id" item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "", // update should allow the client to send an empty namespace UID: "uid", @@ -2254,7 +2253,7 @@ func TestUpdate(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "", // update should allow the client to send an empty namespace }, @@ -2291,7 +2290,7 @@ func TestUpdateInvokesAdmissionControl(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: api.NamespaceDefault, }, @@ -2353,7 +2352,7 @@ func TestUpdateAllowsMissingNamespace(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, }, Other: "bar", @@ -2390,7 +2389,7 @@ func TestUpdateAllowsMismatchedNamespaceOnError(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "other", // does not match request }, @@ -2427,7 +2426,7 @@ func TestUpdatePreventsMismatchedNamespace(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "other", }, @@ -2462,7 +2461,7 @@ func TestUpdateMissing(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: api.NamespaceDefault, }, @@ -3211,7 +3210,7 @@ func TestUpdateChecksAPIVersion(t *testing.T) { defer server.Close() client := http.Client{} - simple := &genericapitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "bar"}} + simple := &genericapitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} data, err := runtime.Encode(newCodec, simple) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -3238,10 +3237,10 @@ func TestUpdateChecksAPIVersion(t *testing.T) { // SimpleXGSubresource is a cross group subresource, i.e. the subresource does not belong to the // same group as its parent resource. type SimpleXGSubresource struct { - metav1.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata"` - SubresourceInfo string `json:"subresourceInfo,omitempty"` - Labels map[string]string `json:"labels,omitempty"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` + SubresourceInfo string `json:"subresourceInfo,omitempty"` + Labels map[string]string `json:"labels,omitempty"` } func (obj *SimpleXGSubresource) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/genericapiserver/api/handlers/rest_test.go b/pkg/genericapiserver/api/handlers/rest_test.go index 9eb0d28dcf6..22c0fe4876a 100644 --- a/pkg/genericapiserver/api/handlers/rest_test.go +++ b/pkg/genericapiserver/api/handlers/rest_test.go @@ -460,7 +460,7 @@ func TestHasUID(t *testing.T) { {obj: &api.Pod{}, hasUID: false}, {obj: nil, hasUID: false}, {obj: runtime.Object(nil), hasUID: false}, - {obj: &api.Pod{ObjectMeta: api.ObjectMeta{UID: types.UID("A")}}, hasUID: true}, + {obj: &api.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("A")}}, hasUID: true}, } for i, tc := range testcases { actual, err := hasUID(tc.obj) diff --git a/pkg/genericapiserver/api/installer_test.go b/pkg/genericapiserver/api/installer_test.go index 6368ceaffea..0e032c9973c 100644 --- a/pkg/genericapiserver/api/installer_test.go +++ b/pkg/genericapiserver/api/installer_test.go @@ -43,7 +43,7 @@ func TestScopeNamingGenerateLink(t *testing.T) { true, } service := &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "other", }, diff --git a/pkg/genericapiserver/api/rest/BUILD b/pkg/genericapiserver/api/rest/BUILD index f38faa64b8a..ed55f45e731 100644 --- a/pkg/genericapiserver/api/rest/BUILD +++ b/pkg/genericapiserver/api/rest/BUILD @@ -62,6 +62,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/util/uuid:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/request", ], ) diff --git a/pkg/genericapiserver/api/rest/create.go b/pkg/genericapiserver/api/rest/create.go index 18f73cd6a7c..8b4c758590d 100644 --- a/pkg/genericapiserver/api/rest/create.go +++ b/pkg/genericapiserver/api/rest/create.go @@ -116,8 +116,8 @@ func CheckGeneratedNameError(strategy RESTCreateStrategy, err error, obj runtime } // objectMetaAndKind retrieves kind and ObjectMeta from a runtime object, or returns an error. -func objectMetaAndKind(typer runtime.ObjectTyper, obj runtime.Object) (*api.ObjectMeta, schema.GroupVersionKind, error) { - objectMeta, err := api.ObjectMetaFor(obj) +func objectMetaAndKind(typer runtime.ObjectTyper, obj runtime.Object) (*metav1.ObjectMeta, schema.GroupVersionKind, error) { + objectMeta, err := metav1.ObjectMetaFor(obj) if err != nil { return nil, schema.GroupVersionKind{}, errors.NewInternalError(err) } diff --git a/pkg/genericapiserver/api/rest/meta_test.go b/pkg/genericapiserver/api/rest/meta_test.go index 978e7524f72..805f6a40514 100644 --- a/pkg/genericapiserver/api/rest/meta_test.go +++ b/pkg/genericapiserver/api/rest/meta_test.go @@ -19,6 +19,7 @@ package rest import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" genericapirequest "k8s.io/apiserver/pkg/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/uuid" @@ -27,7 +28,7 @@ import ( // TestFillObjectMetaSystemFields validates that system populated fields are set on an object func TestFillObjectMetaSystemFields(t *testing.T) { ctx := genericapirequest.NewDefaultContext() - resource := api.ObjectMeta{} + resource := metav1.ObjectMeta{} FillObjectMetaSystemFields(ctx, &resource) if resource.CreationTimestamp.Time.IsZero() { t.Errorf("resource.CreationTimestamp is zero") @@ -37,7 +38,7 @@ func TestFillObjectMetaSystemFields(t *testing.T) { // verify we can inject a UID uid := uuid.NewUUID() ctx = genericapirequest.WithUID(ctx, uid) - resource = api.ObjectMeta{} + resource = metav1.ObjectMeta{} FillObjectMetaSystemFields(ctx, &resource) if resource.UID != uid { t.Errorf("resource.UID expected: %v, actual: %v", uid, resource.UID) @@ -47,7 +48,7 @@ func TestFillObjectMetaSystemFields(t *testing.T) { // TestHasObjectMetaSystemFieldValues validates that true is returned if and only if all fields are populated func TestHasObjectMetaSystemFieldValues(t *testing.T) { ctx := genericapirequest.NewDefaultContext() - resource := api.ObjectMeta{} + resource := metav1.ObjectMeta{} if api.HasObjectMetaSystemFieldValues(&resource) { t.Errorf("the resource does not have all fields yet populated, but incorrectly reports it does") } @@ -68,7 +69,7 @@ func TestValidNamespace(t *testing.T) { if namespace != resource.Namespace { t.Fatalf("expected resource to have the default namespace assigned during validation") } - resource = api.ReplicationController{ObjectMeta: api.ObjectMeta{Namespace: "other"}} + resource = api.ReplicationController{ObjectMeta: metav1.ObjectMeta{Namespace: "other"}} if ValidNamespace(ctx, &resource.ObjectMeta) { t.Fatalf("Expected error that resource and context errors do not match because resource has different namespace") } diff --git a/pkg/genericapiserver/api/rest/resttest/resttest.go b/pkg/genericapiserver/api/rest/resttest/resttest.go index 1565cf3cb51..999957d2280 100644 --- a/pkg/genericapiserver/api/rest/resttest/resttest.go +++ b/pkg/genericapiserver/api/rest/resttest/resttest.go @@ -104,8 +104,8 @@ func (t *Tester) TestContext() genericapirequest.Context { return genericapirequest.WithNamespace(genericapirequest.NewContext(), t.TestNamespace()) } -func (t *Tester) getObjectMetaOrFail(obj runtime.Object) *api.ObjectMeta { - meta, err := api.ObjectMetaFor(obj) +func (t *Tester) getObjectMetaOrFail(obj runtime.Object) *metav1.ObjectMeta { + meta, err := metav1.ObjectMetaFor(obj) if err != nil { t.Fatalf("object does not have ObjectMeta: %v\n%#v", err, obj) } @@ -225,7 +225,7 @@ func (t *Tester) TestWatch( // Creation tests. func (t *Tester) delete(ctx genericapirequest.Context, obj runtime.Object) error { - objectMeta, err := api.ObjectMetaFor(obj) + objectMeta, err := metav1.ObjectMetaFor(obj) if err != nil { return err } diff --git a/pkg/genericapiserver/api/rest/update.go b/pkg/genericapiserver/api/rest/update.go index 137106eed01..7e14b29481d 100644 --- a/pkg/genericapiserver/api/rest/update.go +++ b/pkg/genericapiserver/api/rest/update.go @@ -60,11 +60,11 @@ type RESTUpdateStrategy interface { // TODO: add other common fields that require global validation. func validateCommonFields(obj, old runtime.Object) (field.ErrorList, error) { allErrs := field.ErrorList{} - objectMeta, err := api.ObjectMetaFor(obj) + objectMeta, err := metav1.ObjectMetaFor(obj) if err != nil { return nil, fmt.Errorf("failed to get new object metadata: %v", err) } - oldObjectMeta, err := api.ObjectMetaFor(old) + oldObjectMeta, err := metav1.ObjectMetaFor(old) if err != nil { return nil, fmt.Errorf("failed to get old object metadata: %v", err) } @@ -89,7 +89,7 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx genericapirequest.Context, ob objectMeta.Namespace = api.NamespaceNone } // Ensure requests cannot update generation - oldMeta, err := api.ObjectMetaFor(old) + oldMeta, err := metav1.ObjectMetaFor(old) if err != nil { return err } diff --git a/pkg/genericapiserver/api/testing/BUILD b/pkg/genericapiserver/api/testing/BUILD index 70f7ce32b77..d2dfc5ddd4a 100644 --- a/pkg/genericapiserver/api/testing/BUILD +++ b/pkg/genericapiserver/api/testing/BUILD @@ -15,7 +15,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/pkg/genericapiserver/api/testing/types.generated.go b/pkg/genericapiserver/api/testing/types.generated.go index ba3fa09eeb0..c7ba608b63f 100644 --- a/pkg/genericapiserver/api/testing/types.generated.go +++ b/pkg/genericapiserver/api/testing/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -158,13 +156,25 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) @@ -311,33 +321,39 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "other": if r.TryDecodeAsNil() { x.Other = "" } else { - yyv9 := &x.Other - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Other + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "labels": if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv11 := &x.Labels - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Labels + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } default: @@ -351,16 +367,16 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -368,21 +384,21 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -390,38 +406,44 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -429,21 +451,21 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Other = "" } else { - yyv19 := &x.Other - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Other + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -451,26 +473,26 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv21 := &x.Labels - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Labels + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecMapStringStringX(yyv21, false, d) + z.F.DecMapStringStringX(yyv23, false, d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -562,13 +584,25 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) @@ -715,33 +749,39 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "other": if r.TryDecodeAsNil() { x.Other = "" } else { - yyv9 := &x.Other - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Other + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "labels": if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv11 := &x.Labels - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Labels + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } default: @@ -755,16 +795,16 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -772,21 +812,21 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -794,38 +834,44 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -833,21 +879,21 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Other = "" } else { - yyv19 := &x.Other - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Other + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -855,26 +901,26 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv21 := &x.Labels - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Labels + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecMapStringStringX(yyv21, false, d) + z.F.DecMapStringStringX(yyv23, false, d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/genericapiserver/api/testing/types.go b/pkg/genericapiserver/api/testing/types.go index e5378e03043..c5d367caf8b 100644 --- a/pkg/genericapiserver/api/testing/types.go +++ b/pkg/genericapiserver/api/testing/types.go @@ -19,11 +19,10 @@ package testing import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - apiv1 "k8s.io/kubernetes/pkg/api/v1" ) type Simple struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // +optional Other string `json:"other,omitempty"` @@ -34,7 +33,7 @@ type Simple struct { func (obj *Simple) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } type SimpleRoot struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // +optional Other string `json:"other,omitempty"` diff --git a/pkg/genericapiserver/api/watch_test.go b/pkg/genericapiserver/api/watch_test.go index 4b634094629..159beb2c206 100644 --- a/pkg/genericapiserver/api/watch_test.go +++ b/pkg/genericapiserver/api/watch_test.go @@ -38,7 +38,6 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" - apiv1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/genericapiserver/api/handlers" "k8s.io/kubernetes/pkg/genericapiserver/api/rest" @@ -68,18 +67,18 @@ var watchTestTable = []struct { t watch.EventType obj runtime.Object }{ - {watch.Added, &apitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}}}, - {watch.Modified, &apitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "bar"}}}, - {watch.Deleted, &apitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "bar"}}}, + {watch.Added, &apitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}}, + {watch.Modified, &apitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}}, + {watch.Deleted, &apitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}}, } var podWatchTestTable = []struct { t watch.EventType obj runtime.Object }{ - {watch.Added, roundTripOrDie(codec, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}})}, - {watch.Modified, roundTripOrDie(codec, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}})}, - {watch.Deleted, roundTripOrDie(codec, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}})}, + {watch.Added, roundTripOrDie(codec, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}})}, + {watch.Modified, roundTripOrDie(codec, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}})}, + {watch.Deleted, roundTripOrDie(codec, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}})}, } func TestWatchWebsocket(t *testing.T) { diff --git a/pkg/kubectl/autoscale.go b/pkg/kubectl/autoscale.go index 3fd1e3457de..e452d6428e2 100644 --- a/pkg/kubectl/autoscale.go +++ b/pkg/kubectl/autoscale.go @@ -20,8 +20,8 @@ import ( "fmt" "strconv" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" ) @@ -111,7 +111,7 @@ func generateHPA(genericParams map[string]interface{}) (runtime.Object, error) { } scaler := autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: autoscaling.HorizontalPodAutoscalerSpec{ diff --git a/pkg/kubectl/cluster.go b/pkg/kubectl/cluster.go index b6f60b50ecb..3bb9f0feade 100644 --- a/pkg/kubectl/cluster.go +++ b/pkg/kubectl/cluster.go @@ -19,6 +19,7 @@ package kubectl import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/pkg/api/v1" @@ -94,7 +95,7 @@ func (s ClusterGeneratorV1Beta1) StructuredGenerate() (runtime.Object, error) { s.SecretName = s.Name } cluster := &federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: s.Name, }, Spec: federationapi.ClusterSpec{ diff --git a/pkg/kubectl/cluster_test.go b/pkg/kubectl/cluster_test.go index bea3c44964f..65a2e160e0a 100644 --- a/pkg/kubectl/cluster_test.go +++ b/pkg/kubectl/cluster_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -38,7 +39,7 @@ func TestClusterGenerate(t *testing.T) { "secret": "foo-credentials", }, expected: &federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: federationapi.ClusterSpec{ @@ -63,7 +64,7 @@ func TestClusterGenerate(t *testing.T) { "secret": "foo-credentials", }, expected: &federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: federationapi.ClusterSpec{ @@ -88,7 +89,7 @@ func TestClusterGenerate(t *testing.T) { "secret": "credentials", }, expected: &federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar-cluster", }, Spec: federationapi.ClusterSpec{ diff --git a/pkg/kubectl/cmd/annotate.go b/pkg/kubectl/cmd/annotate.go index 16c1d96d34a..576e3e4abb3 100644 --- a/pkg/kubectl/cmd/annotate.go +++ b/pkg/kubectl/cmd/annotate.go @@ -25,6 +25,7 @@ import ( "github.com/golang/glog" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/kubectl" diff --git a/pkg/kubectl/cmd/annotate_test.go b/pkg/kubectl/cmd/annotate_test.go index f94b1bb1f99..715636958b1 100644 --- a/pkg/kubectl/cmd/annotate_test.go +++ b/pkg/kubectl/cmd/annotate_test.go @@ -23,6 +23,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" @@ -32,13 +33,13 @@ import ( func TestValidateAnnotationOverwrites(t *testing.T) { tests := []struct { - meta *api.ObjectMeta + meta *metav1.ObjectMeta annotations map[string]string expectErr bool scenario string }{ { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Annotations: map[string]string{ "a": "A", "b": "B", @@ -52,7 +53,7 @@ func TestValidateAnnotationOverwrites(t *testing.T) { expectErr: true, }, { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Annotations: map[string]string{ "a": "A", "c": "C", @@ -66,7 +67,7 @@ func TestValidateAnnotationOverwrites(t *testing.T) { expectErr: true, }, { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Annotations: map[string]string{ "a": "A", "c": "C", @@ -79,7 +80,7 @@ func TestValidateAnnotationOverwrites(t *testing.T) { scenario: "no overlap", }, { - meta: &api.ObjectMeta{}, + meta: &metav1.ObjectMeta{}, annotations: map[string]string{ "a": "A", "b": "B", @@ -214,7 +215,7 @@ func TestUpdateAnnotations(t *testing.T) { }{ { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, @@ -223,41 +224,41 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, annotations: map[string]string{"a": "c"}, overwrite: true, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "c"}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, annotations: map[string]string{"c": "d"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, annotations: map[string]string{"c": "d"}, version: "2", expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, ResourceVersion: "2", }, @@ -265,28 +266,28 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, annotations: map[string]string{}, remove: []string{"a"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, }, }, annotations: map[string]string{"e": "f"}, remove: []string{"a"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "c": "d", "e": "f", @@ -296,14 +297,14 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, }, }, annotations: map[string]string{"e": "f"}, remove: []string{"g"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "a": "b", "c": "d", @@ -314,13 +315,13 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, }, }, remove: []string{"e"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "a": "b", "c": "d", @@ -330,11 +331,11 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, }, annotations: map[string]string{"a": "b"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, diff --git a/pkg/kubectl/cmd/attach_test.go b/pkg/kubectl/cmd/attach_test.go index f34919345e2..28a7f71641d 100644 --- a/pkg/kubectl/cmd/attach_test.go +++ b/pkg/kubectl/cmd/attach_test.go @@ -27,6 +27,7 @@ import ( "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" @@ -294,7 +295,7 @@ func TestAttachWarnings(t *testing.T) { func attachPod() *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, diff --git a/pkg/kubectl/cmd/cmd_test.go b/pkg/kubectl/cmd/cmd_test.go index 1342aac2256..d953b4630d4 100644 --- a/pkg/kubectl/cmd/cmd_test.go +++ b/pkg/kubectl/cmd/cmd_test.go @@ -156,7 +156,7 @@ func Example_printReplicationControllerWithNamespace() { } cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) ctrl := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "beep", Labels: map[string]string{"foo": "bar"}, @@ -166,7 +166,7 @@ func Example_printReplicationControllerWithNamespace() { Replicas: 1, Selector: map[string]string{"foo": "bar"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar"}, }, Spec: api.PodSpec{ @@ -206,7 +206,7 @@ func Example_printMultiContainersReplicationControllerWithWide() { } cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) ctrl := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar"}, CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, @@ -215,7 +215,7 @@ func Example_printMultiContainersReplicationControllerWithWide() { Replicas: 1, Selector: map[string]string{"foo": "bar"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar"}, }, Spec: api.PodSpec{ @@ -257,7 +257,7 @@ func Example_printReplicationController() { } cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) ctrl := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar"}, CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, @@ -266,7 +266,7 @@ func Example_printReplicationController() { Replicas: 1, Selector: map[string]string{"foo": "bar"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar"}, }, Spec: api.PodSpec{ @@ -310,7 +310,7 @@ func Example_printPodWithWideFormat() { nodeName := "kubernetes-node-abcd" cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -350,7 +350,7 @@ func Example_printPodWithShowLabels() { nodeName := "kubernetes-node-abcd" cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, Labels: map[string]string{ @@ -385,7 +385,7 @@ func newAllPhasePodList() *api.PodList { return &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -402,7 +402,7 @@ func newAllPhasePodList() *api.PodList { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test2", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -419,7 +419,7 @@ func newAllPhasePodList() *api.PodList { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test3", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -436,7 +436,7 @@ func newAllPhasePodList() *api.PodList { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test4", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -453,7 +453,7 @@ func newAllPhasePodList() *api.PodList { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test5", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -544,7 +544,7 @@ func Example_printServiceWithNamespacesAndLabels() { svc := &api.ServiceList{ Items: []api.Service{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "svc1", Namespace: "ns1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, @@ -565,7 +565,7 @@ func Example_printServiceWithNamespacesAndLabels() { Status: api.ServiceStatus{}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "svc2", Namespace: "ns2", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, diff --git a/pkg/kubectl/cmd/delete_test.go b/pkg/kubectl/cmd/delete_test.go index aee4b4a3447..8486897279f 100644 --- a/pkg/kubectl/cmd/delete_test.go +++ b/pkg/kubectl/cmd/delete_test.go @@ -278,7 +278,7 @@ func TestDeleteObjectIgnoreNotFound(t *testing.T) { func TestDeleteAllNotFound(t *testing.T) { _, svc, _ := testData() // Add an item to the list which will result in a 404 on delete - svc.Items = append(svc.Items, api.Service{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + svc.Items = append(svc.Items, api.Service{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) notFoundError := &errors.NewNotFound(api.Resource("services"), "foo").ErrStatus f, tf, codec, _ := cmdtesting.NewAPIFactory() @@ -328,7 +328,7 @@ func TestDeleteAllIgnoreNotFound(t *testing.T) { f, tf, codec, _ := cmdtesting.NewAPIFactory() // Add an item to the list which will result in a 404 on delete - svc.Items = append(svc.Items, api.Service{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + svc.Items = append(svc.Items, api.Service{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) notFoundError := &errors.NewNotFound(api.Resource("services"), "foo").ErrStatus tf.Printer = &testPrinter{} diff --git a/pkg/kubectl/cmd/drain.go b/pkg/kubectl/cmd/drain.go index a70107b75f7..fe56eea3486 100644 --- a/pkg/kubectl/cmd/drain.go +++ b/pkg/kubectl/cmd/drain.go @@ -437,7 +437,7 @@ func (o *DrainOptions) evictPod(pod api.Pod, policyGroupVersion string) error { APIVersion: policyGroupVersion, Kind: EvictionKind, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: pod.Name, Namespace: pod.Namespace, }, diff --git a/pkg/kubectl/cmd/drain_test.go b/pkg/kubectl/cmd/drain_test.go index f050caa2451..e97ec4c87a6 100644 --- a/pkg/kubectl/cmd/drain_test.go +++ b/pkg/kubectl/cmd/drain_test.go @@ -60,7 +60,7 @@ var cordoned_node *api.Node func TestMain(m *testing.M) { // Create a node. node = &api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node", CreationTimestamp: metav1.Time{Time: time.Now()}, }, @@ -221,7 +221,7 @@ func TestDrain(t *testing.T) { labels["my_key"] = "my_value" rc := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "rc", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -237,7 +237,7 @@ func TestDrain(t *testing.T) { rc_anno[api.CreatedByAnnotation] = refJson(t, &rc) rc_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -250,7 +250,7 @@ func TestDrain(t *testing.T) { } ds := extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "ds", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -265,7 +265,7 @@ func TestDrain(t *testing.T) { ds_anno[api.CreatedByAnnotation] = refJson(t, &ds) ds_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -278,7 +278,7 @@ func TestDrain(t *testing.T) { } job := batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "job", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -290,7 +290,7 @@ func TestDrain(t *testing.T) { } job_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -300,7 +300,7 @@ func TestDrain(t *testing.T) { } rs := extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "rs", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -316,7 +316,7 @@ func TestDrain(t *testing.T) { rs_anno[api.CreatedByAnnotation] = refJson(t, &rs) rs_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -329,7 +329,7 @@ func TestDrain(t *testing.T) { } naked_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -341,7 +341,7 @@ func TestDrain(t *testing.T) { } emptydir_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -716,7 +716,7 @@ func createPods(ifCreateNewPods bool) (map[string]api.Pod, []api.Pod) { uid = types.UID(strconv.Itoa(i) + strconv.Itoa(i)) } pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + strconv.Itoa(i), Namespace: "default", UID: uid, diff --git a/pkg/kubectl/cmd/exec_test.go b/pkg/kubectl/cmd/exec_test.go index a889b5592cf..df4706ee495 100644 --- a/pkg/kubectl/cmd/exec_test.go +++ b/pkg/kubectl/cmd/exec_test.go @@ -29,6 +29,7 @@ import ( "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" @@ -243,7 +244,7 @@ func TestExec(t *testing.T) { func execPod() *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, diff --git a/pkg/kubectl/cmd/expose_test.go b/pkg/kubectl/cmd/expose_test.go index f796683e5ed..987d21f6629 100644 --- a/pkg/kubectl/cmd/expose_test.go +++ b/pkg/kubectl/cmd/expose_test.go @@ -23,6 +23,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient/fake" @@ -52,14 +53,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -83,14 +84,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -114,7 +115,7 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/default/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "mayor", Namespace: "default", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "mayor", Namespace: "default", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"run": "this"}, }, @@ -122,7 +123,7 @@ func TestRunExposeService(t *testing.T) { // No --name flag specified below. Service will use the rc's name passed via the 'default-name' parameter flags: map[string]string{"selector": "run=this", "port": "80", "labels": "runas=amayor"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "mayor", Namespace: "", Labels: map[string]string{"runas": "amayor"}}, + ObjectMeta: metav1.ObjectMeta{Name: "mayor", Namespace: "", Labels: map[string]string{"runas": "amayor"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -146,14 +147,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "type": "LoadBalancer", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -177,14 +178,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "type": "LoadBalancer", "session-affinity": "ClientIP", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -209,14 +210,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "cluster-ip": "10.10.10.10", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -241,14 +242,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "cluster-ip": "None", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -273,14 +274,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "name": "foo", "labels": "svc=test", "cluster-ip": "None", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{}, Selector: map[string]string{"func": "stream"}, @@ -299,14 +300,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "redis-master", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "redis-master", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"filename": "../../../examples/guestbook/redis-master-service.yaml", "selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -329,11 +330,11 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, }, flags: map[string]string{"selector": "svc=frompod", "port": "90", "labels": "svc=frompod", "generator": "service/v2"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "a-name-that-is-toooo-big-for-a-service-because-it-can-only-handle-63-characters", Namespace: "", Labels: map[string]string{"svc": "frompod"}}, + ObjectMeta: metav1.ObjectMeta{Name: "a-name-that-is-toooo-big-for-a-service-because-it-can-only-handle-63-characters", Namespace: "", Labels: map[string]string{"svc": "frompod"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -357,7 +358,7 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -375,7 +376,7 @@ func TestRunExposeService(t *testing.T) { }, flags: map[string]string{"selector": "svc=fromfoo", "generator": "service/v2", "name": "fromfoo", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "fromfoo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, + ObjectMeta: metav1.ObjectMeta{Name: "fromfoo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -405,7 +406,7 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -428,7 +429,7 @@ func TestRunExposeService(t *testing.T) { }, flags: map[string]string{"selector": "svc=fromfoo", "generator": "service/v2", "name": "fromfoo", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "fromfoo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, + ObjectMeta: metav1.ObjectMeta{Name: "fromfoo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { diff --git a/pkg/kubectl/cmd/get_test.go b/pkg/kubectl/cmd/get_test.go index e7d73035b74..fccd176c197 100644 --- a/pkg/kubectl/cmd/get_test.go +++ b/pkg/kubectl/cmd/get_test.go @@ -49,11 +49,11 @@ func testData() (*api.PodList, *api.ServiceList, *api.ReplicationControllerList) }, Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "11"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -64,7 +64,7 @@ func testData() (*api.PodList, *api.ServiceList, *api.ReplicationControllerList) }, Items: []api.Service{ { - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ SessionAffinity: "None", Type: api.ServiceTypeClusterIP, @@ -78,7 +78,7 @@ func testData() (*api.PodList, *api.ServiceList, *api.ReplicationControllerList) }, Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{Name: "rc1", Namespace: "test", ResourceVersion: "18"}, + ObjectMeta: metav1.ObjectMeta{Name: "rc1", Namespace: "test", ResourceVersion: "18"}, Spec: api.ReplicationControllerSpec{ Replicas: 1, }, @@ -93,21 +93,21 @@ func testComponentStatusData() *api.ComponentStatusList { Conditions: []api.ComponentCondition{ {Type: api.ComponentHealthy, Status: api.ConditionTrue, Message: "ok"}, }, - ObjectMeta: api.ObjectMeta{Name: "servergood"}, + ObjectMeta: metav1.ObjectMeta{Name: "servergood"}, } bad := api.ComponentStatus{ Conditions: []api.ComponentCondition{ {Type: api.ComponentHealthy, Status: api.ConditionFalse, Message: "", Error: "bad status: 500"}, }, - ObjectMeta: api.ObjectMeta{Name: "serverbad"}, + ObjectMeta: metav1.ObjectMeta{Name: "serverbad"}, } unknown := api.ComponentStatus{ Conditions: []api.ComponentCondition{ {Type: api.ComponentHealthy, Status: api.ConditionUnknown, Message: "", Error: "fizzbuzz error"}, }, - ObjectMeta: api.ObjectMeta{Name: "serverunknown"}, + ObjectMeta: metav1.ObjectMeta{Name: "serverunknown"}, } return &api.ComponentStatusList{ @@ -166,7 +166,7 @@ func TestGetSchemaObject(t *testing.T) { tf.Printer = &testPrinter{} tf.Client = &fake.RESTClient{ NegotiatedSerializer: unstructuredSerializer, - Resp: &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &api.ReplicationController{ObjectMeta: api.ObjectMeta{Name: "foo"}})}, + Resp: &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &api.ReplicationController{ObjectMeta: metav1.ObjectMeta{Name: "foo"}})}, } tf.Namespace = "test" tf.ClientConfig = &restclient.Config{ContentConfig: restclient.ContentConfig{GroupVersion: &schema.GroupVersion{Version: "v1"}}} @@ -213,15 +213,15 @@ func TestGetSortedObjects(t *testing.T) { }, Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "c", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "c", Namespace: "test", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "b", Namespace: "test", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "b", Namespace: "test", ResourceVersion: "11"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "a", Namespace: "test", ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "test", ResourceVersion: "9"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -552,7 +552,7 @@ func TestGetMultipleTypeObjectsWithSelector(t *testing.T) { func TestGetMultipleTypeObjectsWithDirectReference(t *testing.T) { _, svc, _ := testData() node := &api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ @@ -619,7 +619,7 @@ func TestGetByNameForcesFlag(t *testing.T) { func watchTestData() ([]api.Pod, []watch.Event) { pods := []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "test", ResourceVersion: "9", @@ -627,7 +627,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", ResourceVersion: "10", @@ -640,7 +640,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { { Type: watch.Added, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "test", ResourceVersion: "9", @@ -651,7 +651,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { { Type: watch.Added, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", ResourceVersion: "10", @@ -663,7 +663,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { { Type: watch.Modified, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", ResourceVersion: "11", @@ -674,7 +674,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { { Type: watch.Deleted, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", ResourceVersion: "12", diff --git a/pkg/kubectl/cmd/label.go b/pkg/kubectl/cmd/label.go index b21c3ac7fdb..bb0173d959e 100644 --- a/pkg/kubectl/cmd/label.go +++ b/pkg/kubectl/cmd/label.go @@ -26,6 +26,7 @@ import ( "github.com/golang/glog" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" diff --git a/pkg/kubectl/cmd/label_test.go b/pkg/kubectl/cmd/label_test.go index 9da1b3b889d..94fe2ba10f5 100644 --- a/pkg/kubectl/cmd/label_test.go +++ b/pkg/kubectl/cmd/label_test.go @@ -23,6 +23,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" @@ -33,13 +34,13 @@ import ( func TestValidateLabels(t *testing.T) { tests := []struct { - meta *api.ObjectMeta + meta *metav1.ObjectMeta labels map[string]string expectErr bool test string }{ { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Labels: map[string]string{ "a": "b", "c": "d", @@ -53,7 +54,7 @@ func TestValidateLabels(t *testing.T) { expectErr: true, }, { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Labels: map[string]string{ "a": "b", "c": "d", @@ -67,7 +68,7 @@ func TestValidateLabels(t *testing.T) { expectErr: true, }, { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Labels: map[string]string{ "a": "b", "c": "d", @@ -80,7 +81,7 @@ func TestValidateLabels(t *testing.T) { test: "no overlap", }, { - meta: &api.ObjectMeta{}, + meta: &metav1.ObjectMeta{}, labels: map[string]string{ "b": "a", "d": "c", @@ -165,7 +166,7 @@ func TestLabelFunc(t *testing.T) { }{ { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, @@ -174,41 +175,41 @@ func TestLabelFunc(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, labels: map[string]string{"a": "c"}, overwrite: true, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "c"}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, labels: map[string]string{"c": "d"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b", "c": "d"}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, labels: map[string]string{"c": "d"}, version: "2", expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b", "c": "d"}, ResourceVersion: "2", }, @@ -216,28 +217,28 @@ func TestLabelFunc(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, labels: map[string]string{}, remove: []string{"a"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b", "c": "d"}, }, }, labels: map[string]string{"e": "f"}, remove: []string{"a"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "c": "d", "e": "f", @@ -247,11 +248,11 @@ func TestLabelFunc(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, }, labels: map[string]string{"a": "b"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, diff --git a/pkg/kubectl/cmd/logs_test.go b/pkg/kubectl/cmd/logs_test.go index 39970e65868..ac4f5b08e0a 100644 --- a/pkg/kubectl/cmd/logs_test.go +++ b/pkg/kubectl/cmd/logs_test.go @@ -26,6 +26,7 @@ import ( "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" @@ -82,7 +83,7 @@ func TestLog(t *testing.T) { func testPod() *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, diff --git a/pkg/kubectl/cmd/run.go b/pkg/kubectl/cmd/run.go index d12a37a88a5..97e3bd7f5c4 100644 --- a/pkg/kubectl/cmd/run.go +++ b/pkg/kubectl/cmd/run.go @@ -377,7 +377,7 @@ func contains(resourcesList []*metav1.APIResourceList, resource schema.GroupVers // waitForPod watches the given pod until the exitCondition is true func waitForPod(podClient coreclient.PodsGetter, ns, name string, exitCondition watch.ConditionFunc) (*api.Pod, error) { - w, err := podClient.Pods(ns).Watch(api.SingleObject(api.ObjectMeta{Name: name})) + w, err := podClient.Pods(ns).Watch(api.SingleObject(metav1.ObjectMeta{Name: name})) if err != nil { return nil, err } diff --git a/pkg/kubectl/cmd/run_test.go b/pkg/kubectl/cmd/run_test.go index 1495797ff88..e3a94b507a0 100644 --- a/pkg/kubectl/cmd/run_test.go +++ b/pkg/kubectl/cmd/run_test.go @@ -28,6 +28,7 @@ import ( "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" @@ -196,7 +197,7 @@ func TestGenerateService(t *testing.T) { expectErr: false, name: "basic", service: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.ServiceSpec{ @@ -227,7 +228,7 @@ func TestGenerateService(t *testing.T) { expectErr: false, name: "custom labels", service: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"app": "bar"}, }, diff --git a/pkg/kubectl/cmd/taint.go b/pkg/kubectl/cmd/taint.go index 6a8400d6024..aab538a5ea1 100644 --- a/pkg/kubectl/cmd/taint.go +++ b/pkg/kubectl/cmd/taint.go @@ -32,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/kubernetes/pkg/api" +metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "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/taint_test.go b/pkg/kubectl/cmd/taint_test.go index 327a93a84c0..2a5395175d0 100644 --- a/pkg/kubectl/cmd/taint_test.go +++ b/pkg/kubectl/cmd/taint_test.go @@ -41,7 +41,7 @@ func generateNodeAndTaintedNode(oldTaints []api.Taint, newTaints []api.Taint) (* oldTaintsData, _ := json.Marshal(oldTaints) // Create a node. node := &api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node-name", CreationTimestamp: metav1.Time{Time: time.Now()}, Annotations: map[string]string{ diff --git a/pkg/kubectl/cmd/top_pod_test.go b/pkg/kubectl/cmd/top_pod_test.go index 7520fb8ad58..56b4bba3066 100644 --- a/pkg/kubectl/cmd/top_pod_test.go +++ b/pkg/kubectl/cmd/top_pod_test.go @@ -25,6 +25,7 @@ import ( "net/url" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metricsapi "k8s.io/heapster/metrics/apis/metrics/v1alpha1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" @@ -171,7 +172,7 @@ func TestTopPod(t *testing.T) { func testPodMetricsData() []metricsapi.PodMetrics { return []metricsapi.PodMetrics{ { - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: "test", ResourceVersion: "10"}, Window: unversioned.Duration{Duration: time.Minute}, Containers: []metricsapi.ContainerMetrics{ { @@ -193,7 +194,7 @@ func testPodMetricsData() []metricsapi.PodMetrics { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "pod2", Namespace: "test", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod2", Namespace: "test", ResourceVersion: "11"}, Window: unversioned.Duration{Duration: time.Minute}, Containers: []metricsapi.ContainerMetrics{ { @@ -223,7 +224,7 @@ func testPodMetricsData() []metricsapi.PodMetrics { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "pod3", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod3", Namespace: "test", ResourceVersion: "12"}, Window: unversioned.Duration{Duration: time.Minute}, Containers: []metricsapi.ContainerMetrics{ { diff --git a/pkg/kubectl/cmd/top_test.go b/pkg/kubectl/cmd/top_test.go index 6b3a01a5f69..39194fc0cc5 100644 --- a/pkg/kubectl/cmd/top_test.go +++ b/pkg/kubectl/cmd/top_test.go @@ -67,7 +67,7 @@ func testNodeMetricsData() (*metricsapi.NodeMetricsList, *api.NodeList) { }, Items: []metricsapi.NodeMetrics{ { - ObjectMeta: v1.ObjectMeta{Name: "node1", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "node1", ResourceVersion: "10"}, Window: unversioned.Duration{Duration: time.Minute}, Usage: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(1, resource.DecimalSI), @@ -76,7 +76,7 @@ func testNodeMetricsData() (*metricsapi.NodeMetricsList, *api.NodeList) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "node2", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "node2", ResourceVersion: "11"}, Window: unversioned.Duration{Duration: time.Minute}, Usage: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(5, resource.DecimalSI), @@ -92,7 +92,7 @@ func testNodeMetricsData() (*metricsapi.NodeMetricsList, *api.NodeList) { }, Items: []api.Node{ { - ObjectMeta: api.ObjectMeta{Name: "node1", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "node1", ResourceVersion: "10"}, Status: api.NodeStatus{ Allocatable: api.ResourceList{ api.ResourceCPU: *resource.NewMilliQuantity(10, resource.DecimalSI), @@ -102,7 +102,7 @@ func testNodeMetricsData() (*metricsapi.NodeMetricsList, *api.NodeList) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "node2", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "node2", ResourceVersion: "11"}, Status: api.NodeStatus{ Allocatable: api.ResourceList{ api.ResourceCPU: *resource.NewMilliQuantity(50, resource.DecimalSI), diff --git a/pkg/kubectl/cmd/util/factory_test.go b/pkg/kubectl/cmd/util/factory_test.go index b4e6245c51a..b691f189a80 100644 --- a/pkg/kubectl/cmd/util/factory_test.go +++ b/pkg/kubectl/cmd/util/factory_test.go @@ -74,7 +74,7 @@ func TestPortsForObject(t *testing.T) { f := NewFactory(nil) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -111,7 +111,7 @@ func TestProtocolsForObject(t *testing.T) { f := NewFactory(nil) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -161,7 +161,7 @@ func TestLabelsForObject(t *testing.T) { { name: "successful re-use of labels", object: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", Labels: map[string]string{"svc": "test"}}, TypeMeta: metav1.TypeMeta{Kind: "Service", APIVersion: "v1"}, }, expected: "svc=test", @@ -170,7 +170,7 @@ func TestLabelsForObject(t *testing.T) { { name: "empty labels", object: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", Labels: map[string]string{}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", Labels: map[string]string{}}, TypeMeta: metav1.TypeMeta{Kind: "Service", APIVersion: "v1"}, }, expected: "", @@ -179,7 +179,7 @@ func TestLabelsForObject(t *testing.T) { { name: "nil labels", object: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "zen", Namespace: "test", Labels: nil}, + ObjectMeta: metav1.ObjectMeta{Name: "zen", Namespace: "test", Labels: nil}, TypeMeta: metav1.TypeMeta{Kind: "Service", APIVersion: "v1"}, }, expected: "", @@ -437,7 +437,7 @@ func newPodList(count, isUnready, isUnhealthy int, labels map[string]string) *ap pods := []api.Pod{} for i := 0; i < count; i++ { newPod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("pod-%d", i+1), Namespace: api.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, i, 0, time.UTC), @@ -483,7 +483,7 @@ func TestGetFirstPod(t *testing.T) { podList: newPodList(2, -1, -1, labelSet), sortBy: func(pods []*v1.Pod) sort.Interface { return controller.ByLogging(pods) }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: api.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC), @@ -505,7 +505,7 @@ func TestGetFirstPod(t *testing.T) { podList: newPodList(2, -1, 1, labelSet), sortBy: func(pods []*v1.Pod) sort.Interface { return controller.ByLogging(pods) }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-2", Namespace: api.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 1, 0, time.UTC), @@ -528,7 +528,7 @@ func TestGetFirstPod(t *testing.T) { podList: newPodList(2, -1, -1, labelSet), sortBy: func(pods []*v1.Pod) sort.Interface { return sort.Reverse(controller.ActivePods(pods)) }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: api.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC), @@ -552,7 +552,7 @@ func TestGetFirstPod(t *testing.T) { { Type: watch.Modified, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: api.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC), @@ -571,7 +571,7 @@ func TestGetFirstPod(t *testing.T) { }, sortBy: func(pods []*v1.Pod) sort.Interface { return sort.Reverse(controller.ActivePods(pods)) }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: api.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC), diff --git a/pkg/kubectl/cmd/util/helpers_test.go b/pkg/kubectl/cmd/util/helpers_test.go index 3c4e748b48d..7abb9ac8377 100644 --- a/pkg/kubectl/cmd/util/helpers_test.go +++ b/pkg/kubectl/cmd/util/helpers_test.go @@ -52,13 +52,13 @@ func TestMerge(t *testing.T) { { kind: "Pod", obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, fragment: fmt.Sprintf(`{ "apiVersion": "%s" }`, api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()), expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: apitesting.DeepEqualSafePodSpec(), @@ -69,7 +69,7 @@ func TestMerge(t *testing.T) { { kind: "Pod", obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -87,7 +87,7 @@ func TestMerge(t *testing.T) { }, fragment: fmt.Sprintf(`{ "apiVersion": "%s", "spec": { "containers": [ { "name": "c1", "image": "green-image" } ] } }`, api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()), expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -107,13 +107,13 @@ func TestMerge(t *testing.T) { { kind: "Pod", obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, fragment: fmt.Sprintf(`{ "apiVersion": "%s", "spec": { "volumes": [ {"name": "v1"}, {"name": "v2"} ] } }`, api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()), expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -337,7 +337,7 @@ func TestMaybeConvert(t *testing.T) { }{ { input: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, @@ -347,20 +347,20 @@ func TestMaybeConvert(t *testing.T) { APIVersion: "v1", Kind: "Pod", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, }, { input: &extensions.ThirdPartyResourceData{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: []byte("this is some data"), }, expected: &extensions.ThirdPartyResourceData{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: []byte("this is some data"), diff --git a/pkg/kubectl/configmap_test.go b/pkg/kubectl/configmap_test.go index 70c154b8ba9..e7ae10a0713 100644 --- a/pkg/kubectl/configmap_test.go +++ b/pkg/kubectl/configmap_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -34,7 +35,7 @@ func TestConfigMapGenerate(t *testing.T) { "name": "foo", }, expected: &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string]string{}, @@ -47,7 +48,7 @@ func TestConfigMapGenerate(t *testing.T) { "type": "my-type", }, expected: &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string]string{}, @@ -60,7 +61,7 @@ func TestConfigMapGenerate(t *testing.T) { "from-literal": []string{"key1=value1", "key2=value2"}, }, expected: &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string]string{ @@ -97,7 +98,7 @@ func TestConfigMapGenerate(t *testing.T) { "from-literal": []string{"key1==value1"}, }, expected: &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string]string{ diff --git a/pkg/kubectl/custom_column_printer_test.go b/pkg/kubectl/custom_column_printer_test.go index 4d581f73c55..991a5c42f19 100644 --- a/pkg/kubectl/custom_column_printer_test.go +++ b/pkg/kubectl/custom_column_printer_test.go @@ -237,7 +237,7 @@ func TestColumnPrint(t *testing.T) { FieldSpec: "{.metadata.name}", }, }, - obj: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}, + obj: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, expectedOutput: `NAME foo `, @@ -251,8 +251,8 @@ foo }, obj: &v1.PodList{ Items: []v1.Pod{ - {ObjectMeta: v1.ObjectMeta{Name: "foo"}}, - {ObjectMeta: v1.ObjectMeta{Name: "bar"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, }, }, expectedOutput: `NAME @@ -271,7 +271,7 @@ bar FieldSpec: "{.apiVersion}", }, }, - obj: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}, TypeMeta: metav1.TypeMeta{APIVersion: "baz"}}, + obj: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, TypeMeta: metav1.TypeMeta{APIVersion: "baz"}}, expectedOutput: `NAME API_VERSION foo baz `, diff --git a/pkg/kubectl/deployment.go b/pkg/kubectl/deployment.go index f2c4b2377f4..8b54ce63e04 100644 --- a/pkg/kubectl/deployment.go +++ b/pkg/kubectl/deployment.go @@ -84,7 +84,7 @@ func (s *DeploymentBasicGeneratorV1) StructuredGenerate() (runtime.Object, error labels["app"] = s.Name selector := metav1.LabelSelector{MatchLabels: labels} deployment := extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: s.Name, Labels: labels, }, @@ -92,7 +92,7 @@ func (s *DeploymentBasicGeneratorV1) StructuredGenerate() (runtime.Object, error Replicas: 1, Selector: &selector, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: podSpec, diff --git a/pkg/kubectl/deployment_test.go b/pkg/kubectl/deployment_test.go index f477f07c1bb..db010ca2627 100644 --- a/pkg/kubectl/deployment_test.go +++ b/pkg/kubectl/deployment_test.go @@ -37,7 +37,7 @@ func TestDeploymentGenerate(t *testing.T) { "image": []string{"abc/app:v4"}, }, expected: &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"app": "foo"}, }, @@ -45,7 +45,7 @@ func TestDeploymentGenerate(t *testing.T) { Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"app": "foo"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"app": "foo"}, }, Spec: api.PodSpec{ @@ -62,7 +62,7 @@ func TestDeploymentGenerate(t *testing.T) { "image": []string{"abc/app:v4", "zyx/ape"}, }, expected: &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"app": "foo"}, }, @@ -70,7 +70,7 @@ func TestDeploymentGenerate(t *testing.T) { Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"app": "foo"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"app": "foo"}, }, Spec: api.PodSpec{ diff --git a/pkg/kubectl/describe_test.go b/pkg/kubectl/describe_test.go index 00a317b22ff..15481d70bb5 100644 --- a/pkg/kubectl/describe_test.go +++ b/pkg/kubectl/describe_test.go @@ -51,7 +51,7 @@ type describeClient struct { func TestDescribePod(t *testing.T) { fake := fake.NewSimpleClientset(&api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -73,7 +73,7 @@ func TestDescribePodTolerations(t *testing.T) { {Key: "key2", Value: "value2"}} pt, _ := json.Marshal(podTolerations) fake := fake.NewSimpleClientset(&api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", Annotations: map[string]string{ @@ -94,7 +94,7 @@ func TestDescribePodTolerations(t *testing.T) { func TestDescribeNamespace(t *testing.T) { fake := fake.NewSimpleClientset(&api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myns", }, }) @@ -111,7 +111,7 @@ func TestDescribeNamespace(t *testing.T) { func TestDescribeService(t *testing.T) { fake := fake.NewSimpleClientset(&api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -133,7 +133,7 @@ func TestPodDescribeResultsSorted(t *testing.T) { &api.EventList{ Items: []api.Event{ { - ObjectMeta: api.ObjectMeta{Name: "one"}, + ObjectMeta: metav1.ObjectMeta{Name: "one"}, Source: api.EventSource{Component: "kubelet"}, Message: "Item 1", FirstTimestamp: metav1.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)), @@ -142,7 +142,7 @@ func TestPodDescribeResultsSorted(t *testing.T) { Type: api.EventTypeNormal, }, { - ObjectMeta: api.ObjectMeta{Name: "two"}, + ObjectMeta: metav1.ObjectMeta{Name: "two"}, Source: api.EventSource{Component: "scheduler"}, Message: "Item 2", FirstTimestamp: metav1.NewTime(time.Date(1987, time.June, 17, 0, 0, 0, 0, time.UTC)), @@ -151,7 +151,7 @@ func TestPodDescribeResultsSorted(t *testing.T) { Type: api.EventTypeNormal, }, { - ObjectMeta: api.ObjectMeta{Name: "three"}, + ObjectMeta: metav1.ObjectMeta{Name: "three"}, Source: api.EventSource{Component: "kubelet"}, Message: "Item 3", FirstTimestamp: metav1.NewTime(time.Date(2002, time.December, 25, 0, 0, 0, 0, time.UTC)), @@ -161,7 +161,7 @@ func TestPodDescribeResultsSorted(t *testing.T) { }, }, }, - &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "bar"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"}}, ) c := &describeClient{T: t, Namespace: "foo", Interface: fake} d := PodDescriber{c} @@ -431,7 +431,7 @@ func TestDescribers(t *testing.T) { } func TestDefaultDescribers(t *testing.T) { - out, err := DefaultObjectDescriber.DescribeObject(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + out, err := DefaultObjectDescriber.DescribeObject(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -439,7 +439,7 @@ func TestDefaultDescribers(t *testing.T) { t.Errorf("unexpected output: %s", out) } - out, err = DefaultObjectDescriber.DescribeObject(&api.Service{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + out, err = DefaultObjectDescriber.DescribeObject(&api.Service{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -447,7 +447,7 @@ func TestDefaultDescribers(t *testing.T) { t.Errorf("unexpected output: %s", out) } - out, err = DefaultObjectDescriber.DescribeObject(&api.ReplicationController{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + out, err = DefaultObjectDescriber.DescribeObject(&api.ReplicationController{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -455,7 +455,7 @@ func TestDefaultDescribers(t *testing.T) { t.Errorf("unexpected output: %s", out) } - out, err = DefaultObjectDescriber.DescribeObject(&api.Node{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + out, err = DefaultObjectDescriber.DescribeObject(&api.Node{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -545,7 +545,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { tests := map[string]*api.PersistentVolume{ "hostpath": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ HostPath: &api.HostPathVolumeSource{}, @@ -553,7 +553,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "gce": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{}, @@ -561,7 +561,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "ebs": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{}, @@ -569,7 +569,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "nfs": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ NFS: &api.NFSVolumeSource{}, @@ -577,7 +577,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "iscsi": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ ISCSI: &api.ISCSIVolumeSource{}, @@ -585,7 +585,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "gluster": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ Glusterfs: &api.GlusterfsVolumeSource{}, @@ -593,7 +593,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "rbd": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ RBD: &api.RBDVolumeSource{}, @@ -601,7 +601,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "quobyte": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ Quobyte: &api.QuobyteVolumeSource{}, @@ -609,7 +609,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "cinder": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ Cinder: &api.CinderVolumeSource{}, @@ -634,7 +634,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { func TestDescribeDeployment(t *testing.T) { fake := fake.NewSimpleClientset() versionedFake := versionedfake.NewSimpleClientset(&v1beta1.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -656,7 +656,7 @@ func TestDescribeDeployment(t *testing.T) { func TestDescribeCluster(t *testing.T) { cluster := federation.Cluster{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", ResourceVersion: "4", Labels: map[string]string{ @@ -690,7 +690,7 @@ func TestDescribeCluster(t *testing.T) { func TestDescribeStorageClass(t *testing.T) { f := fake.NewSimpleClientset(&storage.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", ResourceVersion: "4", Annotations: map[string]string{ @@ -715,7 +715,7 @@ func TestDescribeStorageClass(t *testing.T) { func TestDescribePodDisruptionBudget(t *testing.T) { f := fake.NewSimpleClientset(&policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "pdb1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, @@ -742,7 +742,7 @@ func TestDescribeEvents(t *testing.T) { events := &api.EventList{ Items: []api.Event{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "foo", }, Source: api.EventSource{Component: "kubelet"}, @@ -758,7 +758,7 @@ func TestDescribeEvents(t *testing.T) { m := map[string]Describer{ "DaemonSetDescriber": &DaemonSetDescriber{ fake.NewSimpleClientset(&extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -767,7 +767,7 @@ func TestDescribeEvents(t *testing.T) { "DeploymentDescriber": &DeploymentDescriber{ fake.NewSimpleClientset(events), versionedfake.NewSimpleClientset(&v1beta1.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -779,7 +779,7 @@ func TestDescribeEvents(t *testing.T) { }, "EndpointsDescriber": &EndpointsDescriber{ fake.NewSimpleClientset(&api.Endpoints{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -791,7 +791,7 @@ func TestDescribeEvents(t *testing.T) { // - JobDescriber "NodeDescriber": &NodeDescriber{ fake.NewSimpleClientset(&api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", SelfLink: "url/url/url", }, @@ -799,7 +799,7 @@ func TestDescribeEvents(t *testing.T) { }, "PersistentVolumeDescriber": &PersistentVolumeDescriber{ fake.NewSimpleClientset(&api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", SelfLink: "url/url/url", }, @@ -807,7 +807,7 @@ func TestDescribeEvents(t *testing.T) { }, "PodDescriber": &PodDescriber{ fake.NewSimpleClientset(&api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", SelfLink: "url/url/url", @@ -816,7 +816,7 @@ func TestDescribeEvents(t *testing.T) { }, "ReplicaSetDescriber": &ReplicaSetDescriber{ fake.NewSimpleClientset(&extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -824,7 +824,7 @@ func TestDescribeEvents(t *testing.T) { }, "ReplicationControllerDescriber": &ReplicationControllerDescriber{ fake.NewSimpleClientset(&api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -832,7 +832,7 @@ func TestDescribeEvents(t *testing.T) { }, "Service": &ServiceDescriber{ fake.NewSimpleClientset(&api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -840,7 +840,7 @@ func TestDescribeEvents(t *testing.T) { }, "StorageClass": &StorageClassDescriber{ fake.NewSimpleClientset(&storage.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", }, }, events), diff --git a/pkg/kubectl/namespace_test.go b/pkg/kubectl/namespace_test.go index 85fd6b6b343..20d134fdc2a 100644 --- a/pkg/kubectl/namespace_test.go +++ b/pkg/kubectl/namespace_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -35,7 +36,7 @@ func TestNamespaceGenerate(t *testing.T) { "name": "foo", }, expected: &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, diff --git a/pkg/kubectl/pdb.go b/pkg/kubectl/pdb.go index d558f6e7bcf..56d3de0dc79 100644 --- a/pkg/kubectl/pdb.go +++ b/pkg/kubectl/pdb.go @@ -21,7 +21,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -77,7 +76,7 @@ func (s *PodDisruptionBudgetV1Generator) StructuredGenerate() (runtime.Object, e } return &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: s.Name, }, Spec: policy.PodDisruptionBudgetSpec{ diff --git a/pkg/kubectl/quota_test.go b/pkg/kubectl/quota_test.go index 930ded039b7..8529dd676a2 100644 --- a/pkg/kubectl/quota_test.go +++ b/pkg/kubectl/quota_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -41,7 +42,7 @@ func TestQuotaGenerate(t *testing.T) { "hard": hard, }, expected: &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.ResourceQuotaSpec{Hard: resourceQuotaSpecList}, @@ -61,7 +62,7 @@ func TestQuotaGenerate(t *testing.T) { "scopes": "BestEffort,NotTerminating", }, expected: &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.ResourceQuotaSpec{ @@ -81,7 +82,7 @@ func TestQuotaGenerate(t *testing.T) { "scopes": "", }, expected: &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.ResourceQuotaSpec{Hard: resourceQuotaSpecList}, diff --git a/pkg/kubectl/resource/builder_test.go b/pkg/kubectl/resource/builder_test.go index 786637a36ab..83edf3e28cb 100644 --- a/pkg/kubectl/resource/builder_test.go +++ b/pkg/kubectl/resource/builder_test.go @@ -100,11 +100,11 @@ func testData() (*api.PodList, *api.ServiceList) { }, Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "11"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -115,7 +115,7 @@ func testData() (*api.PodList, *api.ServiceList) { }, Items: []api.Service{ { - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Type: "ClusterIP", SessionAffinity: "None", @@ -277,7 +277,7 @@ func TestPathBuilderAndVersionedObjectNotDefaulted(t *testing.T) { func TestNodeBuilder(t *testing.T) { node := &api.Node{ - ObjectMeta: api.ObjectMeta{Name: "node1", Namespace: "should-not-have", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "node1", Namespace: "should-not-have", ResourceVersion: "10"}, Spec: api.NodeSpec{}, Status: api.NodeStatus{ Capacity: api.ResourceList{ @@ -457,7 +457,7 @@ func TestDirectoryBuilder(t *testing.T) { func TestNamespaceOverride(t *testing.T) { s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusOK) - w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "test"}}))) + w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "test"}}))) })) defer s.Close() @@ -487,8 +487,8 @@ func TestNamespaceOverride(t *testing.T) { func TestURLBuilder(t *testing.T) { s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusOK) - w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "test"}}))) - w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "test1"}}))) + w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "test"}}))) + w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "test1"}}))) })) defer s.Close() @@ -517,7 +517,7 @@ func TestURLBuilder(t *testing.T) { func TestURLBuilderRequireNamespace(t *testing.T) { s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusOK) - w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "test"}}))) + w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "test"}}))) })) defer s.Close() @@ -820,7 +820,7 @@ func TestResourceTuple(t *testing.T) { expectedRequests = map[string]string{ "/namespaces/test/pods/foo": runtime.EncodeOrDie(testapi.Default.Codec(), &pods.Items[0]), "/namespaces/test/pods/bar": runtime.EncodeOrDie(testapi.Default.Codec(), &pods.Items[0]), - "/nodes/foo": runtime.EncodeOrDie(testapi.Default.Codec(), &api.Node{ObjectMeta: api.ObjectMeta{Name: "foo"}}), + "/nodes/foo": runtime.EncodeOrDie(testapi.Default.Codec(), &api.Node{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}), } } @@ -980,7 +980,7 @@ func TestSingleItemImpliedObjectNoExtension(t *testing.T) { } func TestSingleItemImpliedRootScopedObject(t *testing.T) { - node := &api.Node{ObjectMeta: api.ObjectMeta{Name: "test"}, Spec: api.NodeSpec{ExternalID: "test"}} + node := &api.Node{ObjectMeta: metav1.ObjectMeta{Name: "test"}, Spec: api.NodeSpec{ExternalID: "test"}} r := streamTestObject(node) infos, err := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClient(), testapi.Default.Codec()). NamespaceParam("test").DefaultNamespace(). @@ -1112,13 +1112,13 @@ func TestWatchMultipleError(t *testing.T) { func TestLatest(t *testing.T) { r, _, _ := streamTestData() newPod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "13"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "13"}, } newPod2 := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "14"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "14"}, } newSvc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "15"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "15"}, } b := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClientWith("", t, map[string]string{ diff --git a/pkg/kubectl/resource/helper_test.go b/pkg/kubectl/resource/helper_test.go index 5141f3cfe90..d6b954c0ebd 100644 --- a/pkg/kubectl/resource/helper_test.go +++ b/pkg/kubectl/resource/helper_test.go @@ -166,25 +166,25 @@ func TestHelperCreate(t *testing.T) { Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess}), }, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, - ExpectObject: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + ExpectObject: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, Req: expectPost, }, { Modify: false, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, - ExpectObject: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, + ExpectObject: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, Resp: &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, Req: expectPost, }, { Modify: true, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, ExpectObject: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, Resp: &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, @@ -251,7 +251,7 @@ func TestHelperGet(t *testing.T) { Resp: &http.Response{ StatusCode: http.StatusOK, Header: header(), - Body: objBody(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}), + Body: objBody(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}), }, Req: func(req *http.Request) bool { if req.Method != "GET" { @@ -322,7 +322,7 @@ func TestHelperList(t *testing.T) { Header: header(), Body: objBody(&api.PodList{ Items: []api.Pod{{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, }, }, }), @@ -406,7 +406,7 @@ func TestHelperReplace(t *testing.T) { { Namespace: "bar", NamespaceScoped: true, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, Resp: &http.Response{ StatusCode: http.StatusNotFound, Header: header(), @@ -417,9 +417,9 @@ func TestHelperReplace(t *testing.T) { { Namespace: "bar", NamespaceScoped: true, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, ExpectPath: "/namespaces/bar/foo", - ExpectObject: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + ExpectObject: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, Resp: &http.Response{ StatusCode: http.StatusOK, Header: header(), @@ -432,12 +432,12 @@ func TestHelperReplace(t *testing.T) { Namespace: "bar", NamespaceScoped: true, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, ExpectPath: "/namespaces/bar/foo", ExpectObject: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, Overwrite: true, @@ -445,17 +445,17 @@ func TestHelperReplace(t *testing.T) { if req.Method == "PUT" { return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, nil } - return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}})}, nil + return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}})}, nil }), Req: expectPut, }, // cluster scoped resource { Object: &api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, }, ExpectObject: &api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, }, Overwrite: true, ExpectPath: "/foo", @@ -463,16 +463,16 @@ func TestHelperReplace(t *testing.T) { if req.Method == "PUT" { return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, nil } - return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&api.Node{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}})}, nil + return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&api.Node{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}})}, nil }), Req: expectPut, }, { Namespace: "bar", NamespaceScoped: true, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, ExpectPath: "/namespaces/bar/foo", - ExpectObject: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, + ExpectObject: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, Resp: &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, Req: expectPut, }, diff --git a/pkg/kubectl/resource_printer.go b/pkg/kubectl/resource_printer.go index a5c8f0c5e44..b09dba33222 100644 --- a/pkg/kubectl/resource_printer.go +++ b/pkg/kubectl/resource_printer.go @@ -1766,7 +1766,7 @@ func printLimitRangeList(list *api.LimitRangeList, w io.Writer, options PrintOpt } // printObjectMeta prints the object metadata of a given resource. -func printObjectMeta(meta api.ObjectMeta, w io.Writer, options PrintOptions, namespaced bool) error { +func printObjectMeta(meta metav1.ObjectMeta, w io.Writer, options PrintOptions, namespaced bool) error { name := formatResourceName(options.Kind, meta.Name, options.WithKind) if namespaced && options.WithNamespace { diff --git a/pkg/kubectl/resource_printer_test.go b/pkg/kubectl/resource_printer_test.go index 42f9d62fdd3..6ebc9488405 100644 --- a/pkg/kubectl/resource_printer_test.go +++ b/pkg/kubectl/resource_printer_test.go @@ -99,11 +99,11 @@ func (obj *TestUnknownType) GetObjectKind() schema.ObjectKind { return schema.Em func TestPrinter(t *testing.T) { //test inputs simpleTest := &TestPrintType{"foo"} - podTest := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + podTest := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} podListTest := &api.PodList{ Items: []api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "foo"}}, - {ObjectMeta: api.ObjectMeta{Name: "bar"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, }, } emptyListTest := &api.PodList{} @@ -193,7 +193,7 @@ func testPrinter(t *testing.T, printer ResourcePrinter, unmarshalFunc func(data } obj := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, } buf.Reset() printer.PrintObj(obj, buf) @@ -334,7 +334,7 @@ func TestNamePrinter(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "Pod", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, @@ -490,7 +490,7 @@ func TestTemplateStrings(t *testing.T) { } func TestPrinters(t *testing.T) { - om := func(name string) api.ObjectMeta { return api.ObjectMeta{Name: name} } + om := func(name string) metav1.ObjectMeta { return metav1.ObjectMeta{Name: name} } var ( err error @@ -615,14 +615,14 @@ func TestPrintNodeStatus(t *testing.T) { }{ { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionTrue}}}, }, status: "Ready", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Spec: api.NodeSpec{Unschedulable: true}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionTrue}}}, }, @@ -630,7 +630,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo3"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo3"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{ {Type: api.NodeReady, Status: api.ConditionTrue}, {Type: api.NodeReady, Status: api.ConditionTrue}}}, @@ -639,14 +639,14 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo4"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo4"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionFalse}}}, }, status: "NotReady", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo5"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo5"}, Spec: api.NodeSpec{Unschedulable: true}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionFalse}}}, }, @@ -654,21 +654,21 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo6"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo6"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: "InvalidValue", Status: api.ConditionTrue}}}, }, status: "Unknown", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo7"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo7"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{}}}, }, status: "Unknown", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo8"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo8"}, Spec: api.NodeSpec{Unschedulable: true}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: "InvalidValue", Status: api.ConditionTrue}}}, }, @@ -676,7 +676,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo9"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo9"}, Spec: api.NodeSpec{Unschedulable: true}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{}}}, }, @@ -684,7 +684,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo10", Labels: map[string]string{"kubernetes.io/role": "master"}, }, @@ -694,7 +694,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo11", Labels: map[string]string{"kubernetes.io/role": "node"}, }, @@ -704,7 +704,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo12", Labels: map[string]string{"kubeadm.alpha.kubernetes.io/role": "node"}, }, @@ -738,7 +738,7 @@ func TestPrintNodeOSImage(t *testing.T) { }{ { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Status: api.NodeStatus{ NodeInfo: api.NodeSystemInfo{OSImage: "fake-os-image"}, Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}, @@ -748,7 +748,7 @@ func TestPrintNodeOSImage(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Status: api.NodeStatus{ NodeInfo: api.NodeSystemInfo{KernelVersion: "fake-kernel-version"}, Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}, @@ -782,7 +782,7 @@ func TestPrintNodeKernelVersion(t *testing.T) { }{ { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Status: api.NodeStatus{ NodeInfo: api.NodeSystemInfo{KernelVersion: "fake-kernel-version"}, Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}, @@ -792,7 +792,7 @@ func TestPrintNodeKernelVersion(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Status: api.NodeStatus{ NodeInfo: api.NodeSystemInfo{OSImage: "fake-os-image"}, Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}, @@ -824,21 +824,21 @@ func TestPrintNodeExternalIP(t *testing.T) { }{ { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Status: api.NodeStatus{Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}}, }, externalIP: "1.1.1.1", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Status: api.NodeStatus{Addresses: []api.NodeAddress{{Type: api.NodeInternalIP, Address: "1.1.1.1"}}}, }, externalIP: "", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo3"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo3"}, Status: api.NodeStatus{Addresses: []api.NodeAddress{ {Type: api.NodeLegacyHostIP, Address: "1.1.1.1"}, {Type: api.NodeExternalIP, Address: "2.2.2.2"}, @@ -873,7 +873,7 @@ func contains(fields []string, field string) bool { func TestPrintHunmanReadableIngressWithColumnLabels(t *testing.T) { ingress := extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, Labels: map[string]string{ @@ -1061,17 +1061,17 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }{ { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, }, isNamespaced: true, }, { obj: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "name": "foo", "type": "production", @@ -1098,7 +1098,7 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }, { obj: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Spec: api.ServiceSpec{ ClusterIP: "1.2.3.4", Ports: []api.ServicePort{ @@ -1122,7 +1122,7 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }, { obj: &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}, {IP: "localhost"}}, Ports: []api.EndpointPort{{Port: 8080}}, @@ -1132,47 +1132,47 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }, { obj: &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, }, isNamespaced: false, }, { obj: &api.Secret{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, }, isNamespaced: true, }, { obj: &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Secrets: []api.ObjectReference{}, }, isNamespaced: true, }, { obj: &api.Node{ - ObjectMeta: api.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Status: api.NodeStatus{}, }, isNamespaced: false, }, { obj: &api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Spec: api.PersistentVolumeSpec{}, }, isNamespaced: false, }, { obj: &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Spec: api.PersistentVolumeClaimSpec{}, }, isNamespaced: true, }, { obj: &api.Event{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Source: api.EventSource{Component: "kubelet"}, Message: "Item 1", FirstTimestamp: metav1.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)), @@ -1184,13 +1184,13 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }, { obj: &api.LimitRange{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, }, isNamespaced: true, }, { obj: &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, }, isNamespaced: true, }, @@ -1241,7 +1241,7 @@ func TestPrintPod(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test1"}, + ObjectMeta: metav1.ObjectMeta{Name: "test1"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: "podPhase", @@ -1256,7 +1256,7 @@ func TestPrintPod(t *testing.T) { { // Test container error overwrites pod phase api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test2"}, + ObjectMeta: metav1.ObjectMeta{Name: "test2"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: "podPhase", @@ -1271,7 +1271,7 @@ func TestPrintPod(t *testing.T) { { // Test the same as the above but with Terminated state and the first container overwrites the rest api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test3"}, + ObjectMeta: metav1.ObjectMeta{Name: "test3"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: "podPhase", @@ -1286,7 +1286,7 @@ func TestPrintPod(t *testing.T) { { // Test ready is not enough for reporting running api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test4"}, + ObjectMeta: metav1.ObjectMeta{Name: "test4"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: "podPhase", @@ -1301,7 +1301,7 @@ func TestPrintPod(t *testing.T) { { // Test ready is not enough for reporting running api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test5"}, + ObjectMeta: metav1.ObjectMeta{Name: "test5"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Reason: "OutOfDisk", @@ -1336,7 +1336,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Running should be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test1"}, + ObjectMeta: metav1.ObjectMeta{Name: "test1"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodRunning, @@ -1351,7 +1351,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Pending should be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test2"}, + ObjectMeta: metav1.ObjectMeta{Name: "test2"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodPending, @@ -1366,7 +1366,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Unknown should be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test3"}, + ObjectMeta: metav1.ObjectMeta{Name: "test3"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodUnknown, @@ -1381,7 +1381,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Succeeded shouldn't be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test4"}, + ObjectMeta: metav1.ObjectMeta{Name: "test4"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodSucceeded, @@ -1396,7 +1396,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Failed shouldn't be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test5"}, + ObjectMeta: metav1.ObjectMeta{Name: "test5"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodFailed, @@ -1432,7 +1432,7 @@ func TestPrintPodWithLabels(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Labels: map[string]string{"col1": "asd", "COL2": "zxc"}, }, @@ -1452,7 +1452,7 @@ func TestPrintPodWithLabels(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Labels: map[string]string{"col1": "asd", "COL2": "zxc"}, }, @@ -1516,7 +1516,7 @@ func TestPrintDeployment(t *testing.T) { }{ { extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, }, @@ -1573,7 +1573,7 @@ func TestPrintDaemonSet(t *testing.T) { }{ { extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, }, @@ -1610,7 +1610,7 @@ func TestPrintJob(t *testing.T) { }{ { batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "job1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, }, @@ -1625,7 +1625,7 @@ func TestPrintJob(t *testing.T) { }, { batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "job2", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -1660,7 +1660,7 @@ func TestPrintPodShowLabels(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Labels: map[string]string{"col1": "asd", "COL2": "zxc"}, }, @@ -1680,7 +1680,7 @@ func TestPrintPodShowLabels(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Labels: map[string]string{"col3": "asd", "COL4": "zxc"}, }, @@ -1720,7 +1720,7 @@ func TestPrintService(t *testing.T) { { // Test name, cluster ip, port with protocol api.Service{ - ObjectMeta: api.ObjectMeta{Name: "test1"}, + ObjectMeta: metav1.ObjectMeta{Name: "test1"}, Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, Ports: []api.ServicePort{ @@ -1735,7 +1735,7 @@ func TestPrintService(t *testing.T) { { // Test name, cluster ip, port:nodePort with protocol api.Service{ - ObjectMeta: api.ObjectMeta{Name: "test2"}, + ObjectMeta: metav1.ObjectMeta{Name: "test2"}, Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, Ports: []api.ServicePort{ @@ -1769,7 +1769,7 @@ func TestPrintPodDisruptionBudget(t *testing.T) { }{ { policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "pdb1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, diff --git a/pkg/kubectl/rolling_updater_test.go b/pkg/kubectl/rolling_updater_test.go index 12be46b0df2..40f5f51f8c5 100644 --- a/pkg/kubectl/rolling_updater_test.go +++ b/pkg/kubectl/rolling_updater_test.go @@ -44,7 +44,7 @@ import ( func oldRc(replicas int, original int) *api.ReplicationController { return &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo-v1", UID: "7764ae47-9092-11e4-8393-42010af018ff", @@ -56,7 +56,7 @@ func oldRc(replicas int, original int) *api.ReplicationController { Replicas: int32(replicas), Selector: map[string]string{"version": "v1"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo-v1", Labels: map[string]string{"version": "v1"}, }, @@ -71,13 +71,13 @@ func oldRc(replicas int, original int) *api.ReplicationController { func newRc(replicas int, desired int) *api.ReplicationController { rc := oldRc(replicas, replicas) rc.Spec.Template = &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo-v2", Labels: map[string]string{"version": "v2"}, }, } rc.Spec.Selector = map[string]string{"version": "v2"} - rc.ObjectMeta = api.ObjectMeta{ + rc.ObjectMeta = metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo-v2", Annotations: map[string]string{ @@ -948,7 +948,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { }{ { oldRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", }, @@ -957,7 +957,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { "dk": "old", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "old", }, @@ -978,7 +978,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { }, }, newRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", }, @@ -987,7 +987,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { "dk": "old", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "old", }, @@ -1013,7 +1013,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { }, { oldRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "bar", }, @@ -1022,7 +1022,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { "dk": "old", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "old", }, @@ -1039,7 +1039,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { }, }, newRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "bar", }, @@ -1048,7 +1048,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { "dk": "old", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "old", }, @@ -1228,7 +1228,7 @@ func TestRollingUpdater_cleanupWithClients_Rename(t *testing.T) { func TestFindSourceController(t *testing.T) { ctrl1 := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", Annotations: map[string]string{ @@ -1237,7 +1237,7 @@ func TestFindSourceController(t *testing.T) { }, } ctrl2 := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "bar", Annotations: map[string]string{ @@ -1246,7 +1246,7 @@ func TestFindSourceController(t *testing.T) { }, } ctrl3 := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "baz", Annotations: map[string]string{ @@ -1328,7 +1328,7 @@ func TestUpdateExistingReplicationController(t *testing.T) { }{ { rc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", }, @@ -1341,7 +1341,7 @@ func TestUpdateExistingReplicationController(t *testing.T) { deploymentValue: "some-hash", expectedRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", Annotations: map[string]string{ @@ -1353,7 +1353,7 @@ func TestUpdateExistingReplicationController(t *testing.T) { "dk": "some-hash", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "some-hash", }, @@ -1364,13 +1364,13 @@ func TestUpdateExistingReplicationController(t *testing.T) { }, { rc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", }, Spec: api.ReplicationControllerSpec{ Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "some-other-hash", }, @@ -1386,7 +1386,7 @@ func TestUpdateExistingReplicationController(t *testing.T) { deploymentValue: "some-hash", expectedRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", Annotations: map[string]string{ @@ -1398,7 +1398,7 @@ func TestUpdateExistingReplicationController(t *testing.T) { "dk": "some-other-hash", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "some-other-hash", }, @@ -1427,7 +1427,7 @@ func TestUpdateExistingReplicationController(t *testing.T) { func TestUpdateRcWithRetries(t *testing.T) { codec := testapi.Default.Codec() rc := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "rc", + ObjectMeta: metav1.ObjectMeta{Name: "rc", Labels: map[string]string{ "foo": "bar", }, @@ -1437,7 +1437,7 @@ func TestUpdateRcWithRetries(t *testing.T) { "foo": "bar", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -1532,13 +1532,13 @@ func TestAddDeploymentHash(t *testing.T) { buf := &bytes.Buffer{} codec := testapi.Default.Codec() rc := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "rc"}, + ObjectMeta: metav1.ObjectMeta{Name: "rc"}, Spec: api.ReplicationControllerSpec{ Selector: map[string]string{ "foo": "bar", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -1549,9 +1549,9 @@ func TestAddDeploymentHash(t *testing.T) { podList := &api.PodList{ Items: []api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "foo"}}, - {ObjectMeta: api.ObjectMeta{Name: "bar"}}, - {ObjectMeta: api.ObjectMeta{Name: "baz"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "baz"}}, }, } @@ -1624,7 +1624,7 @@ func TestRollingUpdater_readyPods(t *testing.T) { status = api.ConditionFalse } return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: fmt.Sprintf("pod-%d", count), Labels: labels, diff --git a/pkg/kubectl/rollout_status_test.go b/pkg/kubectl/rollout_status_test.go index 1261f0c2cee..5d104e85e10 100644 --- a/pkg/kubectl/rollout_status_test.go +++ b/pkg/kubectl/rollout_status_test.go @@ -19,7 +19,7 @@ package kubectl import ( "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" ) @@ -106,7 +106,7 @@ func TestDeploymentStatusViewerStatus(t *testing.T) { for _, test := range tests { d := &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "bar", Name: "foo", UID: "8764ae47-9092-11e4-8393-42010af018ff", diff --git a/pkg/kubectl/run.go b/pkg/kubectl/run.go index e27755700f3..2e4dd41ee28 100644 --- a/pkg/kubectl/run.go +++ b/pkg/kubectl/run.go @@ -100,7 +100,7 @@ func (DeploymentV1Beta1) Generate(genericParams map[string]interface{}) (runtime // TODO: use versioned types for generators so that we don't need to // set default values manually (see issue #17384) deployment := extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -108,7 +108,7 @@ func (DeploymentV1Beta1) Generate(genericParams map[string]interface{}) (runtime Replicas: int32(count), Selector: &metav1.LabelSelector{MatchLabels: labels}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: *podSpec, @@ -266,13 +266,13 @@ func (JobV1) Generate(genericParams map[string]interface{}) (runtime.Object, err podSpec.RestartPolicy = restartPolicy job := batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, Spec: batch.JobSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: *podSpec, @@ -360,7 +360,7 @@ func (CronJobV2Alpha1) Generate(genericParams map[string]interface{}) (runtime.O podSpec.RestartPolicy = restartPolicy cronJob := batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -370,7 +370,7 @@ func (CronJobV2Alpha1) Generate(genericParams map[string]interface{}) (runtime.O JobTemplate: batch.JobTemplateSpec{ Spec: batch.JobSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: *podSpec, @@ -521,7 +521,7 @@ func (BasicReplicationController) Generate(genericParams map[string]interface{}) } controller := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -529,7 +529,7 @@ func (BasicReplicationController) Generate(genericParams map[string]interface{}) Replicas: int32(count), Selector: labels, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: *podSpec, @@ -672,7 +672,7 @@ func (BasicPod) Generate(genericParams map[string]interface{}) (runtime.Object, // TODO: Figure out why we set ImagePullPolicy here, whether we can make it // consistent with the other places imagePullPolicy is set using flag. pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, diff --git a/pkg/kubectl/run_test.go b/pkg/kubectl/run_test.go index 08b10aea580..2633086c50a 100644 --- a/pkg/kubectl/run_test.go +++ b/pkg/kubectl/run_test.go @@ -42,7 +42,7 @@ func TestGenerate(t *testing.T) { "port": "", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -50,7 +50,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -76,7 +76,7 @@ func TestGenerate(t *testing.T) { "env": []string{"a=b", "c=d"}, }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -84,7 +84,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -120,7 +120,7 @@ func TestGenerate(t *testing.T) { "args": []string{"bar", "baz", "blah"}, }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -128,7 +128,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -155,7 +155,7 @@ func TestGenerate(t *testing.T) { "command": "true", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -163,7 +163,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -187,7 +187,7 @@ func TestGenerate(t *testing.T) { "port": "80", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -195,7 +195,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -225,7 +225,7 @@ func TestGenerate(t *testing.T) { "hostport": "80", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -233,7 +233,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -273,7 +273,7 @@ func TestGenerate(t *testing.T) { "labels": "foo=bar,baz=blah", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -281,7 +281,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"foo": "bar", "baz": "blah"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ @@ -349,7 +349,7 @@ func TestGenerate(t *testing.T) { "limits": "cpu=400m,memory=200Mi", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -357,7 +357,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"foo": "bar", "baz": "blah"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ @@ -413,7 +413,7 @@ func TestGeneratePod(t *testing.T) { "port": "", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -447,7 +447,7 @@ func TestGeneratePod(t *testing.T) { "env": []string{"a=b", "c=d"}, }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -480,7 +480,7 @@ func TestGeneratePod(t *testing.T) { "port": "80", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -509,7 +509,7 @@ func TestGeneratePod(t *testing.T) { "hostport": "80", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -548,7 +548,7 @@ func TestGeneratePod(t *testing.T) { "labels": "foo=bar,baz=blah", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -574,7 +574,7 @@ func TestGeneratePod(t *testing.T) { "stdin": "true", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -603,7 +603,7 @@ func TestGeneratePod(t *testing.T) { "leave-stdin-open": "true", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -661,7 +661,7 @@ func TestGenerateDeployment(t *testing.T) { "limits": "cpu=400m,memory=200Mi", }, expected: &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -669,7 +669,7 @@ func TestGenerateDeployment(t *testing.T) { Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar", "baz": "blah"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ @@ -753,13 +753,13 @@ func TestGenerateJob(t *testing.T) { "restart": "OnFailure", }, expected: &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: batch.JobSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ @@ -845,7 +845,7 @@ func TestGenerateCronJob(t *testing.T) { "schedule": "0/5 * * * ?", }, expected: &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -855,7 +855,7 @@ func TestGenerateCronJob(t *testing.T) { JobTemplate: batch.JobTemplateSpec{ Spec: batch.JobSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ diff --git a/pkg/kubectl/scale_test.go b/pkg/kubectl/scale_test.go index 4aeeec8535a..14871b5c9a5 100644 --- a/pkg/kubectl/scale_test.go +++ b/pkg/kubectl/scale_test.go @@ -127,7 +127,7 @@ func TestReplicationControllerScale(t *testing.T) { func TestReplicationControllerScaleFailsPreconditions(t *testing.T) { fake := fake.NewSimpleClientset(&api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, Spec: api.ReplicationControllerSpec{ Replicas: 10, }, @@ -162,7 +162,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{-1, ""}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -175,7 +175,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{0, ""}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -188,7 +188,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{-1, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -201,7 +201,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -214,7 +214,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -227,7 +227,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: api.ReplicationControllerSpec{ @@ -240,7 +240,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: api.ReplicationControllerSpec{ @@ -327,7 +327,7 @@ func TestJobScaleRetry(t *testing.T) { func job() *batch.Job { return &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", }, @@ -376,7 +376,7 @@ func TestJobScaleInvalid(t *testing.T) { func TestJobScaleFailsPreconditions(t *testing.T) { ten := int32(10) fake := fake.NewSimpleClientset(&batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", }, @@ -415,7 +415,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{-1, ""}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -428,7 +428,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{0, ""}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -441,7 +441,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{-1, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -454,7 +454,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -467,7 +467,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -480,7 +480,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, }, @@ -490,7 +490,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: batch.JobSpec{ @@ -503,7 +503,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: batch.JobSpec{ @@ -589,7 +589,7 @@ func TestDeploymentScaleRetry(t *testing.T) { func deployment() *extensions.Deployment { return &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", }, @@ -637,7 +637,7 @@ func TestDeploymentScaleInvalid(t *testing.T) { func TestDeploymentScaleFailsPreconditions(t *testing.T) { fake := fake.NewSimpleClientset(&extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", }, @@ -676,7 +676,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{-1, ""}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -689,7 +689,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{0, ""}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -702,7 +702,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{-1, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -715,7 +715,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -728,7 +728,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -741,7 +741,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, }, @@ -751,7 +751,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: extensions.DeploymentSpec{ @@ -764,7 +764,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: extensions.DeploymentSpec{ diff --git a/pkg/kubectl/secret_for_docker_registry_test.go b/pkg/kubectl/secret_for_docker_registry_test.go index 9a0595d8135..563633de379 100644 --- a/pkg/kubectl/secret_for_docker_registry_test.go +++ b/pkg/kubectl/secret_for_docker_registry_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -44,7 +45,7 @@ func TestSecretForDockerRegistryGenerate(t *testing.T) { "docker-email": email, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ diff --git a/pkg/kubectl/secret_for_tls_test.go b/pkg/kubectl/secret_for_tls_test.go index 212d9f57c5f..54962ad75e0 100644 --- a/pkg/kubectl/secret_for_tls_test.go +++ b/pkg/kubectl/secret_for_tls_test.go @@ -23,6 +23,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" utiltesting "k8s.io/kubernetes/pkg/util/testing" ) @@ -133,7 +134,7 @@ func TestSecretForTLSGenerate(t *testing.T) { "cert": validCertPath, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ @@ -151,7 +152,7 @@ func TestSecretForTLSGenerate(t *testing.T) { "cert": invalidCertPath, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ @@ -169,7 +170,7 @@ func TestSecretForTLSGenerate(t *testing.T) { "cert": mismatchCertPath, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ diff --git a/pkg/kubectl/secret_test.go b/pkg/kubectl/secret_test.go index 1114813b0a7..cb9856d72ae 100644 --- a/pkg/kubectl/secret_test.go +++ b/pkg/kubectl/secret_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -34,7 +35,7 @@ func TestSecretGenerate(t *testing.T) { "name": "foo", }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{}, @@ -47,7 +48,7 @@ func TestSecretGenerate(t *testing.T) { "type": "my-type", }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{}, @@ -61,7 +62,7 @@ func TestSecretGenerate(t *testing.T) { "from-literal": []string{"key1=value1", "key2=value2"}, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ @@ -98,7 +99,7 @@ func TestSecretGenerate(t *testing.T) { "from-literal": []string{"key1==value1"}, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ diff --git a/pkg/kubectl/service.go b/pkg/kubectl/service.go index 8ed2275f957..84cf260ce3c 100644 --- a/pkg/kubectl/service.go +++ b/pkg/kubectl/service.go @@ -21,6 +21,7 @@ import ( "strconv" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/intstr" @@ -177,7 +178,7 @@ func generate(genericParams map[string]interface{}) (runtime.Object, error) { } service := api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, diff --git a/pkg/kubectl/service_basic.go b/pkg/kubectl/service_basic.go index b3e100b3e62..a2945794e2a 100644 --- a/pkg/kubectl/service_basic.go +++ b/pkg/kubectl/service_basic.go @@ -21,6 +21,7 @@ import ( "strconv" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/kubernetes/pkg/api" @@ -231,7 +232,7 @@ func (s ServiceCommonGeneratorV1) StructuredGenerate() (runtime.Object, error) { selector["app"] = s.Name service := api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: s.Name, Labels: labels, }, diff --git a/pkg/kubectl/service_basic_test.go b/pkg/kubectl/service_basic_test.go index 8aab29c81f7..93b4b713810 100644 --- a/pkg/kubectl/service_basic_test.go +++ b/pkg/kubectl/service_basic_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -39,7 +40,7 @@ func TestServiceBasicGenerate(t *testing.T) { clusterip: "", serviceType: api.ServiceTypeClusterIP, expected: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "clusterip-ok", Labels: map[string]string{"app": "clusterip-ok"}, }, @@ -76,7 +77,7 @@ func TestServiceBasicGenerate(t *testing.T) { clusterip: "None", serviceType: api.ServiceTypeClusterIP, expected: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "clusterip-none-ok", Labels: map[string]string{"app": "clusterip-none-ok"}, }, @@ -93,7 +94,7 @@ func TestServiceBasicGenerate(t *testing.T) { clusterip: "", serviceType: api.ServiceTypeLoadBalancer, expected: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "loadbalancer-ok", Labels: map[string]string{"app": "loadbalancer-ok"}, }, diff --git a/pkg/kubectl/service_test.go b/pkg/kubectl/service_test.go index d887cf8bdc0..64f835d2147 100644 --- a/pkg/kubectl/service_test.go +++ b/pkg/kubectl/service_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -40,7 +41,7 @@ func TestGenerateService(t *testing.T) { "container-port": "1234", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -69,7 +70,7 @@ func TestGenerateService(t *testing.T) { "container-port": "foobar", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -98,7 +99,7 @@ func TestGenerateService(t *testing.T) { "container-port": "1234", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", Labels: map[string]string{ "key1": "value1", @@ -131,7 +132,7 @@ func TestGenerateService(t *testing.T) { "external-ip": "1.2.3.4", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -162,7 +163,7 @@ func TestGenerateService(t *testing.T) { "create-external-load-balancer": "true", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -193,7 +194,7 @@ func TestGenerateService(t *testing.T) { "type": string(api.ServiceTypeNodePort), }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -224,7 +225,7 @@ func TestGenerateService(t *testing.T) { "type": string(api.ServiceTypeNodePort), }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -253,7 +254,7 @@ func TestGenerateService(t *testing.T) { "container-port": "1234", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -283,7 +284,7 @@ func TestGenerateService(t *testing.T) { "session-affinity": "ClientIP", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -314,7 +315,7 @@ func TestGenerateService(t *testing.T) { "cluster-ip": "10.10.10.10", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -344,7 +345,7 @@ func TestGenerateService(t *testing.T) { "cluster-ip": "None", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -373,7 +374,7 @@ func TestGenerateService(t *testing.T) { "container-port": "foobar", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -407,7 +408,7 @@ func TestGenerateService(t *testing.T) { "target-port": "1234", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -440,7 +441,7 @@ func TestGenerateService(t *testing.T) { "protocol": "TCP", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -473,7 +474,7 @@ func TestGenerateService(t *testing.T) { "protocols": "8080/UDP", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -506,7 +507,7 @@ func TestGenerateService(t *testing.T) { "protocols": "8080/UDP,8081/TCP", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -546,7 +547,7 @@ func TestGenerateService(t *testing.T) { "cluster-ip": "None", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ diff --git a/pkg/kubectl/serviceaccount_test.go b/pkg/kubectl/serviceaccount_test.go index 1eedeec35d7..e8223914269 100644 --- a/pkg/kubectl/serviceaccount_test.go +++ b/pkg/kubectl/serviceaccount_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -32,7 +33,7 @@ func TestServiceAccountGenerate(t *testing.T) { { name: "foo", expected: &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, diff --git a/pkg/kubectl/sorting_printer_test.go b/pkg/kubectl/sorting_printer_test.go index c23188915b8..62608d2b42b 100644 --- a/pkg/kubectl/sorting_printer_test.go +++ b/pkg/kubectl/sorting_printer_test.go @@ -38,19 +38,19 @@ func TestSortingPrinter(t *testing.T) { intPtr := func(val int32) *int32 { return &val } a := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, } b := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, } c := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, } @@ -66,17 +66,17 @@ func TestSortingPrinter(t *testing.T) { obj: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, }, @@ -85,17 +85,17 @@ func TestSortingPrinter(t *testing.T) { sort: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, }, @@ -108,17 +108,17 @@ func TestSortingPrinter(t *testing.T) { obj: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, }, @@ -127,17 +127,17 @@ func TestSortingPrinter(t *testing.T) { sort: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, }, @@ -150,17 +150,17 @@ func TestSortingPrinter(t *testing.T) { obj: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(300, 0), }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(100, 0), }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(200, 0), }, }, @@ -169,17 +169,17 @@ func TestSortingPrinter(t *testing.T) { sort: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(100, 0), }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(200, 0), }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(300, 0), }, }, diff --git a/pkg/kubectl/stop_test.go b/pkg/kubectl/stop_test.go index 18363edee0e..6c23ab246bc 100644 --- a/pkg/kubectl/stop_test.go +++ b/pkg/kubectl/stop_test.go @@ -52,7 +52,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -72,7 +72,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "baz", Namespace: ns, }, @@ -81,7 +81,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k3": "v3"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -102,7 +102,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "baz", Namespace: ns, }, @@ -111,7 +111,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k1": "v1", "k2": "v2"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -133,7 +133,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "baz", Namespace: ns, }, @@ -142,7 +142,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k1": "v1", "k2": "v2", "k3": "v3"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "zaz", Namespace: ns, }, @@ -151,7 +151,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k1": "v1"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -174,7 +174,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "zaz", Namespace: ns, }, @@ -183,7 +183,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k1": "v1"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -251,7 +251,7 @@ func TestReplicaSetStop(t *testing.T) { &extensions.ReplicaSetList{ // LIST Items: []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -272,7 +272,7 @@ func TestReplicaSetStop(t *testing.T) { &extensions.ReplicaSetList{ // LIST Items: []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "baz", Namespace: ns, }, @@ -282,7 +282,7 @@ func TestReplicaSetStop(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -342,7 +342,7 @@ func TestJobStop(t *testing.T) { &batch.JobList{ // LIST Items: []batch.Job{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -366,7 +366,7 @@ func TestJobStop(t *testing.T) { &batch.JobList{ // LIST Items: []batch.Job{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -382,7 +382,7 @@ func TestJobStop(t *testing.T) { &api.PodList{ // LIST Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: ns, Labels: map[string]string{"k1": "v1"}, @@ -427,7 +427,7 @@ func TestDeploymentStop(t *testing.T) { name := "foo" ns := "default" deployment := extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -450,7 +450,7 @@ func TestDeploymentStop(t *testing.T) { Name: "SimpleDeployment", Objs: []runtime.Object{ &extensions.Deployment{ // GET - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -474,7 +474,7 @@ func TestDeploymentStop(t *testing.T) { &extensions.ReplicaSetList{ // LIST Items: []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, Labels: map[string]string{"k1": "v1"}, @@ -570,11 +570,11 @@ func (c *reaperCoreFake) Services(namespace string) coreclient.ServiceInterface } func pod() *api.Pod { - return &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}} + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}} } func service() *api.Service { - return &api.Service{ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}} + return &api.Service{ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}} } func TestSimpleStop(t *testing.T) { @@ -664,7 +664,7 @@ func TestDeploymentNotFoundError(t *testing.T) { name := "foo" ns := "default" deployment := &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -682,7 +682,7 @@ func TestDeploymentNotFoundError(t *testing.T) { deployment, &extensions.ReplicaSetList{Items: []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, diff --git a/pkg/kubectl/testing/BUILD b/pkg/kubectl/testing/BUILD index 70f7ce32b77..d2dfc5ddd4a 100644 --- a/pkg/kubectl/testing/BUILD +++ b/pkg/kubectl/testing/BUILD @@ -15,7 +15,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/pkg/kubectl/testing/types.generated.go b/pkg/kubectl/testing/types.generated.go index 62158ac1251..f6c8e78f560 100644 --- a/pkg/kubectl/testing/types.generated.go +++ b/pkg/kubectl/testing/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -158,7 +156,13 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -168,7 +172,13 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -358,57 +368,63 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "Key": if r.TryDecodeAsNil() { x.Key = "" } else { - yyv9 := &x.Key - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Key + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "Map": if r.TryDecodeAsNil() { x.Map = nil } else { - yyv11 := &x.Map - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Map + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringIntX(yyv11, false, d) + z.F.DecMapStringIntX(yyv12, false, d) } } case "StringList": if r.TryDecodeAsNil() { x.StringList = nil } else { - yyv13 := &x.StringList - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.StringList + yym15 := z.DecBinary() + _ = yym15 if false { } else { - z.F.DecSliceStringX(yyv13, false, d) + z.F.DecSliceStringX(yyv14, false, d) } } case "IntList": if r.TryDecodeAsNil() { x.IntList = nil } else { - yyv15 := &x.IntList - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.IntList + yym17 := z.DecBinary() + _ = yym17 if false { } else { - z.F.DecSliceIntX(yyv15, false, d) + z.F.DecSliceIntX(yyv16, false, d) } } default: @@ -422,16 +438,16 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj17 int - var yyb17 bool - var yyhl17 bool = l >= 0 - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -439,21 +455,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv18 := &x.Kind - yym19 := z.DecBinary() - _ = yym19 + yyv19 := &x.Kind + yym20 := z.DecBinary() + _ = yym20 if false { } else { - *((*string)(yyv18)) = r.DecodeString() + *((*string)(yyv19)) = r.DecodeString() } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -461,38 +477,44 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv20 := &x.APIVersion - yym21 := z.DecBinary() - _ = yym21 + yyv21 := &x.APIVersion + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv20)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv22 := &x.ObjectMeta - yyv22.CodecDecodeSelf(d) + yyv23 := &x.ObjectMeta + yym24 := z.DecBinary() + _ = yym24 + if false { + } else if z.HasExtensions() && z.DecExt(yyv23) { + } else { + z.DecFallback(yyv23, false) + } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -500,21 +522,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Key = "" } else { - yyv23 := &x.Key - yym24 := z.DecBinary() - _ = yym24 + yyv25 := &x.Key + yym26 := z.DecBinary() + _ = yym26 if false { } else { - *((*string)(yyv23)) = r.DecodeString() + *((*string)(yyv25)) = r.DecodeString() } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -522,21 +544,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Map = nil } else { - yyv25 := &x.Map - yym26 := z.DecBinary() - _ = yym26 + yyv27 := &x.Map + yym28 := z.DecBinary() + _ = yym28 if false { } else { - z.F.DecMapStringIntX(yyv25, false, d) + z.F.DecMapStringIntX(yyv27, false, d) } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -544,21 +566,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.StringList = nil } else { - yyv27 := &x.StringList - yym28 := z.DecBinary() - _ = yym28 + yyv29 := &x.StringList + yym30 := z.DecBinary() + _ = yym30 if false { } else { - z.F.DecSliceStringX(yyv27, false, d) + z.F.DecSliceStringX(yyv29, false, d) } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -566,26 +588,26 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.IntList = nil } else { - yyv29 := &x.IntList - yym30 := z.DecBinary() - _ = yym30 + yyv31 := &x.IntList + yym32 := z.DecBinary() + _ = yym32 if false { } else { - z.F.DecSliceIntX(yyv29, false, d) + z.F.DecSliceIntX(yyv31, false, d) } } for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj17-1, "") + z.DecStructFieldNotFound(yyj18-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/kubectl/testing/types.go b/pkg/kubectl/testing/types.go index 6097c9a2832..ab9a54f45d3 100644 --- a/pkg/kubectl/testing/types.go +++ b/pkg/kubectl/testing/types.go @@ -19,17 +19,16 @@ package testing import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - apiv1 "k8s.io/kubernetes/pkg/api/v1" ) type TestStruct struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - Key string `json:"Key"` - Map map[string]int `json:"Map"` - StringList []string `json:"StringList"` - IntList []int `json:"IntList"` + Key string `json:"Key"` + Map map[string]int `json:"Map"` + StringList []string `json:"StringList"` + IntList []int `json:"IntList"` } func (obj *TestStruct) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/kubelet/config/apiserver_test.go b/pkg/kubelet/config/apiserver_test.go index 8b3656a2497..17c4054f7d2 100644 --- a/pkg/kubelet/config/apiserver_test.go +++ b/pkg/kubelet/config/apiserver_test.go @@ -19,6 +19,7 @@ package config import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" @@ -44,13 +45,13 @@ var _ cache.ListerWatcher = fakePodLW{} func TestNewSourceApiserver_UpdatesAndMultiplePods(t *testing.T) { pod1v1 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "p"}, + ObjectMeta: metav1.ObjectMeta{Name: "p"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/one"}}}} pod1v2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "p"}, + ObjectMeta: metav1.ObjectMeta{Name: "p"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/two"}}}} pod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "q"}, + ObjectMeta: metav1.ObjectMeta{Name: "q"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/blah"}}}} // Setup fake api client. @@ -130,10 +131,10 @@ func TestNewSourceApiserver_UpdatesAndMultiplePods(t *testing.T) { func TestNewSourceApiserver_TwoNamespacesSameName(t *testing.T) { pod1 := v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "p", Namespace: "one"}, + ObjectMeta: metav1.ObjectMeta{Name: "p", Namespace: "one"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/one"}}}} pod2 := v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "p", Namespace: "two"}, + ObjectMeta: metav1.ObjectMeta{Name: "p", Namespace: "two"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/blah"}}}} // Setup fake api client. diff --git a/pkg/kubelet/config/common_test.go b/pkg/kubelet/config/common_test.go index b1a5c00d106..455b113339b 100644 --- a/pkg/kubelet/config/common_test.go +++ b/pkg/kubelet/config/common_test.go @@ -36,7 +36,7 @@ func TestDecodeSinglePod(t *testing.T) { TypeMeta: metav1.TypeMeta{ APIVersion: "", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", UID: "12345", Namespace: "mynamespace", @@ -96,7 +96,7 @@ func TestDecodePodList(t *testing.T) { TypeMeta: metav1.TypeMeta{ APIVersion: "", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", UID: "12345", Namespace: "mynamespace", diff --git a/pkg/kubelet/config/config_test.go b/pkg/kubelet/config/config_test.go index 222ab67427f..a09a2c88a86 100644 --- a/pkg/kubelet/config/config_test.go +++ b/pkg/kubelet/config/config_test.go @@ -59,7 +59,7 @@ func (s sortedPods) Less(i, j int) bool { func CreateValidPod(name, namespace string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(name), // for the purpose of testing, this is unique enough Name: name, Namespace: namespace, @@ -186,7 +186,7 @@ func TestInvalidPodFiltered(t *testing.T) { expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.ADD, TestSource, CreateValidPod("foo", "new"))) // add an invalid update - podUpdate = CreatePodUpdate(kubetypes.UPDATE, TestSource, &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}) + podUpdate = CreatePodUpdate(kubetypes.UPDATE, TestSource, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) channel <- podUpdate expectNoPodUpdate(t, ch) } @@ -245,7 +245,7 @@ func TestNewPodAddedUpdatedRemoved(t *testing.T) { channel <- podUpdate expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.UPDATE, TestSource, pod)) - podUpdate = CreatePodUpdate(kubetypes.REMOVE, TestSource, &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "new"}}) + podUpdate = CreatePodUpdate(kubetypes.REMOVE, TestSource, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "new"}}) channel <- podUpdate expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.REMOVE, TestSource, pod)) } diff --git a/pkg/kubelet/config/file_linux_test.go b/pkg/kubelet/config/file_linux_test.go index 95bda1c7000..bd96997e1b0 100644 --- a/pkg/kubelet/config/file_linux_test.go +++ b/pkg/kubelet/config/file_linux_test.go @@ -180,7 +180,7 @@ func getTestCases(hostname types.NodeName) []*testCase { Kind: "Pod", APIVersion: "", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", UID: "12345", Namespace: "mynamespace", @@ -194,7 +194,7 @@ func getTestCases(hostname types.NodeName) []*testCase { }, }, expected: CreatePodUpdate(kubetypes.SET, kubetypes.FileSource, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-" + string(hostname), UID: "12345", Namespace: "mynamespace", diff --git a/pkg/kubelet/config/http_test.go b/pkg/kubelet/config/http_test.go index a87eb827524..2b2f0453937 100644 --- a/pkg/kubelet/config/http_test.go +++ b/pkg/kubelet/config/http_test.go @@ -138,7 +138,7 @@ func TestExtractPodsFromHTTP(t *testing.T) { Kind: "Pod", APIVersion: "", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", UID: "111", Namespace: "mynamespace", @@ -155,7 +155,7 @@ func TestExtractPodsFromHTTP(t *testing.T) { expected: CreatePodUpdate(kubetypes.SET, kubetypes.HTTPSource, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "111", Name: "foo" + "-" + nodeName, Namespace: "mynamespace", @@ -190,7 +190,7 @@ func TestExtractPodsFromHTTP(t *testing.T) { }, Items: []v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", UID: "111", }, @@ -204,7 +204,7 @@ func TestExtractPodsFromHTTP(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", UID: "222", }, @@ -222,7 +222,7 @@ func TestExtractPodsFromHTTP(t *testing.T) { expected: CreatePodUpdate(kubetypes.SET, kubetypes.HTTPSource, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "111", Name: "foo" + "-" + nodeName, Namespace: "default", @@ -248,7 +248,7 @@ func TestExtractPodsFromHTTP(t *testing.T) { }, }, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "222", Name: "bar" + "-" + nodeName, Namespace: "default", @@ -322,7 +322,7 @@ func TestURLWithHeader(t *testing.T) { APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), Kind: "Pod", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", UID: "111", Namespace: "mynamespace", diff --git a/pkg/kubelet/container/helpers_test.go b/pkg/kubelet/container/helpers_test.go index 0f68556197d..13d65469060 100644 --- a/pkg/kubelet/container/helpers_test.go +++ b/pkg/kubelet/container/helpers_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -137,7 +138,7 @@ func TestExpandCommandAndArgs(t *testing.T) { func TestShouldContainerBeRestarted(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", diff --git a/pkg/kubelet/container/ref_test.go b/pkg/kubelet/container/ref_test.go index 86b5e67b8d4..3be777d9581 100644 --- a/pkg/kubelet/container/ref_test.go +++ b/pkg/kubelet/container/ref_test.go @@ -69,7 +69,7 @@ func TestGenerateContainerRef(t *testing.T) { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "ok", Namespace: "test-ns", UID: "bar", diff --git a/pkg/kubelet/dockertools/BUILD b/pkg/kubelet/dockertools/BUILD index 23de80010b4..928a2ee19c6 100644 --- a/pkg/kubelet/dockertools/BUILD +++ b/pkg/kubelet/dockertools/BUILD @@ -130,6 +130,7 @@ go_test( "//vendor:github.com/golang/mock/gomock", "//vendor:github.com/google/cadvisor/info/v1", "//vendor:github.com/stretchr/testify/assert", + "//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/sets", diff --git a/pkg/kubelet/dockertools/container_gc_test.go b/pkg/kubelet/dockertools/container_gc_test.go index 5f6ce489f47..43518f26263 100644 --- a/pkg/kubelet/dockertools/container_gc_test.go +++ b/pkg/kubelet/dockertools/container_gc_test.go @@ -24,6 +24,7 @@ import ( "time" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -66,7 +67,7 @@ func addPods(podGetter podGetter, podUIDs ...types.UID) { fakePodGetter := podGetter.(*fakePodGetter) for _, uid := range podUIDs { fakePodGetter.pods[uid] = &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uid), Namespace: "test", UID: uid, diff --git a/pkg/kubelet/dockertools/docker_manager_linux_test.go b/pkg/kubelet/dockertools/docker_manager_linux_test.go index 72dc111d2eb..7c1d3bbbc5a 100644 --- a/pkg/kubelet/dockertools/docker_manager_linux_test.go +++ b/pkg/kubelet/dockertools/docker_manager_linux_test.go @@ -27,6 +27,7 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -282,7 +283,7 @@ func TestCreateAppArmorContanier(t *testing.T) { dm.recorder = recorder pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -417,7 +418,7 @@ func TestGetPodStatusFromNetworkPlugin(t *testing.T) { }{ { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -435,7 +436,7 @@ func TestGetPodStatusFromNetworkPlugin(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", diff --git a/pkg/kubelet/dockertools/docker_manager_test.go b/pkg/kubelet/dockertools/docker_manager_test.go index 645e0cd6a8f..4f3753955a2 100644 --- a/pkg/kubelet/dockertools/docker_manager_test.go +++ b/pkg/kubelet/dockertools/docker_manager_test.go @@ -36,6 +36,7 @@ import ( "github.com/golang/mock/gomock" cadvisorapi "github.com/google/cadvisor/info/v1" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" kubetypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" @@ -1918,7 +1919,7 @@ func makePod(name string, spec *v1.PodSpec) *v1.Pod { spec = &v1.PodSpec{Containers: []v1.Container{{Name: "foo"}, {Name: "bar"}}} } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: name, Namespace: "new", diff --git a/pkg/kubelet/dockertools/labels_test.go b/pkg/kubelet/dockertools/labels_test.go index a0b30bd06ea..b04e9f34663 100644 --- a/pkg/kubelet/dockertools/labels_test.go +++ b/pkg/kubelet/dockertools/labels_test.go @@ -21,6 +21,7 @@ import ( "strconv" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -71,7 +72,7 @@ func TestLabels(t *testing.T) { Lifecycle: lifecycle, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", diff --git a/pkg/kubelet/envvars/BUILD b/pkg/kubelet/envvars/BUILD index 493d6b00d17..99ef7e2118c 100644 --- a/pkg/kubelet/envvars/BUILD +++ b/pkg/kubelet/envvars/BUILD @@ -25,6 +25,7 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//pkg/kubelet/envvars:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/kubelet/envvars/envvars_test.go b/pkg/kubelet/envvars/envvars_test.go index 1a580136097..8b192526e2b 100644 --- a/pkg/kubelet/envvars/envvars_test.go +++ b/pkg/kubelet/envvars/envvars_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/kubelet/envvars" ) @@ -27,7 +28,7 @@ import ( func TestFromServices(t *testing.T) { sl := []*v1.Service{ { - ObjectMeta: v1.ObjectMeta{Name: "foo-bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo-bar"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "1.2.3.4", @@ -37,7 +38,7 @@ func TestFromServices(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "5.6.7.8", @@ -48,7 +49,7 @@ func TestFromServices(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "q-u-u-x"}, + ObjectMeta: metav1.ObjectMeta{Name: "q-u-u-x"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "9.8.7.6", @@ -59,7 +60,7 @@ func TestFromServices(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "svrc-clusterip-none"}, + ObjectMeta: metav1.ObjectMeta{Name: "svrc-clusterip-none"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "None", @@ -69,7 +70,7 @@ func TestFromServices(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "svrc-clusterip-empty"}, + ObjectMeta: metav1.ObjectMeta{Name: "svrc-clusterip-empty"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "", diff --git a/pkg/kubelet/eviction/helpers_test.go b/pkg/kubelet/eviction/helpers_test.go index 5b63446494a..bb0e1bd6b25 100644 --- a/pkg/kubelet/eviction/helpers_test.go +++ b/pkg/kubelet/eviction/helpers_test.go @@ -1573,7 +1573,7 @@ func newVolume(name string, volumeSource v1.VolumeSource) v1.Volume { // newPod uses the name as the uid. Make names unique for testing. func newPod(name string, containers []v1.Container, volumes []v1.Volume) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, UID: types.UID(name), }, diff --git a/pkg/kubelet/images/BUILD b/pkg/kubelet/images/BUILD index f0891b3ac21..e6465a47021 100644 --- a/pkg/kubelet/images/BUILD +++ b/pkg/kubelet/images/BUILD @@ -54,6 +54,7 @@ go_test( "//vendor:github.com/google/cadvisor/info/v2", "//vendor:github.com/stretchr/testify/assert", "//vendor:github.com/stretchr/testify/require", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/kubelet/images/image_manager_test.go b/pkg/kubelet/images/image_manager_test.go index 86ea4577ca9..6355b7fc051 100644 --- a/pkg/kubelet/images/image_manager_test.go +++ b/pkg/kubelet/images/image_manager_test.go @@ -22,6 +22,7 @@ import ( "time" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" . "k8s.io/kubernetes/pkg/kubelet/container" @@ -111,7 +112,7 @@ func pullerTestEnv(c pullerTestCase, serialized bool) (puller ImageManager, fake func TestParallelPuller(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test-ns", UID: "bar", @@ -135,7 +136,7 @@ func TestParallelPuller(t *testing.T) { func TestSerializedPuller(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test-ns", UID: "bar", diff --git a/pkg/kubelet/kubelet_node_status.go b/pkg/kubelet/kubelet_node_status.go index dc959a19d84..d3091fe69ed 100644 --- a/pkg/kubelet/kubelet_node_status.go +++ b/pkg/kubelet/kubelet_node_status.go @@ -189,7 +189,7 @@ func (kl *Kubelet) reconcileCMADAnnotationWithExistingNode(node, existingNode *v // labels, information from the cloud provider, and Kubelet configuration. func (kl *Kubelet) initialNode() (*v1.Node, error) { node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: string(kl.nodeName), Labels: map[string]string{ metav1.LabelHostname: kl.hostname, diff --git a/pkg/kubelet/kubelet_node_status_test.go b/pkg/kubelet/kubelet_node_status_test.go index 2dd38405418..2ca5fbd63df 100644 --- a/pkg/kubelet/kubelet_node_status_test.go +++ b/pkg/kubelet/kubelet_node_status_test.go @@ -116,7 +116,7 @@ func TestUpdateNewNodeStatus(t *testing.T) { t, inputImageList, false /* controllerAttachDetachEnabled */) kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}} + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain machineInfo := &cadvisorapi.MachineInfo{ MachineID: "123", @@ -140,7 +140,7 @@ func TestUpdateNewNodeStatus(t *testing.T) { } expectedNode := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -255,7 +255,7 @@ func TestUpdateNewNodeOutOfDiskStatusWithTransitionFrequency(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}} + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain machineInfo := &cadvisorapi.MachineInfo{ MachineID: "123", @@ -331,7 +331,7 @@ func TestUpdateExistingNodeStatus(t *testing.T) { kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient existingNode := v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -403,7 +403,7 @@ func TestUpdateExistingNodeStatus(t *testing.T) { } expectedNode := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -530,7 +530,7 @@ func TestUpdateExistingNodeOutOfDiskStatusWithTransitionFrequency(t *testing.T) clock.SetTime(time.Unix(123456, 0)) kubeClient := testKubelet.fakeKubeClient existingNode := v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -684,7 +684,7 @@ func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) { kubelet := testKubelet.kubelet clock := testKubelet.fakeClock kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}} + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain mockCadvisor := testKubelet.fakeCadvisor mockCadvisor.On("Start").Return(nil) @@ -708,7 +708,7 @@ func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) { } expectedNode := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -925,7 +925,7 @@ func TestRegisterWithApiServer(t *testing.T) { kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { // Return an existing (matching) node on get. return true, &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{ExternalID: testKubeletHostname}, }, nil }) @@ -981,7 +981,7 @@ func TestTryRegisterWithApiServer(t *testing.T) { newNode := func(cmad bool, externalID string) *v1.Node { node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, Spec: v1.NodeSpec{ ExternalID: externalID, }, diff --git a/pkg/kubelet/kubelet_pods_test.go b/pkg/kubelet/kubelet_pods_test.go index 0d08d133ac7..8f00bf937d0 100644 --- a/pkg/kubelet/kubelet_pods_test.go +++ b/pkg/kubelet/kubelet_pods_test.go @@ -26,6 +26,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -121,7 +122,7 @@ func TestRunInContainerNoSuchPod(t *testing.T) { podNamespace := "nsFoo" containerName := "containerFoo" output, err := kubelet.RunInContainer( - kubecontainer.GetPodFullName(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: podName, Namespace: podNamespace}}), + kubecontainer.GetPodFullName(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: podName, Namespace: podNamespace}}), "", containerName, []string{"ls"}) @@ -237,7 +238,7 @@ func (e envs) Less(i, j int) bool { return e[i].Name < e[j].Name } func buildService(name, namespace, clusterIP, protocol string, port int) *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{{ Protocol: v1.Protocol(protocol), @@ -638,7 +639,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { masterServiceNs: "nothing", nilLister: false, configMap: &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test1", Name: "test-configmap", }, @@ -723,7 +724,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { }, masterServiceNs: "nothing", configMap: &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test1", Name: "test-configmap", }, @@ -746,7 +747,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { }, masterServiceNs: "", configMap: &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test1", Name: "test-configmap", }, @@ -782,7 +783,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { }) testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: tc.ns, Name: "dapi-test-pod-name", }, diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index b2035cd359b..cc141e3e858 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -275,7 +275,7 @@ func newTestPods(count int) []*v1.Pod { Spec: v1.PodSpec{ HostNetwork: true, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(10000 + i), Name: fmt.Sprintf("pod%d", i), }, @@ -416,7 +416,7 @@ func TestHandlePortConflicts(t *testing.T) { kl.nodeLister = testNodeLister{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: string(kl.nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -426,7 +426,7 @@ func TestHandlePortConflicts(t *testing.T) { }} kl.nodeInfo = testNodeInfo{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: string(kl.nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -465,7 +465,7 @@ func TestCriticalPrioritySorting(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) kl := testKubelet.kubelet nodes := []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + {ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Status: v1.NodeStatus{Capacity: v1.ResourceList{}, Allocatable: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(10, resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity(100, resource.BinarySI), @@ -533,7 +533,7 @@ func TestHandleHostNameConflicts(t *testing.T) { kl.nodeLister = testNodeLister{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: "127.0.0.1"}, + ObjectMeta: metav1.ObjectMeta{Name: "127.0.0.1"}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -543,7 +543,7 @@ func TestHandleHostNameConflicts(t *testing.T) { }} kl.nodeInfo = testNodeInfo{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: "127.0.0.1"}, + ObjectMeta: metav1.ObjectMeta{Name: "127.0.0.1"}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -580,7 +580,7 @@ func TestHandleNodeSelector(t *testing.T) { kl := testKubelet.kubelet nodes := []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname, Labels: map[string]string{"key": "B"}}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname, Labels: map[string]string{"key": "B"}}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -619,7 +619,7 @@ func TestHandleMemExceeded(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) kl := testKubelet.kubelet nodes := []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + {ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Status: v1.NodeStatus{Capacity: v1.ResourceList{}, Allocatable: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(10, resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity(100, resource.BinarySI), @@ -678,8 +678,8 @@ func TestPurgingObsoleteStatusMapEntries(t *testing.T) { kl := testKubelet.kubelet pods := []*v1.Pod{ - {ObjectMeta: v1.ObjectMeta{Name: "pod1", UID: "1234"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, - {ObjectMeta: v1.ObjectMeta{Name: "pod2", UID: "4567"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "pod1", UID: "1234"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "pod2", UID: "4567"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, } podToTest := pods[1] // Run once to populate the status map. @@ -900,7 +900,7 @@ func TestDeleteOrphanedMirrorPods(t *testing.T) { manager := testKubelet.fakeMirrorClient orphanPods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "pod1", Namespace: "ns", @@ -911,7 +911,7 @@ func TestDeleteOrphanedMirrorPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345679", Name: "pod2", Namespace: "ns", @@ -941,7 +941,7 @@ func TestGetContainerInfoForMirrorPods(t *testing.T) { // different UIDs. pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "1234", Name: "qux", Namespace: "ns", @@ -956,7 +956,7 @@ func TestGetContainerInfoForMirrorPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "5678", Name: "qux", Namespace: "ns", @@ -1247,7 +1247,7 @@ func TestSyncPodsSetStatusToFailedForPodsThatRunTooLong(t *testing.T) { pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "new", @@ -1299,7 +1299,7 @@ func TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) { pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "new", @@ -1336,7 +1336,7 @@ func TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) { func podWithUidNameNs(uid types.UID, name, namespace string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uid, Name: name, Namespace: namespace, @@ -1896,7 +1896,7 @@ func TestHandlePodAdditionsInvokesPodAdmitHandlers(t *testing.T) { kl := testKubelet.kubelet kl.nodeLister = testNodeLister{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: string(kl.nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -1906,7 +1906,7 @@ func TestHandlePodAdditionsInvokesPodAdmitHandlers(t *testing.T) { }} kl.nodeInfo = testNodeInfo{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: string(kl.nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -1920,14 +1920,14 @@ func TestHandlePodAdditionsInvokesPodAdmitHandlers(t *testing.T) { pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "123456789", Name: "podA", Namespace: "foo", }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "987654321", Name: "podB", Namespace: "foo", @@ -2026,7 +2026,7 @@ func TestSyncPodKillPod(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) kl := testKubelet.kubelet pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "foo", diff --git a/pkg/kubelet/kubelet_volumes_test.go b/pkg/kubelet/kubelet_volumes_test.go index ebb898360a4..f9d20112dd6 100644 --- a/pkg/kubelet/kubelet_volumes_test.go +++ b/pkg/kubelet/kubelet_volumes_test.go @@ -21,6 +21,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" @@ -89,7 +90,7 @@ func TestPodVolumesExist(t *testing.T) { pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -107,7 +108,7 @@ func TestPodVolumesExist(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", UID: "pod2uid", }, @@ -125,7 +126,7 @@ func TestPodVolumesExist(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, @@ -289,7 +290,7 @@ func TestVolumeAttachAndMountControllerEnabled(t *testing.T) { kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { return true, &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Status: v1.NodeStatus{ VolumesAttached: []v1.AttachedVolume{ { @@ -357,7 +358,7 @@ func TestVolumeUnmountAndDetachControllerEnabled(t *testing.T) { kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { return true, &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Status: v1.NodeStatus{ VolumesAttached: []v1.AttachedVolume{ { diff --git a/pkg/kubelet/kuberuntime/helpers_test.go b/pkg/kubelet/kuberuntime/helpers_test.go index 7338694fae1..5297ef5e7cb 100644 --- a/pkg/kubelet/kuberuntime/helpers_test.go +++ b/pkg/kubelet/kuberuntime/helpers_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -29,7 +30,7 @@ func TestStableKey(t *testing.T) { Image: "foo/image:v1", } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", diff --git a/pkg/kubelet/kuberuntime/kuberuntime_container.go b/pkg/kubelet/kuberuntime/kuberuntime_container.go index 7380716d12e..5adab3fd4f6 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_container.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_container.go @@ -461,7 +461,7 @@ func (m *kubeGenericRuntimeManager) restoreSpecsFromContainerLabels(containerID // Notice that the followings are not full spec. The container killing code should not use // un-restored fields. pod = &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: l.PodUID, Name: l.PodName, Namespace: l.PodNamespace, diff --git a/pkg/kubelet/kuberuntime/kuberuntime_container_test.go b/pkg/kubelet/kuberuntime/kuberuntime_container_test.go index 001c2c2db97..8ecae0751c9 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_container_test.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_container_test.go @@ -21,6 +21,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" runtimeapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" @@ -30,7 +31,7 @@ import ( func TestRemoveContainer(t *testing.T) { fakeRuntime, _, m, err := createTestRuntimeManager() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "new", diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/pkg/kubelet/kuberuntime/kuberuntime_manager.go index b7c5882d60a..0da889fcfff 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -25,6 +25,7 @@ import ( "github.com/golang/glog" cadvisorapi "github.com/google/cadvisor/info/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubetypes "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api/v1" @@ -824,7 +825,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(uid kubetypes.UID, name, namesp } podFullName := format.Pod(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, UID: uid, diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go b/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go index 583b46e95ac..f6f7cb7ae35 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go @@ -24,6 +24,7 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" kubetypes "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" @@ -187,7 +188,7 @@ func makeTestContainer(name, image string) v1.Container { // makeTestPod creates a test api pod. func makeTestPod(podName, podNamespace, podUID string, containers []v1.Container) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(podUID), Name: podName, Namespace: podNamespace, @@ -269,7 +270,7 @@ func TestGetPodStatus(t *testing.T) { }, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -295,7 +296,7 @@ func TestGetPods(t *testing.T) { assert.NoError(t, err) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -371,7 +372,7 @@ func TestGetPodContainerID(t *testing.T) { assert.NoError(t, err) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -418,7 +419,7 @@ func TestGetNetNS(t *testing.T) { assert.NoError(t, err) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -450,7 +451,7 @@ func TestKillPod(t *testing.T) { assert.NoError(t, err) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -533,7 +534,7 @@ func TestSyncPod(t *testing.T) { }, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -564,7 +565,7 @@ func TestPruneInitContainers(t *testing.T) { init1 := makeTestContainer("init1", "busybox") init2 := makeTestContainer("init2", "busybox") pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -618,7 +619,7 @@ func TestSyncPodWithInitContainers(t *testing.T) { }, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", diff --git a/pkg/kubelet/kuberuntime/kuberuntime_sandbox_test.go b/pkg/kubelet/kuberuntime/kuberuntime_sandbox_test.go index 4e19dc11b32..ca9b85e7023 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_sandbox_test.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_sandbox_test.go @@ -22,6 +22,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" runtimeapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" @@ -31,7 +32,7 @@ import ( func TestCreatePodSandbox(t *testing.T) { fakeRuntime, _, m, err := createTestRuntimeManager() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "new", diff --git a/pkg/kubelet/kuberuntime/labels_test.go b/pkg/kubelet/kuberuntime/labels_test.go index 5c52ec49a52..d4c03db6b24 100644 --- a/pkg/kubelet/kuberuntime/labels_test.go +++ b/pkg/kubelet/kuberuntime/labels_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/util/intstr" @@ -51,7 +52,7 @@ func TestContainerLabels(t *testing.T) { Lifecycle: lifecycle, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", @@ -119,7 +120,7 @@ func TestContainerAnnotations(t *testing.T) { Lifecycle: lifecycle, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", @@ -166,7 +167,7 @@ func TestContainerAnnotations(t *testing.T) { func TestPodLabels(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", @@ -193,7 +194,7 @@ func TestPodLabels(t *testing.T) { func TestPodAnnotations(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", diff --git a/pkg/kubelet/network/hostport/BUILD b/pkg/kubelet/network/hostport/BUILD index 46b5919cff5..400588bb4c2 100644 --- a/pkg/kubelet/network/hostport/BUILD +++ b/pkg/kubelet/network/hostport/BUILD @@ -35,6 +35,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/util/iptables:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/kubelet/network/hostport/hostport_test.go b/pkg/kubelet/network/hostport/hostport_test.go index 3680ec60b7c..4c131c05349 100644 --- a/pkg/kubelet/network/hostport/hostport_test.go +++ b/pkg/kubelet/network/hostport/hostport_test.go @@ -23,6 +23,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" utiliptables "k8s.io/kubernetes/pkg/util/iptables" @@ -69,7 +70,7 @@ func TestOpenPodHostports(t *testing.T) { // New pod that we are going to add { &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-pod", Namespace: v1.NamespaceDefault, }, @@ -124,7 +125,7 @@ func TestOpenPodHostports(t *testing.T) { // Already running pod { &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "another-test-pod", Namespace: v1.NamespaceDefault, }, diff --git a/pkg/kubelet/pod/BUILD b/pkg/kubelet/pod/BUILD index d0591326358..ea8ad683e4e 100644 --- a/pkg/kubelet/pod/BUILD +++ b/pkg/kubelet/pod/BUILD @@ -39,6 +39,7 @@ go_test( "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/pod/testing:go_default_library", "//pkg/kubelet/types:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/pkg/kubelet/pod/pod_manager_test.go b/pkg/kubelet/pod/pod_manager_test.go index c50e2e4ae07..3d530a1f46c 100644 --- a/pkg/kubelet/pod/pod_manager_test.go +++ b/pkg/kubelet/pod/pod_manager_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" @@ -37,7 +38,7 @@ func newTestManager() (*basicManager, *podtest.FakeMirrorClient) { // methods work correctly. func TestGetSetPods(t *testing.T) { mirrorPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "987654321", Name: "bar", Namespace: "default", @@ -48,7 +49,7 @@ func TestGetSetPods(t *testing.T) { }, } staticPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "123456789", Name: "bar", Namespace: "default", @@ -58,7 +59,7 @@ func TestGetSetPods(t *testing.T) { expectedPods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "999999999", Name: "taco", Namespace: "default", @@ -112,7 +113,7 @@ func TestGetSetPods(t *testing.T) { func TestDeletePods(t *testing.T) { mirrorPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID("mirror-pod-uid"), Name: "mirror-static-pod-name", Namespace: v1.NamespaceDefault, @@ -123,7 +124,7 @@ func TestDeletePods(t *testing.T) { }, } staticPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID("static-pod-uid"), Name: "mirror-static-pod-name", Namespace: v1.NamespaceDefault, @@ -133,7 +134,7 @@ func TestDeletePods(t *testing.T) { expectedPods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID("extra-pod-uid"), Name: "extra-pod-name", Namespace: v1.NamespaceDefault, diff --git a/pkg/kubelet/pod_workers_test.go b/pkg/kubelet/pod_workers_test.go index 9829514e23d..b073b6ff237 100644 --- a/pkg/kubelet/pod_workers_test.go +++ b/pkg/kubelet/pod_workers_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" @@ -66,7 +67,7 @@ type TestingInterface interface { func newPod(uid, name string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(uid), Name: name, }, diff --git a/pkg/kubelet/prober/prober_manager_test.go b/pkg/kubelet/prober/prober_manager_test.go index a0077ac8473..6634f4a246a 100644 --- a/pkg/kubelet/prober/prober_manager_test.go +++ b/pkg/kubelet/prober/prober_manager_test.go @@ -23,6 +23,7 @@ import ( "time" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -48,7 +49,7 @@ var defaultProbe *v1.Probe = &v1.Probe{ func TestAddRemovePods(t *testing.T) { noProbePod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "no_probe_pod", }, Spec: v1.PodSpec{ @@ -61,7 +62,7 @@ func TestAddRemovePods(t *testing.T) { } probePod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "probe_pod", }, Spec: v1.PodSpec{ @@ -127,7 +128,7 @@ func TestCleanupPods(t *testing.T) { m := newTestManager() defer cleanup(t, m) podToCleanup := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "pod_cleanup", }, Spec: v1.PodSpec{ @@ -141,7 +142,7 @@ func TestCleanupPods(t *testing.T) { }, } podToKeep := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "pod_keep", }, Spec: v1.PodSpec{ diff --git a/pkg/kubelet/prober/results/BUILD b/pkg/kubelet/prober/results/BUILD index 19fd6211027..91dd8df7f05 100644 --- a/pkg/kubelet/prober/results/BUILD +++ b/pkg/kubelet/prober/results/BUILD @@ -28,6 +28,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/kubelet/container:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", ], ) diff --git a/pkg/kubelet/prober/results/results_manager_test.go b/pkg/kubelet/prober/results/results_manager_test.go index 444fb4d0c7e..b892fec12dd 100644 --- a/pkg/kubelet/prober/results/results_manager_test.go +++ b/pkg/kubelet/prober/results/results_manager_test.go @@ -21,6 +21,7 @@ import ( "time" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -48,7 +49,7 @@ func TestCacheOperations(t *testing.T) { func TestUpdates(t *testing.T) { m := NewManager() - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "test-pod"}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "test-pod"}} fooID := kubecontainer.ContainerID{Type: "test", ID: "foo"} barID := kubecontainer.ContainerID{Type: "test", ID: "bar"} diff --git a/pkg/kubelet/qos/BUILD b/pkg/kubelet/qos/BUILD index 0a79e88670b..24dfd9f0a10 100644 --- a/pkg/kubelet/qos/BUILD +++ b/pkg/kubelet/qos/BUILD @@ -37,6 +37,7 @@ go_test( "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/kubelet/types:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/kubelet/qos/policy_test.go b/pkg/kubelet/qos/policy_test.go index e878d778551..707727e019c 100644 --- a/pkg/kubelet/qos/policy_test.go +++ b/pkg/kubelet/qos/policy_test.go @@ -20,6 +20,7 @@ import ( "strconv" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" @@ -137,7 +138,7 @@ var ( }, } criticalPodWithNoLimit = v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ kubetypes.CriticalPodAnnotationKey: "", }, diff --git a/pkg/kubelet/qos/qos_test.go b/pkg/kubelet/qos/qos_test.go index 939ff85553e..61f50c5bad3 100644 --- a/pkg/kubelet/qos/qos_test.go +++ b/pkg/kubelet/qos/qos_test.go @@ -19,6 +19,7 @@ package qos import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" ) @@ -55,7 +56,7 @@ func newContainer(name string, requests v1.ResourceList, limits v1.ResourceList) func newPod(name string, containers []v1.Container) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/pkg/kubelet/rkt/BUILD b/pkg/kubelet/rkt/BUILD index f48f94cdeff..5ef5867c1a7 100644 --- a/pkg/kubelet/rkt/BUILD +++ b/pkg/kubelet/rkt/BUILD @@ -89,6 +89,7 @@ go_test( "//vendor:github.com/stretchr/testify/assert", "//vendor:golang.org/x/net/context", "//vendor:google.golang.org/grpc", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", ], diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index 8742055da0b..c13a4f8c96a 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -41,6 +41,7 @@ import ( "github.com/golang/glog" "golang.org/x/net/context" "google.golang.org/grpc" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubetypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/errors" utilwait "k8s.io/apimachinery/pkg/util/wait" @@ -1967,7 +1968,7 @@ func (r *Runtime) cleanupPodNetworkFromServiceFile(serviceFilePath string) error return err } return r.cleanupPodNetwork(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: kubetypes.UID(id), Name: name, Namespace: namespace, diff --git a/pkg/kubelet/rkt/rkt_test.go b/pkg/kubelet/rkt/rkt_test.go index e3e8231286d..273b5e5ac24 100644 --- a/pkg/kubelet/rkt/rkt_test.go +++ b/pkg/kubelet/rkt/rkt_test.go @@ -31,6 +31,7 @@ import ( rktapi "github.com/coreos/rkt/api/v1alpha" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubetypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/errors" "k8s.io/kubernetes/pkg/api/resource" @@ -1203,7 +1204,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1222,7 +1223,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1241,7 +1242,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1262,7 +1263,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1283,7 +1284,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1304,7 +1305,7 @@ func TestGenerateRunCommand(t *testing.T) { { &network.NoopNetworkPlugin{}, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1323,7 +1324,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1345,7 +1346,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1415,7 +1416,7 @@ func TestLifeCycleHooks(t *testing.T) { { // Case 0, container without any hooks. &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: "ns-1", UID: "uid-1", @@ -1438,7 +1439,7 @@ func TestLifeCycleHooks(t *testing.T) { { // Case 1, containers with post-start and pre-stop hooks. &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: "ns-1", UID: "uid-1", @@ -1513,7 +1514,7 @@ func TestLifeCycleHooks(t *testing.T) { { // Case 2, one container with invalid hooks. &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: "ns-1", UID: "uid-1", @@ -1632,10 +1633,10 @@ func TestGarbageCollect(t *testing.T) { MaxContainers: 0, }, []*v1.Pod{ - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-1"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-2"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-3"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-4"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-1"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-2"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-3"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-4"}}, }, []*rktapi.Pod{ { @@ -1716,9 +1717,9 @@ func TestGarbageCollect(t *testing.T) { MaxContainers: 1, }, []*v1.Pod{ - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-0"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-1"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-2"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-0"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-1"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-2"}}, }, []*rktapi.Pod{ { @@ -1839,7 +1840,7 @@ func TestMakePodManifestAnnotations(t *testing.T) { }{ { in: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "uid-1", Name: "name-1", Namespace: "namespace-1", diff --git a/pkg/kubelet/runonce_test.go b/pkg/kubelet/runonce_test.go index 8aee989023c..e604ddee046 100644 --- a/pkg/kubelet/runonce_test.go +++ b/pkg/kubelet/runonce_test.go @@ -23,6 +23,7 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" cadvisorapiv2 "github.com/google/cadvisor/info/v2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/componentconfig" @@ -128,7 +129,7 @@ func TestRunOnce(t *testing.T) { pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", diff --git a/pkg/kubelet/server/BUILD b/pkg/kubelet/server/BUILD index 63a24edb1fd..008441689eb 100644 --- a/pkg/kubelet/server/BUILD +++ b/pkg/kubelet/server/BUILD @@ -77,6 +77,7 @@ go_test( "//vendor:github.com/stretchr/testify/assert", "//vendor:github.com/stretchr/testify/require", "//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/sets", "//vendor:k8s.io/apiserver/pkg/authentication/user", diff --git a/pkg/kubelet/server/server_test.go b/pkg/kubelet/server/server_test.go index f9a074434d0..889c4701742 100644 --- a/pkg/kubelet/server/server_test.go +++ b/pkg/kubelet/server/server_test.go @@ -39,6 +39,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" apierrs "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/authentication/user" @@ -211,7 +212,7 @@ func newServerTest() *serverTestFramework { }, podByNameFunc: func(namespace, name string) (*v1.Pod, bool) { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, UID: testUID, @@ -891,7 +892,7 @@ func assertHealthIsOk(t *testing.T, httpURL string) { func setPodByNameFunc(fw *serverTestFramework, namespace, pod, container string) { fw.fakeKubelet.podByNameFunc = func(namespace, name string) (*v1.Pod, bool) { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: pod, }, diff --git a/pkg/kubelet/status/status_manager_test.go b/pkg/kubelet/status/status_manager_test.go index a2929ddc123..a11290633d3 100644 --- a/pkg/kubelet/status/status_manager_test.go +++ b/pkg/kubelet/status/status_manager_test.go @@ -44,7 +44,7 @@ import ( // Generate new instance of test pod with the same initial value. func getTestPod() *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -138,7 +138,7 @@ func TestNewStatus(t *testing.T) { func TestNewStatusPreservesPodStartTime(t *testing.T) { syncer := newTestManager(&fake.Clientset{}) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -171,7 +171,7 @@ func TestNewStatusSetsReadyTransitionTime(t *testing.T) { syncer := newTestManager(&fake.Clientset{}) podStatus := getReadyPodStatus() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -218,7 +218,7 @@ func TestChangedStatusUpdatesLastTransitionTime(t *testing.T) { syncer := newTestManager(&fake.Clientset{}) podStatus := getReadyPodStatus() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -257,7 +257,7 @@ func TestUnchangedStatusPreservesLastTransitionTime(t *testing.T) { syncer := newTestManager(&fake.Clientset{}) podStatus := getReadyPodStatus() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", diff --git a/pkg/kubelet/util/csr/csr.go b/pkg/kubelet/util/csr/csr.go index dc74470e00c..fe84c24f2df 100644 --- a/pkg/kubelet/util/csr/csr.go +++ b/pkg/kubelet/util/csr/csr.go @@ -52,7 +52,7 @@ func RequestNodeCertificate(client unversionedcertificates.CertificateSigningReq req, err := client.Create(&certificates.CertificateSigningRequest{ // Username, UID, Groups will be injected by API server. TypeMeta: metav1.TypeMeta{Kind: "CertificateSigningRequest"}, - ObjectMeta: v1.ObjectMeta{GenerateName: "csr-"}, + ObjectMeta: metav1.ObjectMeta{GenerateName: "csr-"}, Spec: certificates.CertificateSigningRequestSpec{ Request: csr, diff --git a/pkg/kubelet/volumemanager/BUILD b/pkg/kubelet/volumemanager/BUILD index 91cd8ab59e2..88f381e0a75 100644 --- a/pkg/kubelet/volumemanager/BUILD +++ b/pkg/kubelet/volumemanager/BUILD @@ -56,6 +56,7 @@ go_test( "//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", ], ) diff --git a/pkg/kubelet/volumemanager/cache/BUILD b/pkg/kubelet/volumemanager/cache/BUILD index af37477db19..d6078cf2d56 100644 --- a/pkg/kubelet/volumemanager/cache/BUILD +++ b/pkg/kubelet/volumemanager/cache/BUILD @@ -40,6 +40,7 @@ go_test( "//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", ], ) diff --git a/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go index bec23f6cef8..7a20b6c82ac 100644 --- a/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go +++ b/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go @@ -19,6 +19,7 @@ package cache import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/volume" volumetesting "k8s.io/kubernetes/pkg/volume/testing" @@ -36,7 +37,7 @@ func Test_MarkVolumeAsAttached_Positive_NewVolume(t *testing.T) { volumePluginMgr, plugin := volumetesting.GetTestVolumePluginMgr(t) asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -80,7 +81,7 @@ func Test_MarkVolumeAsAttached_SuppliedVolumeName_Positive_NewVolume(t *testing. volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -124,7 +125,7 @@ func Test_MarkVolumeAsAttached_Positive_ExistingVolume(t *testing.T) { devicePath := "fake/device/path" asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -172,7 +173,7 @@ func Test_AddPodToVolume_Positive_ExistingVolumeNewNode(t *testing.T) { devicePath := "fake/device/path" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -229,7 +230,7 @@ func Test_AddPodToVolume_Positive_ExistingVolumeExistingNode(t *testing.T) { devicePath := "fake/device/path" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -291,7 +292,7 @@ func Test_AddPodToVolume_Negative_VolumeDoesntExist(t *testing.T) { asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -356,7 +357,7 @@ func Test_MarkDeviceAsMounted_Positive_NewVolume(t *testing.T) { volumePluginMgr, plugin := volumetesting.GetTestVolumePluginMgr(t) asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, diff --git a/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go b/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go index 3bb7467c5eb..e739b989160 100644 --- a/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go +++ b/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go @@ -19,6 +19,7 @@ package cache import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/volume" volumetesting "k8s.io/kubernetes/pkg/volume/testing" @@ -34,7 +35,7 @@ func Test_AddPodToVolume_Positive_NewPodNewVolume(t *testing.T) { volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) dsw := NewDesiredStateOfWorld(volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, @@ -78,7 +79,7 @@ func Test_AddPodToVolume_Positive_ExistingPodExistingVolume(t *testing.T) { volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) dsw := NewDesiredStateOfWorld(volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, @@ -122,7 +123,7 @@ func Test_DeletePodFromVolume_Positive_PodExistsVolumeExists(t *testing.T) { volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) dsw := NewDesiredStateOfWorld(volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, @@ -174,7 +175,7 @@ func Test_MarkVolumesReportedInUse_Positive_NewPodNewVolume(t *testing.T) { dsw := NewDesiredStateOfWorld(volumePluginMgr) pod1 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -196,7 +197,7 @@ func Test_MarkVolumesReportedInUse_Positive_NewPodNewVolume(t *testing.T) { pod1Name := volumehelper.GetUniquePodName(pod1) pod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", UID: "pod2uid", }, @@ -218,7 +219,7 @@ func Test_MarkVolumesReportedInUse_Positive_NewPodNewVolume(t *testing.T) { pod2Name := volumehelper.GetUniquePodName(pod2) pod3 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, diff --git a/pkg/kubelet/volumemanager/reconciler/BUILD b/pkg/kubelet/volumemanager/reconciler/BUILD index a55bc05cb8e..c01d0faff35 100644 --- a/pkg/kubelet/volumemanager/reconciler/BUILD +++ b/pkg/kubelet/volumemanager/reconciler/BUILD @@ -52,6 +52,7 @@ go_test( "//pkg/volume/util/operationexecutor:go_default_library", "//pkg/volume/util/volumehelper:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//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/sets", diff --git a/pkg/kubelet/volumemanager/reconciler/reconciler.go b/pkg/kubelet/volumemanager/reconciler/reconciler.go index bea511a5b9d..4aadcb8d0d4 100644 --- a/pkg/kubelet/volumemanager/reconciler/reconciler.go +++ b/pkg/kubelet/volumemanager/reconciler/reconciler.go @@ -495,7 +495,7 @@ func (rc *reconciler) reconstructVolume(volume podVolume) (*reconstructedVolume, return nil, err } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(volume.podName), }, } diff --git a/pkg/kubelet/volumemanager/reconciler/reconciler_test.go b/pkg/kubelet/volumemanager/reconciler/reconciler_test.go index 10bad01969b..29833f19eb4 100644 --- a/pkg/kubelet/volumemanager/reconciler/reconciler_test.go +++ b/pkg/kubelet/volumemanager/reconciler/reconciler_test.go @@ -22,6 +22,7 @@ import ( "time" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" k8stypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" @@ -112,7 +113,7 @@ func Test_Run_Positive_VolumeAttachAndMount(t *testing.T) { volumePluginMgr, kubeletPodsDir) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -183,7 +184,7 @@ func Test_Run_Positive_VolumeMountControllerAttachEnabled(t *testing.T) { volumePluginMgr, kubeletPodsDir) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -255,7 +256,7 @@ func Test_Run_Positive_VolumeAttachMountUnmountDetach(t *testing.T) { volumePluginMgr, kubeletPodsDir) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -338,7 +339,7 @@ func Test_Run_Positive_VolumeUnmountControllerAttachEnabled(t *testing.T) { volumePluginMgr, kubeletPodsDir) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -453,7 +454,7 @@ func createTestClient() *fake.Clientset { fakeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { return true, &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: string(nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(nodeName)}, Status: v1.NodeStatus{ VolumesAttached: []v1.AttachedVolume{ { diff --git a/pkg/kubelet/volumemanager/volume_manager_test.go b/pkg/kubelet/volumemanager/volume_manager_test.go index 2b935cb0b68..ce52675e5ec 100644 --- a/pkg/kubelet/volumemanager/volume_manager_test.go +++ b/pkg/kubelet/volumemanager/volume_manager_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -126,7 +127,7 @@ func TestGetExtraSupplementalGroupsForPod(t *testing.T) { for _, tc := range cases { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", Annotations: map[string]string{ volumehelper.VolumeGidAnnotationKey: tc.gidAnnotation, @@ -205,7 +206,7 @@ func newTestVolumeManager( // already attached to the node and bound to the claim used by the pod. func createObjects() (*v1.Node, *v1.Pod, *v1.PersistentVolume, *v1.PersistentVolumeClaim) { node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testHostname}, Status: v1.NodeStatus{ VolumesAttached: []v1.AttachedVolume{ { @@ -216,7 +217,7 @@ func createObjects() (*v1.Node, *v1.Pod, *v1.PersistentVolume, *v1.PersistentVol Spec: v1.NodeSpec{ExternalID: testHostname}, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "nsA", UID: "1234", @@ -238,7 +239,7 @@ func createObjects() (*v1.Node, *v1.Pod, *v1.PersistentVolume, *v1.PersistentVol }, } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -253,7 +254,7 @@ func createObjects() (*v1.Node, *v1.Pod, *v1.PersistentVolume, *v1.PersistentVol }, } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, diff --git a/pkg/master/controller.go b/pkg/master/controller.go index 82c186d01fe..dcde14046c5 100644 --- a/pkg/master/controller.go +++ b/pkg/master/controller.go @@ -191,7 +191,7 @@ func (c *Controller) CreateNamespaceIfNeeded(ns string) error { return nil } newNs := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ns, Namespace: "", }, @@ -250,7 +250,7 @@ func (c *Controller) CreateOrUpdateMasterServiceIfNeeded(serviceName string, ser return nil } svc := &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Namespace: api.NamespaceDefault, Labels: map[string]string{"provider": "kubernetes", "component": "apiserver"}, @@ -321,7 +321,7 @@ func (r *masterCountEndpointReconciler) ReconcileEndpoints(serviceName string, i e, err := r.endpointClient.Endpoints(api.NamespaceDefault).Get(serviceName, metav1.GetOptions{}) if err != nil { e = &api.Endpoints{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Namespace: api.NamespaceDefault, }, diff --git a/pkg/master/controller_test.go b/pkg/master/controller_test.go index 4a61a10776b..e6731465196 100644 --- a/pkg/master/controller_test.go +++ b/pkg/master/controller_test.go @@ -21,6 +21,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" "k8s.io/kubernetes/pkg/client/testing/core" @@ -29,8 +30,8 @@ import ( func TestReconcileEndpoints(t *testing.T) { ns := api.NamespaceDefault - om := func(name string) api.ObjectMeta { - return api.ObjectMeta{Namespace: ns, Name: name} + om := func(name string) metav1.ObjectMeta { + return metav1.ObjectMeta{Namespace: ns, Name: name} } reconcile_tests := []struct { testName string @@ -542,8 +543,8 @@ func TestReconcileEndpoints(t *testing.T) { func TestCreateOrUpdateMasterService(t *testing.T) { ns := api.NamespaceDefault - om := func(name string) api.ObjectMeta { - return api.ObjectMeta{Namespace: ns, Name: name} + om := func(name string) metav1.ObjectMeta { + return metav1.ObjectMeta{Namespace: ns, Name: name} } create_tests := []struct { diff --git a/pkg/proxy/config/BUILD b/pkg/proxy/config/BUILD index 1760c8bf835..4d6211ecaec 100644 --- a/pkg/proxy/config/BUILD +++ b/pkg/proxy/config/BUILD @@ -36,6 +36,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], @@ -48,6 +49,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/proxy/config:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", ], ) diff --git a/pkg/proxy/config/api_test.go b/pkg/proxy/config/api_test.go index 34f81a36c9c..f0f704f2ff1 100644 --- a/pkg/proxy/config/api_test.go +++ b/pkg/proxy/config/api_test.go @@ -20,6 +20,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" @@ -44,13 +45,13 @@ var _ cache.ListerWatcher = fakeLW{} func TestNewServicesSourceApi_UpdatesAndMultipleServices(t *testing.T) { service1v1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "s1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "s1"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}} service1v2 := &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "s1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "s1"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 20}}}} service2 := &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "s2"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "s2"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 30}}}} // Setup fake api client. @@ -136,7 +137,7 @@ func TestNewServicesSourceApi_UpdatesAndMultipleServices(t *testing.T) { func TestNewEndpointsSourceApi_UpdatesAndMultipleEndpoints(t *testing.T) { endpoints1v1 := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "e1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "e1"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{ {IP: "1.2.3.4"}, @@ -145,7 +146,7 @@ func TestNewEndpointsSourceApi_UpdatesAndMultipleEndpoints(t *testing.T) { }}, } endpoints1v2 := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "e1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "e1"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{ {IP: "1.2.3.4"}, @@ -155,7 +156,7 @@ func TestNewEndpointsSourceApi_UpdatesAndMultipleEndpoints(t *testing.T) { }}, } endpoints2 := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "e2"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "e2"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{ {IP: "5.6.7.8"}, diff --git a/pkg/proxy/config/config_test.go b/pkg/proxy/config/config_test.go index e2e544a26e3..5be9f21dd91 100644 --- a/pkg/proxy/config/config_test.go +++ b/pkg/proxy/config/config_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api" . "k8s.io/kubernetes/pkg/proxy/config" @@ -153,7 +154,7 @@ func TestNewServiceAddedAndNotified(t *testing.T) { handler := NewServiceHandlerMock() config.RegisterHandler(handler) serviceUpdate := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}, }) channel <- serviceUpdate @@ -167,14 +168,14 @@ func TestServiceAddedRemovedSetAndNotified(t *testing.T) { handler := NewServiceHandlerMock() config.RegisterHandler(handler) serviceUpdate := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}, }) channel <- serviceUpdate handler.ValidateServices(t, serviceUpdate.Services) serviceUpdate2 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 20}}}, }) channel <- serviceUpdate2 @@ -182,14 +183,14 @@ func TestServiceAddedRemovedSetAndNotified(t *testing.T) { handler.ValidateServices(t, services) serviceUpdate3 := CreateServiceUpdate(REMOVE, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, }) channel <- serviceUpdate3 services = []api.Service{serviceUpdate2.Services[0]} handler.ValidateServices(t, services) serviceUpdate4 := CreateServiceUpdate(SET, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foobar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foobar"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 99}}}, }) channel <- serviceUpdate4 @@ -207,11 +208,11 @@ func TestNewMultipleSourcesServicesAddedAndNotified(t *testing.T) { handler := NewServiceHandlerMock() config.RegisterHandler(handler) serviceUpdate1 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}, }) serviceUpdate2 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 20}}}, }) channelOne <- serviceUpdate1 @@ -229,11 +230,11 @@ func TestNewMultipleSourcesServicesMultipleHandlersAddedAndNotified(t *testing.T config.RegisterHandler(handler) config.RegisterHandler(handler2) serviceUpdate1 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}, }) serviceUpdate2 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 20}}}, }) channelOne <- serviceUpdate1 @@ -252,14 +253,14 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddedAndNotified(t *testing. config.RegisterHandler(handler) config.RegisterHandler(handler2) endpointsUpdate1 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "1.1.1.1"}, {IP: "2.2.2.2"}}, Ports: []api.EndpointPort{{Port: 80}}, }}, }) endpointsUpdate2 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "3.3.3.3"}, {IP: "4.4.4.4"}}, Ports: []api.EndpointPort{{Port: 80}}, @@ -282,14 +283,14 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddRemoveSetAndNotified(t *t config.RegisterHandler(handler) config.RegisterHandler(handler2) endpointsUpdate1 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "1.1.1.1"}, {IP: "2.2.2.2"}}, Ports: []api.EndpointPort{{Port: 80}}, }}, }) endpointsUpdate2 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "3.3.3.3"}, {IP: "4.4.4.4"}}, Ports: []api.EndpointPort{{Port: 80}}, @@ -304,7 +305,7 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddRemoveSetAndNotified(t *t // Add one more endpointsUpdate3 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foobar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foobar"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "5.5.5.5"}, {IP: "6.6.6.6"}}, Ports: []api.EndpointPort{{Port: 80}}, @@ -317,7 +318,7 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddRemoveSetAndNotified(t *t // Update the "foo" service with new endpoints endpointsUpdate1 = CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "7.7.7.7"}}, Ports: []api.EndpointPort{{Port: 80}}, @@ -329,7 +330,7 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddRemoveSetAndNotified(t *t handler2.ValidateEndpoints(t, endpoints) // Remove "bar" service - endpointsUpdate2 = CreateEndpointsUpdate(REMOVE, api.Endpoints{ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}}) + endpointsUpdate2 = CreateEndpointsUpdate(REMOVE, api.Endpoints{ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}}) channelTwo <- endpointsUpdate2 endpoints = []api.Endpoints{endpointsUpdate1.Endpoints[0], endpointsUpdate3.Endpoints[0]} diff --git a/pkg/proxy/iptables/BUILD b/pkg/proxy/iptables/BUILD index 03fab42888d..085088fe261 100644 --- a/pkg/proxy/iptables/BUILD +++ b/pkg/proxy/iptables/BUILD @@ -46,6 +46,7 @@ go_test( "//pkg/util/intstr:go_default_library", "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/pkg/proxy/iptables/proxier_test.go b/pkg/proxy/iptables/proxier_test.go index dd4b7065e5b..e8d1c21fb5f 100644 --- a/pkg/proxy/iptables/proxier_test.go +++ b/pkg/proxy/iptables/proxier_test.go @@ -23,6 +23,7 @@ import ( "net" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/service" @@ -887,7 +888,7 @@ func onlyLocalNodePorts(t *testing.T, fp *Proxier, ipt *iptablestest.FakeIPTable func makeTestService(namespace, name string, svcFunc func(*api.Service)) api.Service { svc := api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/pkg/proxy/userspace/BUILD b/pkg/proxy/userspace/BUILD index b3b331aa47d..2ed2504f08c 100644 --- a/pkg/proxy/userspace/BUILD +++ b/pkg/proxy/userspace/BUILD @@ -47,6 +47,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/proxy:go_default_library", "//pkg/util/iptables/testing:go_default_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/apimachinery/pkg/util/runtime", diff --git a/pkg/proxy/userspace/proxier_test.go b/pkg/proxy/userspace/proxier_test.go index 71483d24c87..6650a3d0e47 100644 --- a/pkg/proxy/userspace/proxier_test.go +++ b/pkg/proxy/userspace/proxier_test.go @@ -29,6 +29,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api" @@ -202,7 +203,7 @@ func TestTCPProxy(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -229,7 +230,7 @@ func TestUDPProxy(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -256,7 +257,7 @@ func TestUDPProxyTimeout(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -287,13 +288,13 @@ func TestMultiPortProxy(t *testing.T) { serviceP := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo-p"}, Port: "p"} serviceQ := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo-q"}, Port: "q"} lb.OnEndpointsUpdate([]api.Endpoints{{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Protocol: "TCP", Port: tcpServerPort}}, }}, }, { - ObjectMeta: api.ObjectMeta{Name: serviceQ.Name, Namespace: serviceQ.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceQ.Name, Namespace: serviceQ.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "q", Protocol: "UDP", Port: udpServerPort}}, @@ -334,7 +335,7 @@ func TestMultiPortOnServiceUpdate(t *testing.T) { waitForNumProxyLoops(t, p, 0) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 80, @@ -382,7 +383,7 @@ func TestTCPProxyStop(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -426,7 +427,7 @@ func TestUDPProxyStop(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -464,7 +465,7 @@ func TestTCPProxyUpdateDelete(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -501,7 +502,7 @@ func TestUDPProxyUpdateDelete(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -537,7 +538,7 @@ func TestTCPProxyUpdateDeleteUpdate(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -571,7 +572,7 @@ func TestTCPProxyUpdateDeleteUpdate(t *testing.T) { // need to add endpoint here because it got clean up during service delete lb.OnEndpointsUpdate([]api.Endpoints{endpoint}) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -590,7 +591,7 @@ func TestUDPProxyUpdateDeleteUpdate(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -624,7 +625,7 @@ func TestUDPProxyUpdateDeleteUpdate(t *testing.T) { // need to add endpoint here because it got clean up during service delete lb.OnEndpointsUpdate([]api.Endpoints{endpoint}) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -644,7 +645,7 @@ func TestTCPProxyUpdatePort(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -666,7 +667,7 @@ func TestTCPProxyUpdatePort(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 99, @@ -692,7 +693,7 @@ func TestUDPProxyUpdatePort(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -713,7 +714,7 @@ func TestUDPProxyUpdatePort(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 99, @@ -737,7 +738,7 @@ func TestProxyUpdatePublicIPs(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -759,7 +760,7 @@ func TestProxyUpdatePublicIPs(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{ Name: "p", @@ -788,7 +789,7 @@ func TestProxyUpdatePortal(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -810,7 +811,7 @@ func TestProxyUpdatePortal(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -823,7 +824,7 @@ func TestProxyUpdatePortal(t *testing.T) { } p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "None", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -836,7 +837,7 @@ func TestProxyUpdatePortal(t *testing.T) { } p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), diff --git a/pkg/proxy/userspace/roundrobin_test.go b/pkg/proxy/userspace/roundrobin_test.go index 19f32f0d31f..0e744c7ea49 100644 --- a/pkg/proxy/userspace/roundrobin_test.go +++ b/pkg/proxy/userspace/roundrobin_test.go @@ -20,6 +20,7 @@ import ( "net" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/proxy" @@ -107,7 +108,7 @@ func TestLoadBalanceWorksWithSingleEndpoint(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Name: "p", Port: 40}}, @@ -145,7 +146,7 @@ func TestLoadBalanceWorksWithMultipleEndpoints(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "endpoint"}}, Ports: []api.EndpointPort{{Name: "p", Port: 1}, {Name: "p", Port: 2}, {Name: "p", Port: 3}}, @@ -173,7 +174,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsMultiplePorts(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}, {IP: "endpoint2"}}, @@ -216,7 +217,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, @@ -255,7 +256,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { // Then update the configuration with one fewer endpoints, make sure // we start in the beginning again endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint4"}}, @@ -288,7 +289,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { expectEndpoint(t, loadBalancer, serviceQ, shuffledEndpoints[1], nil) // Clear endpoints - endpoints[0] = api.Endpoints{ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: nil} + endpoints[0] = api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: nil} loadBalancer.OnEndpointsUpdate(endpoints) endpoint, err = loadBalancer.NextEndpoint(serviceP, nil, false) @@ -307,7 +308,7 @@ func TestLoadBalanceWorksWithServiceRemoval(t *testing.T) { } endpoints := make([]api.Endpoints, 2) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: fooServiceP.Name, Namespace: fooServiceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: fooServiceP.Name, Namespace: fooServiceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}, {IP: "endpoint2"}, {IP: "endpoint3"}}, @@ -316,7 +317,7 @@ func TestLoadBalanceWorksWithServiceRemoval(t *testing.T) { }, } endpoints[1] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: barServiceP.Name, Namespace: barServiceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: barServiceP.Name, Namespace: barServiceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint4"}, {IP: "endpoint5"}, {IP: "endpoint6"}}, @@ -365,7 +366,7 @@ func TestStickyLoadBalanceWorksWithNewServiceCalledFirst(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, @@ -421,7 +422,7 @@ func TestStickyLoadBalanceWorksWithNewServiceCalledSecond(t *testing.T) { // Call OnEndpointsUpdate() before NewService() endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, @@ -483,7 +484,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -503,7 +504,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { client3Endpoint := shuffledEndpoints[2] endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -525,7 +526,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { expectEndpoint(t, loadBalancer, service, client3Endpoint, client3) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -557,7 +558,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -577,7 +578,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { // Then update the configuration with one fewer endpoints, make sure // we start in the beginning again endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -595,7 +596,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { expectEndpoint(t, loadBalancer, service, shuffledEndpoints[1], client2) // Clear endpoints - endpoints[0] = api.Endpoints{ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: nil} + endpoints[0] = api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: nil} loadBalancer.OnEndpointsUpdate(endpoints) endpoint, err = loadBalancer.NextEndpoint(service, nil, false) @@ -617,7 +618,7 @@ func TestStickyLoadBalanceWorksWithServiceRemoval(t *testing.T) { loadBalancer.NewService(fooService, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 2) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: fooService.Name, Namespace: fooService.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: fooService.Name, Namespace: fooService.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -628,7 +629,7 @@ func TestStickyLoadBalanceWorksWithServiceRemoval(t *testing.T) { barService := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "bar"}, Port: ""} loadBalancer.NewService(barService, api.ServiceAffinityClientIP, 0) endpoints[1] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: barService.Name, Namespace: barService.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: barService.Name, Namespace: barService.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -686,7 +687,7 @@ func TestStickyLoadBalanceWorksWithEndpointFails(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, diff --git a/pkg/proxy/winuserspace/BUILD b/pkg/proxy/winuserspace/BUILD index 2aed90e7a03..f2fe3cd4962 100644 --- a/pkg/proxy/winuserspace/BUILD +++ b/pkg/proxy/winuserspace/BUILD @@ -46,6 +46,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/proxy:go_default_library", "//pkg/util/netsh/testing:go_default_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/apimachinery/pkg/util/runtime", diff --git a/pkg/proxy/winuserspace/proxier_test.go b/pkg/proxy/winuserspace/proxier_test.go index fdedeeb5b10..60da5fda939 100644 --- a/pkg/proxy/winuserspace/proxier_test.go +++ b/pkg/proxy/winuserspace/proxier_test.go @@ -29,6 +29,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api" @@ -202,7 +203,7 @@ func TestTCPProxy(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -229,7 +230,7 @@ func TestUDPProxy(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -256,7 +257,7 @@ func TestUDPProxyTimeout(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -287,13 +288,13 @@ func TestMultiPortProxy(t *testing.T) { serviceP := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo-p"}, Port: "p"} serviceQ := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo-q"}, Port: "q"} lb.OnEndpointsUpdate([]api.Endpoints{{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Protocol: "TCP", Port: tcpServerPort}}, }}, }, { - ObjectMeta: api.ObjectMeta{Name: serviceQ.Name, Namespace: serviceQ.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceQ.Name, Namespace: serviceQ.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "q", Protocol: "UDP", Port: udpServerPort}}, @@ -334,7 +335,7 @@ func TestMultiPortOnServiceUpdate(t *testing.T) { waitForNumProxyLoops(t, p, 0) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 80, @@ -382,7 +383,7 @@ func TestTCPProxyStop(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -426,7 +427,7 @@ func TestUDPProxyStop(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -464,7 +465,7 @@ func TestTCPProxyUpdateDelete(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -501,7 +502,7 @@ func TestUDPProxyUpdateDelete(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -537,7 +538,7 @@ func TestTCPProxyUpdateDeleteUpdate(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -571,7 +572,7 @@ func TestTCPProxyUpdateDeleteUpdate(t *testing.T) { // need to add endpoint here because it got clean up during service delete lb.OnEndpointsUpdate([]api.Endpoints{endpoint}) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -590,7 +591,7 @@ func TestUDPProxyUpdateDeleteUpdate(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -624,7 +625,7 @@ func TestUDPProxyUpdateDeleteUpdate(t *testing.T) { // need to add endpoint here because it got clean up during service delete lb.OnEndpointsUpdate([]api.Endpoints{endpoint}) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -644,7 +645,7 @@ func TestTCPProxyUpdatePort(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -666,7 +667,7 @@ func TestTCPProxyUpdatePort(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 99, @@ -692,7 +693,7 @@ func TestUDPProxyUpdatePort(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -713,7 +714,7 @@ func TestUDPProxyUpdatePort(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 99, @@ -737,7 +738,7 @@ func TestProxyUpdatePublicIPs(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -759,7 +760,7 @@ func TestProxyUpdatePublicIPs(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{ Name: "p", @@ -788,7 +789,7 @@ func TestProxyUpdatePortal(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -810,7 +811,7 @@ func TestProxyUpdatePortal(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -823,7 +824,7 @@ func TestProxyUpdatePortal(t *testing.T) { } p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "None", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -836,7 +837,7 @@ func TestProxyUpdatePortal(t *testing.T) { } p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), diff --git a/pkg/proxy/winuserspace/roundrobin_test.go b/pkg/proxy/winuserspace/roundrobin_test.go index ea869985586..8983e2e92bf 100644 --- a/pkg/proxy/winuserspace/roundrobin_test.go +++ b/pkg/proxy/winuserspace/roundrobin_test.go @@ -20,6 +20,7 @@ import ( "net" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/proxy" @@ -107,7 +108,7 @@ func TestLoadBalanceWorksWithSingleEndpoint(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Name: "p", Port: 40}}, @@ -145,7 +146,7 @@ func TestLoadBalanceWorksWithMultipleEndpoints(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "endpoint"}}, Ports: []api.EndpointPort{{Name: "p", Port: 1}, {Name: "p", Port: 2}, {Name: "p", Port: 3}}, @@ -173,7 +174,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsMultiplePorts(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}, {IP: "endpoint2"}}, @@ -216,7 +217,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, @@ -255,7 +256,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { // Then update the configuration with one fewer endpoints, make sure // we start in the beginning again endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint4"}}, @@ -288,7 +289,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { expectEndpoint(t, loadBalancer, serviceQ, shuffledEndpoints[1], nil) // Clear endpoints - endpoints[0] = api.Endpoints{ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: nil} + endpoints[0] = api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: nil} loadBalancer.OnEndpointsUpdate(endpoints) endpoint, err = loadBalancer.NextEndpoint(serviceP, nil, false) @@ -307,7 +308,7 @@ func TestLoadBalanceWorksWithServiceRemoval(t *testing.T) { } endpoints := make([]api.Endpoints, 2) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: fooServiceP.Name, Namespace: fooServiceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: fooServiceP.Name, Namespace: fooServiceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}, {IP: "endpoint2"}, {IP: "endpoint3"}}, @@ -316,7 +317,7 @@ func TestLoadBalanceWorksWithServiceRemoval(t *testing.T) { }, } endpoints[1] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: barServiceP.Name, Namespace: barServiceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: barServiceP.Name, Namespace: barServiceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint4"}, {IP: "endpoint5"}, {IP: "endpoint6"}}, @@ -365,7 +366,7 @@ func TestStickyLoadBalanceWorksWithNewServiceCalledFirst(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, @@ -421,7 +422,7 @@ func TestStickyLoadBalanceWorksWithNewServiceCalledSecond(t *testing.T) { // Call OnEndpointsUpdate() before NewService() endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, @@ -483,7 +484,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -503,7 +504,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { client3Endpoint := shuffledEndpoints[2] endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -525,7 +526,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { expectEndpoint(t, loadBalancer, service, client3Endpoint, client3) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -557,7 +558,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -577,7 +578,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { // Then update the configuration with one fewer endpoints, make sure // we start in the beginning again endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -595,7 +596,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { expectEndpoint(t, loadBalancer, service, shuffledEndpoints[1], client2) // Clear endpoints - endpoints[0] = api.Endpoints{ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: nil} + endpoints[0] = api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: nil} loadBalancer.OnEndpointsUpdate(endpoints) endpoint, err = loadBalancer.NextEndpoint(service, nil, false) @@ -617,7 +618,7 @@ func TestStickyLoadBalanceWorksWithServiceRemoval(t *testing.T) { loadBalancer.NewService(fooService, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 2) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: fooService.Name, Namespace: fooService.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: fooService.Name, Namespace: fooService.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -628,7 +629,7 @@ func TestStickyLoadBalanceWorksWithServiceRemoval(t *testing.T) { barService := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "bar"}, Port: ""} loadBalancer.NewService(barService, api.ServiceAffinityClientIP, 0) endpoints[1] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: barService.Name, Namespace: barService.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: barService.Name, Namespace: barService.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -686,7 +687,7 @@ func TestStickyLoadBalanceWorksWithEndpointFails(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, diff --git a/pkg/quota/evaluator/core/persistent_volume_claims_test.go b/pkg/quota/evaluator/core/persistent_volume_claims_test.go index 6744fe344ba..2bf7ba5e5e5 100644 --- a/pkg/quota/evaluator/core/persistent_volume_claims_test.go +++ b/pkg/quota/evaluator/core/persistent_volume_claims_test.go @@ -29,7 +29,7 @@ import ( func testVolumeClaim(name string, namespace string, spec api.PersistentVolumeClaimSpec) *api.PersistentVolumeClaim { return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: spec, } } diff --git a/pkg/registry/apps/petset/storage/storage_test.go b/pkg/registry/apps/petset/storage/storage_test.go index d79f4475143..94b68b89c08 100644 --- a/pkg/registry/apps/petset/storage/storage_test.go +++ b/pkg/registry/apps/petset/storage/storage_test.go @@ -52,7 +52,7 @@ func createStatefulSet(storage *REST, ps apps.StatefulSet, t *testing.T) (apps.S func validNewStatefulSet() *apps.StatefulSet { return &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, Labels: map[string]string{"a": "b"}, @@ -60,7 +60,7 @@ func validNewStatefulSet() *apps.StatefulSet { Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "b"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ @@ -87,7 +87,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) ps := validNewStatefulSet() - ps.ObjectMeta = api.ObjectMeta{} + ps.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid ps, diff --git a/pkg/registry/apps/petset/strategy.go b/pkg/registry/apps/petset/strategy.go index ba332b60a7e..7155bbf8a0f 100644 --- a/pkg/registry/apps/petset/strategy.go +++ b/pkg/registry/apps/petset/strategy.go @@ -65,7 +65,7 @@ func (statefulSetStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, // Any changes to the spec increment the generation number, any changes to the // status should reflect the generation number of the corresponding object. - // See api.ObjectMeta description for more information on Generation. + // See metav1.ObjectMeta description for more information on Generation. if !reflect.DeepEqual(oldStatefulSet.Spec, newStatefulSet.Spec) { newStatefulSet.Generation = oldStatefulSet.Generation + 1 } diff --git a/pkg/registry/apps/petset/strategy_test.go b/pkg/registry/apps/petset/strategy_test.go index 31b4d457e8f..2d8b6104432 100644 --- a/pkg/registry/apps/petset/strategy_test.go +++ b/pkg/registry/apps/petset/strategy_test.go @@ -37,7 +37,7 @@ func TestStatefulSetStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -48,7 +48,7 @@ func TestStatefulSetStrategy(t *testing.T) { }, } ps := &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, @@ -67,7 +67,7 @@ func TestStatefulSetStrategy(t *testing.T) { // Just Spec.Replicas is allowed to change validPs := &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: ps.Name, Namespace: ps.Namespace, ResourceVersion: "1", Generation: 1}, + ObjectMeta: metav1.ObjectMeta{Name: ps.Name, Namespace: ps.Namespace, ResourceVersion: "1", Generation: 1}, Spec: apps.StatefulSetSpec{ Selector: ps.Spec.Selector, Template: validPodTemplate.Template, @@ -99,7 +99,7 @@ func TestStatefulSetStatusStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -110,7 +110,7 @@ func TestStatefulSetStatusStrategy(t *testing.T) { }, } oldPS := &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, Spec: apps.StatefulSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validSelector}, @@ -121,7 +121,7 @@ func TestStatefulSetStatusStrategy(t *testing.T) { }, } newPS := &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, Spec: apps.StatefulSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validSelector}, diff --git a/pkg/registry/autoscaling/horizontalpodautoscaler/storage/BUILD b/pkg/registry/autoscaling/horizontalpodautoscaler/storage/BUILD index a01a89f937b..06f446c8ef6 100644 --- a/pkg/registry/autoscaling/horizontalpodautoscaler/storage/BUILD +++ b/pkg/registry/autoscaling/horizontalpodautoscaler/storage/BUILD @@ -21,6 +21,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage_test.go b/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage_test.go index bb7cdd220d3..8f720aef437 100644 --- a/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage_test.go +++ b/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" // Ensure that autoscaling/v1 package is initialized. @@ -46,7 +47,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewHorizontalPodAutoscaler(name string) *autoscaling.HorizontalPodAutoscaler { cpu := int32(70) return &autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: api.NamespaceDefault, }, @@ -67,7 +68,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) autoscaler := validNewHorizontalPodAutoscaler("foo") - autoscaler.ObjectMeta = api.ObjectMeta{} + autoscaler.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid autoscaler, diff --git a/pkg/registry/batch/cronjob/storage/BUILD b/pkg/registry/batch/cronjob/storage/BUILD index 1ca2795ff80..3ce32529eac 100644 --- a/pkg/registry/batch/cronjob/storage/BUILD +++ b/pkg/registry/batch/cronjob/storage/BUILD @@ -22,6 +22,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/batch/cronjob/storage/storage_test.go b/pkg/registry/batch/cronjob/storage/storage_test.go index 12169c9e634..9c1b045f69e 100644 --- a/pkg/registry/batch/cronjob/storage/storage_test.go +++ b/pkg/registry/batch/cronjob/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -41,7 +42,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewCronJob() *batch.CronJob { return &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -74,7 +75,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) validCronJob := validNewCronJob() - validCronJob.ObjectMeta = api.ObjectMeta{} + validCronJob.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid validCronJob, diff --git a/pkg/registry/batch/cronjob/strategy_test.go b/pkg/registry/batch/cronjob/strategy_test.go index ddaa1455032..668daee862e 100644 --- a/pkg/registry/batch/cronjob/strategy_test.go +++ b/pkg/registry/batch/cronjob/strategy_test.go @@ -49,7 +49,7 @@ func TestCronJobStrategy(t *testing.T) { }, } scheduledJob := &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, }, @@ -74,7 +74,7 @@ func TestCronJobStrategy(t *testing.T) { } now := metav1.Now() updatedCronJob := &batch.CronJob{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, Spec: batch.CronJobSpec{ Schedule: "5 5 5 * ?", }, @@ -111,7 +111,7 @@ func TestCronJobStatusStrategy(t *testing.T) { } oldSchedule := "* * * * ?" oldCronJob := &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -128,7 +128,7 @@ func TestCronJobStatusStrategy(t *testing.T) { } now := metav1.Now() newCronJob := &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: api.NamespaceDefault, ResourceVersion: "9", diff --git a/pkg/registry/batch/job/storage/storage_test.go b/pkg/registry/batch/job/storage/storage_test.go index 104cf32c91d..03d96bccd77 100644 --- a/pkg/registry/batch/job/storage/storage_test.go +++ b/pkg/registry/batch/job/storage/storage_test.go @@ -46,7 +46,7 @@ func validNewJob() *batch.Job { completions := int32(1) parallelism := int32(1) return &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "default", }, @@ -58,7 +58,7 @@ func validNewJob() *batch.Job { }, ManualSelector: newBool(true), Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ @@ -83,7 +83,7 @@ func TestCreate(t *testing.T) { defer storage.Job.Store.DestroyFunc() test := registrytest.New(t, storage.Job.Store) validJob := validNewJob() - validJob.ObjectMeta = api.ObjectMeta{} + validJob.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid validJob, diff --git a/pkg/registry/batch/job/strategy_test.go b/pkg/registry/batch/job/strategy_test.go index aa1b4627ca9..651476730d8 100644 --- a/pkg/registry/batch/job/strategy_test.go +++ b/pkg/registry/batch/job/strategy_test.go @@ -48,7 +48,7 @@ func TestJobStrategy(t *testing.T) { MatchLabels: map[string]string{"a": "b"}, } validPodTemplateSpec := api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector.MatchLabels, }, Spec: api.PodSpec{ @@ -58,7 +58,7 @@ func TestJobStrategy(t *testing.T) { }, } job := &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, }, @@ -82,7 +82,7 @@ func TestJobStrategy(t *testing.T) { } parallelism := int32(10) updatedJob := &batch.Job{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, Spec: batch.JobSpec{ Parallelism: ¶llelism, }, @@ -115,7 +115,7 @@ func TestJobStrategyWithGeneration(t *testing.T) { }, } job := &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob2", Namespace: api.NamespaceDefault, UID: theUID, @@ -164,7 +164,7 @@ func TestJobStatusStrategy(t *testing.T) { MatchLabels: map[string]string{"a": "b"}, } validPodTemplateSpec := api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector.MatchLabels, }, Spec: api.PodSpec{ @@ -176,7 +176,7 @@ func TestJobStatusStrategy(t *testing.T) { oldParallelism := int32(10) newParallelism := int32(11) oldJob := &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, ResourceVersion: "10", @@ -191,7 +191,7 @@ func TestJobStatusStrategy(t *testing.T) { }, } newJob := &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", Namespace: api.NamespaceDefault, ResourceVersion: "9", diff --git a/pkg/registry/core/configmap/BUILD b/pkg/registry/core/configmap/BUILD index 08e33a1ef82..90bec9ec258 100644 --- a/pkg/registry/core/configmap/BUILD +++ b/pkg/registry/core/configmap/BUILD @@ -41,6 +41,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/request", ], ) diff --git a/pkg/registry/core/configmap/storage/BUILD b/pkg/registry/core/configmap/storage/BUILD index 19ef1865be7..990a2861354 100644 --- a/pkg/registry/core/configmap/storage/BUILD +++ b/pkg/registry/core/configmap/storage/BUILD @@ -19,6 +19,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/core/configmap/storage/storage_test.go b/pkg/registry/core/configmap/storage/storage_test.go index 9037b990d2f..2755f62671f 100644 --- a/pkg/registry/core/configmap/storage/storage_test.go +++ b/pkg/registry/core/configmap/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -41,7 +42,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewConfigMap() *api.ConfigMap { return &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "default", Labels: map[string]string{ @@ -62,20 +63,20 @@ func TestCreate(t *testing.T) { test := registrytest.New(t, storage.Store) validConfigMap := validNewConfigMap() - validConfigMap.ObjectMeta = api.ObjectMeta{ + validConfigMap.ObjectMeta = metav1.ObjectMeta{ GenerateName: "foo-", } test.TestCreate( validConfigMap, &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{Name: "badName"}, + ObjectMeta: metav1.ObjectMeta{Name: "badName"}, Data: map[string]string{ "key": "value", }, }, &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{Name: "name-2"}, + ObjectMeta: metav1.ObjectMeta{Name: "name-2"}, Data: map[string]string{ "..dotfile": "do: nothing\n", }, diff --git a/pkg/registry/core/configmap/strategy_test.go b/pkg/registry/core/configmap/strategy_test.go index 79b816e21f3..9e5934b0d3a 100644 --- a/pkg/registry/core/configmap/strategy_test.go +++ b/pkg/registry/core/configmap/strategy_test.go @@ -19,6 +19,7 @@ package configmap import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" genericapirequest "k8s.io/apiserver/pkg/request" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" @@ -34,7 +35,7 @@ func TestConfigMapStrategy(t *testing.T) { } cfg := &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-config-data", Namespace: api.NamespaceDefault, }, @@ -51,7 +52,7 @@ func TestConfigMapStrategy(t *testing.T) { } newCfg := &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-config-data-2", Namespace: api.NamespaceDefault, ResourceVersion: "4", diff --git a/pkg/registry/core/controller/BUILD b/pkg/registry/core/controller/BUILD index 2a54256e9d8..bf3c0e70bbe 100644 --- a/pkg/registry/core/controller/BUILD +++ b/pkg/registry/core/controller/BUILD @@ -41,6 +41,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/request", ], ) diff --git a/pkg/registry/core/controller/storage/storage.go b/pkg/registry/core/controller/storage/storage.go index 6a429231466..b3b69a1cd22 100644 --- a/pkg/registry/core/controller/storage/storage.go +++ b/pkg/registry/core/controller/storage/storage.go @@ -158,7 +158,7 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r // scaleFromRC returns a scale subresource for a replication controller. func scaleFromRC(rc *api.ReplicationController) *autoscaling.Scale { return &autoscaling.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rc.Name, Namespace: rc.Namespace, UID: rc.UID, diff --git a/pkg/registry/core/controller/storage/storage_test.go b/pkg/registry/core/controller/storage/storage_test.go index ddc4d31fd9e..eedacce53ea 100644 --- a/pkg/registry/core/controller/storage/storage_test.go +++ b/pkg/registry/core/controller/storage/storage_test.go @@ -64,14 +64,14 @@ func createController(storage *REST, rc api.ReplicationController, t *testing.T) func validNewController() *api.ReplicationController { return &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, Spec: api.ReplicationControllerSpec{ Selector: map[string]string{"a": "b"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ @@ -98,7 +98,7 @@ func TestCreate(t *testing.T) { defer storage.Controller.Store.DestroyFunc() test := registrytest.New(t, storage.Controller.Store) controller := validNewController() - controller.ObjectMeta = api.ObjectMeta{} + controller.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid controller, @@ -263,7 +263,7 @@ func TestScaleGet(t *testing.T) { } want := &autoscaling.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, UID: rc.UID, @@ -300,7 +300,7 @@ func TestScaleUpdate(t *testing.T) { } replicas := int32(12) update := autoscaling.Scale{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: autoscaling.ScaleSpec{ Replicas: replicas, }, diff --git a/pkg/registry/core/controller/strategy_test.go b/pkg/registry/core/controller/strategy_test.go index 7ce0c5248c2..ec0ebc48e7b 100644 --- a/pkg/registry/core/controller/strategy_test.go +++ b/pkg/registry/core/controller/strategy_test.go @@ -19,6 +19,7 @@ package controller import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" genericapirequest "k8s.io/apiserver/pkg/request" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" @@ -36,7 +37,7 @@ func TestControllerStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -47,7 +48,7 @@ func TestControllerStrategy(t *testing.T) { }, } rc := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, @@ -71,7 +72,7 @@ func TestControllerStrategy(t *testing.T) { } invalidRc := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, } Strategy.PrepareForUpdate(ctx, invalidRc, rc) errs = Strategy.ValidateUpdate(ctx, invalidRc, rc) @@ -94,7 +95,7 @@ func TestControllerStatusStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -105,7 +106,7 @@ func TestControllerStatusStrategy(t *testing.T) { }, } oldController := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, Spec: api.ReplicationControllerSpec{ Replicas: 3, Selector: validSelector, @@ -117,7 +118,7 @@ func TestControllerStatusStrategy(t *testing.T) { }, } newController := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, Spec: api.ReplicationControllerSpec{ Replicas: 1, Selector: validSelector, diff --git a/pkg/registry/core/endpoint/storage/BUILD b/pkg/registry/core/endpoint/storage/BUILD index f6121fae9a0..6cb7adae02e 100644 --- a/pkg/registry/core/endpoint/storage/BUILD +++ b/pkg/registry/core/endpoint/storage/BUILD @@ -19,6 +19,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/core/endpoint/storage/storage_test.go b/pkg/registry/core/endpoint/storage/storage_test.go index 433b3afaf08..8a3ce3f08ec 100644 --- a/pkg/registry/core/endpoint/storage/storage_test.go +++ b/pkg/registry/core/endpoint/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -41,7 +42,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewEndpoints() *api.Endpoints { return &api.Endpoints{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -68,13 +69,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) endpoints := validNewEndpoints() - endpoints.ObjectMeta = api.ObjectMeta{} + endpoints.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid endpoints, // invalid &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "_-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "_-a123-a_"}, }, ) } diff --git a/pkg/registry/core/event/BUILD b/pkg/registry/core/event/BUILD index a515a20eac4..08723d2847e 100644 --- a/pkg/registry/core/event/BUILD +++ b/pkg/registry/core/event/BUILD @@ -38,6 +38,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", "//pkg/fields:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", ], ) diff --git a/pkg/registry/core/event/storage/BUILD b/pkg/registry/core/event/storage/BUILD index bf7eeb8dc37..d09e4eaeae8 100644 --- a/pkg/registry/core/event/storage/BUILD +++ b/pkg/registry/core/event/storage/BUILD @@ -18,6 +18,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/pkg/registry/core/event/storage/storage_test.go b/pkg/registry/core/event/storage/storage_test.go index 380fba6743d..1abeb2412d5 100644 --- a/pkg/registry/core/event/storage/storage_test.go +++ b/pkg/registry/core/event/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/registry/generic" @@ -41,7 +42,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewEvent(namespace string) *api.Event { return &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: namespace, }, @@ -59,7 +60,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) event := validNewEvent(test.TestNamespace()) - event.ObjectMeta = api.ObjectMeta{} + event.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid event, diff --git a/pkg/registry/core/event/strategy_test.go b/pkg/registry/core/event/strategy_test.go index 8bc4843e105..f95447c6d06 100644 --- a/pkg/registry/core/event/strategy_test.go +++ b/pkg/registry/core/event/strategy_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" @@ -28,7 +29,7 @@ import ( func testEvent(name string) *api.Event { return &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: "default", }, @@ -41,7 +42,7 @@ func testEvent(name string) *api.Event { func TestGetAttrs(t *testing.T) { eventA := &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "f0118", Namespace: "default", }, diff --git a/pkg/registry/core/limitrange/storage/BUILD b/pkg/registry/core/limitrange/storage/BUILD index c1ea5f7832e..af39ad17b15 100644 --- a/pkg/registry/core/limitrange/storage/BUILD +++ b/pkg/registry/core/limitrange/storage/BUILD @@ -20,6 +20,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/core/limitrange/storage/storage_test.go b/pkg/registry/core/limitrange/storage/storage_test.go index 78fef9a4170..d3a4375f4bc 100644 --- a/pkg/registry/core/limitrange/storage/storage_test.go +++ b/pkg/registry/core/limitrange/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -42,7 +43,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewLimitRange() *api.LimitRange { return &api.LimitRange{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -70,13 +71,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).GeneratesName() validLimitRange := validNewLimitRange() - validLimitRange.ObjectMeta = api.ObjectMeta{} + validLimitRange.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid validLimitRange, // invalid &api.LimitRange{ - ObjectMeta: api.ObjectMeta{Name: "_-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "_-a123-a_"}, }, ) } diff --git a/pkg/registry/core/namespace/storage/storage_test.go b/pkg/registry/core/namespace/storage/storage_test.go index c8be34506f5..f5ff06d96d7 100644 --- a/pkg/registry/core/namespace/storage/storage_test.go +++ b/pkg/registry/core/namespace/storage/storage_test.go @@ -38,7 +38,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewNamespace() *api.Namespace { return &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, } @@ -50,13 +50,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() namespace := validNewNamespace() - namespace.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + namespace.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( // valid namespace, // invalid &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "bad value"}, + ObjectMeta: metav1.ObjectMeta{Name: "bad value"}, }, ) } @@ -145,7 +145,7 @@ func TestDeleteNamespaceWithIncompleteFinalizers(t *testing.T) { ctx := genericapirequest.NewContext() now := metav1.Now() namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now, }, @@ -170,7 +170,7 @@ func TestDeleteNamespaceWithCompleteFinalizers(t *testing.T) { ctx := genericapirequest.NewContext() now := metav1.Now() namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now, }, diff --git a/pkg/registry/core/namespace/strategy_test.go b/pkg/registry/core/namespace/strategy_test.go index f3e481e2be5..e47565a7242 100644 --- a/pkg/registry/core/namespace/strategy_test.go +++ b/pkg/registry/core/namespace/strategy_test.go @@ -34,7 +34,7 @@ func TestNamespaceStrategy(t *testing.T) { t.Errorf("Namespaces should not allow create on update") } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, Status: api.NamespaceStatus{Phase: api.NamespaceTerminating}, } Strategy.PrepareForCreate(ctx, namespace) @@ -49,7 +49,7 @@ func TestNamespaceStrategy(t *testing.T) { t.Errorf("Unexpected error validating %v", errs) } invalidNamespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, } // ensure we copy spec.finalizers from old to new Strategy.PrepareForUpdate(ctx, invalidNamespace, namespace) @@ -75,12 +75,12 @@ func TestNamespaceStatusStrategy(t *testing.T) { } now := metav1.Now() oldNamespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10", DeletionTimestamp: &now}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10", DeletionTimestamp: &now}, Spec: api.NamespaceSpec{Finalizers: []api.FinalizerName{"kubernetes"}}, Status: api.NamespaceStatus{Phase: api.NamespaceActive}, } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "9", DeletionTimestamp: &now}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "9", DeletionTimestamp: &now}, Status: api.NamespaceStatus{Phase: api.NamespaceTerminating}, } StatusStrategy.PrepareForUpdate(ctx, namespace, oldNamespace) @@ -108,12 +108,12 @@ func TestNamespaceFinalizeStrategy(t *testing.T) { t.Errorf("Namespaces should not allow create on update") } oldNamespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, Spec: api.NamespaceSpec{Finalizers: []api.FinalizerName{"kubernetes", "example.com/org"}}, Status: api.NamespaceStatus{Phase: api.NamespaceActive}, } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "9"}, Spec: api.NamespaceSpec{Finalizers: []api.FinalizerName{"example.com/foo"}}, Status: api.NamespaceStatus{Phase: api.NamespaceTerminating}, } diff --git a/pkg/registry/core/node/storage/BUILD b/pkg/registry/core/node/storage/BUILD index f2017f7eaaa..f5685eafb50 100644 --- a/pkg/registry/core/node/storage/BUILD +++ b/pkg/registry/core/node/storage/BUILD @@ -21,6 +21,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/core/node/storage/storage_test.go b/pkg/registry/core/node/storage/storage_test.go index 498742420be..7a88b61b72a 100644 --- a/pkg/registry/core/node/storage/storage_test.go +++ b/pkg/registry/core/node/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -47,7 +48,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewNode() *api.Node { return &api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "name": "foo", @@ -71,13 +72,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() node := validNewNode() - node.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + node.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( // valid node, // invalid &api.Node{ - ObjectMeta: api.ObjectMeta{Name: "_-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "_-a123-a_"}, }, ) } diff --git a/pkg/registry/core/persistentvolume/storage/storage_test.go b/pkg/registry/core/persistentvolume/storage/storage_test.go index 44d5b23388d..7ff7709e8e0 100644 --- a/pkg/registry/core/persistentvolume/storage/storage_test.go +++ b/pkg/registry/core/persistentvolume/storage/storage_test.go @@ -47,7 +47,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewPersistentVolume(name string) *api.PersistentVolume { pv := &api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: api.PersistentVolumeSpec{ @@ -80,13 +80,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() pv := validNewPersistentVolume("foo") - pv.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + pv.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( // valid pv, // invalid &api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{Name: "*BadName!"}, + ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, }, ) } @@ -172,7 +172,7 @@ func TestUpdateStatus(t *testing.T) { } pvIn := &api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.PersistentVolumeStatus{ diff --git a/pkg/registry/core/persistentvolumeclaim/storage/storage_test.go b/pkg/registry/core/persistentvolumeclaim/storage/storage_test.go index 4091542f5c3..3b79dc42d77 100644 --- a/pkg/registry/core/persistentvolumeclaim/storage/storage_test.go +++ b/pkg/registry/core/persistentvolumeclaim/storage/storage_test.go @@ -47,7 +47,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewPersistentVolumeClaim(name, ns string) *api.PersistentVolumeClaim { pv := &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -72,13 +72,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) pv := validNewPersistentVolumeClaim("foo", api.NamespaceDefault) - pv.ObjectMeta = api.ObjectMeta{} + pv.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid pv, // invalid &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: "*BadName!"}, + ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, }, ) } @@ -160,7 +160,7 @@ func TestUpdateStatus(t *testing.T) { err := storage.Storage.Create(ctx, key, pvcStart, nil, 0) pvc := &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, diff --git a/pkg/registry/core/pod/storage/storage_test.go b/pkg/registry/core/pod/storage/storage_test.go index 0700a0bfeae..8e68929f21b 100644 --- a/pkg/registry/core/pod/storage/storage_test.go +++ b/pkg/registry/core/pod/storage/storage_test.go @@ -53,7 +53,7 @@ func newStorage(t *testing.T) (*REST, *BindingREST, *StatusREST, *etcdtesting.Et func validNewPod() *api.Pod { grace := int64(30) return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -91,7 +91,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) pod := validNewPod() - pod.ObjectMeta = api.ObjectMeta{} + pod.ObjectMeta = metav1.ObjectMeta{} // Make an invalid pod with an an incorrect label. invalidPod := validNewPod() invalidPod.Namespace = test.TestNamespace() @@ -243,7 +243,7 @@ func TestResourceLocation(t *testing.T) { }{ { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Status: api.PodStatus{PodIP: expectedIP}, }, query: "foo", @@ -251,7 +251,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Status: api.PodStatus{PodIP: expectedIP}, }, query: "foo:12345", @@ -259,7 +259,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr"}, @@ -272,7 +272,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr", Ports: []api.ContainerPort{{ContainerPort: 9376}}}, @@ -285,7 +285,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr", Ports: []api.ContainerPort{{ContainerPort: 9376}}}, @@ -298,7 +298,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr1"}, @@ -312,7 +312,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr1", Ports: []api.ContainerPort{{ContainerPort: 9376}}}, @@ -405,7 +405,7 @@ func TestEtcdCreate(t *testing.T) { // Suddenly, a wild scheduler appears: _, err = bindingStorage.Create(ctx, &api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine"}, }) if err != nil { @@ -431,7 +431,7 @@ func TestEtcdCreateBindingNoPod(t *testing.T) { // - Schedule (scheduler) // - Delete (apiserver) _, err := bindingStorage.Create(ctx, &api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine"}, }) if err == nil { @@ -475,7 +475,7 @@ func TestEtcdCreateWithContainersNotFound(t *testing.T) { // Suddenly, a wild scheduler appears: _, err = bindingStorage.Create(ctx, &api.Binding{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", Annotations: map[string]string{"label1": "value1"}, @@ -510,7 +510,7 @@ func TestEtcdCreateWithConflict(t *testing.T) { // Suddenly, a wild scheduler appears: binding := api.Binding{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", Annotations: map[string]string{"label1": "value1"}, @@ -540,7 +540,7 @@ func TestEtcdCreateWithExistingContainers(t *testing.T) { // Suddenly, a wild scheduler appears: _, err = bindingStorage.Create(ctx, &api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine"}, }) if err != nil { @@ -562,28 +562,28 @@ func TestEtcdCreateBinding(t *testing.T) { }{ "noName": { binding: api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{}, }, errOK: func(err error) bool { return err != nil }, }, "badKind": { binding: api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine1", Kind: "unknown"}, }, errOK: func(err error) bool { return err != nil }, }, "emptyKind": { binding: api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine2"}, }, errOK: func(err error) bool { return err == nil }, }, "kindNode": { binding: api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine3", Kind: "Node"}, }, errOK: func(err error) bool { return err == nil }, @@ -645,7 +645,7 @@ func TestEtcdUpdateScheduled(t *testing.T) { key, _ := storage.KeyFunc(ctx, "foo") err := storage.Storage.Create(ctx, key, &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -667,7 +667,7 @@ func TestEtcdUpdateScheduled(t *testing.T) { grace := int64(30) podIn := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "foo": "bar", @@ -714,7 +714,7 @@ func TestEtcdUpdateStatus(t *testing.T) { key, _ := storage.KeyFunc(ctx, "foo") podStart := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -735,7 +735,7 @@ func TestEtcdUpdateStatus(t *testing.T) { } podIn := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "foo": "bar", diff --git a/pkg/registry/core/pod/strategy_test.go b/pkg/registry/core/pod/strategy_test.go index 773cc5a615d..c11962cd746 100644 --- a/pkg/registry/core/pod/strategy_test.go +++ b/pkg/registry/core/pod/strategy_test.go @@ -124,7 +124,7 @@ func newContainer(name string, requests api.ResourceList, limits api.ResourceLis func newPod(name string, containers []api.Container) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: api.PodSpec{ diff --git a/pkg/registry/core/podtemplate/storage/BUILD b/pkg/registry/core/podtemplate/storage/BUILD index 41834551559..72bcd490b75 100644 --- a/pkg/registry/core/podtemplate/storage/BUILD +++ b/pkg/registry/core/podtemplate/storage/BUILD @@ -19,6 +19,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/core/podtemplate/storage/storage_test.go b/pkg/registry/core/podtemplate/storage/storage_test.go index c1b8ba4f008..34b21ed3394 100644 --- a/pkg/registry/core/podtemplate/storage/storage_test.go +++ b/pkg/registry/core/podtemplate/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -41,12 +42,12 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewPodTemplate(name string) *api.PodTemplate { return &api.PodTemplate{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: api.NamespaceDefault, }, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"test": "foo"}, }, Spec: api.PodSpec{ @@ -72,7 +73,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) pod := validNewPodTemplate("foo") - pod.ObjectMeta = api.ObjectMeta{} + pod.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid pod, diff --git a/pkg/registry/core/resourcequota/BUILD b/pkg/registry/core/resourcequota/BUILD index 6bc239aee84..66de72918e3 100644 --- a/pkg/registry/core/resourcequota/BUILD +++ b/pkg/registry/core/resourcequota/BUILD @@ -38,6 +38,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/api/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/request", ], ) diff --git a/pkg/registry/core/resourcequota/storage/storage_test.go b/pkg/registry/core/resourcequota/storage/storage_test.go index b444685dcb5..a73fd95dd6c 100644 --- a/pkg/registry/core/resourcequota/storage/storage_test.go +++ b/pkg/registry/core/resourcequota/storage/storage_test.go @@ -46,7 +46,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewResourceQuota() *api.ResourceQuota { return &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -69,13 +69,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) resourcequota := validNewResourceQuota() - resourcequota.ObjectMeta = api.ObjectMeta{} + resourcequota.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid resourcequota, // invalid &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "_-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "_-a123-a_"}, }, ) } @@ -166,7 +166,7 @@ func TestUpdateStatus(t *testing.T) { } resourcequotaIn := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, diff --git a/pkg/registry/core/resourcequota/strategy_test.go b/pkg/registry/core/resourcequota/strategy_test.go index c7fc10cd1fd..d9ccf22203b 100644 --- a/pkg/registry/core/resourcequota/strategy_test.go +++ b/pkg/registry/core/resourcequota/strategy_test.go @@ -19,6 +19,7 @@ package resourcequota import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" genericapirequest "k8s.io/apiserver/pkg/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" @@ -33,7 +34,7 @@ func TestResourceQuotaStrategy(t *testing.T) { t.Errorf("ResourceQuota should not allow create on update") } resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Status: api.ResourceQuotaStatus{ Used: api.ResourceList{ api.ResourceCPU: resource.MustParse("1"), diff --git a/pkg/registry/core/secret/BUILD b/pkg/registry/core/secret/BUILD index 8c1bbb9ea13..4358b096ddb 100644 --- a/pkg/registry/core/secret/BUILD +++ b/pkg/registry/core/secret/BUILD @@ -42,6 +42,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/request", ], diff --git a/pkg/registry/core/secret/storage/BUILD b/pkg/registry/core/secret/storage/BUILD index b0c184a4b44..6aae383d509 100644 --- a/pkg/registry/core/secret/storage/BUILD +++ b/pkg/registry/core/secret/storage/BUILD @@ -19,6 +19,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/core/secret/storage/storage_test.go b/pkg/registry/core/secret/storage/storage_test.go index 811d9822411..09c7b39811e 100644 --- a/pkg/registry/core/secret/storage/storage_test.go +++ b/pkg/registry/core/secret/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -41,7 +42,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewSecret(name string) *api.Secret { return &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: api.NamespaceDefault, }, @@ -57,18 +58,18 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) secret := validNewSecret("foo") - secret.ObjectMeta = api.ObjectMeta{GenerateName: "foo-"} + secret.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo-"} test.TestCreate( // valid secret, // invalid &api.Secret{}, &api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "name"}, + ObjectMeta: metav1.ObjectMeta{Name: "name"}, Data: map[string][]byte{"name with spaces": []byte("")}, }, &api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "name"}, + ObjectMeta: metav1.ObjectMeta{Name: "name"}, Data: map[string][]byte{"~.dotfile": []byte("")}, }, ) diff --git a/pkg/registry/core/secret/strategy_test.go b/pkg/registry/core/secret/strategy_test.go index 274b2aade70..ec4e95ab872 100644 --- a/pkg/registry/core/secret/strategy_test.go +++ b/pkg/registry/core/secret/strategy_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" genericapirequest "k8s.io/apiserver/pkg/request" "k8s.io/kubernetes/pkg/api" @@ -35,7 +36,7 @@ func TestExportSecret(t *testing.T) { }{ { objIn: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -44,7 +45,7 @@ func TestExportSecret(t *testing.T) { }, }, objOut: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -56,7 +57,7 @@ func TestExportSecret(t *testing.T) { }, { objIn: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -66,7 +67,7 @@ func TestExportSecret(t *testing.T) { }, { objIn: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", Annotations: map[string]string{ diff --git a/pkg/registry/core/service/ipallocator/controller/BUILD b/pkg/registry/core/service/ipallocator/controller/BUILD index a377daf8174..54474aa9889 100644 --- a/pkg/registry/core/service/ipallocator/controller/BUILD +++ b/pkg/registry/core/service/ipallocator/controller/BUILD @@ -33,6 +33,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/registry/core/service/ipallocator/controller/repair_test.go b/pkg/registry/core/service/ipallocator/controller/repair_test.go index 7aa3670de2a..c784f04cec9 100644 --- a/pkg/registry/core/service/ipallocator/controller/repair_test.go +++ b/pkg/registry/core/service/ipallocator/controller/repair_test.go @@ -22,6 +22,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" @@ -87,7 +88,7 @@ func TestRepairLeak(t *testing.T) { fakeClient := fake.NewSimpleClientset() ipregistry := &mockRangeRegistry{ item: &api.RangeAllocation{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", }, Range: dst.Range, @@ -134,34 +135,34 @@ func TestRepairWithExisting(t *testing.T) { fakeClient := fake.NewSimpleClientset( &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "one", Name: "one"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "one", Name: "one"}, Spec: api.ServiceSpec{ClusterIP: "192.168.1.1"}, }, &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "two", Name: "two"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "two", Name: "two"}, Spec: api.ServiceSpec{ClusterIP: "192.168.1.100"}, }, &api.Service{ // outside CIDR, will be dropped - ObjectMeta: api.ObjectMeta{Namespace: "three", Name: "three"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "three", Name: "three"}, Spec: api.ServiceSpec{ClusterIP: "192.168.0.1"}, }, &api.Service{ // empty, ignored - ObjectMeta: api.ObjectMeta{Namespace: "four", Name: "four"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "four", Name: "four"}, Spec: api.ServiceSpec{ClusterIP: ""}, }, &api.Service{ // duplicate, dropped - ObjectMeta: api.ObjectMeta{Namespace: "five", Name: "five"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "five", Name: "five"}, Spec: api.ServiceSpec{ClusterIP: "192.168.1.1"}, }, &api.Service{ // headless - ObjectMeta: api.ObjectMeta{Namespace: "six", Name: "six"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "six", Name: "six"}, Spec: api.ServiceSpec{ClusterIP: "None"}, }, ) ipregistry := &mockRangeRegistry{ item: &api.RangeAllocation{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", }, Range: dst.Range, diff --git a/pkg/registry/core/service/portallocator/controller/BUILD b/pkg/registry/core/service/portallocator/controller/BUILD index 9e03770f150..028bb5f0daa 100644 --- a/pkg/registry/core/service/portallocator/controller/BUILD +++ b/pkg/registry/core/service/portallocator/controller/BUILD @@ -35,6 +35,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/registry/core/service/portallocator:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/net", ], ) diff --git a/pkg/registry/core/service/portallocator/controller/repair_test.go b/pkg/registry/core/service/portallocator/controller/repair_test.go index 7c56de932b0..beb5a4cfd32 100644 --- a/pkg/registry/core/service/portallocator/controller/repair_test.go +++ b/pkg/registry/core/service/portallocator/controller/repair_test.go @@ -21,6 +21,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/net" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" @@ -87,7 +88,7 @@ func TestRepairLeak(t *testing.T) { fakeClient := fake.NewSimpleClientset() registry := &mockRangeRegistry{ item: &api.RangeAllocation{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", }, Range: dst.Range, @@ -134,31 +135,31 @@ func TestRepairWithExisting(t *testing.T) { fakeClient := fake.NewSimpleClientset( &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "one", Name: "one"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "one", Name: "one"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{NodePort: 111}}, }, }, &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "two", Name: "two"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "two", Name: "two"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{NodePort: 122}, {NodePort: 133}}, }, }, &api.Service{ // outside range, will be dropped - ObjectMeta: api.ObjectMeta{Namespace: "three", Name: "three"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "three", Name: "three"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{NodePort: 201}}, }, }, &api.Service{ // empty, ignored - ObjectMeta: api.ObjectMeta{Namespace: "four", Name: "four"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "four", Name: "four"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{}}, }, }, &api.Service{ // duplicate, dropped - ObjectMeta: api.ObjectMeta{Namespace: "five", Name: "five"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "five", Name: "five"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{NodePort: 111}}, }, @@ -167,7 +168,7 @@ func TestRepairWithExisting(t *testing.T) { registry := &mockRangeRegistry{ item: &api.RangeAllocation{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", }, Range: dst.Range, diff --git a/pkg/registry/core/service/rest_test.go b/pkg/registry/core/service/rest_test.go index 271404b427f..be3b1717855 100644 --- a/pkg/registry/core/service/rest_test.go +++ b/pkg/registry/core/service/rest_test.go @@ -79,7 +79,7 @@ func TestServiceRegistryCreate(t *testing.T) { storage, registry := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -127,7 +127,7 @@ func TestServiceRegistryCreateMultiNodePortsService(t *testing.T) { }{ { svc: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -155,7 +155,7 @@ func TestServiceRegistryCreateMultiNodePortsService(t *testing.T) { }, { svc: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -182,7 +182,7 @@ func TestServiceRegistryCreateMultiNodePortsService(t *testing.T) { }, { svc: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo3"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo3"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -241,7 +241,7 @@ func TestServiceStorageValidatesCreate(t *testing.T) { storage, _ := NewTestREST(t, nil) failureCases := map[string]api.Service{ "empty ID": { - ObjectMeta: api.ObjectMeta{Name: ""}, + ObjectMeta: metav1.ObjectMeta{Name: ""}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -254,7 +254,7 @@ func TestServiceStorageValidatesCreate(t *testing.T) { }, }, "empty port": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -265,7 +265,7 @@ func TestServiceStorageValidatesCreate(t *testing.T) { }, }, "missing targetPort": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -293,7 +293,7 @@ func TestServiceRegistryUpdate(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) svc, err := registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1", Namespace: api.NamespaceDefault}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz1"}, Ports: []api.ServicePort{{ @@ -308,7 +308,7 @@ func TestServiceRegistryUpdate(t *testing.T) { t.Fatalf("Expected no error: %v", err) } updated_svc, created, err := storage.Update(ctx, "foo", rest.DefaultUpdatedObjectInfo(&api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", ResourceVersion: svc.ResourceVersion}, Spec: api.ServiceSpec{ @@ -344,7 +344,7 @@ func TestServiceStorageValidatesUpdate(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, Ports: []api.ServicePort{{ @@ -355,7 +355,7 @@ func TestServiceStorageValidatesUpdate(t *testing.T) { }) failureCases := map[string]api.Service{ "empty ID": { - ObjectMeta: api.ObjectMeta{Name: ""}, + ObjectMeta: metav1.ObjectMeta{Name: ""}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -368,7 +368,7 @@ func TestServiceStorageValidatesUpdate(t *testing.T) { }, }, "invalid selector": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"ThisSelectorFailsValidation": "ok"}, SessionAffinity: api.ServiceAffinityNone, @@ -396,7 +396,7 @@ func TestServiceRegistryExternalService(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -425,7 +425,7 @@ func TestServiceRegistryDelete(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -447,7 +447,7 @@ func TestServiceRegistryDeleteExternal(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -471,7 +471,7 @@ func TestServiceRegistryUpdateExternalService(t *testing.T) { // Create non-external load balancer. svc1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -508,7 +508,7 @@ func TestServiceRegistryUpdateMultiPortExternalService(t *testing.T) { // Create external load balancer. svc1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -542,7 +542,7 @@ func TestServiceRegistryGet(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, }, @@ -558,7 +558,7 @@ func TestServiceRegistryResourceLocation(t *testing.T) { endpoints := &api.EndpointsList{ Items: []api.Endpoints{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -568,7 +568,7 @@ func TestServiceRegistryResourceLocation(t *testing.T) { }}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -587,7 +587,7 @@ func TestServiceRegistryResourceLocation(t *testing.T) { } storage, registry := NewTestREST(t, endpoints) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, Ports: []api.ServicePort{ @@ -678,13 +678,13 @@ func TestServiceRegistryList(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, }, }) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo2", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2", Namespace: api.NamespaceDefault}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar2": "baz2"}, }, @@ -710,7 +710,7 @@ func TestServiceRegistryIPAllocation(t *testing.T) { storage, _ := NewTestREST(t, nil) svc1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -733,7 +733,7 @@ func TestServiceRegistryIPAllocation(t *testing.T) { } svc2 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -764,7 +764,7 @@ func TestServiceRegistryIPAllocation(t *testing.T) { } svc3 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "quux"}, + ObjectMeta: metav1.ObjectMeta{Name: "quux"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: testIP, @@ -792,7 +792,7 @@ func TestServiceRegistryIPReallocation(t *testing.T) { storage, _ := NewTestREST(t, nil) svc1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -820,7 +820,7 @@ func TestServiceRegistryIPReallocation(t *testing.T) { } svc2 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -847,7 +847,7 @@ func TestServiceRegistryIPUpdate(t *testing.T) { storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -901,7 +901,7 @@ func TestServiceRegistryIPLoadBalancer(t *testing.T) { storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -934,7 +934,7 @@ func TestServiceRegistryIPLoadBalancer(t *testing.T) { func TestUpdateServiceWithConflictingNamespace(t *testing.T) { storage, _ := NewTestREST(t, nil) service := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "test", Namespace: "not-default"}, + ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: "not-default"}, } ctx := genericapirequest.NewDefaultContext() @@ -955,7 +955,7 @@ func TestServiceRegistryExternalTrafficAnnotationHealthCheckNodePortAllocation(t ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficLocal, }, @@ -992,7 +992,7 @@ func TestServiceRegistryExternalTrafficBetaAnnotationHealthCheckNodePortUserAllo ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficLocal, service.BetaAnnotationHealthCheckNodePort: "30200", @@ -1031,7 +1031,7 @@ func TestServiceRegistryExternalTrafficAnnotationNegative(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficLocal, service.BetaAnnotationHealthCheckNodePort: "-1", @@ -1060,7 +1060,7 @@ func TestServiceRegistryExternalTrafficAnnotationGlobal(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficGlobal, }, @@ -1097,7 +1097,7 @@ func TestServiceRegistryExternalTrafficAnnotationClusterIP(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficGlobal, }, diff --git a/pkg/registry/core/service/storage/BUILD b/pkg/registry/core/service/storage/BUILD index 12e69703985..af36b1c4136 100644 --- a/pkg/registry/core/service/storage/BUILD +++ b/pkg/registry/core/service/storage/BUILD @@ -20,6 +20,7 @@ go_test( "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/util/intstr:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/core/service/storage/storage_test.go b/pkg/registry/core/service/storage/storage_test.go index a78c8e239e5..79e99562f0e 100644 --- a/pkg/registry/core/service/storage/storage_test.go +++ b/pkg/registry/core/service/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -43,7 +44,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validService() *api.Service { return &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, @@ -67,7 +68,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) validService := validService() - validService.ObjectMeta = api.ObjectMeta{} + validService.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid validService, diff --git a/pkg/registry/core/service/strategy_test.go b/pkg/registry/core/service/strategy_test.go index d89cdb69e3c..b6b04b37dd7 100644 --- a/pkg/registry/core/service/strategy_test.go +++ b/pkg/registry/core/service/strategy_test.go @@ -21,6 +21,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" genericapirequest "k8s.io/apiserver/pkg/request" "k8s.io/kubernetes/pkg/api" @@ -38,7 +39,7 @@ func TestExportService(t *testing.T) { }{ { objIn: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -51,7 +52,7 @@ func TestExportService(t *testing.T) { }, }, objOut: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -60,7 +61,7 @@ func TestExportService(t *testing.T) { }, { objIn: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -76,7 +77,7 @@ func TestExportService(t *testing.T) { }, }, objOut: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -121,14 +122,14 @@ func TestCheckGeneratedNameError(t *testing.T) { } expect = errors.NewAlreadyExists(api.Resource("foos"), "bar") - if err := rest.CheckGeneratedNameError(Strategy, expect, &api.Pod{ObjectMeta: api.ObjectMeta{GenerateName: "foo"}}); err == nil || !errors.IsServerTimeout(err) { + if err := rest.CheckGeneratedNameError(Strategy, expect, &api.Pod{ObjectMeta: metav1.ObjectMeta{GenerateName: "foo"}}); err == nil || !errors.IsServerTimeout(err) { t.Errorf("expected try again later error: %v", err) } } func makeValidService() api.Service { return api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid", Namespace: "default", Labels: map[string]string{}, diff --git a/pkg/registry/core/serviceaccount/storage/BUILD b/pkg/registry/core/serviceaccount/storage/BUILD index 4ae34743e67..3c40d1d2343 100644 --- a/pkg/registry/core/serviceaccount/storage/BUILD +++ b/pkg/registry/core/serviceaccount/storage/BUILD @@ -19,6 +19,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/core/serviceaccount/storage/storage_test.go b/pkg/registry/core/serviceaccount/storage/storage_test.go index 70cf497bfb1..d652ca96f89 100644 --- a/pkg/registry/core/serviceaccount/storage/storage_test.go +++ b/pkg/registry/core/serviceaccount/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -41,7 +42,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewServiceAccount(name string) *api.ServiceAccount { return &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: api.NamespaceDefault, }, @@ -55,14 +56,14 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) serviceAccount := validNewServiceAccount("foo") - serviceAccount.ObjectMeta = api.ObjectMeta{GenerateName: "foo-"} + serviceAccount.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo-"} test.TestCreate( // valid serviceAccount, // invalid &api.ServiceAccount{}, &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{Name: "name with spaces"}, + ObjectMeta: metav1.ObjectMeta{Name: "name with spaces"}, }, ) } diff --git a/pkg/registry/extensions/controller/storage/storage.go b/pkg/registry/extensions/controller/storage/storage.go index 98da62a78b5..ae480bde2a3 100644 --- a/pkg/registry/extensions/controller/storage/storage.go +++ b/pkg/registry/extensions/controller/storage/storage.go @@ -102,7 +102,7 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r // scaleFromRC returns a scale subresource for a replication controller. func scaleFromRC(rc *api.ReplicationController) *extensions.Scale { return &extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rc.Name, Namespace: rc.Namespace, UID: rc.UID, diff --git a/pkg/registry/extensions/controller/storage/storage_test.go b/pkg/registry/extensions/controller/storage/storage_test.go index 71a1a2b8d7a..7ef4daa88e3 100644 --- a/pkg/registry/extensions/controller/storage/storage_test.go +++ b/pkg/registry/extensions/controller/storage/storage_test.go @@ -44,7 +44,7 @@ func newStorage(t *testing.T) (*ScaleREST, *etcdtesting.EtcdTestServer, storage. var validPodTemplate = api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ @@ -70,12 +70,12 @@ var validControllerSpec = api.ReplicationControllerSpec{ } var validController = api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: validControllerSpec, } var validScale = extensions.Scale{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: extensions.ScaleSpec{ Replicas: validReplicas, }, @@ -117,7 +117,7 @@ func TestUpdate(t *testing.T) { } replicas := int32(12) update := extensions.Scale{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: extensions.ScaleSpec{ Replicas: replicas, }, diff --git a/pkg/registry/extensions/daemonset/storage/storage_test.go b/pkg/registry/extensions/daemonset/storage/storage_test.go index b3b19155c45..d150410c15e 100644 --- a/pkg/registry/extensions/daemonset/storage/storage_test.go +++ b/pkg/registry/extensions/daemonset/storage/storage_test.go @@ -44,14 +44,14 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func newValidDaemonSet() *extensions.DaemonSet { return &extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "b"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ @@ -78,7 +78,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) ds := newValidDaemonSet() - ds.ObjectMeta = api.ObjectMeta{} + ds.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid ds, diff --git a/pkg/registry/extensions/deployment/BUILD b/pkg/registry/extensions/deployment/BUILD index 488a8fcee8b..da4cf8f2e0d 100644 --- a/pkg/registry/extensions/deployment/BUILD +++ b/pkg/registry/extensions/deployment/BUILD @@ -44,6 +44,7 @@ go_test( "//pkg/api/testapi:go_default_library", "//pkg/api/testing:go_default_library", "//pkg/apis/extensions:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/request", ], diff --git a/pkg/registry/extensions/deployment/storage/BUILD b/pkg/registry/extensions/deployment/storage/BUILD index 8b188b0e033..39c37dd34f7 100644 --- a/pkg/registry/extensions/deployment/storage/BUILD +++ b/pkg/registry/extensions/deployment/storage/BUILD @@ -37,7 +37,6 @@ go_library( srcs = ["storage.go"], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/api/errors/storage:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", diff --git a/pkg/registry/extensions/deployment/storage/storage.go b/pkg/registry/extensions/deployment/storage/storage.go index 847f243c3ef..e66ca926805 100644 --- a/pkg/registry/extensions/deployment/storage/storage.go +++ b/pkg/registry/extensions/deployment/storage/storage.go @@ -24,7 +24,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" storeerr "k8s.io/kubernetes/pkg/api/errors/storage" "k8s.io/kubernetes/pkg/apis/extensions" extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" @@ -240,7 +239,7 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r func scaleFromDeployment(deployment *extensions.Deployment) (*extensions.Scale, error) { return &extensions.Scale{ // TODO: Create a variant of ObjectMeta type that only contains the fields below. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: deployment.Name, Namespace: deployment.Namespace, UID: deployment.UID, diff --git a/pkg/registry/extensions/deployment/storage/storage_test.go b/pkg/registry/extensions/deployment/storage/storage_test.go index 7eb72b00b13..c14022e6f06 100644 --- a/pkg/registry/extensions/deployment/storage/storage_test.go +++ b/pkg/registry/extensions/deployment/storage/storage_test.go @@ -51,7 +51,7 @@ var name = "foo-deployment" func validNewDeployment() *extensions.Deployment { return &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -65,7 +65,7 @@ func validNewDeployment() *extensions.Deployment { }, }, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ @@ -96,7 +96,7 @@ func TestCreate(t *testing.T) { defer storage.Deployment.Store.DestroyFunc() test := registrytest.New(t, storage.Deployment.Store) deployment := validNewDeployment() - deployment.ObjectMeta = api.ObjectMeta{} + deployment.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid deployment, @@ -205,7 +205,7 @@ func TestScaleGet(t *testing.T) { } want := &extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, UID: deployment.UID, @@ -242,7 +242,7 @@ func TestScaleUpdate(t *testing.T) { } replicas := int32(12) update := extensions.Scale{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: extensions.ScaleSpec{ Replicas: replicas, }, diff --git a/pkg/registry/extensions/deployment/strategy_test.go b/pkg/registry/extensions/deployment/strategy_test.go index 92e96df740a..b81eeb3a7fd 100644 --- a/pkg/registry/extensions/deployment/strategy_test.go +++ b/pkg/registry/extensions/deployment/strategy_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" genericapirequest "k8s.io/apiserver/pkg/request" "k8s.io/kubernetes/pkg/api" @@ -65,7 +66,7 @@ func TestStatusUpdates(t *testing.T) { func newDeployment(labels, annotations map[string]string) *extensions.Deployment { return &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", Labels: labels, Annotations: annotations, diff --git a/pkg/registry/extensions/ingress/BUILD b/pkg/registry/extensions/ingress/BUILD index 33683c6cb4f..97e7290e4ac 100644 --- a/pkg/registry/extensions/ingress/BUILD +++ b/pkg/registry/extensions/ingress/BUILD @@ -41,6 +41,7 @@ go_test( "//pkg/api/testing:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/util/intstr:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/request", ], ) diff --git a/pkg/registry/extensions/ingress/storage/BUILD b/pkg/registry/extensions/ingress/storage/BUILD index 917d196e497..df8e7027b1c 100644 --- a/pkg/registry/extensions/ingress/storage/BUILD +++ b/pkg/registry/extensions/ingress/storage/BUILD @@ -21,6 +21,7 @@ go_test( "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/util/intstr:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/extensions/ingress/storage/storage_test.go b/pkg/registry/extensions/ingress/storage/storage_test.go index e6000c72480..b0fbd8f1718 100644 --- a/pkg/registry/extensions/ingress/storage/storage_test.go +++ b/pkg/registry/extensions/ingress/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -89,7 +90,7 @@ func toIngressRules(hostRules map[string]IngressRuleValues) []extensions.Ingress func newIngress(pathMap map[string]string) *extensions.Ingress { return &extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/pkg/registry/extensions/ingress/strategy.go b/pkg/registry/extensions/ingress/strategy.go index e5ec6501bd9..ccd7b8180e6 100644 --- a/pkg/registry/extensions/ingress/strategy.go +++ b/pkg/registry/extensions/ingress/strategy.go @@ -65,7 +65,7 @@ func (ingressStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, old // Any changes to the spec increment the generation number, any changes to the // status should reflect the generation number of the corresponding object. - // See api.ObjectMeta description for more information on Generation. + // See metav1.ObjectMeta description for more information on Generation. if !reflect.DeepEqual(oldIngress.Spec, newIngress.Spec) { newIngress.Generation = oldIngress.Generation + 1 } diff --git a/pkg/registry/extensions/ingress/strategy_test.go b/pkg/registry/extensions/ingress/strategy_test.go index 908c6fbf232..9ea4aa5436d 100644 --- a/pkg/registry/extensions/ingress/strategy_test.go +++ b/pkg/registry/extensions/ingress/strategy_test.go @@ -19,6 +19,7 @@ package ingress import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" genericapirequest "k8s.io/apiserver/pkg/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" @@ -33,7 +34,7 @@ func newIngress() extensions.Ingress { ServicePort: intstr.FromInt(80), } return extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, diff --git a/pkg/registry/extensions/networkpolicy/storage/storage_test.go b/pkg/registry/extensions/networkpolicy/storage/storage_test.go index 987b6384d8a..199733ce6df 100644 --- a/pkg/registry/extensions/networkpolicy/storage/storage_test.go +++ b/pkg/registry/extensions/networkpolicy/storage/storage_test.go @@ -57,7 +57,7 @@ func createNetworkPolicy(storage *REST, np extensions.NetworkPolicy, t *testing. func validNewNetworkPolicy() *extensions.NetworkPolicy { port := intstr.FromInt(80) return &extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, Labels: map[string]string{"a": "b"}, @@ -90,7 +90,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) np := validNewNetworkPolicy() - np.ObjectMeta = api.ObjectMeta{} + np.ObjectMeta = metav1.ObjectMeta{} invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} test.TestCreate( diff --git a/pkg/registry/extensions/networkpolicy/strategy.go b/pkg/registry/extensions/networkpolicy/strategy.go index 0a6f34bbd54..5955ba54324 100644 --- a/pkg/registry/extensions/networkpolicy/strategy.go +++ b/pkg/registry/extensions/networkpolicy/strategy.go @@ -60,7 +60,7 @@ func (networkPolicyStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj // Any changes to the spec increment the generation number, any changes to the // status should reflect the generation number of the corresponding object. - // See api.ObjectMeta description for more information on Generation. + // See metav1.ObjectMeta description for more information on Generation. if !reflect.DeepEqual(oldNetworkPolicy.Spec, newNetworkPolicy.Spec) { newNetworkPolicy.Generation = oldNetworkPolicy.Generation + 1 } diff --git a/pkg/registry/extensions/networkpolicy/strategy_test.go b/pkg/registry/extensions/networkpolicy/strategy_test.go index 70c8da9ecb8..39b95e0d5e0 100644 --- a/pkg/registry/extensions/networkpolicy/strategy_test.go +++ b/pkg/registry/extensions/networkpolicy/strategy_test.go @@ -36,7 +36,7 @@ func TestNetworkPolicyStrategy(t *testing.T) { validMatchLabels := map[string]string{"a": "b"} np := &extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{MatchLabels: validMatchLabels}, Ingress: []extensions.NetworkPolicyIngressRule{}, @@ -50,7 +50,7 @@ func TestNetworkPolicyStrategy(t *testing.T) { } invalidNp := &extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, } Strategy.PrepareForUpdate(ctx, invalidNp, np) errs = Strategy.ValidateUpdate(ctx, invalidNp, np) diff --git a/pkg/registry/extensions/podsecuritypolicy/storage/BUILD b/pkg/registry/extensions/podsecuritypolicy/storage/BUILD index d70c6e0404d..8dafb2ca7c4 100644 --- a/pkg/registry/extensions/podsecuritypolicy/storage/BUILD +++ b/pkg/registry/extensions/podsecuritypolicy/storage/BUILD @@ -14,13 +14,13 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/fields:go_default_library", "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/extensions/podsecuritypolicy/storage/storage_test.go b/pkg/registry/extensions/podsecuritypolicy/storage/storage_test.go index f8801950223..f7af3c43398 100644 --- a/pkg/registry/extensions/podsecuritypolicy/storage/storage_test.go +++ b/pkg/registry/extensions/podsecuritypolicy/storage/storage_test.go @@ -19,7 +19,7 @@ package storage import ( "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/extensions" // Ensure that extensions/v1beta1 package is initialized. "k8s.io/apimachinery/pkg/labels" @@ -44,7 +44,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewPodSecurityPolicy() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: extensions.PodSecurityPolicySpec{ @@ -70,13 +70,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() psp := validNewPodSecurityPolicy() - psp.ObjectMeta = api.ObjectMeta{GenerateName: "foo-"} + psp.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo-"} test.TestCreate( // valid psp, // invalid &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{Name: "name with spaces"}, + ObjectMeta: metav1.ObjectMeta{Name: "name with spaces"}, }, ) } diff --git a/pkg/registry/extensions/replicaset/storage/BUILD b/pkg/registry/extensions/replicaset/storage/BUILD index 9e67e767f3e..ba929f82b5a 100644 --- a/pkg/registry/extensions/replicaset/storage/BUILD +++ b/pkg/registry/extensions/replicaset/storage/BUILD @@ -35,7 +35,6 @@ go_library( srcs = ["storage.go"], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", "//pkg/genericapiserver/api/rest:go_default_library", diff --git a/pkg/registry/extensions/replicaset/storage/storage.go b/pkg/registry/extensions/replicaset/storage/storage.go index 67474a298bc..ec9dc76d7e5 100644 --- a/pkg/registry/extensions/replicaset/storage/storage.go +++ b/pkg/registry/extensions/replicaset/storage/storage.go @@ -25,7 +25,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" "k8s.io/kubernetes/pkg/genericapiserver/api/rest" @@ -169,7 +168,7 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r func scaleFromReplicaSet(rs *extensions.ReplicaSet) (*extensions.Scale, error) { return &extensions.Scale{ // TODO: Create a variant of ObjectMeta type that only contains the fields below. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rs.Name, Namespace: rs.Namespace, UID: rs.UID, diff --git a/pkg/registry/extensions/replicaset/storage/storage_test.go b/pkg/registry/extensions/replicaset/storage/storage_test.go index 8f82b227e9f..b92b040f0fb 100644 --- a/pkg/registry/extensions/replicaset/storage/storage_test.go +++ b/pkg/registry/extensions/replicaset/storage/storage_test.go @@ -56,14 +56,14 @@ func createReplicaSet(storage *REST, rs extensions.ReplicaSet, t *testing.T) (ex func validNewReplicaSet() *extensions.ReplicaSet { return &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, }, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "b"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ @@ -94,7 +94,7 @@ func TestCreate(t *testing.T) { defer storage.ReplicaSet.Store.DestroyFunc() test := registrytest.New(t, storage.ReplicaSet.Store) rs := validNewReplicaSet() - rs.ObjectMeta = api.ObjectMeta{} + rs.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid rs, @@ -260,7 +260,7 @@ func TestScaleGet(t *testing.T) { } want := &extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: api.NamespaceDefault, UID: rs.UID, @@ -300,7 +300,7 @@ func TestScaleUpdate(t *testing.T) { } replicas := 12 update := extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: api.NamespaceDefault, }, diff --git a/pkg/registry/extensions/replicaset/strategy_test.go b/pkg/registry/extensions/replicaset/strategy_test.go index ac780300115..02c2a9bf6b7 100644 --- a/pkg/registry/extensions/replicaset/strategy_test.go +++ b/pkg/registry/extensions/replicaset/strategy_test.go @@ -37,7 +37,7 @@ func TestReplicaSetStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -48,7 +48,7 @@ func TestReplicaSetStrategy(t *testing.T) { }, } rs := &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, @@ -72,7 +72,7 @@ func TestReplicaSetStrategy(t *testing.T) { } invalidRc := &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, } Strategy.PrepareForUpdate(ctx, invalidRc, rs) errs = Strategy.ValidateUpdate(ctx, invalidRc, rs) @@ -95,7 +95,7 @@ func TestReplicaSetStatusStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -106,7 +106,7 @@ func TestReplicaSetStatusStrategy(t *testing.T) { }, } oldRS := &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, Spec: extensions.ReplicaSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validSelector}, @@ -118,7 +118,7 @@ func TestReplicaSetStatusStrategy(t *testing.T) { }, } newRS := &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, Spec: extensions.ReplicaSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validSelector}, diff --git a/pkg/registry/extensions/rest/BUILD b/pkg/registry/extensions/rest/BUILD index 677c5c3d5ac..3e882e30c98 100644 --- a/pkg/registry/extensions/rest/BUILD +++ b/pkg/registry/extensions/rest/BUILD @@ -48,9 +48,9 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/registry/extensions/thirdpartyresourcedata:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/pkg/registry/extensions/rest/thirdparty_controller_test.go b/pkg/registry/extensions/rest/thirdparty_controller_test.go index cb974ddf4a8..74c0781057d 100644 --- a/pkg/registry/extensions/rest/thirdparty_controller_test.go +++ b/pkg/registry/extensions/rest/thirdparty_controller_test.go @@ -19,8 +19,8 @@ package rest import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/api" expapi "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata" ) @@ -66,7 +66,7 @@ func TestSyncAPIs(t *testing.T) { resourcesNamed := func(names ...string) []expapi.ThirdPartyResource { result := []expapi.ThirdPartyResource{} for _, name := range names { - result = append(result, expapi.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: name}}) + result = append(result, expapi.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: name}}) } return result } diff --git a/pkg/registry/extensions/thirdpartyresource/storage/BUILD b/pkg/registry/extensions/thirdpartyresource/storage/BUILD index a3e4c3cb5f4..f00e2206b4d 100644 --- a/pkg/registry/extensions/thirdpartyresource/storage/BUILD +++ b/pkg/registry/extensions/thirdpartyresource/storage/BUILD @@ -14,13 +14,13 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/fields:go_default_library", "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/extensions/thirdpartyresource/storage/storage_test.go b/pkg/registry/extensions/thirdpartyresource/storage/storage_test.go index 4785c85b5a5..be069ea6757 100644 --- a/pkg/registry/extensions/thirdpartyresource/storage/storage_test.go +++ b/pkg/registry/extensions/thirdpartyresource/storage/storage_test.go @@ -20,7 +20,7 @@ import ( "fmt" "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/extensions" // Ensure that extensions/v1beta1 package is initialized. "k8s.io/apimachinery/pkg/labels" @@ -45,7 +45,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewThirdPartyResource(name string) *extensions.ThirdPartyResource { return &extensions.ThirdPartyResource{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Versions: []extensions.APIVersion{ @@ -71,10 +71,10 @@ func TestCreate(t *testing.T) { rsrc, // invalid &extensions.ThirdPartyResource{}, - &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: "kind"}, Versions: []extensions.APIVersion{{Name: "v1"}}}, - &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: "kind.tld"}, Versions: []extensions.APIVersion{{Name: "v1"}}}, - &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: "kind.domain.tld"}, Versions: []extensions.APIVersion{{Name: "v.1"}}}, - &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: "kind.domain.tld"}, Versions: []extensions.APIVersion{{Name: "stable/v1"}}}, + &extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: "kind"}, Versions: []extensions.APIVersion{{Name: "v1"}}}, + &extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: "kind.tld"}, Versions: []extensions.APIVersion{{Name: "v1"}}}, + &extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: "kind.domain.tld"}, Versions: []extensions.APIVersion{{Name: "v.1"}}}, + &extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: "kind.domain.tld"}, Versions: []extensions.APIVersion{{Name: "stable/v1"}}}, ) } diff --git a/pkg/registry/extensions/thirdpartyresourcedata/codec_test.go b/pkg/registry/extensions/thirdpartyresourcedata/codec_test.go index 92afcd8c965..79fcd882f0e 100644 --- a/pkg/registry/extensions/thirdpartyresourcedata/codec_test.go +++ b/pkg/registry/extensions/thirdpartyresourcedata/codec_test.go @@ -33,8 +33,8 @@ import ( ) type Foo struct { - metav1.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` SomeField string `json:"someField"` OtherField int `json:"otherField"` @@ -61,20 +61,20 @@ func TestCodec(t *testing.T) { { into: &runtime.VersionedObjects{}, obj: &Foo{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, TypeMeta: metav1.TypeMeta{APIVersion: "company.com/v1", Kind: "Foo"}, }, expectErr: false, name: "versioned objects list", }, { - obj: &Foo{ObjectMeta: api.ObjectMeta{Name: "bar"}}, + obj: &Foo{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, expectErr: true, name: "missing kind", }, { obj: &Foo{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, TypeMeta: metav1.TypeMeta{APIVersion: "company.com/v1", Kind: "Foo"}, }, name: "basic", @@ -82,7 +82,7 @@ func TestCodec(t *testing.T) { { into: &extensions.ThirdPartyResourceData{}, obj: &Foo{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, TypeMeta: metav1.TypeMeta{Kind: "ThirdPartyResourceData"}, }, expectErr: true, @@ -90,14 +90,14 @@ func TestCodec(t *testing.T) { }, { obj: &Foo{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "baz"}, TypeMeta: metav1.TypeMeta{APIVersion: "company.com/v1", Kind: "Foo"}, }, name: "resource version", }, { obj: &Foo{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", CreationTimestamp: metav1.Time{Time: time.Unix(100, 0)}, }, @@ -110,7 +110,7 @@ func TestCodec(t *testing.T) { }, { obj: &Foo{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", ResourceVersion: "baz", Labels: map[string]string{"foo": "bar", "baz": "blah"}, diff --git a/pkg/registry/extensions/thirdpartyresourcedata/storage/BUILD b/pkg/registry/extensions/thirdpartyresourcedata/storage/BUILD index f84bd2246b9..e2b481c06eb 100644 --- a/pkg/registry/extensions/thirdpartyresourcedata/storage/BUILD +++ b/pkg/registry/extensions/thirdpartyresourcedata/storage/BUILD @@ -21,6 +21,7 @@ go_test( "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/extensions/thirdpartyresourcedata/storage/storage_test.go b/pkg/registry/extensions/thirdpartyresourcedata/storage/storage_test.go index 9b5ed242323..e2625b419f5 100644 --- a/pkg/registry/extensions/thirdpartyresourcedata/storage/storage_test.go +++ b/pkg/registry/extensions/thirdpartyresourcedata/storage/storage_test.go @@ -19,6 +19,7 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" // Ensure that extensions/v1beta1 package is initialized. @@ -39,7 +40,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewThirdPartyResourceData(name string) *extensions.ThirdPartyResourceData { return &extensions.ThirdPartyResourceData{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: api.NamespaceDefault, }, @@ -53,7 +54,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) rsrc := validNewThirdPartyResourceData("foo") - rsrc.ObjectMeta = api.ObjectMeta{} + rsrc.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid rsrc, diff --git a/pkg/registry/extensions/thirdpartyresourcedata/util_test.go b/pkg/registry/extensions/thirdpartyresourcedata/util_test.go index c0cd4c1a47d..025cb55f80c 100644 --- a/pkg/registry/extensions/thirdpartyresourcedata/util_test.go +++ b/pkg/registry/extensions/thirdpartyresourcedata/util_test.go @@ -19,7 +19,7 @@ package thirdpartyresourcedata import ( "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/extensions" ) @@ -47,7 +47,7 @@ func TestExtractAPIGroupAndKind(t *testing.T) { } for _, test := range tests { - kind, group, err := ExtractApiGroupAndKind(&extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: test.input}}) + kind, group, err := ExtractApiGroupAndKind(&extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: test.input}}) if err != nil && !test.expectErr { t.Errorf("unexpected error: %v", err) continue diff --git a/pkg/registry/generic/BUILD b/pkg/registry/generic/BUILD index ab405837c68..0b0c09aa1d6 100644 --- a/pkg/registry/generic/BUILD +++ b/pkg/registry/generic/BUILD @@ -17,12 +17,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/fields:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/storagebackend:go_default_library", "//pkg/storage/storagebackend/factory:go_default_library", "//vendor:github.com/golang/glog", + "//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/registry/generic/matcher.go b/pkg/registry/generic/matcher.go index 9654156034c..ad1abb8b6e4 100644 --- a/pkg/registry/generic/matcher.go +++ b/pkg/registry/generic/matcher.go @@ -17,12 +17,12 @@ limitations under the License. package generic import ( - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/fields" ) // ObjectMetaFieldsSet returns a fields that represent the ObjectMeta. -func ObjectMetaFieldsSet(objectMeta *api.ObjectMeta, hasNamespaceField bool) fields.Set { +func ObjectMetaFieldsSet(objectMeta *metav1.ObjectMeta, hasNamespaceField bool) fields.Set { if !hasNamespaceField { return fields.Set{ "metadata.name": objectMeta.Name, @@ -35,7 +35,7 @@ func ObjectMetaFieldsSet(objectMeta *api.ObjectMeta, hasNamespaceField bool) fie } // AdObjectMetaField add fields that represent the ObjectMeta to source. -func AddObjectMetaFieldsSet(source fields.Set, objectMeta *api.ObjectMeta, hasNamespaceField bool) fields.Set { +func AddObjectMetaFieldsSet(source fields.Set, objectMeta *metav1.ObjectMeta, hasNamespaceField bool) fields.Set { source["metadata.name"] = objectMeta.Name if hasNamespaceField { source["metadata.namespace"] = objectMeta.Namespace diff --git a/pkg/registry/generic/registry/decorated_watcher_test.go b/pkg/registry/generic/registry/decorated_watcher_test.go index 2412b11ace8..ae62e0a1e61 100644 --- a/pkg/registry/generic/registry/decorated_watcher_test.go +++ b/pkg/registry/generic/registry/decorated_watcher_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" @@ -37,7 +38,7 @@ func TestDecoratedWatcher(t *testing.T) { dw := newDecoratedWatcher(w, decorator) defer dw.Stop() - go w.Add(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + go w.Add(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) select { case e := <-dw.ResultChan(): pod, ok := e.Object.(*api.Pod) @@ -62,7 +63,7 @@ func TestDecoratedWatcherError(t *testing.T) { dw := newDecoratedWatcher(w, decorator) defer dw.Stop() - go w.Add(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + go w.Add(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) select { case e := <-dw.ResultChan(): if e.Type != watch.Error { diff --git a/pkg/registry/generic/registry/store.go b/pkg/registry/generic/registry/store.go index 94cc659bcb2..37d608a6673 100644 --- a/pkg/registry/generic/registry/store.go +++ b/pkg/registry/generic/registry/store.go @@ -280,12 +280,12 @@ func (e *Store) shouldDelete(ctx genericapirequest.Context, key string, obj, exi if !e.EnableGarbageCollection { return false } - newMeta, err := api.ObjectMetaFor(obj) + newMeta, err := metav1.ObjectMetaFor(obj) if err != nil { utilruntime.HandleError(err) return false } - oldMeta, err := api.ObjectMetaFor(existing) + oldMeta, err := metav1.ObjectMetaFor(existing) if err != nil { utilruntime.HandleError(err) return false @@ -525,7 +525,7 @@ func shouldUpdateFinalizers(e *Store, accessor metav1.Object, options *api.Delet // DeletionTimestamp to "now". Finalizers are watching for such updates and will // finalize the object if their IDs are present in the object's Finalizers list. func markAsDeleting(obj runtime.Object) (err error) { - objectMeta, kerr := api.ObjectMetaFor(obj) + objectMeta, kerr := metav1.ObjectMetaFor(obj) if kerr != nil { return kerr } diff --git a/pkg/registry/generic/registry/store_test.go b/pkg/registry/generic/registry/store_test.go index 3f06297b71c..82cce002700 100644 --- a/pkg/registry/generic/registry/store_test.go +++ b/pkg/registry/generic/registry/store_test.go @@ -138,11 +138,11 @@ func matchEverything() storage.SelectionPredicate { func TestStoreList(t *testing.T) { podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "bar"}, Spec: api.PodSpec{NodeName: "machine"}, } podB := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "foo"}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -214,11 +214,11 @@ func TestStoreList(t *testing.T) { // the results are as fresh as given version. func TestStoreListResourceVersion(t *testing.T) { fooPod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "foo"}, Spec: api.PodSpec{NodeName: "machine"}, } barPod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "bar"}, Spec: api.PodSpec{NodeName: "machine"}, } ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") @@ -277,11 +277,11 @@ func TestStoreListResourceVersion(t *testing.T) { func TestStoreCreate(t *testing.T) { gracefulPeriod := int64(50) podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: api.PodSpec{NodeName: "machine"}, } podB := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: api.PodSpec{NodeName: "machine2"}, } @@ -360,15 +360,15 @@ func updateAndVerify(t *testing.T, ctx genericapirequest.Context, registry *Stor func TestStoreUpdate(t *testing.T) { podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: api.PodSpec{NodeName: "machine"}, } podB := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: api.PodSpec{NodeName: "machine2"}, } podAWithResourceVersion := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "7"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "7"}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -416,7 +416,7 @@ func TestNoOpUpdates(t *testing.T) { newPod := func() *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: api.NamespaceDefault, Name: "foo", Labels: map[string]string{"prepare_create": "true"}, @@ -485,7 +485,7 @@ func (t testPodExport) Export(ctx genericapirequest.Context, obj runtime.Object, func TestStoreCustomExport(t *testing.T) { podA := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "foo", Labels: map[string]string{}, @@ -530,7 +530,7 @@ func TestStoreCustomExport(t *testing.T) { func TestStoreBasicExport(t *testing.T) { podA := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "foo", Labels: map[string]string{}, @@ -566,7 +566,7 @@ func TestStoreBasicExport(t *testing.T) { func TestStoreGet(t *testing.T) { podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "foo"}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -587,7 +587,7 @@ func TestStoreGet(t *testing.T) { func TestStoreDelete(t *testing.T) { podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -629,7 +629,7 @@ func TestGracefulStoreCanDeleteIfExistingGracePeriodZero(t *testing.T) { deletionGracePeriodSeconds := int64(0) initialGeneration := int64(1) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Generation: initialGeneration, DeletionGracePeriodSeconds: &deletionGracePeriodSeconds, @@ -660,7 +660,7 @@ func TestGracefulStoreCanDeleteIfExistingGracePeriodZero(t *testing.T) { func TestGracefulStoreHandleFinalizers(t *testing.T) { initialGeneration := int64(1) podWithFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -687,7 +687,7 @@ func TestGracefulStoreHandleFinalizers(t *testing.T) { } updatedPodWithFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, Spec: api.PodSpec{NodeName: "machine"}, } _, _, err = registry.Update(testContext, updatedPodWithFinalizer.ObjectMeta.Name, rest.DefaultUpdatedObjectInfo(updatedPodWithFinalizer, api.Scheme)) @@ -702,7 +702,7 @@ func TestGracefulStoreHandleFinalizers(t *testing.T) { } podWithNoFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, Spec: api.PodSpec{NodeName: "anothermachine"}, } _, _, err = registry.Update(testContext, podWithFinalizer.ObjectMeta.Name, rest.DefaultUpdatedObjectInfo(podWithNoFinalizer, api.Scheme)) @@ -719,7 +719,7 @@ func TestGracefulStoreHandleFinalizers(t *testing.T) { func TestNonGracefulStoreHandleFinalizers(t *testing.T) { initialGeneration := int64(1) podWithFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -759,7 +759,7 @@ func TestNonGracefulStoreHandleFinalizers(t *testing.T) { } updatedPodWithFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, Spec: api.PodSpec{NodeName: "machine"}, } _, _, err = registry.Update(testContext, updatedPodWithFinalizer.ObjectMeta.Name, rest.DefaultUpdatedObjectInfo(updatedPodWithFinalizer, api.Scheme)) @@ -778,7 +778,7 @@ func TestNonGracefulStoreHandleFinalizers(t *testing.T) { } podWithNoFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, Spec: api.PodSpec{NodeName: "anothermachine"}, } _, _, err = registry.Update(testContext, podWithFinalizer.ObjectMeta.Name, rest.DefaultUpdatedObjectInfo(podWithNoFinalizer, api.Scheme)) @@ -796,25 +796,25 @@ func TestStoreDeleteWithOrphanDependents(t *testing.T) { initialGeneration := int64(1) podWithOrphanFinalizer := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", api.FinalizerOrphan, "bar.com/y"}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", api.FinalizerOrphan, "bar.com/y"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } podWithOtherFinalizers := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", "bar.com/y"}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", "bar.com/y"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } podWithNoFinalizer := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: name, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } podWithOnlyOrphanFinalizer := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{api.FinalizerOrphan}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: name, Finalizers: []string{api.FinalizerOrphan}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } @@ -1063,8 +1063,8 @@ func TestStoreDeleteWithOrphanDependents(t *testing.T) { } func TestStoreDeleteCollection(t *testing.T) { - podA := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - podB := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} + podA := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + podB := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") destroyFunc, registry := NewTestGenericStoreRegistry(t) @@ -1101,8 +1101,8 @@ func TestStoreDeleteCollectionNotFound(t *testing.T) { testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") - podA := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - podB := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} + podA := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + podB := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} for i := 0; i < 10; i++ { // Setup @@ -1139,7 +1139,7 @@ func TestStoreDeleteCollectionNotFound(t *testing.T) { // Test whether objects deleted with DeleteCollection are correctly delivered // to watchers. func TestStoreDeleteCollectionWithWatch(t *testing.T) { - podA := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + podA := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") destroyFunc, registry := NewTestGenericStoreRegistry(t) @@ -1202,7 +1202,7 @@ func TestStoreWatch(t *testing.T) { ctx = m.context } podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", }, diff --git a/pkg/registry/policy/poddisruptionbudget/storage/storage_test.go b/pkg/registry/policy/poddisruptionbudget/storage/storage_test.go index 3c96f865670..f6d8d98d81e 100644 --- a/pkg/registry/policy/poddisruptionbudget/storage/storage_test.go +++ b/pkg/registry/policy/poddisruptionbudget/storage/storage_test.go @@ -52,7 +52,7 @@ func createPodDisruptionBudget(storage *REST, pdb policy.PodDisruptionBudget, t func validNewPodDisruptionBudget() *policy.PodDisruptionBudget { return &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: api.NamespaceDefault, Labels: map[string]string{"a": "b"}, @@ -71,7 +71,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) pdb := validNewPodDisruptionBudget() - pdb.ObjectMeta = api.ObjectMeta{} + pdb.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid pdb, diff --git a/pkg/registry/policy/poddisruptionbudget/strategy.go b/pkg/registry/policy/poddisruptionbudget/strategy.go index 4dd73d3e221..485a3286b67 100644 --- a/pkg/registry/policy/poddisruptionbudget/strategy.go +++ b/pkg/registry/policy/poddisruptionbudget/strategy.go @@ -65,7 +65,7 @@ func (podDisruptionBudgetStrategy) PrepareForUpdate(ctx genericapirequest.Contex // Any changes to the spec increment the generation number, any changes to the // status should reflect the generation number of the corresponding object. - // See api.ObjectMeta description for more information on Generation. + // See metav1.ObjectMeta description for more information on Generation. if !reflect.DeepEqual(oldPodDisruptionBudget.Spec, newPodDisruptionBudget.Spec) { newPodDisruptionBudget.Generation = oldPodDisruptionBudget.Generation + 1 } diff --git a/pkg/registry/policy/poddisruptionbudget/strategy_test.go b/pkg/registry/policy/poddisruptionbudget/strategy_test.go index 13dc1712405..235e1bdb12d 100644 --- a/pkg/registry/policy/poddisruptionbudget/strategy_test.go +++ b/pkg/registry/policy/poddisruptionbudget/strategy_test.go @@ -37,7 +37,7 @@ func TestPodDisruptionBudgetStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} pdb := &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, Spec: policy.PodDisruptionBudgetSpec{ MinAvailable: intstr.FromInt(3), Selector: &metav1.LabelSelector{MatchLabels: validSelector}, @@ -51,7 +51,7 @@ func TestPodDisruptionBudgetStrategy(t *testing.T) { } newPdb := &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{Name: pdb.Name, Namespace: pdb.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: pdb.Name, Namespace: pdb.Namespace}, Spec: pdb.Spec, Status: policy.PodDisruptionBudgetStatus{ PodDisruptionsAllowed: 1, @@ -96,7 +96,7 @@ func TestPodDisruptionBudgetStatusStrategy(t *testing.T) { } validSelector := map[string]string{"a": "b"} oldPdb := &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, Spec: policy.PodDisruptionBudgetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, MinAvailable: intstr.FromInt(3), @@ -109,7 +109,7 @@ func TestPodDisruptionBudgetStatusStrategy(t *testing.T) { }, } newPdb := &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, Spec: policy.PodDisruptionBudgetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, MinAvailable: intstr.FromInt(2), diff --git a/pkg/registry/rbac/validation/BUILD b/pkg/registry/rbac/validation/BUILD index acfda09f006..0e33a5f1c64 100644 --- a/pkg/registry/rbac/validation/BUILD +++ b/pkg/registry/rbac/validation/BUILD @@ -17,8 +17,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apiserver/pkg/authentication/user", ], diff --git a/pkg/registry/rbac/validation/rule_test.go b/pkg/registry/rbac/validation/rule_test.go index 181dc8e806e..fb45667b9cf 100644 --- a/pkg/registry/rbac/validation/rule_test.go +++ b/pkg/registry/rbac/validation/rule_test.go @@ -23,9 +23,9 @@ import ( "sort" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apiserver/pkg/authentication/user" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/rbac" ) @@ -75,23 +75,23 @@ func TestDefaultRuleResolver(t *testing.T) { staticRoles1 := StaticRoles{ roles: []*rbac.Role{ { - ObjectMeta: api.ObjectMeta{Namespace: "namespace1", Name: "readthings"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace1", Name: "readthings"}, Rules: []rbac.PolicyRule{ruleReadPods, ruleReadServices}, }, }, clusterRoles: []*rbac.ClusterRole{ { - ObjectMeta: api.ObjectMeta{Name: "cluster-admin"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-admin"}, Rules: []rbac.PolicyRule{ruleAdmin}, }, { - ObjectMeta: api.ObjectMeta{Name: "write-nodes"}, + ObjectMeta: metav1.ObjectMeta{Name: "write-nodes"}, Rules: []rbac.PolicyRule{ruleWriteNodes}, }, }, roleBindings: []*rbac.RoleBinding{ { - ObjectMeta: api.ObjectMeta{Namespace: "namespace1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace1"}, Subjects: []rbac.Subject{ {Kind: rbac.UserKind, Name: "foobar"}, {Kind: rbac.GroupKind, Name: "group1"}, diff --git a/pkg/registry/registrytest/node.go b/pkg/registry/registrytest/node.go index ac0c80c6500..b9f3f747856 100644 --- a/pkg/registry/registrytest/node.go +++ b/pkg/registry/registrytest/node.go @@ -105,7 +105,7 @@ func (r *NodeRegistry) DeleteNode(ctx genericapirequest.Context, nodeID string) var newList []api.Node for _, node := range r.Nodes.Items { if node.Name != nodeID { - newList = append(newList, api.Node{ObjectMeta: api.ObjectMeta{Name: node.Name}}) + newList = append(newList, api.Node{ObjectMeta: metav1.ObjectMeta{Name: node.Name}}) } } r.Nodes.Items = newList diff --git a/pkg/registry/storage/storageclass/BUILD b/pkg/registry/storage/storageclass/BUILD index 43c8cd24a75..a42ae676502 100644 --- a/pkg/registry/storage/storageclass/BUILD +++ b/pkg/registry/storage/storageclass/BUILD @@ -36,8 +36,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/request", ], ) diff --git a/pkg/registry/storage/storageclass/storage/BUILD b/pkg/registry/storage/storageclass/storage/BUILD index cd839eb07ff..d2adf7ee5e1 100644 --- a/pkg/registry/storage/storageclass/storage/BUILD +++ b/pkg/registry/storage/storageclass/storage/BUILD @@ -14,12 +14,12 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/fields:go_default_library", "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/pkg/registry/storage/storageclass/storage/storage_test.go b/pkg/registry/storage/storageclass/storage/storage_test.go index 4b738c2887e..a27ca4206c7 100644 --- a/pkg/registry/storage/storageclass/storage/storage_test.go +++ b/pkg/registry/storage/storageclass/storage/storage_test.go @@ -19,9 +19,9 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" storageapi "k8s.io/kubernetes/pkg/apis/storage" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/registry/generic" @@ -43,7 +43,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewStorageClass(name string) *storageapi.StorageClass { return &storageapi.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Provisioner: "kubernetes.io/aws-ebs", @@ -63,13 +63,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() storageClass := validNewStorageClass("foo") - storageClass.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + storageClass.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( // valid storageClass, // invalid &storageapi.StorageClass{ - ObjectMeta: api.ObjectMeta{Name: "*BadName!"}, + ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, }, ) } diff --git a/pkg/registry/storage/storageclass/strategy_test.go b/pkg/registry/storage/storageclass/strategy_test.go index 952c19c1163..7c395db31b2 100644 --- a/pkg/registry/storage/storageclass/strategy_test.go +++ b/pkg/registry/storage/storageclass/strategy_test.go @@ -19,8 +19,8 @@ package storageclass import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/storage" ) @@ -34,7 +34,7 @@ func TestStorageClassStrategy(t *testing.T) { } storageClass := &storage.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-class", }, Provisioner: "kubernetes.io/aws-ebs", @@ -51,7 +51,7 @@ func TestStorageClassStrategy(t *testing.T) { } newStorageClass := &storage.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-class-2", ResourceVersion: "4", }, diff --git a/pkg/security/apparmor/BUILD b/pkg/security/apparmor/BUILD index 3682bacaeca..f194512aec7 100644 --- a/pkg/security/apparmor/BUILD +++ b/pkg/security/apparmor/BUILD @@ -33,6 +33,7 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/security/apparmor/validate_test.go b/pkg/security/apparmor/validate_test.go index 2c293a5f3dd..467decfcca4 100644 --- a/pkg/security/apparmor/validate_test.go +++ b/pkg/security/apparmor/validate_test.go @@ -21,6 +21,7 @@ import ( "fmt" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "github.com/stretchr/testify/assert" @@ -134,7 +135,7 @@ func TestValidateValidHost(t *testing.T) { // Test multi-container pod. pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ContainerAnnotationKeyPrefix + "init": ProfileNamePrefix + "foo-container", ContainerAnnotationKeyPrefix + "test1": ProfileRuntimeDefault, @@ -182,7 +183,7 @@ func getPodWithProfile(profile string) *v1.Pod { } } return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: annotations, }, Spec: v1.PodSpec{ diff --git a/pkg/security/podsecuritypolicy/BUILD b/pkg/security/podsecuritypolicy/BUILD index 6e4f454ff9b..e78c296663a 100644 --- a/pkg/security/podsecuritypolicy/BUILD +++ b/pkg/security/podsecuritypolicy/BUILD @@ -47,6 +47,7 @@ go_test( "//pkg/security/podsecuritypolicy/seccomp:go_default_library", "//pkg/security/podsecuritypolicy/util:go_default_library", "//vendor:github.com/davecgh/go-spew/spew", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], diff --git a/pkg/security/podsecuritypolicy/apparmor/BUILD b/pkg/security/podsecuritypolicy/apparmor/BUILD index 6e2fdea9a49..6b6fdb81432 100644 --- a/pkg/security/podsecuritypolicy/apparmor/BUILD +++ b/pkg/security/podsecuritypolicy/apparmor/BUILD @@ -31,6 +31,7 @@ go_test( "//pkg/util/maps:go_default_library", "//vendor:github.com/davecgh/go-spew/spew", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/security/podsecuritypolicy/apparmor/strategy_test.go b/pkg/security/podsecuritypolicy/apparmor/strategy_test.go index 64e56f60ae0..927bdf9aeba 100644 --- a/pkg/security/podsecuritypolicy/apparmor/strategy_test.go +++ b/pkg/security/podsecuritypolicy/apparmor/strategy_test.go @@ -22,6 +22,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/security/apparmor" "k8s.io/kubernetes/pkg/util/maps" @@ -162,7 +163,7 @@ func TestValidate(t *testing.T) { func makeTestPod(annotations map[string]string) (*api.Pod, *api.Container) { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-pod", Annotations: maps.CopySS(annotations), }, diff --git a/pkg/security/podsecuritypolicy/provider_test.go b/pkg/security/podsecuritypolicy/provider_test.go index d35af12fff1..3e29ec1ae6a 100644 --- a/pkg/security/podsecuritypolicy/provider_test.go +++ b/pkg/security/podsecuritypolicy/provider_test.go @@ -24,6 +24,7 @@ import ( "github.com/davecgh/go-spew/spew" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/kubernetes/pkg/api" @@ -49,7 +50,7 @@ func TestCreatePodSecurityContextNonmutating(t *testing.T) { // Create a PSP with strategies that will populate a blank psc createPSP := func() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "psp-sa", Annotations: map[string]string{ seccomp.AllowedProfilesAnnotationKey: "*", @@ -125,7 +126,7 @@ func TestCreateContainerSecurityContextNonmutating(t *testing.T) { createPSP := func() *extensions.PodSecurityPolicy { var uid int64 = 1 return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "psp-sa", Annotations: map[string]string{ seccomp.AllowedProfilesAnnotationKey: "*", @@ -891,7 +892,7 @@ func TestGenerateContainerSecurityContextReadOnlyRootFS(t *testing.T) { func defaultPSP() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "psp-sa", Annotations: map[string]string{}, }, @@ -915,7 +916,7 @@ func defaultPSP() *extensions.PodSecurityPolicy { func defaultPod() *api.Pod { var notPriv bool = false return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, Spec: api.PodSpec{ @@ -939,7 +940,7 @@ func defaultPod() *api.Pod { func defaultV1Pod() *v1.Pod { var notPriv bool = false return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, Spec: v1.PodSpec{ diff --git a/pkg/security/podsecuritypolicy/seccomp/BUILD b/pkg/security/podsecuritypolicy/seccomp/BUILD index a3b2276f2e9..3c1311cb3b9 100644 --- a/pkg/security/podsecuritypolicy/seccomp/BUILD +++ b/pkg/security/podsecuritypolicy/seccomp/BUILD @@ -23,7 +23,10 @@ go_test( srcs = ["strategy_test.go"], library = ":go_default_library", tags = ["automanaged"], - deps = ["//pkg/api:go_default_library"], + deps = [ + "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/pkg/security/podsecuritypolicy/seccomp/strategy_test.go b/pkg/security/podsecuritypolicy/seccomp/strategy_test.go index 6a371f4c05e..663900ecf27 100644 --- a/pkg/security/podsecuritypolicy/seccomp/strategy_test.go +++ b/pkg/security/podsecuritypolicy/seccomp/strategy_test.go @@ -21,6 +21,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -208,7 +209,7 @@ func TestValidatePod(t *testing.T) { } for k, v := range tests { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: v.podAnnotations, }, } @@ -295,7 +296,7 @@ func TestValidateContainer(t *testing.T) { } for k, v := range tests { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: v.podAnnotations, }, } diff --git a/pkg/serviceaccount/BUILD b/pkg/serviceaccount/BUILD index 017518359ec..f56e4a0b331 100644 --- a/pkg/serviceaccount/BUILD +++ b/pkg/serviceaccount/BUILD @@ -36,6 +36,7 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/controller/serviceaccount:go_default_library", "//pkg/serviceaccount:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/authentication/serviceaccount", ], ) diff --git a/pkg/serviceaccount/jwt_test.go b/pkg/serviceaccount/jwt_test.go index f72a4180b00..7908114fa26 100644 --- a/pkg/serviceaccount/jwt_test.go +++ b/pkg/serviceaccount/jwt_test.go @@ -22,6 +22,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/kubernetes/pkg/api/v1" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -166,20 +167,20 @@ func TestTokenGenerateAndValidate(t *testing.T) { // Related API objects serviceAccount := &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "my-service-account", UID: "12345", Namespace: "test", }, } rsaSecret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "my-rsa-secret", Namespace: "test", }, } ecdsaSecret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "my-ecdsa-secret", Namespace: "test", }, diff --git a/pkg/storage/cacher_test.go b/pkg/storage/cacher_test.go index 3cc804f7e6b..a1576e39ef9 100644 --- a/pkg/storage/cacher_test.go +++ b/pkg/storage/cacher_test.go @@ -70,7 +70,7 @@ func newTestCacher(s storage.Interface, cap int) *storage.Cacher { func makeTestPod(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "ns", Name: name}, + ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: name}, Spec: apitesting.DeepEqualSafePodSpec(), } } diff --git a/pkg/storage/etcd/BUILD b/pkg/storage/etcd/BUILD index 10b101a90c4..fa3443229e0 100644 --- a/pkg/storage/etcd/BUILD +++ b/pkg/storage/etcd/BUILD @@ -49,7 +49,6 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/testing:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/fields:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/etcd/etcdtest:go_default_library", @@ -57,6 +56,7 @@ go_test( "//pkg/storage/testing:go_default_library", "//vendor:github.com/coreos/etcd/client", "//vendor:golang.org/x/net/context", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/pkg/storage/etcd/api_object_versioner.go b/pkg/storage/etcd/api_object_versioner.go index c1a63ee28ce..dcf813770c8 100644 --- a/pkg/storage/etcd/api_object_versioner.go +++ b/pkg/storage/etcd/api_object_versioner.go @@ -20,8 +20,8 @@ import ( "strconv" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/storage" ) diff --git a/pkg/storage/etcd/api_object_versioner_test.go b/pkg/storage/etcd/api_object_versioner_test.go index ad64e92887c..acbce6243fb 100644 --- a/pkg/storage/etcd/api_object_versioner_test.go +++ b/pkg/storage/etcd/api_object_versioner_test.go @@ -19,19 +19,19 @@ package etcd import ( "testing" - apiv1 "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" storagetesting "k8s.io/kubernetes/pkg/storage/testing" ) func TestObjectVersioner(t *testing.T) { v := APIObjectVersioner{} - if ver, err := v.ObjectResourceVersion(&storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "5"}}); err != nil || ver != 5 { + if ver, err := v.ObjectResourceVersion(&storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "5"}}); err != nil || ver != 5 { t.Errorf("unexpected version: %d %v", ver, err) } - if ver, err := v.ObjectResourceVersion(&storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "a"}}); err == nil || ver != 0 { + if ver, err := v.ObjectResourceVersion(&storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "a"}}); err == nil || ver != 0 { t.Errorf("unexpected version: %d %v", ver, err) } - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "a"}} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "a"}} if err := v.UpdateObject(obj, 5); err != nil { t.Fatalf("unexpected error: %v", err) } @@ -41,8 +41,8 @@ func TestObjectVersioner(t *testing.T) { } func TestCompareResourceVersion(t *testing.T) { - five := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "5"}} - six := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "6"}} + five := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "5"}} + six := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "6"}} versioner := APIObjectVersioner{} diff --git a/pkg/storage/etcd/etcd_helper.go b/pkg/storage/etcd/etcd_helper.go index fd6c226cf2b..f92f6ac143a 100644 --- a/pkg/storage/etcd/etcd_helper.go +++ b/pkg/storage/etcd/etcd_helper.go @@ -24,6 +24,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" @@ -131,7 +132,7 @@ func checkPreconditions(key string, preconditions *storage.Preconditions, out ru if preconditions == nil { return nil } - objMeta, err := api.ObjectMetaFor(out) + objMeta, err := metav1.ObjectMetaFor(out) if err != nil { return storage.NewInternalErrorf("can't enforce preconditions %v on un-introspectable object %v, got error: %v", *preconditions, out, err) } diff --git a/pkg/storage/etcd/etcd_helper_test.go b/pkg/storage/etcd/etcd_helper_test.go index aa1d9dedceb..328b2a3c54a 100644 --- a/pkg/storage/etcd/etcd_helper_test.go +++ b/pkg/storage/etcd/etcd_helper_test.go @@ -25,6 +25,7 @@ import ( etcd "github.com/coreos/etcd/client" "golang.org/x/net/context" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +33,6 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" - apiv1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/storage" "k8s.io/kubernetes/pkg/storage/etcd/etcdtest" @@ -68,7 +68,7 @@ func newEtcdHelper(client etcd.Client, codec runtime.Codec, prefix string) etcdH // Returns an encoded version of api.Pod with the given name. func getEncodedPod(name string) string { pod, _ := runtime.Encode(testapi.Default.Codec(), &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, }) return string(pod) } @@ -101,15 +101,15 @@ func TestList(t *testing.T) { list := api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -137,15 +137,15 @@ func TestListFiltered(t *testing.T) { list := api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -184,15 +184,15 @@ func TestListAcrossDirectories(t *testing.T) { list := api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -224,7 +224,7 @@ func TestGet(t *testing.T) { key := "/some/key" helper := newEtcdHelper(server.Client, testapi.Default.Codec(), etcdtest.PathPrefix()) expect := api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), } var got api.Pod @@ -254,7 +254,7 @@ func TestGetNotFoundErr(t *testing.T) { } func TestCreate(t *testing.T) { - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} server := etcdtesting.NewEtcdTestClientServer(t) defer server.Terminate(t) helper := newEtcdHelper(server.Client, testapi.Default.Codec(), etcdtest.PathPrefix()) @@ -281,7 +281,7 @@ func TestCreate(t *testing.T) { } func TestCreateNilOutParam(t *testing.T) { - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} server := etcdtesting.NewEtcdTestClientServer(t) defer server.Terminate(t) helper := newEtcdHelper(server.Client, testapi.Default.Codec(), etcdtest.PathPrefix()) @@ -298,7 +298,7 @@ func TestGuaranteedUpdate(t *testing.T) { key := "/some/key" helper := newEtcdHelper(server.Client, codec, etcdtest.PathPrefix()) - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 1} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 1} err := helper.GuaranteedUpdate(context.TODO(), key, &storagetesting.TestResource{}, true, nil, storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { return obj, nil })) @@ -308,7 +308,7 @@ func TestGuaranteedUpdate(t *testing.T) { // Update an existing node. callbackCalled := false - objUpdate := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 2} + objUpdate := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 2} err = helper.GuaranteedUpdate(context.TODO(), key, &storagetesting.TestResource{}, true, nil, storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { callbackCalled = true @@ -343,7 +343,7 @@ func TestGuaranteedUpdateNoChange(t *testing.T) { key := "/some/key" helper := newEtcdHelper(server.Client, codec, etcdtest.PathPrefix()) - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 1} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 1} err := helper.GuaranteedUpdate(context.TODO(), key, &storagetesting.TestResource{}, true, nil, storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { return obj, nil })) @@ -353,7 +353,7 @@ func TestGuaranteedUpdateNoChange(t *testing.T) { // Update an existing node with the same data callbackCalled := false - objUpdate := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 1} + objUpdate := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 1} err = helper.GuaranteedUpdate(context.TODO(), key, &storagetesting.TestResource{}, true, nil, storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { callbackCalled = true return objUpdate, nil @@ -374,7 +374,7 @@ func TestGuaranteedUpdateKeyNotFound(t *testing.T) { helper := newEtcdHelper(server.Client, codec, etcdtest.PathPrefix()) // Create a new node. - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 1} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 1} f := storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { return obj, nil @@ -422,7 +422,7 @@ func TestGuaranteedUpdate_CreateCollision(t *testing.T) { } currValue := in.(*storagetesting.TestResource).Value - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: currValue + 1} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: currValue + 1} return obj, nil })) if err != nil { @@ -448,7 +448,7 @@ func TestGuaranteedUpdateUIDMismatch(t *testing.T) { prefix := path.Join("/", etcdtest.PathPrefix()) helper := newEtcdHelper(server.Client, testapi.Default.Codec(), prefix) - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}} podPtr := &api.Pod{} err := helper.Create(context.TODO(), "/some/key", obj, podPtr, 0) if err != nil { @@ -468,7 +468,7 @@ func TestDeleteUIDMismatch(t *testing.T) { prefix := path.Join("/", etcdtest.PathPrefix()) helper := newEtcdHelper(server.Client, testapi.Default.Codec(), prefix) - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}} podPtr := &api.Pod{} err := helper.Create(context.TODO(), "/some/key", obj, podPtr, 0) if err != nil { @@ -507,7 +507,7 @@ func TestDeleteWithRetry(t *testing.T) { defer server.Terminate(t) prefix := path.Join("/", etcdtest.PathPrefix()) - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}} // fakeGet returns a large ModifiedIndex to emulate the case that another // party has updated the object. fakeGet := func(ctx context.Context, key string, opts *etcd.GetOptions) (*etcd.Response, error) { diff --git a/pkg/storage/etcd/etcd_watcher_test.go b/pkg/storage/etcd/etcd_watcher_test.go index 359ff3fe121..c07c189fe70 100644 --- a/pkg/storage/etcd/etcd_watcher_test.go +++ b/pkg/storage/etcd/etcd_watcher_test.go @@ -20,6 +20,7 @@ import ( rt "runtime" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" @@ -49,9 +50,9 @@ var _ etcdCache = &fakeEtcdCache{} func TestWatchInterpretations(t *testing.T) { codec := testapi.Default.Codec() // Declare some pods to make the test cases compact. - podFoo := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - podBar := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} - podBaz := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "baz"}} + podFoo := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + podBar := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} + podBaz := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "baz"}} // All of these test cases will be run with the firstLetterIsB Filter. table := map[string]struct { @@ -229,8 +230,8 @@ func TestSendResultDeleteEventHaveLatestIndex(t *testing.T) { eventChan <- e } - fooPod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - barPod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} + fooPod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + barPod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} fooBytes, err := runtime.Encode(codec, fooPod) if err != nil { t.Fatalf("Encode failed: %v", err) @@ -299,7 +300,7 @@ func TestWatch(t *testing.T) { // watching is explicitly closed below. // Test normal case - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} returnObj := &api.Pod{} err = h.Create(context.TODO(), key, pod, returnObj, 0) if err != nil { @@ -353,7 +354,7 @@ func TestWatchEtcdState(t *testing.T) { defer watching.Stop() endpoint := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Subsets: emptySubsets(), } @@ -397,7 +398,7 @@ func TestWatchEtcdState(t *testing.T) { func TestWatchFromZeroIndex(t *testing.T) { codec := testapi.Default.Codec() - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key := "/somekey/foo" server := etcdtesting.NewEtcdTestClientServer(t) @@ -482,7 +483,7 @@ func TestWatchListFromZeroIndex(t *testing.T) { defer watching.Stop() // creates foo which should trigger the WatchList for "/" - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} err = h.Create(context.TODO(), pod.Name, pod, pod, 0) if err != nil { t.Fatalf("Unexpected error: %v", err) @@ -500,7 +501,7 @@ func TestWatchListFromZeroIndex(t *testing.T) { func TestWatchListIgnoresRootKey(t *testing.T) { codec := testapi.Default.Codec() - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key := "/some/key" server := etcdtesting.NewEtcdTestClientServer(t) defer server.Terminate(t) diff --git a/pkg/storage/etcd3/BUILD b/pkg/storage/etcd3/BUILD index 66848682d04..60e5a751a8b 100644 --- a/pkg/storage/etcd3/BUILD +++ b/pkg/storage/etcd3/BUILD @@ -18,7 +18,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/etcd:go_default_library", "//pkg/util:go_default_library", diff --git a/pkg/storage/etcd3/store.go b/pkg/storage/etcd3/store.go index 809d94f7a26..bcecfbfc384 100644 --- a/pkg/storage/etcd3/store.go +++ b/pkg/storage/etcd3/store.go @@ -26,10 +26,10 @@ import ( "time" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/storage" "k8s.io/kubernetes/pkg/storage/etcd" "k8s.io/kubernetes/pkg/util" @@ -497,7 +497,7 @@ func checkPreconditions(key string, preconditions *storage.Preconditions, out ru if preconditions == nil { return nil } - objMeta, err := api.ObjectMetaFor(out) + objMeta, err := metav1.ObjectMetaFor(out) if err != nil { return storage.NewInternalErrorf("can't enforce preconditions %v on un-introspectable object %v, got error: %v", *preconditions, out, err) } diff --git a/pkg/storage/etcd3/store_test.go b/pkg/storage/etcd3/store_test.go index 5de7a91e227..1ce84735d16 100644 --- a/pkg/storage/etcd3/store_test.go +++ b/pkg/storage/etcd3/store_test.go @@ -22,6 +22,7 @@ import ( "sync" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -41,7 +42,7 @@ func TestCreate(t *testing.T) { key := "/testkey" out := &api.Pod{} - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} // verify that kv pair is empty before set getResp, err := etcdClient.KV.Get(ctx, key) @@ -78,7 +79,7 @@ func TestCreateWithTTL(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - input := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + input := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key := "/somekey" out := &api.Pod{} @@ -96,7 +97,7 @@ func TestCreateWithTTL(t *testing.T) { func TestCreateWithKeyExist(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key, _ := testPropogateStore(ctx, t, store, obj) out := &api.Pod{} err := store.Create(ctx, key, obj, out, 0) @@ -108,7 +109,7 @@ func TestCreateWithKeyExist(t *testing.T) { func TestGet(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) tests := []struct { key string @@ -152,7 +153,7 @@ func TestGet(t *testing.T) { func TestUnconditionalDelete(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) tests := []struct { key string @@ -189,7 +190,7 @@ func TestUnconditionalDelete(t *testing.T) { func TestConditionalDelete(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}}) tests := []struct { precondition *storage.Preconditions @@ -217,14 +218,14 @@ func TestConditionalDelete(t *testing.T) { if !reflect.DeepEqual(storedObj, out) { t.Errorf("#%d: pod want=%#v, get=%#v", i, storedObj, out) } - key, storedObj = testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}}) + key, storedObj = testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}}) } } func TestGetToList(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) tests := []struct { key string @@ -273,7 +274,7 @@ func TestGetToList(t *testing.T) { func TestGuaranteedUpdate(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storeObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}}) + key, storeObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}}) tests := []struct { key string @@ -381,7 +382,7 @@ func TestGuaranteedUpdateWithTTL(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - input := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + input := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key := "/somekey" out := &api.Pod{} @@ -404,7 +405,7 @@ func TestGuaranteedUpdateWithTTL(t *testing.T) { func TestGuaranteedUpdateWithConflict(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, _ := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, _ := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) errChan := make(chan error, 1) var firstToFinish sync.WaitGroup @@ -471,13 +472,13 @@ func TestList(t *testing.T) { storedObj *api.Pod }{{ key: "/one-level/test", - obj: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + obj: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, }, { key: "/two-level/1/test", - obj: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + obj: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, }, { key: "/two-level/2/test", - obj: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}}, + obj: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, }} for i, ps := range preset { diff --git a/pkg/storage/etcd3/watcher_test.go b/pkg/storage/etcd3/watcher_test.go index 447bcc1d072..d51b8f6e449 100644 --- a/pkg/storage/etcd3/watcher_test.go +++ b/pkg/storage/etcd3/watcher_test.go @@ -55,8 +55,8 @@ func TestWatchList(t *testing.T) { func testWatch(t *testing.T, recursive bool) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - podFoo := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - podBar := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} + podFoo := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + podBar := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} tests := []struct { key string @@ -130,7 +130,7 @@ func testWatch(t *testing.T, recursive bool) { func TestDeleteTriggerWatch(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) w, err := store.Watch(ctx, key, storedObj.ResourceVersion, storage.Everything) if err != nil { t.Fatalf("Watch failed: %v", err) @@ -147,7 +147,7 @@ func TestDeleteTriggerWatch(t *testing.T) { func TestWatchFromZero(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "ns"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "ns"}}) w, err := store.Watch(ctx, key, "0", storage.Everything) if err != nil { @@ -160,7 +160,7 @@ func TestWatchFromZero(t *testing.T) { out := &api.Pod{} err = store.GuaranteedUpdate(ctx, key, out, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { - return &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "ns", Annotations: map[string]string{"a": "1"}}}, nil + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "ns", Annotations: map[string]string{"a": "1"}}}, nil })) if err != nil { t.Fatalf("GuaranteedUpdate failed: %v", err) @@ -178,7 +178,7 @@ func TestWatchFromZero(t *testing.T) { out = &api.Pod{} err = store.GuaranteedUpdate(ctx, key, out, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { - return &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "ns"}}, nil + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "ns"}}, nil })) if err != nil { t.Fatalf("GuaranteedUpdate failed: %v", err) @@ -207,7 +207,7 @@ func TestWatchFromZero(t *testing.T) { func TestWatchFromNoneZero(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) w, err := store.Watch(ctx, key, storedObj.ResourceVersion, storage.Everything) if err != nil { @@ -216,7 +216,7 @@ func TestWatchFromNoneZero(t *testing.T) { out := &api.Pod{} store.GuaranteedUpdate(ctx, key, out, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { - return &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}}, err + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, err })) testCheckResult(t, 0, watch.Modified, w, out) } @@ -233,7 +233,7 @@ func TestWatchError(t *testing.T) { validStore := newStore(cluster.RandClient(), false, testapi.Default.Codec(), "") validStore.GuaranteedUpdate(ctx, "/abc", &api.Pod{}, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { - return &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, nil + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, nil })) testCheckEventType(t, watch.Error, w) } @@ -286,7 +286,7 @@ func TestWatchErrResultNotBlockAfterCancel(t *testing.T) { func TestWatchDeleteEventObjectHaveLatestRV(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) w, err := store.Watch(ctx, key, storedObj.ResourceVersion, storage.Everything) if err != nil { diff --git a/pkg/storage/testing/BUILD b/pkg/storage/testing/BUILD index 0b70d657764..487ed43e338 100644 --- a/pkg/storage/testing/BUILD +++ b/pkg/storage/testing/BUILD @@ -16,7 +16,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/storage:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:golang.org/x/net/context", diff --git a/pkg/storage/testing/types.generated.go b/pkg/storage/testing/types.generated.go index 07cc99c34e4..cf7e8aef497 100644 --- a/pkg/storage/testing/types.generated.go +++ b/pkg/storage/testing/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -156,13 +154,25 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) @@ -270,21 +280,27 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "value": if r.TryDecodeAsNil() { x.Value = 0 } else { - yyv9 := &x.Value - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Value + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*int)(yyv9)) = int(r.DecodeInt(codecSelferBitsize1234)) + *((*int)(yyv10)) = int(r.DecodeInt(codecSelferBitsize1234)) } } default: @@ -298,16 +314,16 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -315,21 +331,21 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -337,38 +353,44 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -376,26 +398,26 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Value = 0 } else { - yyv17 := &x.Value - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Value + yym20 := z.DecBinary() + _ = yym20 if false { } else { - *((*int)(yyv17)) = int(r.DecodeInt(codecSelferBitsize1234)) + *((*int)(yyv19)) = int(r.DecodeInt(codecSelferBitsize1234)) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/storage/testing/types.go b/pkg/storage/testing/types.go index eb936d81698..6606f2e8e71 100644 --- a/pkg/storage/testing/types.go +++ b/pkg/storage/testing/types.go @@ -19,13 +19,12 @@ package testing import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - apiv1 "k8s.io/kubernetes/pkg/api/v1" ) type TestResource struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` - Value int `json:"value"` + Value int `json:"value"` } func (obj *TestResource) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/storage/watch_cache_test.go b/pkg/storage/watch_cache_test.go index 7ce5485337f..32a9c00f60a 100644 --- a/pkg/storage/watch_cache_test.go +++ b/pkg/storage/watch_cache_test.go @@ -37,7 +37,7 @@ import ( func makeTestPod(name string, resourceVersion uint64) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns", Name: name, ResourceVersion: strconv.FormatUint(resourceVersion, 10), diff --git a/pkg/util/bandwidth/BUILD b/pkg/util/bandwidth/BUILD index 7036489be48..13584addc2c 100644 --- a/pkg/util/bandwidth/BUILD +++ b/pkg/util/bandwidth/BUILD @@ -38,6 +38,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/util/exec:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/pkg/util/bandwidth/utils_test.go b/pkg/util/bandwidth/utils_test.go index 48696f40088..be572db7d4e 100644 --- a/pkg/util/bandwidth/utils_test.go +++ b/pkg/util/bandwidth/utils_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" ) @@ -30,7 +31,7 @@ func TestExtractPodBandwidthResources(t *testing.T) { twenty, _ := resource.ParseQuantity("20M") testPod := func(ingress, egress string) *api.Pod { - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Annotations: map[string]string{}}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Annotations: map[string]string{}}} if len(ingress) != 0 { pod.Annotations["kubernetes.io/ingress-bandwidth"] = ingress } diff --git a/pkg/util/node/node_test.go b/pkg/util/node/node_test.go index ddf7c3306bb..ca8fb15ff94 100644 --- a/pkg/util/node/node_test.go +++ b/pkg/util/node/node_test.go @@ -72,7 +72,7 @@ func TestGetPreferredAddress(t *testing.T) { for k, tc := range testcases { node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Labels: tc.Labels}, + ObjectMeta: metav1.ObjectMeta{Labels: tc.Labels}, Status: v1.NodeStatus{Addresses: tc.Addresses}, } address, err := GetPreferredNodeAddress(node, tc.Preferences) diff --git a/pkg/util/system/BUILD b/pkg/util/system/BUILD index e5421672908..1904ade565b 100644 --- a/pkg/util/system/BUILD +++ b/pkg/util/system/BUILD @@ -19,7 +19,10 @@ go_test( srcs = ["system_utils_test.go"], library = ":go_default_library", tags = ["automanaged"], - deps = ["//pkg/api/v1:go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/pkg/util/system/system_utils_test.go b/pkg/util/system/system_utils_test.go index 69dcc8fd109..23b98b04af2 100644 --- a/pkg/util/system/system_utils_test.go +++ b/pkg/util/system/system_utils_test.go @@ -19,6 +19,7 @@ package system import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -37,7 +38,7 @@ func TestIsMasterNode(t *testing.T) { } for _, tc := range testCases { - node := v1.Node{ObjectMeta: v1.ObjectMeta{Name: tc.input}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: tc.input}} res := IsMasterNode(node.Name) if res != tc.result { t.Errorf("case \"%s\": expected %t, got %t", tc.input, tc.result, res) diff --git a/pkg/volume/BUILD b/pkg/volume/BUILD index f73beda2a45..2b69bed1096 100644 --- a/pkg/volume/BUILD +++ b/pkg/volume/BUILD @@ -61,6 +61,7 @@ go_test( "//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", ], diff --git a/pkg/volume/aws_ebs/BUILD b/pkg/volume/aws_ebs/BUILD index f93138b9f0a..bb8b8c056ec 100644 --- a/pkg/volume/aws_ebs/BUILD +++ b/pkg/volume/aws_ebs/BUILD @@ -28,6 +28,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -49,6 +50,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/aws_ebs/aws_ebs.go b/pkg/volume/aws_ebs/aws_ebs.go index 8a2a44d41a9..20a7f4ab51f 100644 --- a/pkg/volume/aws_ebs/aws_ebs.go +++ b/pkg/volume/aws_ebs/aws_ebs.go @@ -25,6 +25,7 @@ import ( "strings" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -427,7 +428,7 @@ func (c *awsElasticBlockStoreProvisioner) Provision() (*v1.PersistentVolume, err } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/pkg/volume/aws_ebs/aws_ebs_test.go b/pkg/volume/aws_ebs/aws_ebs_test.go index 5c9665338dc..b1b1e3b8f28 100644 --- a/pkg/volume/aws_ebs/aws_ebs_test.go +++ b/pkg/volume/aws_ebs/aws_ebs_test.go @@ -22,6 +22,7 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -216,7 +217,7 @@ func TestPlugin(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -230,7 +231,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -255,7 +256,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/azure_dd/BUILD b/pkg/volume/azure_dd/BUILD index 7cc093e0f53..b88d96321c1 100644 --- a/pkg/volume/azure_dd/BUILD +++ b/pkg/volume/azure_dd/BUILD @@ -30,6 +30,7 @@ go_library( "//pkg/volume/util:go_default_library", "//vendor:github.com/Azure/azure-sdk-for-go/arm/compute", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", ], diff --git a/pkg/volume/azure_dd/azure_provision.go b/pkg/volume/azure_dd/azure_provision.go index 5c9b1353c45..832d98c5512 100644 --- a/pkg/volume/azure_dd/azure_provision.go +++ b/pkg/volume/azure_dd/azure_provision.go @@ -21,6 +21,7 @@ import ( "strings" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" utilstrings "k8s.io/kubernetes/pkg/util/strings" @@ -137,7 +138,7 @@ func (a *azureDiskProvisioner) Provision() (*v1.PersistentVolume, error) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: a.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/pkg/volume/azure_file/BUILD b/pkg/volume/azure_file/BUILD index d77d9f62d2b..f851038eaaf 100644 --- a/pkg/volume/azure_file/BUILD +++ b/pkg/volume/azure_file/BUILD @@ -39,6 +39,7 @@ go_test( "//pkg/util/mount: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", ], ) diff --git a/pkg/volume/azure_file/azure_file.go b/pkg/volume/azure_file/azure_file.go index 51d922ef3c5..14ed10f2426 100644 --- a/pkg/volume/azure_file/azure_file.go +++ b/pkg/volume/azure_file/azure_file.go @@ -20,6 +20,7 @@ import ( "fmt" "os" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" @@ -119,7 +120,7 @@ func (plugin *azureFilePlugin) newUnmounterInternal(volName string, podUID types return &azureFileUnmounter{&azureFile{ volName: volName, mounter: mounter, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, plugin: plugin, MetricsProvider: volume.NewMetricsStatFS(getPath(podUID, volName, plugin.host)), }}, nil diff --git a/pkg/volume/azure_file/azure_file_test.go b/pkg/volume/azure_file/azure_file_test.go index 006bc323e8a..9bf8bfd987e 100644 --- a/pkg/volume/azure_file/azure_file_test.go +++ b/pkg/volume/azure_file/azure_file_test.go @@ -22,6 +22,7 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -104,7 +105,7 @@ func TestPlugin(t *testing.T) { }, } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*azureFilePlugin).newMounterInternal(volume.NewSpecFromVolume(spec), pod, &fakeAzureSvc{}, fake) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -156,7 +157,7 @@ func TestPlugin(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -170,7 +171,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -190,7 +191,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { @@ -227,7 +228,7 @@ func TestMounterAndUnmounterTypeAssert(t *testing.T) { }, } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*azureFilePlugin).newMounterInternal(volume.NewSpecFromVolume(spec), pod, &fakeAzureSvc{}, fake) if _, ok := mounter.(volume.Unmounter); ok { t.Errorf("Volume Mounter can be type-assert to Unmounter") diff --git a/pkg/volume/cinder/BUILD b/pkg/volume/cinder/BUILD index 341542798ef..6dc47c99c1f 100644 --- a/pkg/volume/cinder/BUILD +++ b/pkg/volume/cinder/BUILD @@ -30,6 +30,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/pkg/volume/cinder/cinder.go b/pkg/volume/cinder/cinder.go index 3b087716841..d02e41cbe1f 100644 --- a/pkg/volume/cinder/cinder.go +++ b/pkg/volume/cinder/cinder.go @@ -23,6 +23,7 @@ import ( "path" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -479,7 +480,7 @@ func (c *cinderVolumeProvisioner) Provision() (*v1.PersistentVolume, error) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/pkg/volume/configmap/BUILD b/pkg/volume/configmap/BUILD index 1a005674e61..b77901a5a9b 100644 --- a/pkg/volume/configmap/BUILD +++ b/pkg/volume/configmap/BUILD @@ -41,6 +41,7 @@ go_test( "//pkg/volume/empty_dir: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", ], ) diff --git a/pkg/volume/configmap/configmap_test.go b/pkg/volume/configmap/configmap_test.go index aae4b43b502..b1e122a6080 100644 --- a/pkg/volume/configmap/configmap_test.go +++ b/pkg/volume/configmap/configmap_test.go @@ -25,6 +25,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -290,7 +291,7 @@ func TestPlugin(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -354,7 +355,7 @@ func TestPluginReboot(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -403,7 +404,7 @@ func volumeSpec(volumeName, configMapName string, defaultMode int32) *v1.Volume func configMap(namespace, name string) v1.ConfigMap { return v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, diff --git a/pkg/volume/downwardapi/BUILD b/pkg/volume/downwardapi/BUILD index a62d953b818..2aa2b03da18 100644 --- a/pkg/volume/downwardapi/BUILD +++ b/pkg/volume/downwardapi/BUILD @@ -38,6 +38,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/downwardapi/downwardapi_test.go b/pkg/volume/downwardapi/downwardapi_test.go index 2dbca39ead7..537af0a878f 100644 --- a/pkg/volume/downwardapi/downwardapi_test.go +++ b/pkg/volume/downwardapi/downwardapi_test.go @@ -23,6 +23,7 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -91,7 +92,7 @@ func TestLabels(t *testing.T) { "key2": "value2"} clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -117,7 +118,7 @@ func TestLabels(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { @@ -182,7 +183,7 @@ func TestAnnotations(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Annotations: annotations, @@ -197,7 +198,7 @@ func TestAnnotations(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Annotations: annotations}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Annotations: annotations}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -247,7 +248,7 @@ func TestName(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, }, @@ -261,7 +262,7 @@ func TestName(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Name: testName}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Name: testName}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -312,7 +313,7 @@ func TestNamespace(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, }, @@ -326,7 +327,7 @@ func TestNamespace(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Namespace: testNamespace}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Namespace: testNamespace}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -368,7 +369,7 @@ func TestWriteTwiceNoUpdate(t *testing.T) { "key2": "value2"} clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -393,7 +394,7 @@ func TestWriteTwiceNoUpdate(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { @@ -456,7 +457,7 @@ func TestWriteTwiceWithUpdate(t *testing.T) { "key2": "value2"} clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -481,7 +482,7 @@ func TestWriteTwiceWithUpdate(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { @@ -563,7 +564,7 @@ func TestWriteWithUnixPath(t *testing.T) { "a2": "value2"} clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -591,7 +592,7 @@ func TestWriteWithUnixPath(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels, Annotations: annotations}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels, Annotations: annotations}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { @@ -641,7 +642,7 @@ func TestWriteWithUnixPathBadPath(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -675,7 +676,7 @@ func TestWriteWithUnixPathBadPath(t *testing.T) { }, } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Fatalf("Failed to make a new Mounter: %v", err) @@ -722,7 +723,7 @@ func TestDefaultMode(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, }, @@ -736,7 +737,7 @@ func TestDefaultMode(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Name: testName}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Name: testName}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -792,7 +793,7 @@ func TestItemMode(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, }, @@ -806,7 +807,7 @@ func TestItemMode(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Name: testName}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Name: testName}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) diff --git a/pkg/volume/empty_dir/BUILD b/pkg/volume/empty_dir/BUILD index a1d5b1b1d00..75a6f012302 100644 --- a/pkg/volume/empty_dir/BUILD +++ b/pkg/volume/empty_dir/BUILD @@ -23,6 +23,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -39,6 +40,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/empty_dir/empty_dir.go b/pkg/volume/empty_dir/empty_dir.go index 74100bdf65b..3252cbc1e97 100644 --- a/pkg/volume/empty_dir/empty_dir.go +++ b/pkg/volume/empty_dir/empty_dir.go @@ -22,6 +22,7 @@ import ( "path" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" @@ -116,7 +117,7 @@ func (plugin *emptyDirPlugin) NewUnmounter(volName string, podUID types.UID) (vo func (plugin *emptyDirPlugin) newUnmounterInternal(volName string, podUID types.UID, mounter mount.Interface, mountDetector mountDetector) (volume.Unmounter, error) { ed := &emptyDir{ - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, volName: volName, medium: v1.StorageMediumDefault, // might be changed later mounter: mounter, diff --git a/pkg/volume/empty_dir/empty_dir_test.go b/pkg/volume/empty_dir/empty_dir_test.go index ac6dbbac663..9cf90ec3c13 100644 --- a/pkg/volume/empty_dir/empty_dir_test.go +++ b/pkg/volume/empty_dir/empty_dir_test.go @@ -23,6 +23,7 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" @@ -108,7 +109,7 @@ func doTestPlugin(t *testing.T, config pluginTestConfig) { physicalMounter = mount.FakeMounter{} mountDetector = fakeMountDetector{} - pod = &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod = &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} ) if config.idempotent { @@ -214,7 +215,7 @@ func TestPluginBackCompat(t *testing.T) { spec := &v1.Volume{ Name: "vol1", } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -243,7 +244,7 @@ func TestMetrics(t *testing.T) { spec := &v1.Volume{ Name: "vol1", } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) diff --git a/pkg/volume/fc/BUILD b/pkg/volume/fc/BUILD index 92c30df8287..a38d6f94c91 100644 --- a/pkg/volume/fc/BUILD +++ b/pkg/volume/fc/BUILD @@ -44,6 +44,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/fc/fc_test.go b/pkg/volume/fc/fc_test.go index 565522c3251..f4cd4ff0f96 100644 --- a/pkg/volume/fc/fc_test.go +++ b/pkg/volume/fc/fc_test.go @@ -21,6 +21,7 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -216,7 +217,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { lun := int32(0) vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -241,7 +242,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { lun := int32(0) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -259,7 +260,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -279,7 +280,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/flexvolume/BUILD b/pkg/volume/flexvolume/BUILD index 955514a768d..07cd08ddf40 100644 --- a/pkg/volume/flexvolume/BUILD +++ b/pkg/volume/flexvolume/BUILD @@ -40,6 +40,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/flexvolume/flexvolume_test.go b/pkg/volume/flexvolume/flexvolume_test.go index b6805ae8071..38396db7470 100644 --- a/pkg/volume/flexvolume/flexvolume_test.go +++ b/pkg/volume/flexvolume/flexvolume_test.go @@ -25,6 +25,7 @@ import ( "testing" "text/template" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/exec" @@ -239,7 +240,7 @@ func doTestPluginAttachDetach(t *testing.T, spec *volume.Spec, tmpDir string) { t.Errorf("Can't find the plugin by name") } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} secretMap := make(map[string]string) secretMap["flexsecret"] = base64.StdEncoding.EncodeToString([]byte("foo")) mounter, err := plugin.(*flexVolumePlugin).newMounterInternal(spec, pod, &flexVolumeUtil{}, fake, exec.New(), secretMap) @@ -320,7 +321,7 @@ func doTestPluginMountUnmount(t *testing.T, spec *volume.Spec, tmpDir string) { t.Errorf("Can't find the plugin by name") } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} // Use nil secret to test for nil secret case. mounter, err := plugin.(*flexVolumePlugin).newMounterInternal(spec, pod, &flexVolumeUtil{}, fake, exec.New(), nil) volumePath := mounter.GetPath() @@ -403,7 +404,7 @@ func TestPluginPersistentVolume(t *testing.T) { defer os.RemoveAll(tmpDir) vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ diff --git a/pkg/volume/flocker/BUILD b/pkg/volume/flocker/BUILD index f3cfe1c68f6..eec4e11adde 100644 --- a/pkg/volume/flocker/BUILD +++ b/pkg/volume/flocker/BUILD @@ -27,6 +27,7 @@ go_library( "//pkg/volume/util:go_default_library", "//vendor:github.com/clusterhq/flocker-go", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/rand", ], diff --git a/pkg/volume/flocker/flocker_test.go b/pkg/volume/flocker/flocker_test.go index 36679ed01d5..06340809b7c 100644 --- a/pkg/volume/flocker/flocker_test.go +++ b/pkg/volume/flocker/flocker_test.go @@ -349,7 +349,7 @@ func TestSetUpAtInternal(t *testing.T) { plug, err := plugMgr.FindPluginByName(flockerPluginName) assert.NoError(err) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} b := flockerVolumeMounter{flockerVolume: &flockerVolume{pod: pod, plugin: plug.(*flockerPlugin)}} b.client = newMockFlockerClient("dataset-id", "primary-uid", mockPath) diff --git a/pkg/volume/flocker/flocker_volume.go b/pkg/volume/flocker/flocker_volume.go index 112eeaaf6d8..c3b5f8ccd6f 100644 --- a/pkg/volume/flocker/flocker_volume.go +++ b/pkg/volume/flocker/flocker_volume.go @@ -19,6 +19,7 @@ package flocker import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/volume" @@ -68,7 +69,7 @@ func (c *flockerVolumeProvisioner) Provision() (*v1.PersistentVolume, error) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/pkg/volume/gce_pd/BUILD b/pkg/volume/gce_pd/BUILD index 9ba1e0684fb..9686b54fbc7 100644 --- a/pkg/volume/gce_pd/BUILD +++ b/pkg/volume/gce_pd/BUILD @@ -28,6 +28,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util: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/apimachinery/pkg/util/sets", ], @@ -49,6 +50,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/gce_pd/gce_pd.go b/pkg/volume/gce_pd/gce_pd.go index 78d629d9897..74224d31bff 100644 --- a/pkg/volume/gce_pd/gce_pd.go +++ b/pkg/volume/gce_pd/gce_pd.go @@ -23,6 +23,7 @@ import ( "strconv" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -371,7 +372,7 @@ func (c *gcePersistentDiskProvisioner) Provision() (*v1.PersistentVolume, error) } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/pkg/volume/gce_pd/gce_pd_test.go b/pkg/volume/gce_pd/gce_pd_test.go index 03afdfda93f..0646dd32472 100644 --- a/pkg/volume/gce_pd/gce_pd_test.go +++ b/pkg/volume/gce_pd/gce_pd_test.go @@ -22,6 +22,7 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -209,7 +210,7 @@ func TestPlugin(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -223,7 +224,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -248,7 +249,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/git_repo/BUILD b/pkg/volume/git_repo/BUILD index 269dc867ab4..4797b461f46 100644 --- a/pkg/volume/git_repo/BUILD +++ b/pkg/volume/git_repo/BUILD @@ -36,6 +36,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/git_repo/git_repo_test.go b/pkg/volume/git_repo/git_repo_test.go index 58f789fb2e2..354d4b94aac 100644 --- a/pkg/volume/git_repo/git_repo_test.go +++ b/pkg/volume/git_repo/git_repo_test.go @@ -25,6 +25,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/exec" @@ -231,7 +232,7 @@ func doTestPlugin(scenario struct { fmt.Errorf("Can't find the plugin by name")) return allErrs } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.NewMounter(volume.NewSpecFromVolume(scenario.vol), pod, volume.VolumeOptions{}) if err != nil { diff --git a/pkg/volume/glusterfs/BUILD b/pkg/volume/glusterfs/BUILD index 27f8302ff7c..19cb8754344 100644 --- a/pkg/volume/glusterfs/BUILD +++ b/pkg/volume/glusterfs/BUILD @@ -56,6 +56,7 @@ go_test( "//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", ], diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index f7fd683e160..105684bf994 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -175,7 +175,7 @@ func (plugin *glusterfsPlugin) newUnmounterInternal(volName string, podUID types return &glusterfsUnmounter{&glusterfs{ volName: volName, mounter: mounter, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, plugin: plugin, }}, nil } @@ -771,7 +771,7 @@ func (p *glusterfsVolumeProvisioner) createEndpointService(namespace string, epS addrlist[i].IP = v } endpoint = &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: epServiceName, Labels: map[string]string{ @@ -797,7 +797,7 @@ func (p *glusterfsVolumeProvisioner) createEndpointService(namespace string, epS return nil, nil, fmt.Errorf("error creating endpoint: %v", err) } service = &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: epServiceName, Namespace: namespace, Labels: map[string]string{ diff --git a/pkg/volume/glusterfs/glusterfs_test.go b/pkg/volume/glusterfs/glusterfs_test.go index d03a6822dd6..8760c2a0981 100644 --- a/pkg/volume/glusterfs/glusterfs_test.go +++ b/pkg/volume/glusterfs/glusterfs_test.go @@ -23,6 +23,7 @@ import ( "testing" gapi "github.com/heketi/heketi/pkg/glusterfs/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" @@ -100,7 +101,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) { if err != nil { t.Errorf("Can't find the plugin by name") } - ep := &v1.Endpoints{ObjectMeta: v1.ObjectMeta{Name: "foo"}, Subsets: []v1.EndpointSubset{{ + ep := &v1.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Subsets: []v1.EndpointSubset{{ Addresses: []v1.EndpointAddress{{IP: "127.0.0.1"}}}}} var fcmd exec.FakeCmd fcmd = exec.FakeCmd{ @@ -116,7 +117,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) { func(cmd string, args ...string) exec.Cmd { return exec.InitFakeCmd(&fcmd, cmd, args...) }, }, } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*glusterfsPlugin).newMounterInternal(spec, ep, pod, &mount.FakeMounter{}, &fake) volumePath := mounter.GetPath() if err != nil { @@ -167,7 +168,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -188,7 +189,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { defer os.RemoveAll(tmpDir) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -202,7 +203,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -215,7 +216,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } ep := &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "nsA", Name: "ep", }, @@ -233,7 +234,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: "nsA", UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "nsA", UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/host_path/BUILD b/pkg/volume/host_path/BUILD index e980c7b0eb9..8429e9f1723 100644 --- a/pkg/volume/host_path/BUILD +++ b/pkg/volume/host_path/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/util/uuid:go_default_library", "//pkg/volume:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -37,6 +38,7 @@ go_test( "//pkg/util/uuid: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", ], ) diff --git a/pkg/volume/host_path/host_path.go b/pkg/volume/host_path/host_path.go index 48e7c04a4ad..c39cb3b453c 100644 --- a/pkg/volume/host_path/host_path.go +++ b/pkg/volume/host_path/host_path.go @@ -21,6 +21,7 @@ import ( "os" "regexp" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -275,7 +276,7 @@ func (r *hostPathProvisioner) Provision() (*v1.PersistentVolume, error) { capacity := r.options.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: r.options.PVName, Annotations: map[string]string{ "kubernetes.io/createdby": "hostpath-dynamic-provisioner", diff --git a/pkg/volume/host_path/host_path_test.go b/pkg/volume/host_path/host_path_test.go index 422ecae88e2..c759c0b297c 100644 --- a/pkg/volume/host_path/host_path_test.go +++ b/pkg/volume/host_path/host_path_test.go @@ -23,6 +23,7 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -200,7 +201,7 @@ func TestPlugin(t *testing.T) { Name: "vol1", VolumeSource: v1.VolumeSource{HostPath: &v1.HostPathVolumeSource{Path: "/vol1"}}, } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -233,7 +234,7 @@ func TestPlugin(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -247,7 +248,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -267,7 +268,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/iscsi/BUILD b/pkg/volume/iscsi/BUILD index 17727c167e8..6a1cfd25af0 100644 --- a/pkg/volume/iscsi/BUILD +++ b/pkg/volume/iscsi/BUILD @@ -44,6 +44,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/iscsi/iscsi_test.go b/pkg/volume/iscsi/iscsi_test.go index 0f314529e8f..ace334c6793 100644 --- a/pkg/volume/iscsi/iscsi_test.go +++ b/pkg/volume/iscsi/iscsi_test.go @@ -21,6 +21,7 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -215,7 +216,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -240,7 +241,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { defer os.RemoveAll(tmpDir) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -259,7 +260,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -279,7 +280,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/nfs/BUILD b/pkg/volume/nfs/BUILD index 79388b6f44c..7814c641ca2 100644 --- a/pkg/volume/nfs/BUILD +++ b/pkg/volume/nfs/BUILD @@ -24,6 +24,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -40,6 +41,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/nfs/nfs.go b/pkg/volume/nfs/nfs.go index ae307abad4b..233db97edc0 100644 --- a/pkg/volume/nfs/nfs.go +++ b/pkg/volume/nfs/nfs.go @@ -22,6 +22,7 @@ import ( "runtime" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -127,7 +128,7 @@ func (plugin *nfsPlugin) newUnmounterInternal(volName string, podUID types.UID, return &nfsUnmounter{&nfs{ volName: volName, mounter: mounter, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, plugin: plugin, }}, nil } diff --git a/pkg/volume/nfs/nfs_test.go b/pkg/volume/nfs/nfs_test.go index 6504b2ecd5a..248d20f08b4 100644 --- a/pkg/volume/nfs/nfs_test.go +++ b/pkg/volume/nfs/nfs_test.go @@ -21,6 +21,7 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -139,7 +140,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) { t.Errorf("Can't find the plugin by name") } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*nfsPlugin).newMounterInternal(spec, pod, fake) volumePath := mounter.GetPath() if err != nil { @@ -211,7 +212,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -232,7 +233,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { defer os.RemoveAll(tmpDir) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -246,7 +247,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -266,7 +267,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/photon_pd/BUILD b/pkg/volume/photon_pd/BUILD index e9e9d16d98f..4753f57d08d 100644 --- a/pkg/volume/photon_pd/BUILD +++ b/pkg/volume/photon_pd/BUILD @@ -27,6 +27,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/pkg/volume/photon_pd/photon_pd.go b/pkg/volume/photon_pd/photon_pd.go index 942481f1681..a935a7b6396 100644 --- a/pkg/volume/photon_pd/photon_pd.go +++ b/pkg/volume/photon_pd/photon_pd.go @@ -22,6 +22,7 @@ import ( "path" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -339,7 +340,7 @@ func (p *photonPersistentDiskProvisioner) Provision() (*v1.PersistentVolume, err } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: p.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/pkg/volume/plugins.go b/pkg/volume/plugins.go index 157534185c9..58af1ac52f2 100644 --- a/pkg/volume/plugins.go +++ b/pkg/volume/plugins.go @@ -530,7 +530,7 @@ func (pm *VolumePluginMgr) FindAttachablePluginByName(name string) (AttachableVo func NewPersistentVolumeRecyclerPodTemplate() *v1.Pod { timeout := int64(60) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pv-recycler-", Namespace: v1.NamespaceDefault, }, diff --git a/pkg/volume/plugins_test.go b/pkg/volume/plugins_test.go index da154992461..d08f555a0ff 100644 --- a/pkg/volume/plugins_test.go +++ b/pkg/volume/plugins_test.go @@ -19,6 +19,7 @@ package volume import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" ) @@ -38,7 +39,7 @@ func TestSpecSourceConverters(t *testing.T) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{}}, }, diff --git a/pkg/volume/quobyte/BUILD b/pkg/volume/quobyte/BUILD index f121b0b89a2..eaeca401880 100644 --- a/pkg/volume/quobyte/BUILD +++ b/pkg/volume/quobyte/BUILD @@ -27,6 +27,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:github.com/pborman/uuid", "//vendor:github.com/quobyte/api", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -43,6 +44,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/quobyte/quobyte.go b/pkg/volume/quobyte/quobyte.go index 9a5dcdf8d17..8e827bb7c26 100644 --- a/pkg/volume/quobyte/quobyte.go +++ b/pkg/volume/quobyte/quobyte.go @@ -24,6 +24,7 @@ import ( "github.com/golang/glog" "github.com/pborman/uuid" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -182,7 +183,7 @@ func (plugin *quobytePlugin) newUnmounterInternal(volName string, podUID types.U &quobyte{ volName: volName, mounter: mounter, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, plugin: plugin, }, }, nil diff --git a/pkg/volume/quobyte/quobyte_test.go b/pkg/volume/quobyte/quobyte_test.go index f37d2e15d07..8e6255c83c8 100644 --- a/pkg/volume/quobyte/quobyte_test.go +++ b/pkg/volume/quobyte/quobyte_test.go @@ -21,6 +21,7 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -96,7 +97,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*quobytePlugin).newMounterInternal(spec, pod, &mount.FakeMounter{}) volumePath := mounter.GetPath() if err != nil { @@ -137,7 +138,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -152,7 +153,7 @@ func TestPluginPersistentVolume(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -166,7 +167,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -191,7 +192,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/rbd/BUILD b/pkg/volume/rbd/BUILD index 48d628d0adc..901f300e585 100644 --- a/pkg/volume/rbd/BUILD +++ b/pkg/volume/rbd/BUILD @@ -45,6 +45,7 @@ go_test( "//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", ], ) diff --git a/pkg/volume/rbd/rbd_test.go b/pkg/volume/rbd/rbd_test.go index 48266a2268d..03cd8086063 100644 --- a/pkg/volume/rbd/rbd_test.go +++ b/pkg/volume/rbd/rbd_test.go @@ -21,6 +21,7 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -169,7 +170,7 @@ func TestPluginVolume(t *testing.T) { } func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -194,7 +195,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { defer os.RemoveAll(tmpDir) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -212,7 +213,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -232,7 +233,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/secret/BUILD b/pkg/volume/secret/BUILD index 2cfcf0aa7d8..7b23fa7b373 100644 --- a/pkg/volume/secret/BUILD +++ b/pkg/volume/secret/BUILD @@ -42,6 +42,7 @@ go_test( "//pkg/volume/testing:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/pkg/volume/secret/secret_test.go b/pkg/volume/secret/secret_test.go index 136dfda055e..368df2ff220 100644 --- a/pkg/volume/secret/secret_test.go +++ b/pkg/volume/secret/secret_test.go @@ -26,6 +26,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -292,7 +293,7 @@ func TestPlugin(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -365,7 +366,7 @@ func TestPluginReboot(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -411,7 +412,7 @@ func volumeSpec(volumeName, secretName string, defaultMode int32) *v1.Volume { func secret(namespace, name string) v1.Secret { return v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, diff --git a/pkg/volume/testing/BUILD b/pkg/volume/testing/BUILD index b3ee7d0c416..0b116c89010 100644 --- a/pkg/volume/testing/BUILD +++ b/pkg/volume/testing/BUILD @@ -26,6 +26,7 @@ go_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", ], ) diff --git a/pkg/volume/testing/testing.go b/pkg/volume/testing/testing.go index df5c9c23f96..1102a7bfe12 100644 --- a/pkg/volume/testing/testing.go +++ b/pkg/volume/testing/testing.go @@ -27,6 +27,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -477,7 +478,7 @@ func (fc *FakeProvisioner) Provision() (*v1.PersistentVolume, error) { fullpath := fmt.Sprintf("/tmp/hostpath_pv/%s", uuid.NewUUID()) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fc.Options.PVName, Annotations: map[string]string{ "kubernetes.io/createdby": "fakeplugin-provisioner", @@ -737,7 +738,7 @@ func GetTestVolumePluginMgr( // CreateTestPVC returns a provisionable PVC for tests func CreateTestPVC(capacity string, accessModes []v1.PersistentVolumeAccessMode) *v1.PersistentVolumeClaim { claim := v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dummy", Namespace: "default", }, diff --git a/pkg/volume/util/operationexecutor/BUILD b/pkg/volume/util/operationexecutor/BUILD index 75708295265..af9aa421fa2 100644 --- a/pkg/volume/util/operationexecutor/BUILD +++ b/pkg/volume/util/operationexecutor/BUILD @@ -42,6 +42,7 @@ go_test( "//pkg/util/mount:go_default_library", "//pkg/util/uuid:go_default_library", "//pkg/volume/util/types:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/pkg/volume/util/operationexecutor/operation_executor_test.go b/pkg/volume/util/operationexecutor/operation_executor_test.go index 460793a4235..dfedbe6167a 100644 --- a/pkg/volume/util/operationexecutor/operation_executor_test.go +++ b/pkg/volume/util/operationexecutor/operation_executor_test.go @@ -17,14 +17,16 @@ limitations under the License. package operationexecutor import ( + "strconv" + "testing" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" "k8s.io/kubernetes/pkg/util/uuid" volumetypes "k8s.io/kubernetes/pkg/volume/util/types" - "strconv" - "testing" - "time" ) const ( @@ -281,7 +283,7 @@ func (fopg *fakeOperationGenerator) GenerateVerifyControllerAttachedVolumeFunc(v func getTestPodWithSecret(podName, secretName string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, UID: types.UID(podName), }, @@ -318,7 +320,7 @@ func getTestPodWithSecret(podName, secretName string) *v1.Pod { func getTestPodWithGCEPD(podName, pdName string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, UID: types.UID(podName + string(uuid.NewUUID())), }, diff --git a/pkg/volume/util_test.go b/pkg/volume/util_test.go index 5c284cb8171..c9b3b42538c 100644 --- a/pkg/volume/util_test.go +++ b/pkg/volume/util_test.go @@ -22,6 +22,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" @@ -56,7 +57,7 @@ func newEvent(eventtype, message string) watch.Event { return watch.Event{ Type: watch.Added, Object: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: v1.NamespaceDefault, }, Reason: "MockEvent", @@ -68,7 +69,7 @@ func newEvent(eventtype, message string) watch.Event { func newPod(name string, phase v1.PodPhase, message string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: v1.NamespaceDefault, Name: name, }, diff --git a/pkg/volume/vsphere_volume/BUILD b/pkg/volume/vsphere_volume/BUILD index 888c965ddbf..000f4c73300 100644 --- a/pkg/volume/vsphere_volume/BUILD +++ b/pkg/volume/vsphere_volume/BUILD @@ -28,6 +28,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/pkg/volume/vsphere_volume/vsphere_volume.go b/pkg/volume/vsphere_volume/vsphere_volume.go index 016fe3cd9e9..abaa94729dd 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume.go +++ b/pkg/volume/vsphere_volume/vsphere_volume.go @@ -23,6 +23,7 @@ import ( "strings" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -340,7 +341,7 @@ func (v *vsphereVolumeProvisioner) Provision() (*v1.PersistentVolume, error) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/plugin/cmd/kube-scheduler/app/BUILD b/plugin/cmd/kube-scheduler/app/BUILD index a5c4374c246..1499c24cc02 100644 --- a/plugin/cmd/kube-scheduler/app/BUILD +++ b/plugin/cmd/kube-scheduler/app/BUILD @@ -31,6 +31,7 @@ go_library( "//vendor:github.com/prometheus/client_golang/prometheus", "//vendor:github.com/spf13/cobra", "//vendor:github.com/spf13/pflag", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/healthz", ], diff --git a/plugin/cmd/kube-scheduler/app/server.go b/plugin/cmd/kube-scheduler/app/server.go index f2e6351153b..b0d001d838e 100644 --- a/plugin/cmd/kube-scheduler/app/server.go +++ b/plugin/cmd/kube-scheduler/app/server.go @@ -27,6 +27,7 @@ import ( goruntime "runtime" "strconv" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/healthz" "k8s.io/kubernetes/pkg/api/v1" @@ -101,7 +102,7 @@ func Run(s *options.SchedulerServer) error { } // TODO: enable other lock types rl := &resourcelock.EndpointsLock{ - EndpointsMeta: v1.ObjectMeta{ + EndpointsMeta: metav1.ObjectMeta{ Namespace: "kube-system", Name: "kube-scheduler", }, diff --git a/plugin/pkg/admission/alwayspullimages/BUILD b/plugin/pkg/admission/alwayspullimages/BUILD index 78e1d415bd3..c1142979a62 100644 --- a/plugin/pkg/admission/alwayspullimages/BUILD +++ b/plugin/pkg/admission/alwayspullimages/BUILD @@ -27,6 +27,7 @@ go_test( deps = [ "//pkg/admission:go_default_library", "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/plugin/pkg/admission/alwayspullimages/admission_test.go b/plugin/pkg/admission/alwayspullimages/admission_test.go index 1c4559c3cac..dce8b089ca3 100644 --- a/plugin/pkg/admission/alwayspullimages/admission_test.go +++ b/plugin/pkg/admission/alwayspullimages/admission_test.go @@ -19,6 +19,7 @@ package alwayspullimages import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" @@ -30,7 +31,7 @@ func TestAdmission(t *testing.T) { namespace := "test" handler := &alwaysPullImages{} pod := api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: namespace}, Spec: api.PodSpec{ InitContainers: []api.Container{ {Name: "init1", Image: "image"}, @@ -68,7 +69,7 @@ func TestOtherResources(t *testing.T) { namespace := "testnamespace" name := "testname" pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr2", Image: "image", ImagePullPolicy: api.PullNever}, diff --git a/plugin/pkg/admission/antiaffinity/admission_test.go b/plugin/pkg/admission/antiaffinity/admission_test.go index 4834b44b143..9d8b32b50ab 100644 --- a/plugin/pkg/admission/antiaffinity/admission_test.go +++ b/plugin/pkg/admission/antiaffinity/admission_test.go @@ -250,7 +250,7 @@ func TestOtherResources(t *testing.T) { namespace := "testnamespace" name := "testname" pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, } tests := []struct { name string diff --git a/plugin/pkg/admission/exec/BUILD b/plugin/pkg/admission/exec/BUILD index 56aec7a4eb0..c967ce2d4c9 100644 --- a/plugin/pkg/admission/exec/BUILD +++ b/plugin/pkg/admission/exec/BUILD @@ -34,6 +34,7 @@ go_test( "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/genericapiserver/api/rest:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/plugin/pkg/admission/exec/admission_test.go b/plugin/pkg/admission/exec/admission_test.go index 1094d576971..0e08d5e4bd1 100644 --- a/plugin/pkg/admission/exec/admission_test.go +++ b/plugin/pkg/admission/exec/admission_test.go @@ -19,6 +19,7 @@ package exec import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" @@ -207,7 +208,7 @@ func TestDenyExecOnPrivileged(t *testing.T) { func validPod(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr1", Image: "image"}, diff --git a/plugin/pkg/admission/gc/gc_admission_test.go b/plugin/pkg/admission/gc/gc_admission_test.go index 08c89271288..8498eef0b79 100644 --- a/plugin/pkg/admission/gc/gc_admission_test.go +++ b/plugin/pkg/admission/gc/gc_admission_test.go @@ -71,7 +71,7 @@ func TestGCAdmission(t *testing.T) { name: "super-user, create, objectref change", username: "super", resource: api.SchemeGroupVersion.WithResource("pods"), - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, { @@ -85,7 +85,7 @@ func TestGCAdmission(t *testing.T) { name: "non-deleter, create, objectref change", username: "non-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: false, }, { @@ -99,14 +99,14 @@ func TestGCAdmission(t *testing.T) { name: "non-pod-deleter, create, objectref change", username: "non-pod-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: false, }, { name: "non-pod-deleter, create, objectref change, but not a pod", username: "non-pod-deleter", resource: api.SchemeGroupVersion.WithResource("not-pods"), - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, @@ -122,8 +122,8 @@ func TestGCAdmission(t *testing.T) { name: "super-user, update, no objectref change two", username: "super", resource: api.SchemeGroupVersion.WithResource("pods"), - oldObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + oldObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, { @@ -131,7 +131,7 @@ func TestGCAdmission(t *testing.T) { username: "super", resource: api.SchemeGroupVersion.WithResource("pods"), oldObj: &api.Pod{}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, { @@ -146,8 +146,8 @@ func TestGCAdmission(t *testing.T) { name: "non-deleter, update, no objectref change two", username: "non-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), - oldObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + oldObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, { @@ -155,15 +155,15 @@ func TestGCAdmission(t *testing.T) { username: "non-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), oldObj: &api.Pod{}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: false, }, { name: "non-deleter, update, objectref change two", username: "non-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), - oldObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}, {Name: "second"}}}}, + oldObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}, {Name: "second"}}}}, expectedAllowed: false, }, { @@ -179,7 +179,7 @@ func TestGCAdmission(t *testing.T) { username: "non-pod-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), oldObj: &api.Pod{}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: false, }, { @@ -187,7 +187,7 @@ func TestGCAdmission(t *testing.T) { username: "non-pod-deleter", resource: api.SchemeGroupVersion.WithResource("not-pods"), oldObj: &api.Pod{}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, } diff --git a/plugin/pkg/admission/initialresources/BUILD b/plugin/pkg/admission/initialresources/BUILD index 0dbbe2df344..2c1704cb1ad 100644 --- a/plugin/pkg/admission/initialresources/BUILD +++ b/plugin/pkg/admission/initialresources/BUILD @@ -48,6 +48,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//vendor:github.com/stretchr/testify/require", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/plugin/pkg/admission/initialresources/admission_test.go b/plugin/pkg/admission/initialresources/admission_test.go index 255c2a4b536..ce8e1138163 100644 --- a/plugin/pkg/admission/initialresources/admission_test.go +++ b/plugin/pkg/admission/initialresources/admission_test.go @@ -20,6 +20,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" @@ -57,7 +58,7 @@ func addContainer(pod *api.Pod, name, image string, request api.ResourceList) { func createPod(name string, image string, request api.ResourceList) *api.Pod { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test-ns"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test-ns"}, Spec: api.PodSpec{}, } pod.Spec.Containers = []api.Container{} diff --git a/plugin/pkg/admission/limitranger/admission_test.go b/plugin/pkg/admission/limitranger/admission_test.go index 7639716e73d..2571424d854 100644 --- a/plugin/pkg/admission/limitranger/admission_test.go +++ b/plugin/pkg/admission/limitranger/admission_test.go @@ -64,7 +64,7 @@ func getResourceRequirements(requests, limits api.ResourceList) api.ResourceRequ // createLimitRange creates a limit range with the specified data func createLimitRange(limitType api.LimitType, min, max, defaultLimit, defaultRequest, maxLimitRequestRatio api.ResourceList) api.LimitRange { return api.LimitRange{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "test", }, @@ -85,7 +85,7 @@ func createLimitRange(limitType api.LimitType, min, max, defaultLimit, defaultRe func validLimitRange() api.LimitRange { return api.LimitRange{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "test", }, @@ -110,7 +110,7 @@ func validLimitRange() api.LimitRange { func validLimitRangeNoDefaults() api.LimitRange { return api.LimitRange{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "test", }, @@ -133,7 +133,7 @@ func validLimitRangeNoDefaults() api.LimitRange { func validPod(name string, numContainers int, resources api.ResourceRequirements) api.Pod { pod := api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PodSpec{}, } pod.Spec.Containers = make([]api.Container, 0, numContainers) @@ -602,7 +602,7 @@ func newHandlerForTest(c clientset.Interface) (admission.Interface, informers.Sh func validPersistentVolumeClaim(name string, resources api.ResourceRequirements) api.PersistentVolumeClaim { pvc := api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PersistentVolumeClaimSpec{ Resources: resources, }, diff --git a/plugin/pkg/admission/namespace/autoprovision/BUILD b/plugin/pkg/admission/namespace/autoprovision/BUILD index 3169cfff935..3e41df513c8 100644 --- a/plugin/pkg/admission/namespace/autoprovision/BUILD +++ b/plugin/pkg/admission/namespace/autoprovision/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/controller/informers:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/plugin/pkg/admission/namespace/autoprovision/admission.go b/plugin/pkg/admission/namespace/autoprovision/admission.go index 57133d53609..d68a71e1179 100644 --- a/plugin/pkg/admission/namespace/autoprovision/admission.go +++ b/plugin/pkg/admission/namespace/autoprovision/admission.go @@ -21,6 +21,7 @@ import ( "io" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" @@ -59,7 +60,7 @@ func (p *provision) Admit(a admission.Attributes) (err error) { return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request")) } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: a.GetNamespace(), Namespace: "", }, diff --git a/plugin/pkg/admission/namespace/autoprovision/admission_test.go b/plugin/pkg/admission/namespace/autoprovision/admission_test.go index 1e9306e6bf8..a950ca81066 100644 --- a/plugin/pkg/admission/namespace/autoprovision/admission_test.go +++ b/plugin/pkg/admission/namespace/autoprovision/admission_test.go @@ -55,7 +55,7 @@ func newMockClientForTest(namespaces []string) *fake.Clientset { } for i, ns := range namespaces { namespaceList.Items = append(namespaceList.Items, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ns, ResourceVersion: fmt.Sprintf("%d", i), }, @@ -69,7 +69,7 @@ func newMockClientForTest(namespaces []string) *fake.Clientset { // newPod returns a new pod for the specified namespace func newPod(namespace string) api.Pod { return api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: namespace}, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "vol"}}, Containers: []api.Container{{Name: "ctr", Image: "image"}}, diff --git a/plugin/pkg/admission/namespace/exists/admission.go b/plugin/pkg/admission/namespace/exists/admission.go index 0b9d1a80e3a..94697a0b540 100644 --- a/plugin/pkg/admission/namespace/exists/admission.go +++ b/plugin/pkg/admission/namespace/exists/admission.go @@ -61,7 +61,7 @@ func (e *exists) Admit(a admission.Attributes) (err error) { return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request")) } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: a.GetNamespace(), Namespace: "", }, diff --git a/plugin/pkg/admission/namespace/exists/admission_test.go b/plugin/pkg/admission/namespace/exists/admission_test.go index 1b45db60acf..c5f3da09425 100644 --- a/plugin/pkg/admission/namespace/exists/admission_test.go +++ b/plugin/pkg/admission/namespace/exists/admission_test.go @@ -54,7 +54,7 @@ func newMockClientForTest(namespaces []string) *fake.Clientset { } for i, ns := range namespaces { namespaceList.Items = append(namespaceList.Items, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ns, ResourceVersion: fmt.Sprintf("%d", i), }, @@ -68,7 +68,7 @@ func newMockClientForTest(namespaces []string) *fake.Clientset { // newPod returns a new pod for the specified namespace func newPod(namespace string) api.Pod { return api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: namespace}, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "vol"}}, Containers: []api.Container{{Name: "ctr", Image: "image"}}, diff --git a/plugin/pkg/admission/namespace/lifecycle/admission.go b/plugin/pkg/admission/namespace/lifecycle/admission.go index f57b4301ff7..e1f158146b5 100644 --- a/plugin/pkg/admission/namespace/lifecycle/admission.go +++ b/plugin/pkg/admission/namespace/lifecycle/admission.go @@ -76,7 +76,7 @@ var _ = kubeapiserveradmission.WantsInternalClientSet(&lifecycle{}) func makeNamespaceKey(namespace string) *api.Namespace { return &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespace, Namespace: "", }, diff --git a/plugin/pkg/admission/namespace/lifecycle/admission_test.go b/plugin/pkg/admission/namespace/lifecycle/admission_test.go index 882df2c097d..c495da4f8d9 100644 --- a/plugin/pkg/admission/namespace/lifecycle/admission_test.go +++ b/plugin/pkg/admission/namespace/lifecycle/admission_test.go @@ -65,7 +65,7 @@ func newMockClientForTest(namespaces map[string]api.NamespacePhase) *fake.Client index := 0 for name, phase := range namespaces { namespaceList.Items = append(namespaceList.Items, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, ResourceVersion: fmt.Sprintf("%d", index), }, @@ -83,7 +83,7 @@ func newMockClientForTest(namespaces map[string]api.NamespacePhase) *fake.Client // newPod returns a new pod for the specified namespace func newPod(namespace string) api.Pod { return api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: namespace}, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "vol"}}, Containers: []api.Container{{Name: "ctr", Image: "image"}}, @@ -188,7 +188,7 @@ func TestAdmissionNamespaceForceLiveLookup(t *testing.T) { mockClient := newMockClientForTest(phases) mockClient.AddReactor("get", "namespaces", func(action core.Action) (bool, runtime.Object, error) { getCalls++ - return true, &api.Namespace{ObjectMeta: api.ObjectMeta{Name: namespace}, Status: api.NamespaceStatus{Phase: phases[namespace]}}, nil + return true, &api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}, Status: api.NamespaceStatus{Phase: phases[namespace]}}, nil }) fakeClock := clock.NewFakeClock(time.Now()) diff --git a/plugin/pkg/admission/persistentvolume/label/BUILD b/plugin/pkg/admission/persistentvolume/label/BUILD index 7fbdf931c0b..d9ab2981c62 100644 --- a/plugin/pkg/admission/persistentvolume/label/BUILD +++ b/plugin/pkg/admission/persistentvolume/label/BUILD @@ -35,6 +35,7 @@ go_test( "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/cloudprovider/providers/aws:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/plugin/pkg/admission/persistentvolume/label/admission_test.go b/plugin/pkg/admission/persistentvolume/label/admission_test.go index 38f07c06671..d74c8a8e6ab 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission_test.go +++ b/plugin/pkg/admission/persistentvolume/label/admission_test.go @@ -21,6 +21,7 @@ import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" @@ -79,7 +80,7 @@ func TestAdmission(t *testing.T) { pvHandler := NewPersistentVolumeLabel() handler := admission.NewChainHandler(pvHandler) ignoredPV := api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{Name: "noncloud", Namespace: "myns"}, + ObjectMeta: metav1.ObjectMeta{Name: "noncloud", Namespace: "myns"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ HostPath: &api.HostPathVolumeSource{ @@ -89,7 +90,7 @@ func TestAdmission(t *testing.T) { }, } awsPV := api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{Name: "noncloud", Namespace: "myns"}, + ObjectMeta: metav1.ObjectMeta{Name: "noncloud", Namespace: "myns"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{ diff --git a/plugin/pkg/admission/podnodeselector/BUILD b/plugin/pkg/admission/podnodeselector/BUILD index f8c3f7eb58f..bae0ea2d012 100644 --- a/plugin/pkg/admission/podnodeselector/BUILD +++ b/plugin/pkg/admission/podnodeselector/BUILD @@ -39,6 +39,7 @@ go_test( "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/util/wait", ], diff --git a/plugin/pkg/admission/podnodeselector/admission.go b/plugin/pkg/admission/podnodeselector/admission.go index 05332e805d5..36275ab7964 100644 --- a/plugin/pkg/admission/podnodeselector/admission.go +++ b/plugin/pkg/admission/podnodeselector/admission.go @@ -115,7 +115,7 @@ func (p *podNodeSelector) Admit(a admission.Attributes) error { var namespace *api.Namespace namespaceObj, exists, err := p.namespaceInformer.GetStore().Get(&api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName, Namespace: "", }, diff --git a/plugin/pkg/admission/podnodeselector/admission_test.go b/plugin/pkg/admission/podnodeselector/admission_test.go index bbd7b36a6cd..356fb1c6b48 100644 --- a/plugin/pkg/admission/podnodeselector/admission_test.go +++ b/plugin/pkg/admission/podnodeselector/admission_test.go @@ -20,6 +20,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/admission" @@ -33,7 +34,7 @@ import ( // TestPodAdmission verifies various scenarios involving pod/namespace/global node label selectors func TestPodAdmission(t *testing.T) { namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testNamespace", Namespace: "", }, @@ -47,7 +48,7 @@ func TestPodAdmission(t *testing.T) { informerFactory.Start(wait.NeverStop) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "testPod", Namespace: "testNamespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "testPod", Namespace: "testNamespace"}, } tests := []struct { diff --git a/plugin/pkg/admission/resourcequota/BUILD b/plugin/pkg/admission/resourcequota/BUILD index eb9beb2fc97..d564cdd7b4a 100644 --- a/plugin/pkg/admission/resourcequota/BUILD +++ b/plugin/pkg/admission/resourcequota/BUILD @@ -32,6 +32,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:github.com/hashicorp/golang-lru", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", @@ -56,6 +57,7 @@ go_test( "//pkg/quota/generic:go_default_library", "//pkg/quota/install:go_default_library", "//vendor:github.com/hashicorp/golang-lru", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], diff --git a/plugin/pkg/admission/resourcequota/admission_test.go b/plugin/pkg/admission/resourcequota/admission_test.go index ca2edc6b8bd..442a8baa1d2 100644 --- a/plugin/pkg/admission/resourcequota/admission_test.go +++ b/plugin/pkg/admission/resourcequota/admission_test.go @@ -24,6 +24,7 @@ import ( lru "github.com/hashicorp/golang-lru" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/admission" @@ -57,7 +58,7 @@ func getResourceRequirements(requests, limits api.ResourceList) api.ResourceRequ func validPod(name string, numContainers int, resources api.ResourceRequirements) *api.Pod { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PodSpec{}, } pod.Spec.Containers = make([]api.Container, 0, numContainers) @@ -72,7 +73,7 @@ func validPod(name string, numContainers int, resources api.ResourceRequirements func validPersistentVolumeClaim(name string, resources api.ResourceRequirements) *api.PersistentVolumeClaim { return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PersistentVolumeClaimSpec{ Resources: resources, }, @@ -184,7 +185,7 @@ func TestAdmissionIgnoresSubresources(t *testing.T) { // TestAdmitBelowQuotaLimit verifies that a pod when created has its usage reflected on the quota func TestAdmitBelowQuotaLimit(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("3"), @@ -264,7 +265,7 @@ func TestAdmitBelowQuotaLimit(t *testing.T) { func TestAdmitHandlesOldObjects(t *testing.T) { // in this scenario, the old quota was based on a service type=loadbalancer resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceServices: resource.MustParse("10"), @@ -298,11 +299,11 @@ func TestAdmitHandlesOldObjects(t *testing.T) { // old service was a load balancer, but updated version is a node port. existingService := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: "1"}, Spec: api.ServiceSpec{Type: api.ServiceTypeLoadBalancer}, } newService := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "service", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test"}, Spec: api.ServiceSpec{ Type: api.ServiceTypeNodePort, Ports: []api.ServicePort{{Port: 1234}}, @@ -360,7 +361,7 @@ func TestAdmitHandlesOldObjects(t *testing.T) { func TestAdmitHandlesCreatingUpdates(t *testing.T) { // in this scenario, there is an existing service resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceServices: resource.MustParse("10"), @@ -394,11 +395,11 @@ func TestAdmitHandlesCreatingUpdates(t *testing.T) { // old service didn't exist, so this update is actually a create oldService := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: ""}, + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: ""}, Spec: api.ServiceSpec{Type: api.ServiceTypeLoadBalancer}, } newService := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "service", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test"}, Spec: api.ServiceSpec{ Type: api.ServiceTypeNodePort, Ports: []api.ServicePort{{Port: 1234}}, @@ -455,7 +456,7 @@ func TestAdmitHandlesCreatingUpdates(t *testing.T) { // TestAdmitExceedQuotaLimit verifies that if a pod exceeded allowed usage that its rejected during admission. func TestAdmitExceedQuotaLimit(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("3"), @@ -496,7 +497,7 @@ func TestAdmitExceedQuotaLimit(t *testing.T) { // We ensure that a pod that does not specify a memory limit that it fails in admission. func TestAdmitEnforceQuotaConstraints(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("3"), @@ -544,7 +545,7 @@ func TestAdmitEnforceQuotaConstraints(t *testing.T) { // TestAdmitPodInNamespaceWithoutQuota ensures that if a namespace has no quota, that a pod can get in func TestAdmitPodInNamespaceWithoutQuota(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "other", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "other", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("3"), @@ -595,7 +596,7 @@ func TestAdmitPodInNamespaceWithoutQuota(t *testing.T) { // It ensures that the terminating quota is incremented, and the non-terminating quota is not. func TestAdmitBelowTerminatingQuotaLimit(t *testing.T) { resourceQuotaNonTerminating := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-non-terminating", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-non-terminating", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeNotTerminating}, }, @@ -613,7 +614,7 @@ func TestAdmitBelowTerminatingQuotaLimit(t *testing.T) { }, } resourceQuotaTerminating := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-terminating", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-terminating", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeTerminating}, }, @@ -707,7 +708,7 @@ func TestAdmitBelowTerminatingQuotaLimit(t *testing.T) { // It verifies that best effort pods are properly scoped to the best effort quota document. func TestAdmitBelowBestEffortQuotaLimit(t *testing.T) { resourceQuotaBestEffort := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-besteffort", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-besteffort", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeBestEffort}, }, @@ -721,7 +722,7 @@ func TestAdmitBelowBestEffortQuotaLimit(t *testing.T) { }, } resourceQuotaNotBestEffort := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-not-besteffort", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-not-besteffort", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeNotBestEffort}, }, @@ -812,7 +813,7 @@ func removeListWatch(in []testcore.Action) []testcore.Action { // guaranteed pod. func TestAdmitBestEffortQuotaLimitIgnoresBurstable(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-besteffort", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-besteffort", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeBestEffort}, }, @@ -898,7 +899,7 @@ func TestHasUsageStats(t *testing.T) { func TestAdmissionSetsMissingNamespace(t *testing.T) { namespace := "test" resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: namespace, ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: namespace, ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourcePods: resource.MustParse("3"), @@ -953,7 +954,7 @@ func TestAdmissionSetsMissingNamespace(t *testing.T) { // TestAdmitRejectsNegativeUsage verifies that usage for any measured resource cannot be negative. func TestAdmitRejectsNegativeUsage(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourcePersistentVolumeClaims: resource.MustParse("3"), @@ -998,7 +999,7 @@ func TestAdmitRejectsNegativeUsage(t *testing.T) { // TestAdmitWhenUnrelatedResourceExceedsQuota verifies that if resource X exceeds quota, it does not prohibit resource Y from admission. func TestAdmitWhenUnrelatedResourceExceedsQuota(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceServices: resource.MustParse("3"), diff --git a/plugin/pkg/admission/resourcequota/resource_access.go b/plugin/pkg/admission/resourcequota/resource_access.go index 8656cbdb071..b272b45de10 100644 --- a/plugin/pkg/admission/resourcequota/resource_access.go +++ b/plugin/pkg/admission/resourcequota/resource_access.go @@ -23,6 +23,7 @@ import ( "github.com/golang/glog" lru "github.com/hashicorp/golang-lru" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/apimachinery/pkg/runtime" @@ -141,7 +142,7 @@ func (e *quotaAccessor) checkCache(quota *api.ResourceQuota) *api.ResourceQuota func (e *quotaAccessor) GetQuotas(namespace string) ([]api.ResourceQuota, error) { // determine if there are any quotas in this namespace // if there are no quotas, we don't need to do anything - items, err := e.indexer.Index("namespace", &api.ResourceQuota{ObjectMeta: api.ObjectMeta{Namespace: namespace, Name: ""}}) + items, err := e.indexer.Index("namespace", &api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: ""}}) if err != nil { return nil, fmt.Errorf("error resolving quota.") } diff --git a/plugin/pkg/admission/security/podsecuritypolicy/BUILD b/plugin/pkg/admission/security/podsecuritypolicy/BUILD index 9b9b516529f..9d844607ef8 100644 --- a/plugin/pkg/admission/security/podsecuritypolicy/BUILD +++ b/plugin/pkg/admission/security/podsecuritypolicy/BUILD @@ -50,6 +50,7 @@ go_test( "//pkg/security/podsecuritypolicy/seccomp:go_default_library", "//pkg/security/podsecuritypolicy/util:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apiserver/pkg/authentication/user", diff --git a/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go b/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go index 75809faf282..27950f001d9 100644 --- a/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go +++ b/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go @@ -24,6 +24,7 @@ import ( "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/authentication/user" diff --git a/plugin/pkg/admission/serviceaccount/BUILD b/plugin/pkg/admission/serviceaccount/BUILD index ab9b8156b2d..c3b6127e05c 100644 --- a/plugin/pkg/admission/serviceaccount/BUILD +++ b/plugin/pkg/admission/serviceaccount/BUILD @@ -46,6 +46,7 @@ go_test( "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/kubelet/types:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/plugin/pkg/admission/serviceaccount/admission.go b/plugin/pkg/admission/serviceaccount/admission.go index 760ed091a04..6624e88f272 100644 --- a/plugin/pkg/admission/serviceaccount/admission.go +++ b/plugin/pkg/admission/serviceaccount/admission.go @@ -265,7 +265,7 @@ func (s *serviceAccount) enforceMountableSecrets(serviceAccount *api.ServiceAcco // getServiceAccount returns the ServiceAccount for the given namespace and name if it exists func (s *serviceAccount) getServiceAccount(namespace string, name string) (*api.ServiceAccount, error) { - key := &api.ServiceAccount{ObjectMeta: api.ObjectMeta{Namespace: namespace}} + key := &api.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Namespace: namespace}} index, err := s.serviceAccounts.Index("namespace", key) if err != nil { return nil, err @@ -327,7 +327,7 @@ func (s *serviceAccount) getReferencedServiceAccountToken(serviceAccount *api.Se // getServiceAccountTokens returns all ServiceAccountToken secrets for the given ServiceAccount func (s *serviceAccount) getServiceAccountTokens(serviceAccount *api.ServiceAccount) ([]*api.Secret, error) { - key := &api.Secret{ObjectMeta: api.ObjectMeta{Namespace: serviceAccount.Namespace}} + key := &api.Secret{ObjectMeta: metav1.ObjectMeta{Namespace: serviceAccount.Namespace}} index, err := s.secrets.Index("namespace", key) if err != nil { return nil, err diff --git a/plugin/pkg/admission/serviceaccount/admission_test.go b/plugin/pkg/admission/serviceaccount/admission_test.go index 96478459b25..5c9c75d5fe9 100644 --- a/plugin/pkg/admission/serviceaccount/admission_test.go +++ b/plugin/pkg/admission/serviceaccount/admission_test.go @@ -22,6 +22,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" @@ -69,7 +70,7 @@ func TestIgnoresNonPodObject(t *testing.T) { func TestIgnoresMirrorPod(t *testing.T) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ kubelet.ConfigMirrorAnnotationKey: "true", }, @@ -89,7 +90,7 @@ func TestIgnoresMirrorPod(t *testing.T) { func TestRejectsMirrorPodWithServiceAccount(t *testing.T) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ kubelet.ConfigMirrorAnnotationKey: "true", }, @@ -107,7 +108,7 @@ func TestRejectsMirrorPodWithServiceAccount(t *testing.T) { func TestRejectsMirrorPodWithSecretVolumes(t *testing.T) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ kubelet.ConfigMirrorAnnotationKey: "true", }, @@ -135,7 +136,7 @@ func TestAssignsDefaultServiceAccountAndToleratesMissingAPIToken(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -162,7 +163,7 @@ func TestAssignsDefaultServiceAccountAndRejectsMissingAPIToken(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -181,7 +182,7 @@ func TestFetchesUncachedServiceAccount(t *testing.T) { // Build a test client that the admission plugin can use to look up the service account missing from its cache client := fake.NewSimpleClientset(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -245,7 +246,7 @@ func TestAutomountsAPIToken(t *testing.T) { // Add the default service account for the ns with a token into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceAccountName, Namespace: ns, UID: types.UID(serviceAccountUID), @@ -256,7 +257,7 @@ func TestAutomountsAPIToken(t *testing.T) { }) // Add a token for the service account into the cache admit.secrets.Add(&api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tokenName, Namespace: ns, Annotations: map[string]string{ @@ -345,7 +346,7 @@ func TestRespectsExistingMount(t *testing.T) { // Add the default service account for the ns with a token into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceAccountName, Namespace: ns, UID: types.UID(serviceAccountUID), @@ -356,7 +357,7 @@ func TestRespectsExistingMount(t *testing.T) { }) // Add a token for the service account into the cache admit.secrets.Add(&api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tokenName, Namespace: ns, Annotations: map[string]string{ @@ -442,7 +443,7 @@ func TestAllowsReferencedSecret(t *testing.T) { // Add the default service account for the ns with a secret reference into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -522,7 +523,7 @@ func TestRejectsUnreferencedSecretVolumes(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -599,7 +600,7 @@ func TestAllowUnreferencedSecretVolumesForPermissiveSAs(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, Annotations: map[string]string{EnforceMountableSecretsAnnotation: "true"}, @@ -630,7 +631,7 @@ func TestAllowsReferencedImagePullSecrets(t *testing.T) { // Add the default service account for the ns with a secret reference into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -661,7 +662,7 @@ func TestRejectsUnreferencedImagePullSecrets(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -689,7 +690,7 @@ func TestDoNotAddImagePullSecrets(t *testing.T) { // Add the default service account for the ns with a secret reference into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -724,7 +725,7 @@ func TestAddImagePullSecrets(t *testing.T) { admit.RequireAPIToken = false sa := &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, diff --git a/plugin/pkg/admission/storageclass/default/admission_test.go b/plugin/pkg/admission/storageclass/default/admission_test.go index 9c4f828247c..e9b822be138 100644 --- a/plugin/pkg/admission/storageclass/default/admission_test.go +++ b/plugin/pkg/admission/storageclass/default/admission_test.go @@ -33,7 +33,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default1", Annotations: map[string]string{ storageutil.IsDefaultStorageClassAnnotation: "true", @@ -45,7 +45,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default2", Annotations: map[string]string{ storageutil.IsDefaultStorageClassAnnotation: "true", @@ -58,7 +58,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "nondefault1", Annotations: map[string]string{ storageutil.IsDefaultStorageClassAnnotation: "false", @@ -71,7 +71,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "nondefault2", }, Provisioner: "nondefault1", @@ -81,7 +81,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "nondefault2", Annotations: map[string]string{ storageutil.IsDefaultStorageClassAnnotation: "", @@ -94,7 +94,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "PersistentVolumeClaim", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimWithClass", Namespace: "ns", Annotations: map[string]string{ @@ -106,7 +106,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "PersistentVolumeClaim", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimWithEmptyClass", Namespace: "ns", Annotations: map[string]string{ @@ -118,7 +118,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "PersistentVolumeClaim", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimWithNoClass", Namespace: "ns", }, diff --git a/plugin/pkg/auth/authorizer/rbac/BUILD b/plugin/pkg/auth/authorizer/rbac/BUILD index 45ac8441c2b..4677e1762ea 100644 --- a/plugin/pkg/auth/authorizer/rbac/BUILD +++ b/plugin/pkg/auth/authorizer/rbac/BUILD @@ -34,9 +34,9 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/registry/rbac/validation:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", ], diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD index 3de0026db3c..fcdd401f2fd 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD @@ -16,9 +16,9 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/authentication/user", ], ) diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go index ab2ea276955..ccbd08fb257 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go @@ -59,7 +59,7 @@ func eventsRule() rbac.PolicyRule { func init() { addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "attachdetach-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "attachdetach-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("list", "watch").Groups(legacyGroup).Resources("persistentvolumes", "persistentvolumeclaims").RuleOrDie(), rbac.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("nodes").RuleOrDie(), @@ -69,7 +69,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "cronjob-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "cronjob-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update").Groups(batchGroup).Resources("cronjobs").RuleOrDie(), rbac.NewRule("get", "list", "watch", "create", "update", "delete").Groups(batchGroup).Resources("jobs").RuleOrDie(), @@ -79,7 +79,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "daemon-set-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "daemon-set-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(extensionsGroup).Resources("daemonsets").RuleOrDie(), rbac.NewRule("update").Groups(extensionsGroup).Resources("daemonsets/status").RuleOrDie(), @@ -90,7 +90,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "deployment-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "deployment-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update").Groups(extensionsGroup).Resources("deployments").RuleOrDie(), rbac.NewRule("update").Groups(extensionsGroup).Resources("deployments/status").RuleOrDie(), @@ -102,7 +102,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "disruption-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "disruption-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(extensionsGroup).Resources("deployments").RuleOrDie(), rbac.NewRule("get", "list", "watch").Groups(extensionsGroup).Resources("replicasets").RuleOrDie(), @@ -114,7 +114,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "endpoint-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "endpoint-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("services", "pods").RuleOrDie(), rbac.NewRule("get", "list", "create", "update", "delete").Groups(legacyGroup).Resources("endpoints").RuleOrDie(), @@ -123,7 +123,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "generic-garbage-collector"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "generic-garbage-collector"}, Rules: []rbac.PolicyRule{ // the GC controller needs to run list/watches, selective gets, and updates against any resource rbac.NewRule("get", "list", "watch", "patch", "update", "delete").Groups("*").Resources("*").RuleOrDie(), @@ -131,7 +131,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "horizontal-pod-autoscaler"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "horizontal-pod-autoscaler"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(autoscalingGroup, extensionsGroup).Resources("horizontalpodautoscalers").RuleOrDie(), rbac.NewRule("update").Groups(autoscalingGroup, extensionsGroup).Resources("horizontalpodautoscalers/status").RuleOrDie(), @@ -147,7 +147,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "job-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "job-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update").Groups(batchGroup).Resources("jobs").RuleOrDie(), rbac.NewRule("update").Groups(batchGroup).Resources("jobs/status").RuleOrDie(), @@ -156,7 +156,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "namespace-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "namespace-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "delete").Groups(legacyGroup).Resources("namespaces").RuleOrDie(), rbac.NewRule("update").Groups(legacyGroup).Resources("namespaces/finalize", "namespaces/status").RuleOrDie(), @@ -164,7 +164,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "node-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "node-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "update", "delete").Groups(legacyGroup).Resources("nodes").RuleOrDie(), rbac.NewRule("update").Groups(legacyGroup).Resources("nodes/status").RuleOrDie(), @@ -175,7 +175,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "persistent-volume-binder"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "persistent-volume-binder"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update", "create", "delete").Groups(legacyGroup).Resources("persistentvolumes").RuleOrDie(), rbac.NewRule("update").Groups(legacyGroup).Resources("persistentvolumes/status").RuleOrDie(), @@ -195,14 +195,14 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "pod-garbage-collector"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "pod-garbage-collector"}, Rules: []rbac.PolicyRule{ rbac.NewRule("list", "watch", "delete").Groups(legacyGroup).Resources("pods").RuleOrDie(), rbac.NewRule("list").Groups(legacyGroup).Resources("nodes").RuleOrDie(), }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "replicaset-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "replicaset-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update").Groups(extensionsGroup).Resources("replicasets").RuleOrDie(), rbac.NewRule("update").Groups(extensionsGroup).Resources("replicasets/status").RuleOrDie(), @@ -211,7 +211,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "replication-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "replication-controller"}, Rules: []rbac.PolicyRule{ // 1.0 controllers needed get, update, so without these old controllers break on new servers rbac.NewRule("get", "list", "watch", "update").Groups(legacyGroup).Resources("replicationcontrollers").RuleOrDie(), @@ -221,7 +221,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "resourcequota-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "resourcequota-controller"}, Rules: []rbac.PolicyRule{ // quota can count quota on anything for reconcilation, so it needs full viewing powers rbac.NewRule("list", "watch").Groups("*").Resources("*").RuleOrDie(), @@ -230,7 +230,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "route-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "route-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("list", "watch").Groups(legacyGroup).Resources("nodes").RuleOrDie(), rbac.NewRule("patch").Groups(legacyGroup).Resources("nodes/status").RuleOrDie(), @@ -238,14 +238,14 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "service-account-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "service-account-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("create").Groups(legacyGroup).Resources("serviceaccounts").RuleOrDie(), eventsRule(), }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "service-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "service-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("services").RuleOrDie(), rbac.NewRule("update").Groups(legacyGroup).Resources("services/status").RuleOrDie(), @@ -254,7 +254,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "statefulset-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "statefulset-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("list", "watch").Groups(legacyGroup).Resources("pods").RuleOrDie(), rbac.NewRule("get", "list", "watch").Groups(appsGroup).Resources("statefulsets").RuleOrDie(), @@ -265,7 +265,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "certificate-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "certificate-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(certificatesGroup).Resources("certificatesigningrequests").RuleOrDie(), rbac.NewRule("update").Groups(certificatesGroup).Resources("certificatesigningrequests/status", "certificatesigningrequests/approval").RuleOrDie(), diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go index f70f1b18ba8..d4deb2b5795 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go @@ -17,8 +17,8 @@ limitations under the License. package bootstrappolicy import ( - "k8s.io/apiserver/pkg/authentication/user" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apiserver/pkg/authentication/user" rbac "k8s.io/kubernetes/pkg/apis/rbac" ) @@ -72,7 +72,7 @@ func ClusterRoles() []rbac.ClusterRole { roles := []rbac.ClusterRole{ { // a "root" role which can do absolutely anything - ObjectMeta: api.ObjectMeta{Name: "cluster-admin"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-admin"}, Rules: []rbac.PolicyRule{ rbac.NewRule("*").Groups("*").Resources("*").RuleOrDie(), rbac.NewRule("*").URLs("*").RuleOrDie(), @@ -80,14 +80,14 @@ func ClusterRoles() []rbac.ClusterRole { }, { // a role which provides just enough power to discovery API versions for negotiation - ObjectMeta: api.ObjectMeta{Name: "system:discovery"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:discovery"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get").URLs("/version", "/swaggerapi", "/swaggerapi/*", "/api", "/api/*", "/apis", "/apis/*").RuleOrDie(), }, }, { // a role which provides minimal resource access to allow a "normal" user to learn information about themselves - ObjectMeta: api.ObjectMeta{Name: "system:basic-user"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:basic-user"}, Rules: []rbac.PolicyRule{ // TODO add future selfsubjectrulesreview, project request APIs, project listing APIs rbac.NewRule("create").Groups(authorizationGroup).Resources("selfsubjectaccessreviews").RuleOrDie(), @@ -96,7 +96,7 @@ func ClusterRoles() []rbac.ClusterRole { { // a role for a namespace level admin. It is `edit` plus the power to grant permissions to other users. - ObjectMeta: api.ObjectMeta{Name: "admin"}, + ObjectMeta: metav1.ObjectMeta{Name: "admin"}, Rules: []rbac.PolicyRule{ rbac.NewRule(ReadWrite...).Groups(legacyGroup).Resources("pods", "pods/attach", "pods/proxy", "pods/exec", "pods/portforward").RuleOrDie(), rbac.NewRule(ReadWrite...).Groups(legacyGroup).Resources("replicationcontrollers", "replicationcontrollers/scale", "serviceaccounts", @@ -126,7 +126,7 @@ func ClusterRoles() []rbac.ClusterRole { // a role for a namespace level editor. It grants access to all user level actions in a namespace. // It does not grant powers for "privileged" resources which are domain of the system: `/status` // subresources or `quota`/`limits` which are used to control namespaces - ObjectMeta: api.ObjectMeta{Name: "edit"}, + ObjectMeta: metav1.ObjectMeta{Name: "edit"}, Rules: []rbac.PolicyRule{ rbac.NewRule(ReadWrite...).Groups(legacyGroup).Resources("pods", "pods/attach", "pods/proxy", "pods/exec", "pods/portforward").RuleOrDie(), rbac.NewRule(ReadWrite...).Groups(legacyGroup).Resources("replicationcontrollers", "replicationcontrollers/scale", "serviceaccounts", @@ -151,7 +151,7 @@ func ClusterRoles() []rbac.ClusterRole { { // a role for namespace level viewing. It grants Read-only access to non-escalating resources in // a namespace. - ObjectMeta: api.ObjectMeta{Name: "view"}, + ObjectMeta: metav1.ObjectMeta{Name: "view"}, Rules: []rbac.PolicyRule{ rbac.NewRule(Read...).Groups(legacyGroup).Resources("pods", "replicationcontrollers", "replicationcontrollers/scale", "serviceaccounts", "services", "endpoints", "persistentvolumeclaims", "configmaps").RuleOrDie(), @@ -180,7 +180,7 @@ func ClusterRoles() []rbac.ClusterRole { }, { // a role for nodes to use to have the access they need for running pods - ObjectMeta: api.ObjectMeta{Name: "system:node"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:node"}, Rules: []rbac.PolicyRule{ // Needed to check API access. These creates are non-mutating rbac.NewRule("create").Groups(authenticationGroup).Resources("tokenreviews").RuleOrDie(), @@ -221,7 +221,7 @@ func ClusterRoles() []rbac.ClusterRole { }, { // a role to use for setting up a proxy - ObjectMeta: api.ObjectMeta{Name: "system:node-proxier"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:node-proxier"}, Rules: []rbac.PolicyRule{ // Used to build serviceLister rbac.NewRule("list", "watch").Groups(legacyGroup).Resources("services", "endpoints").RuleOrDie(), @@ -242,7 +242,7 @@ func ClusterRoles() []rbac.ClusterRole { }, { // a role to use for allowing authentication and authorization delegation - ObjectMeta: api.ObjectMeta{Name: "system:auth-delegator"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:auth-delegator"}, Rules: []rbac.PolicyRule{ // These creates are non-mutating rbac.NewRule("create").Groups(authenticationGroup).Resources("tokenreviews").RuleOrDie(), @@ -251,7 +251,7 @@ func ClusterRoles() []rbac.ClusterRole { }, { // a role to use for the API registry, summarization, and proxy handling - ObjectMeta: api.ObjectMeta{Name: "system:kube-aggregator"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:kube-aggregator"}, Rules: []rbac.PolicyRule{ // it needs to see all services so that it knows whether the ones it points to exist or not rbac.NewRule(Read...).Groups(legacyGroup).Resources("services", "endpoints").RuleOrDie(), @@ -260,7 +260,7 @@ func ClusterRoles() []rbac.ClusterRole { { // a role to use for bootstrapping the kube-controller-manager so it can create the shared informers // service accounts, and secrets that we need to create separate identities for other controllers - ObjectMeta: api.ObjectMeta{Name: "system:kube-controller-manager"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:kube-controller-manager"}, Rules: []rbac.PolicyRule{ eventsRule(), rbac.NewRule("create").Groups(legacyGroup).Resources("endpoints", "secrets", "serviceaccounts").RuleOrDie(), diff --git a/plugin/pkg/auth/authorizer/rbac/rbac_test.go b/plugin/pkg/auth/authorizer/rbac/rbac_test.go index 3cb1162246a..05e52dc58b7 100644 --- a/plugin/pkg/auth/authorizer/rbac/rbac_test.go +++ b/plugin/pkg/auth/authorizer/rbac/rbac_test.go @@ -21,9 +21,9 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" rbacregistryvalidation "k8s.io/kubernetes/pkg/registry/rbac/validation" ) @@ -38,11 +38,11 @@ func newRule(verbs, apiGroups, resources, nonResourceURLs string) rbac.PolicyRul } func newRole(name, namespace string, rules ...rbac.PolicyRule) *rbac.Role { - return &rbac.Role{ObjectMeta: api.ObjectMeta{Namespace: namespace, Name: name}, Rules: rules} + return &rbac.Role{ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: name}, Rules: rules} } func newClusterRole(name string, rules ...rbac.PolicyRule) *rbac.ClusterRole { - return &rbac.ClusterRole{ObjectMeta: api.ObjectMeta{Name: name}, Rules: rules} + return &rbac.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: name}, Rules: rules} } const ( @@ -52,7 +52,7 @@ const ( func newClusterRoleBinding(roleName string, subjects ...string) *rbac.ClusterRoleBinding { r := &rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, RoleRef: rbac.RoleRef{ APIGroup: rbac.GroupName, Kind: "ClusterRole", // ClusterRoleBindings can only refer to ClusterRole @@ -69,7 +69,7 @@ func newClusterRoleBinding(roleName string, subjects ...string) *rbac.ClusterRol } func newRoleBinding(namespace, roleName string, bindType uint16, subjects ...string) *rbac.RoleBinding { - r := &rbac.RoleBinding{ObjectMeta: api.ObjectMeta{Namespace: namespace}} + r := &rbac.RoleBinding{ObjectMeta: metav1.ObjectMeta{Namespace: namespace}} switch bindType { case bindToRole: diff --git a/plugin/pkg/scheduler/BUILD b/plugin/pkg/scheduler/BUILD index fc7ff26ccf9..ec056fda75f 100644 --- a/plugin/pkg/scheduler/BUILD +++ b/plugin/pkg/scheduler/BUILD @@ -31,6 +31,7 @@ go_library( "//plugin/pkg/scheduler/schedulercache:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/golang/groupcache/lru", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/wait", @@ -60,6 +61,7 @@ go_test( "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/schedulercache:go_default_library", "//plugin/pkg/scheduler/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/sets", diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index f5607df7c16..617301b9de3 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -78,7 +78,7 @@ type CachedNodeInfo struct { // GetNodeInfo returns cached data for the node 'id'. func (c *CachedNodeInfo) GetNodeInfo(id string) (*v1.Node, error) { - node, exists, err := c.Get(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: id}}) + node, exists, err := c.Get(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: id}}) if err != nil { return nil, fmt.Errorf("error retrieving node '%v' from cache: %v", id, err) diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go index e030b3c8573..83dad956029 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go @@ -418,7 +418,7 @@ func TestPodFitsHost(t *testing.T) { }, }, node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, @@ -432,7 +432,7 @@ func TestPodFitsHost(t *testing.T) { }, }, node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, @@ -1184,7 +1184,7 @@ func TestPodFitsSelector(t *testing.T) { // TODO: Uncomment this test when implement RequiredDuringSchedulingRequiredDuringExecution // { // pod: &v1.Pod{ - // ObjectMeta: v1.ObjectMeta{ + // ObjectMeta: metav1.ObjectMeta{ // Annotations: map[string]string{ // v1.AffinityAnnotationKey: ` // {"nodeAffinity": { @@ -1283,7 +1283,7 @@ func TestPodFitsSelector(t *testing.T) { expectedFailureReasons := []algorithm.PredicateFailureReason{ErrNodeSelectorNotMatch} for _, test := range tests { - node := v1.Node{ObjectMeta: v1.ObjectMeta{Labels: test.labels}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Labels: test.labels}} nodeInfo := schedulercache.NewNodeInfo() nodeInfo.SetNode(&node) @@ -1349,7 +1349,7 @@ func TestNodeLabelPresence(t *testing.T) { expectedFailureReasons := []algorithm.PredicateFailureReason{ErrNodeLabelPresenceViolated} for _, test := range tests { - node := v1.Node{ObjectMeta: v1.ObjectMeta{Labels: label}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Labels: label}} nodeInfo := schedulercache.NewNodeInfo() nodeInfo.SetNode(&node) @@ -1385,11 +1385,11 @@ func TestServiceAffinity(t *testing.T) { "region": "r2", "zone": "z22", } - node1 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labels1}} - node2 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labels2}} - node3 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labels3}} - node4 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine4", Labels: labels4}} - node5 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine5", Labels: labels4}} + node1 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labels1}} + node2 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labels2}} + node3 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labels3}} + node4 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine4", Labels: labels4}} + node5 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine5", Labels: labels4}} tests := []struct { pod *v1.Pod pods []*v1.Pod @@ -1421,8 +1421,8 @@ func TestServiceAffinity(t *testing.T) { test: "pod with region label mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node1, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: true, @@ -1430,8 +1430,8 @@ func TestServiceAffinity(t *testing.T) { test: "service pod on same node", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node1, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: true, @@ -1439,8 +1439,8 @@ func TestServiceAffinity(t *testing.T) { test: "service pod on different node, region match", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node1, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: false, @@ -1448,35 +1448,35 @@ func TestServiceAffinity(t *testing.T) { test: "service pod on different node, region mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}}, node: &node1, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: v1.ObjectMeta{Namespace: "ns2"}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: metav1.ObjectMeta{Namespace: "ns2"}}}, fits: true, labels: []string{"region"}, test: "service in different namespace, region mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns2"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns2"}}}, node: &node1, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: v1.ObjectMeta{Namespace: "ns1"}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: metav1.ObjectMeta{Namespace: "ns1"}}}, fits: true, labels: []string{"region"}, test: "pod in different namespace, region mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}}, node: &node1, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: v1.ObjectMeta{Namespace: "ns1"}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: metav1.ObjectMeta{Namespace: "ns1"}}}, fits: false, labels: []string{"region"}, test: "service and pod in same namespace, region mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node1, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: false, @@ -1484,8 +1484,8 @@ func TestServiceAffinity(t *testing.T) { test: "service pod on different node, multiple labels, not all match", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node4, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: true, @@ -1749,7 +1749,7 @@ func TestEBSVolumeCountConflicts(t *testing.T) { pvInfo := FakePersistentVolumeInfo{ { - ObjectMeta: v1.ObjectMeta{Name: "someEBSVol"}, + ObjectMeta: metav1.ObjectMeta{Name: "someEBSVol"}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{VolumeID: "ebsVol"}, @@ -1757,7 +1757,7 @@ func TestEBSVolumeCountConflicts(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "someNonEBSVol"}, + ObjectMeta: metav1.ObjectMeta{Name: "someNonEBSVol"}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{}, }, @@ -1766,15 +1766,15 @@ func TestEBSVolumeCountConflicts(t *testing.T) { pvcInfo := FakePersistentVolumeClaimInfo{ { - ObjectMeta: v1.ObjectMeta{Name: "someEBSVol"}, + ObjectMeta: metav1.ObjectMeta{Name: "someEBSVol"}, Spec: v1.PersistentVolumeClaimSpec{VolumeName: "someEBSVol"}, }, { - ObjectMeta: v1.ObjectMeta{Name: "someNonEBSVol"}, + ObjectMeta: metav1.ObjectMeta{Name: "someNonEBSVol"}, Spec: v1.PersistentVolumeClaimSpec{VolumeName: "someNonEBSVol"}, }, { - ObjectMeta: v1.ObjectMeta{Name: "pvcWithDeletedPV"}, + ObjectMeta: metav1.ObjectMeta{Name: "pvcWithDeletedPV"}, Spec: v1.PersistentVolumeClaimSpec{VolumeName: "pvcWithDeletedPV"}, }, } @@ -1841,7 +1841,7 @@ func TestRunGeneralPredicates(t *testing.T) { nodeInfo: schedulercache.NewNodeInfo( newResourcePod(schedulercache.Resource{MilliCPU: 9, Memory: 19})), node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "machine1"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1"}, Status: v1.NodeStatus{Capacity: makeResources(10, 20, 0, 32, 0).Capacity, Allocatable: makeAllocatableResources(10, 20, 0, 32, 0)}, }, fits: true, @@ -1853,7 +1853,7 @@ func TestRunGeneralPredicates(t *testing.T) { nodeInfo: schedulercache.NewNodeInfo( newResourcePod(schedulercache.Resource{MilliCPU: 5, Memory: 19})), node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "machine1"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1"}, Status: v1.NodeStatus{Capacity: makeResources(10, 20, 0, 32, 0).Capacity, Allocatable: makeAllocatableResources(10, 20, 0, 32, 0)}, }, fits: false, @@ -1900,7 +1900,7 @@ func TestRunGeneralPredicates(t *testing.T) { }, nodeInfo: schedulercache.NewNodeInfo(), node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "machine1"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1"}, Status: v1.NodeStatus{Capacity: makeResources(10, 20, 0, 32, 0).Capacity, Allocatable: makeAllocatableResources(10, 20, 0, 32, 0)}, }, fits: false, @@ -1912,7 +1912,7 @@ func TestRunGeneralPredicates(t *testing.T) { pod: newPodWithPort(123), nodeInfo: schedulercache.NewNodeInfo(newPodWithPort(123)), node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "machine1"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1"}, Status: v1.NodeStatus{Capacity: makeResources(10, 20, 0, 32, 0).Capacity, Allocatable: makeAllocatableResources(10, 20, 0, 32, 0)}, }, fits: false, @@ -1943,7 +1943,7 @@ func TestInterPodAffinity(t *testing.T) { "zone": "z11", } podLabel2 := map[string]string{"security": "S1"} - node1 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labels1}} + node1 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labels1}} tests := []struct { pod *v1.Pod pods []*v1.Pod @@ -1959,7 +1959,7 @@ func TestInterPodAffinity(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -1983,14 +1983,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: true, test: "satisfies with requiredDuringSchedulingIgnoredDuringExecution in PodAffinity using In operator that matches the existing pod", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2014,14 +2014,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: true, test: "satisfies the pod with requiredDuringSchedulingIgnoredDuringExecution in PodAffinity using not in operator in labelSelector that matches the existing pod", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2045,14 +2045,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel, Namespace: "ns"}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel, Namespace: "ns"}}}, node: &node1, fits: false, test: "Does not satisfy the PodAffinity with labelSelector because of diff Namespace", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, Spec: v1.PodSpec{ @@ -2075,14 +2075,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: false, test: "Doesn't satisfy the PodAffinity because of unmatching labelSelector with the existing pod", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2123,14 +2123,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: true, test: "satisfies the PodAffinity with different label Operators in multiple RequiredDuringSchedulingIgnoredDuringExecution ", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2171,14 +2171,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: false, test: "The labelSelector requirements(items of matchExpressions) are ANDed, the pod cannot schedule onto the node because one of the matchExpression item don't match.", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2218,7 +2218,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: true, test: "satisfies the PodAffinity and PodAntiAffinity with the existing pod", @@ -2226,7 +2226,7 @@ func TestInterPodAffinity(t *testing.T) { // TODO: Uncomment this block when implement RequiredDuringSchedulingRequiredDuringExecution. //{ // pod: &v1.Pod{ - // ObjectMeta: v1.ObjectMeta{ + // ObjectMeta: metav1.ObjectMeta{ // Labels: podLabel2, // Annotations: map[string]string{ // v1.AffinityAnnotationKey: ` @@ -2262,14 +2262,14 @@ func TestInterPodAffinity(t *testing.T) { // }, // }, // }, - // pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podlabel}}}, + // pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podlabel}}}, // node: &node1, // fits: true, // test: "satisfies the PodAffinity with different Label Operators in multiple RequiredDuringSchedulingRequiredDuringExecution ", //}, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2332,7 +2332,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - ObjectMeta: v1.ObjectMeta{Labels: podLabel}, + ObjectMeta: metav1.ObjectMeta{Labels: podLabel}, }, }, node: &node1, @@ -2341,7 +2341,7 @@ func TestInterPodAffinity(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2381,14 +2381,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: false, test: "satisfies the PodAffinity but doesn't satisfies the PodAntiAffinity with the existing pod", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, Spec: v1.PodSpec{ @@ -2451,7 +2451,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - ObjectMeta: v1.ObjectMeta{Labels: podLabel}, + ObjectMeta: metav1.ObjectMeta{Labels: podLabel}, }, }, node: &node1, @@ -2460,7 +2460,7 @@ func TestInterPodAffinity(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, Spec: v1.PodSpec{ @@ -2484,14 +2484,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: false, test: "pod matches its own Label in PodAffinity and that matches the existing pod Labels", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, }, @@ -2517,7 +2517,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - ObjectMeta: v1.ObjectMeta{Labels: podLabel}, + ObjectMeta: metav1.ObjectMeta{Labels: podLabel}, }, }, node: &node1, @@ -2526,7 +2526,7 @@ func TestInterPodAffinity(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, }, @@ -2552,7 +2552,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - ObjectMeta: v1.ObjectMeta{Labels: podLabel}, + ObjectMeta: metav1.ObjectMeta{Labels: podLabel}, }, }, node: &node1, @@ -2642,12 +2642,12 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelA}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelA}}, }, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgChinaAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgChinaAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, }, fits: map[string]bool{ "machine1": true, @@ -2695,12 +2695,12 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, - {Spec: v1.PodSpec{NodeName: "nodeB"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "def"}}}, + {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, + {Spec: v1.PodSpec{NodeName: "nodeB"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "def"}}}, }, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"region": "r1", "hostname": "h1"}}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"region": "r1", "hostname": "h2"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"region": "r1", "hostname": "h1"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"region": "r1", "hostname": "h2"}}}, }, fits: map[string]bool{ "nodeA": false, @@ -2710,7 +2710,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -2738,8 +2738,8 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, pods: []*v1.Pod{}, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"zone": "az1", "hostname": "h1"}}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"zone": "az2", "hostname": "h2"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"zone": "az1", "hostname": "h1"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"zone": "az2", "hostname": "h2"}}}, }, fits: map[string]bool{ "nodeA": true, @@ -2772,11 +2772,11 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, + {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, }, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"region": "r1", "hostname": "nodeA"}}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"region": "r1", "hostname": "nodeB"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"region": "r1", "hostname": "nodeA"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"region": "r1", "hostname": "nodeB"}}}, }, fits: map[string]bool{ "nodeA": false, @@ -2808,12 +2808,12 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, + {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, }, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: labelRgChinaAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeC", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: labelRgChinaAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeC", Labels: labelRgIndia}}, }, fits: map[string]bool{ "nodeA": false, @@ -2954,12 +2954,12 @@ func TestPodToleratesTaints(t *testing.T) { }{ { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod0", }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -2975,7 +2975,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -2991,7 +2991,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3007,7 +3007,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3024,7 +3024,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3040,7 +3040,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3056,7 +3056,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3072,7 +3072,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3093,7 +3093,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3113,7 +3113,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3130,7 +3130,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3147,7 +3147,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3163,7 +3163,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3180,7 +3180,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3197,7 +3197,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ diff --git a/plugin/pkg/scheduler/algorithm/predicates/utils_test.go b/plugin/pkg/scheduler/algorithm/predicates/utils_test.go index 7ddc9affa3e..f4febd18407 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/utils_test.go +++ b/plugin/pkg/scheduler/algorithm/predicates/utils_test.go @@ -19,6 +19,7 @@ package predicates import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api/v1" ) @@ -32,7 +33,7 @@ func ExampleFindLabelsInSet() { // Utility functions will inspect their labels, filter them, and so on. nsPods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: "ns1", Labels: map[string]string{ @@ -43,14 +44,14 @@ func ExampleFindLabelsInSet() { }, }, // first pod which will be used via the utilities { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Namespace: "ns1", }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3ThatWeWontSee", }, }, diff --git a/plugin/pkg/scheduler/algorithm/priorities/balanced_resource_allocation_test.go b/plugin/pkg/scheduler/algorithm/priorities/balanced_resource_allocation_test.go index 607668ae6b2..63348242131 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/balanced_resource_allocation_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/balanced_resource_allocation_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" @@ -146,10 +147,10 @@ func TestBalancedResourceAllocation(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}}, test: "no resources requested, pods scheduled", pods: []*v1.Pod{ - {Spec: machine1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: machine1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: machine2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: machine2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: machine1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: machine1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: machine2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: machine2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { @@ -169,10 +170,10 @@ func TestBalancedResourceAllocation(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 4}, {Host: "machine2", Score: 6}}, test: "no resources requested, pods scheduled with resources", pods: []*v1.Pod{ - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuOnly2, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuAndMemory, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly2, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuAndMemory, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { diff --git a/plugin/pkg/scheduler/algorithm/priorities/image_locality_test.go b/plugin/pkg/scheduler/algorithm/priorities/image_locality_test.go index 0612a2e45f4..43a6f7d39ec 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/image_locality_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/image_locality_test.go @@ -21,6 +21,7 @@ import ( "sort" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" @@ -176,7 +177,7 @@ func TestImageLocalityPriority(t *testing.T) { func makeImageNode(node string, status v1.NodeStatus) *v1.Node { return &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: node}, + ObjectMeta: metav1.ObjectMeta{Name: node}, Status: status, } } diff --git a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go index e61b54f664b..ed143874dd5 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go @@ -272,11 +272,11 @@ func TestInterPodAffinityPriority(t *testing.T) { test string }{ { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "all machines are same priority as Affinity is nil", @@ -285,16 +285,16 @@ func TestInterPodAffinityPriority(t *testing.T) { // the node(machine3) that don't have the label {"region": "whatever the value is"} (mismatch the topology key) but that have existing pods that match the labelSelector get low score // the node(machine2) that have the label {"region": "China"} (match the topology key) but that have existing pods that mismatch the labelSelector get low score { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegion}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegion}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "Affinity: pod that matches topology key & pods in nodes will get high score comparing to others" + @@ -307,12 +307,12 @@ func TestInterPodAffinityPriority(t *testing.T) { { pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegion}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgChinaAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgChinaAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "All the nodes that have the same topology key & label value with one of them has an existing pod that match the affinity rules, have the same score", @@ -322,37 +322,37 @@ func TestInterPodAffinityPriority(t *testing.T) { // Then, nodes in regionChina get higher score than nodes in regionIndia, and all the nodes in regionChina should get a same score(high score), // while all the nodes in regionIndia should get another same score(low score). { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS2InRegion}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS2InRegion}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine4"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine4"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine4", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine5", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine4", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine5", Labels: labelRgIndia}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 5}, {Host: "machine3", Score: 10}, {Host: "machine4", Score: 10}, {Host: "machine5", Score: 5}}, test: "Affinity: nodes in one region has more matching pods comparing to other reqion, so the region which has more macthes will get high score", }, // Test with the different operators and values for pod affinity scheduling preference, including some match failures. { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: affinity3}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: affinity3}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 2}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "Affinity: different Label operators and values for pod affinity scheduling preference, including some match failures ", @@ -360,29 +360,29 @@ func TestInterPodAffinityPriority(t *testing.T) { // Test the symmetry cases for affinity, the difference between affinity and symmetry is not the pod wants to run together with some existing pods, // but the existing pods have the inter pod affinity preference while the pod to schedule satisfy the preference. { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1", Affinity: stayWithS1InRegion}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2", Affinity: stayWithS2InRegion}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1", Affinity: stayWithS1InRegion}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2", Affinity: stayWithS2InRegion}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "Affinity symmetry: considred only the preferredDuringSchedulingIgnoredDuringExecution in pod affinity symmetry", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1", Affinity: hardAffinity}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2", Affinity: hardAffinity}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1", Affinity: hardAffinity}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2", Affinity: hardAffinity}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "Affinity symmetry: considred RequiredDuringSchedulingIgnoredDuringExecution in pod affinity symmetry", @@ -395,69 +395,69 @@ func TestInterPodAffinityPriority(t *testing.T) { // there are 2 nodes, say node1 and node2, both nodes have pods that match the labelSelector and have topology-key in node.Labels. // But there are more pods on node1 that match the preference than node2. Then, node1 get a lower score than node2. { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgChina}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Anti Affinity: pod that doesnot match existing pods in node will get high score ", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgChina}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Anti Affinity: pod that does not matches topology key & matches the pods in nodes will get higher score comparing to others ", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Anti Affinity: one node has more matching pods comparing to other node, so the node which has more unmacthes will get high score", }, // Test the symmetry cases for anti affinity { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1", Affinity: awayFromS2InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2", Affinity: awayFromS1InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1", Affinity: awayFromS2InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2", Affinity: awayFromS1InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAz2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAz2}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Anti Affinity symmetry: the existing pods in node which has anti affinity match will get high score", }, // Test both affinity and anti-affinity { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}}, test: "Affinity and Anti Affinity: considered only preferredDuringSchedulingIgnoredDuringExecution in both pod affinity & anti affinity", @@ -467,22 +467,22 @@ func TestInterPodAffinityPriority(t *testing.T) { // so that all the pods of a RC/service can stay in a same region but trying to separate with each other // machine-1,machine-3,machine-4 are in ChinaRegion others machin-2,machine-5 are in IndiaRegion { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine4"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine4"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChinaAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine4", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine5", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChinaAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine4", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine5", Labels: labelRgIndia}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 4}, {Host: "machine3", Score: 10}, {Host: "machine4", Score: 10}, {Host: "machine5", Score: 4}}, test: "Affinity and Anti Affinity: considering both affinity and anti-affinity, the pod to schedule and existing pods have the same labels", @@ -493,18 +493,18 @@ func TestInterPodAffinityPriority(t *testing.T) { // for Affinity symmetry, the weights are: 0, 0, 8, 0 // for Anti Affinity symmetry, the weights are: 0, 0, 0, -5 { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, {Spec: v1.PodSpec{NodeName: "machine3", Affinity: stayWithS1InRegionAwayFromS2InAz}}, {Spec: v1.PodSpec{NodeName: "machine4", Affinity: awayFromS1InAz}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine4", Labels: labelAzAz2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine4", Labels: labelAzAz2}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 10}, {Host: "machine4", Score: 0}}, test: "Affinity and Anti Affinity and symmetry: considered only preferredDuringSchedulingIgnoredDuringExecution in both pod affinity & anti affinity & symmetry", @@ -569,30 +569,30 @@ func TestHardPodAffinitySymmetricWeight(t *testing.T) { test string }{ { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelServiceS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelServiceS1}}, pods: []*v1.Pod{ {Spec: v1.PodSpec{NodeName: "machine1", Affinity: hardPodAffinity}}, {Spec: v1.PodSpec{NodeName: "machine2", Affinity: hardPodAffinity}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, hardPodAffinityWeight: v1.DefaultHardPodAffinitySymmetricWeight, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "Hard Pod Affinity symmetry: hard pod affinity symmetry weights 1 by default, then nodes that match the hard pod affinity symmetry rules, get a high score", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelServiceS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelServiceS1}}, pods: []*v1.Pod{ {Spec: v1.PodSpec{NodeName: "machine1", Affinity: hardPodAffinity}}, {Spec: v1.PodSpec{NodeName: "machine2", Affinity: hardPodAffinity}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, hardPodAffinityWeight: 0, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, @@ -657,28 +657,28 @@ func TestSoftPodAntiAffinityWithFailureDomains(t *testing.T) { test string }{ { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: antiAffinity1}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: antiAffinity1}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: LabelZoneFailureDomainAZ1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAZ1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: LabelZoneFailureDomainAZ1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAZ1}}, }, failureDomains: priorityutil.Topologies{DefaultKeys: strings.Split(v1.DefaultFailureDomains, ",")}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Soft Pod Anti Affinity: when the topologyKey is emtpy, match among topologyKeys indicated by failure domains.", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: antiAffinity1}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: antiAffinity1}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: LabelZoneFailureDomainAZ1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAZ1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: LabelZoneFailureDomainAZ1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAZ1}}, }, failureDomains: priorityutil.Topologies{}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}}, diff --git a/plugin/pkg/scheduler/algorithm/priorities/least_requested_test.go b/plugin/pkg/scheduler/algorithm/priorities/least_requested_test.go index f47a76e65d0..d9393d45f5e 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/least_requested_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/least_requested_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" @@ -146,10 +147,10 @@ func TestLeastRequested(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}}, test: "no resources requested, pods scheduled", pods: []*v1.Pod{ - {Spec: machine1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: machine1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: machine2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: machine2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: machine1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: machine1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: machine2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: machine2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { @@ -169,10 +170,10 @@ func TestLeastRequested(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 7}, {Host: "machine2", Score: 5}}, test: "no resources requested, pods scheduled with resources", pods: []*v1.Pod{ - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuOnly2, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuAndMemory, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly2, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuAndMemory, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { diff --git a/plugin/pkg/scheduler/algorithm/priorities/most_requested_test.go b/plugin/pkg/scheduler/algorithm/priorities/most_requested_test.go index fef9748a4a6..794aefaced8 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/most_requested_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/most_requested_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" @@ -140,10 +141,10 @@ func TestMostRequested(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 3}, {Host: "machine2", Score: 4}}, test: "no resources requested, pods scheduled with resources", pods: []*v1.Pod{ - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuOnly2, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuAndMemory, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly2, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuAndMemory, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { diff --git a/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go b/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go index a13b90a7d71..5f81ebebe6c 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" @@ -108,14 +109,14 @@ func TestNodeAffinityPriority(t *testing.T) { }{ { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "all machines are same priority as NodeAffinity is nil", @@ -127,9 +128,9 @@ func TestNodeAffinityPriority(t *testing.T) { }, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label4}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label4}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "no machine macthes preferred scheduling requirements in NodeAffinity of pod so all machines' priority is zero", @@ -141,9 +142,9 @@ func TestNodeAffinityPriority(t *testing.T) { }, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "only machine1 matches the preferred scheduling requirements of pod", @@ -155,9 +156,9 @@ func TestNodeAffinityPriority(t *testing.T) { }, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine5", Labels: label5}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine5", Labels: label5}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 1}, {Host: "machine5", Score: 10}, {Host: "machine2", Score: 3}}, test: "all machines matches the preferred scheduling requirements of pod but with different priorities ", diff --git a/plugin/pkg/scheduler/algorithm/priorities/node_label_test.go b/plugin/pkg/scheduler/algorithm/priorities/node_label_test.go index 58913ae4e0a..b8f413bad7b 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/node_label_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/node_label_test.go @@ -21,6 +21,7 @@ import ( "sort" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" @@ -39,9 +40,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }{ { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, label: "baz", @@ -50,9 +51,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 10}}, label: "baz", @@ -61,9 +62,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, label: "foo", @@ -72,9 +73,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 10}}, label: "foo", @@ -83,9 +84,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 10}}, label: "bar", @@ -94,9 +95,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, label: "bar", diff --git a/plugin/pkg/scheduler/algorithm/priorities/node_prefer_avoid_pods_test.go b/plugin/pkg/scheduler/algorithm/priorities/node_prefer_avoid_pods_test.go index f5f54bf060a..9cac8d4baf3 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/node_prefer_avoid_pods_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/node_prefer_avoid_pods_test.go @@ -70,13 +70,13 @@ func TestNodePreferAvoidPriority(t *testing.T) { } testNodes := []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: "machine1", Annotations: annotations1}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1", Annotations: annotations1}, }, { - ObjectMeta: v1.ObjectMeta{Name: "machine2", Annotations: annotations2}, + ObjectMeta: metav1.ObjectMeta{Name: "machine2", Annotations: annotations2}, }, { - ObjectMeta: v1.ObjectMeta{Name: "machine3"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine3"}, }, } trueVar := true @@ -88,7 +88,7 @@ func TestNodePreferAvoidPriority(t *testing.T) { }{ { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", OwnerReferences: []metav1.OwnerReference{ {Kind: "ReplicationController", Name: "foo", UID: "abcdef123456", Controller: &trueVar}, @@ -101,7 +101,7 @@ func TestNodePreferAvoidPriority(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", OwnerReferences: []metav1.OwnerReference{ {Kind: "RandomController", Name: "foo", UID: "abcdef123456", Controller: &trueVar}, @@ -114,7 +114,7 @@ func TestNodePreferAvoidPriority(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", OwnerReferences: []metav1.OwnerReference{ {Kind: "ReplicationController", Name: "foo", UID: "abcdef123456"}, @@ -127,7 +127,7 @@ func TestNodePreferAvoidPriority(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", OwnerReferences: []metav1.OwnerReference{ {Kind: "ReplicaSet", Name: "foo", UID: "qwert12345", Controller: &trueVar}, diff --git a/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go b/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go index 7237012a867..60d87f00b8c 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go @@ -70,25 +70,25 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "nothing scheduled", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{{Spec: zone1Spec}}, nodes: []string{"machine1", "machine2"}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}}, test: "no services", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - pods: []*v1.Pod{{Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + pods: []*v1.Pod{{Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}}, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"key": "value"}}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}}, test: "different services", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -96,13 +96,13 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "two pods, one service pod", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -110,38 +110,38 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "five pods, one service pod in no namespace", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, }, nodes: []string{"machine1", "machine2"}, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: v1.ObjectMeta{Namespace: v1.NamespaceDefault}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: metav1.ObjectMeta{Namespace: v1.NamespaceDefault}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}}, test: "four pods, one service pod in default namespace", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns2"}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns2"}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, }, nodes: []string{"machine1", "machine2"}, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: v1.ObjectMeta{Namespace: "ns1"}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: metav1.ObjectMeta{Namespace: "ns1"}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}}, test: "five pods, one service pod in specific namespace", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -149,12 +149,12 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "three pods, two service pods on different machines", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -162,11 +162,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "four pods, three service pods", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"baz": "blah"}}}}, @@ -174,11 +174,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "service with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rcs: []*v1.ReplicationController{{Spec: v1.ReplicationControllerSpec{Selector: map[string]string{"foo": "bar"}}}}, @@ -189,11 +189,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "service with partial pod label matches with service and replication controller", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"baz": "blah"}}}}, @@ -203,11 +203,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "service with partial pod label matches with service and replica set", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "bar", "bar": "foo"}, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "bar", "bar": "foo"}, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rcs: []*v1.ReplicationController{{Spec: v1.ReplicationControllerSpec{Selector: map[string]string{"foo": "bar"}}}}, @@ -217,11 +217,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "disjoined service and replication controller should be treated equally", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "bar", "bar": "foo"}, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "bar", "bar": "foo"}, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"bar": "foo"}}}}, @@ -231,11 +231,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "disjoined service and replica set should be treated equally", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rcs: []*v1.ReplicationController{{Spec: v1.ReplicationControllerSpec{Selector: map[string]string{"foo": "bar"}}}}, @@ -244,11 +244,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "Replication controller with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rss: []*extensions.ReplicaSet{{Spec: extensions.ReplicaSetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}}}}, @@ -257,11 +257,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "Replica set with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rcs: []*v1.ReplicationController{{Spec: v1.ReplicationControllerSpec{Selector: map[string]string{"baz": "blah"}}}}, @@ -269,11 +269,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "Another replication controller with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rss: []*extensions.ReplicaSet{{Spec: extensions.ReplicaSetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"baz": "blah"}}}}}, @@ -302,7 +302,7 @@ func TestSelectorSpreadPriority(t *testing.T) { func buildPod(nodeName string, labels map[string]string, ownerRefs []metav1.OwnerReference) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Labels: labels, OwnerReferences: ownerRefs}, + ObjectMeta: metav1.ObjectMeta{Labels: labels, OwnerReferences: ownerRefs}, Spec: v1.PodSpec{NodeName: nodeName}, } } @@ -559,7 +559,7 @@ func TestZoneSpreadPriority(t *testing.T) { test: "nothing scheduled", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{{Spec: zone1Spec}}, nodes: labeledNodes, expectedList: []schedulerapi.HostPriority{{Host: "machine11", Score: 10}, {Host: "machine12", Score: 10}, @@ -568,8 +568,8 @@ func TestZoneSpreadPriority(t *testing.T) { test: "no services", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - pods: []*v1.Pod{{Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + pods: []*v1.Pod{{Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}}, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"key": "value"}}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine11", Score: 10}, {Host: "machine12", Score: 10}, @@ -578,11 +578,11 @@ func TestZoneSpreadPriority(t *testing.T) { test: "different services", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone0Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone0Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -592,11 +592,11 @@ func TestZoneSpreadPriority(t *testing.T) { test: "three pods, one service pod", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -606,27 +606,27 @@ func TestZoneSpreadPriority(t *testing.T) { test: "three pods, two service pods on different machines", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, }, nodes: labeledNodes, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: v1.ObjectMeta{Namespace: v1.NamespaceDefault}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: metav1.ObjectMeta{Namespace: v1.NamespaceDefault}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine11", Score: 0}, {Host: "machine12", Score: 0}, {Host: "machine21", Score: 10}, {Host: "machine22", Score: 10}, {Host: "machine01", Score: 0}, {Host: "machine02", Score: 0}}, test: "three service label match pods in different namespaces", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -636,11 +636,11 @@ func TestZoneSpreadPriority(t *testing.T) { test: "four pods, three service pods", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"baz": "blah"}}}}, @@ -650,12 +650,12 @@ func TestZoneSpreadPriority(t *testing.T) { test: "service with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone0Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone0Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -685,7 +685,7 @@ func TestZoneSpreadPriority(t *testing.T) { func makeLabeledNodeList(nodeMap map[string]map[string]string) []*v1.Node { nodes := make([]*v1.Node, 0, len(nodeMap)) for nodeName, labels := range nodeMap { - nodes = append(nodes, &v1.Node{ObjectMeta: v1.ObjectMeta{Name: nodeName, Labels: labels}}) + nodes = append(nodes, &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName, Labels: labels}}) } return nodes } @@ -693,7 +693,7 @@ func makeLabeledNodeList(nodeMap map[string]map[string]string) []*v1.Node { func makeNodeList(nodeNames []string) []*v1.Node { nodes := make([]*v1.Node, 0, len(nodeNames)) for _, nodeName := range nodeNames { - nodes = append(nodes, &v1.Node{ObjectMeta: v1.ObjectMeta{Name: nodeName}}) + nodes = append(nodes, &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName}}) } return nodes } diff --git a/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go b/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go index c71664a816c..2994c812f7f 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go @@ -21,6 +21,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" @@ -29,7 +30,7 @@ import ( func nodeWithTaints(nodeName string, taints []v1.Taint) *v1.Node { taintsData, _ := json.Marshal(taints) return &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nodeName, Annotations: map[string]string{ v1.TaintsAnnotationKey: string(taintsData), @@ -41,7 +42,7 @@ func nodeWithTaints(nodeName string, taints []v1.Taint) *v1.Node { func podWithTolerations(tolerations []v1.Toleration) *v1.Pod { tolerationData, _ := json.Marshal(tolerations) return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TolerationsAnnotationKey: string(tolerationData), }, diff --git a/plugin/pkg/scheduler/algorithm/priorities/test_util.go b/plugin/pkg/scheduler/algorithm/priorities/test_util.go index a09a5943485..1d1898c8bdd 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/test_util.go +++ b/plugin/pkg/scheduler/algorithm/priorities/test_util.go @@ -17,6 +17,7 @@ limitations under the License. package priorities import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" @@ -26,7 +27,7 @@ import ( func makeNode(node string, milliCPU, memory int64) *v1.Node { return &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: node}, + ObjectMeta: metav1.ObjectMeta{Name: node}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ "cpu": *resource.NewMilliQuantity(milliCPU, resource.DecimalSI), diff --git a/plugin/pkg/scheduler/extender_test.go b/plugin/pkg/scheduler/extender_test.go index f24c563c68c..09ee08aa808 100644 --- a/plugin/pkg/scheduler/extender_test.go +++ b/plugin/pkg/scheduler/extender_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" @@ -283,7 +284,7 @@ func TestGenericSchedulerWithExtenders(t *testing.T) { } cache := schedulercache.New(time.Duration(0), wait.NeverStop) for _, name := range test.nodes { - cache.AddNode(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: name}}) + cache.AddNode(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: name}}) } scheduler := NewGenericScheduler( cache, test.predicates, algorithm.EmptyMetadataProducer, test.prioritizers, algorithm.EmptyMetadataProducer, extenders) diff --git a/plugin/pkg/scheduler/factory/BUILD b/plugin/pkg/scheduler/factory/BUILD index e0bcb18cf28..7bf4bd921c0 100644 --- a/plugin/pkg/scheduler/factory/BUILD +++ b/plugin/pkg/scheduler/factory/BUILD @@ -61,6 +61,7 @@ go_test( "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/api/latest:go_default_library", "//plugin/pkg/scheduler/schedulercache:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", ], diff --git a/plugin/pkg/scheduler/factory/factory_test.go b/plugin/pkg/scheduler/factory/factory_test.go index 747f88aee57..004c63f4640 100644 --- a/plugin/pkg/scheduler/factory/factory_test.go +++ b/plugin/pkg/scheduler/factory/factory_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" @@ -135,7 +136,7 @@ func PriorityTwo(pod *v1.Pod, nodeNameToInfo map[string]*schedulercache.NodeInfo func TestDefaultErrorFunc(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: apitesting.V1DeepEqualSafePodSpec(), } handler := utiltesting.FakeHandler{ @@ -180,9 +181,9 @@ func TestDefaultErrorFunc(t *testing.T) { func TestNodeEnumerator(t *testing.T) { testList := &v1.NodeList{ Items: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "foo"}}, - {ObjectMeta: v1.ObjectMeta{Name: "bar"}}, - {ObjectMeta: v1.ObjectMeta{Name: "baz"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "baz"}}, }, } me := nodeEnumerator{testList} @@ -214,7 +215,7 @@ func TestBind(t *testing.T) { binding *v1.Binding }{ {binding: &v1.Binding{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: v1.NamespaceDefault, Name: "foo", }, @@ -334,28 +335,28 @@ func TestResponsibleForPod(t *testing.T) { { // pod with no annotation "scheduler.alpha.kubernetes.io/name=" should be // picked by the default scheduler, NOT by the one of name "foo-scheduler" - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}}, pickedByDefault: true, pickedByFoo: false, }, { // pod with annotation "scheduler.alpha.kubernetes.io/name=default-scheduler" should be picked // by the scheduler of name "default-scheduler", NOT by the one of name "foo-scheduler" - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar", Annotations: schedulerAnnotationFitsDefault}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar", Annotations: schedulerAnnotationFitsDefault}}, pickedByDefault: true, pickedByFoo: false, }, { // pod with annotataion "scheduler.alpha.kubernetes.io/name=foo-scheduler" should be NOT // be picked by the scheduler of name "default-scheduler", but by the one of name "foo-scheduler" - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar", Annotations: schedulerAnnotationFitsFoo}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar", Annotations: schedulerAnnotationFitsFoo}}, pickedByDefault: false, pickedByFoo: true, }, { // pod with annotataion "scheduler.alpha.kubernetes.io/name=foo-scheduler" should be NOT // be picked by niether the scheduler of name "default-scheduler" nor the one of name "foo-scheduler" - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar", Annotations: schedulerAnnotationFitsNone}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar", Annotations: schedulerAnnotationFitsNone}}, pickedByDefault: false, pickedByFoo: false, }, @@ -437,29 +438,29 @@ func TestNodeConditionPredicate(t *testing.T) { nodeList := &v1.NodeList{ Items: []v1.Node{ // node1 considered - {ObjectMeta: v1.ObjectMeta{Name: "node1"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node1"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}}}}, // node2 ignored - node not Ready - {ObjectMeta: v1.ObjectMeta{Name: "node2"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node2"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}}}}, // node3 ignored - node out of disk - {ObjectMeta: v1.ObjectMeta{Name: "node3"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node3"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, // node4 considered - {ObjectMeta: v1.ObjectMeta{Name: "node4"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node4"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, // node5 ignored - node out of disk - {ObjectMeta: v1.ObjectMeta{Name: "node5"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node5"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, // node6 considered - {ObjectMeta: v1.ObjectMeta{Name: "node6"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node6"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, // node7 ignored - node out of disk, node not Ready - {ObjectMeta: v1.ObjectMeta{Name: "node7"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node7"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, // node8 ignored - node not Ready - {ObjectMeta: v1.ObjectMeta{Name: "node8"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node8"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, // node9 ignored - node unschedulable - {ObjectMeta: v1.ObjectMeta{Name: "node9"}, Spec: v1.NodeSpec{Unschedulable: true}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node9"}, Spec: v1.NodeSpec{Unschedulable: true}}, // node10 considered - {ObjectMeta: v1.ObjectMeta{Name: "node10"}, Spec: v1.NodeSpec{Unschedulable: false}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node10"}, Spec: v1.NodeSpec{Unschedulable: false}}, // node11 considered - {ObjectMeta: v1.ObjectMeta{Name: "node11"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node11"}}, }, } diff --git a/plugin/pkg/scheduler/generic_scheduler_test.go b/plugin/pkg/scheduler/generic_scheduler_test.go index f03d642b97d..2610573c753 100644 --- a/plugin/pkg/scheduler/generic_scheduler_test.go +++ b/plugin/pkg/scheduler/generic_scheduler_test.go @@ -25,6 +25,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/resource" @@ -105,7 +106,7 @@ func reverseNumericPriority(pod *v1.Pod, nodeNameToInfo map[string]*schedulercac func makeNodeList(nodeNames []string) []*v1.Node { result := make([]*v1.Node, 0, len(nodeNames)) for _, nodeName := range nodeNames { - result = append(result, &v1.Node{ObjectMeta: v1.ObjectMeta{Name: nodeName}}) + result = append(result, &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName}}) } return result } @@ -193,10 +194,10 @@ func TestGenericScheduler(t *testing.T) { prioritizers: []algorithm.PriorityConfig{{Map: EqualPriorityMap, Weight: 1}}, nodes: []string{"machine1", "machine2"}, expectsErr: true, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, name: "test 1", wErr: &FitError{ - Pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + Pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, FailedPredicates: FailedPredicateMap{ "machine1": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, "machine2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, @@ -206,7 +207,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"true": truePredicate}, prioritizers: []algorithm.PriorityConfig{{Map: EqualPriorityMap, Weight: 1}}, nodes: []string{"machine1", "machine2"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "ignore"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "ignore"}}, expectedHosts: sets.NewString("machine1", "machine2"), name: "test 2", wErr: nil, @@ -216,7 +217,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"matches": matchesPredicate}, prioritizers: []algorithm.PriorityConfig{{Map: EqualPriorityMap, Weight: 1}}, nodes: []string{"machine1", "machine2"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "machine2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "machine2"}}, expectedHosts: sets.NewString("machine2"), name: "test 3", wErr: nil, @@ -225,7 +226,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"true": truePredicate}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}}, nodes: []string{"3", "2", "1"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "ignore"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "ignore"}}, expectedHosts: sets.NewString("3"), name: "test 4", wErr: nil, @@ -234,7 +235,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"matches": matchesPredicate}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}}, nodes: []string{"3", "2", "1"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, expectedHosts: sets.NewString("2"), name: "test 5", wErr: nil, @@ -243,7 +244,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"true": truePredicate}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}, {Function: reverseNumericPriority, Weight: 2}}, nodes: []string{"3", "2", "1"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, expectedHosts: sets.NewString("1"), name: "test 6", wErr: nil, @@ -252,11 +253,11 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"true": truePredicate, "false": falsePredicate}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}}, nodes: []string{"3", "2", "1"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, expectsErr: true, name: "test 7", wErr: &FitError{ - Pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + Pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, FailedPredicates: FailedPredicateMap{ "3": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, "2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, @@ -271,7 +272,7 @@ func TestGenericScheduler(t *testing.T) { }, pods: []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{Name: "2"}, + ObjectMeta: metav1.ObjectMeta{Name: "2"}, Spec: v1.PodSpec{ NodeName: "2", }, @@ -280,13 +281,13 @@ func TestGenericScheduler(t *testing.T) { }, }, }, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}}, nodes: []string{"1", "2"}, expectsErr: true, name: "test 8", wErr: &FitError{ - Pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + Pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, FailedPredicates: FailedPredicateMap{ "1": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, "2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, @@ -300,7 +301,7 @@ func TestGenericScheduler(t *testing.T) { cache.AddPod(pod) } for _, name := range test.nodes { - cache.AddNode(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: name}}) + cache.AddNode(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: name}}) } scheduler := NewGenericScheduler( @@ -349,14 +350,14 @@ func TestFindFitAllError(t *testing.T) { func TestFindFitSomeError(t *testing.T) { nodes := []string{"3", "2", "1"} predicates := map[string]algorithm.FitPredicate{"true": truePredicate, "match": matchesPredicate} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "1"}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}} nodeNameToInfo := map[string]*schedulercache.NodeInfo{ "3": schedulercache.NewNodeInfo(), "2": schedulercache.NewNodeInfo(), "1": schedulercache.NewNodeInfo(pod), } for name := range nodeNameToInfo { - nodeNameToInfo[name].SetNode(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: name}}) + nodeNameToInfo[name].SetNode(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: name}}) } _, predicateMap, err := findNodesThatFit(pod, nodeNameToInfo, makeNodeList(nodes), predicates, nil, algorithm.EmptyMetadataProducer) @@ -384,7 +385,7 @@ func TestFindFitSomeError(t *testing.T) { func makeNode(node string, milliCPU, memory int64) *v1.Node { return &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: node}, + ObjectMeta: metav1.ObjectMeta{Name: node}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ "cpu": *resource.NewMilliQuantity(milliCPU, resource.DecimalSI), @@ -400,7 +401,7 @@ func makeNode(node string, milliCPU, memory int64) *v1.Node { func TestHumanReadableFitError(t *testing.T) { error := &FitError{ - Pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + Pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, FailedPredicates: FailedPredicateMap{ "1": []algorithm.PredicateFailureReason{algorithmpredicates.ErrNodeUnderMemoryPressure}, "2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrNodeUnderDiskPressure}, diff --git a/plugin/pkg/scheduler/scheduler.go b/plugin/pkg/scheduler/scheduler.go index 87c1327f291..12e8c7f6cc8 100644 --- a/plugin/pkg/scheduler/scheduler.go +++ b/plugin/pkg/scheduler/scheduler.go @@ -19,6 +19,7 @@ package scheduler import ( "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" @@ -128,7 +129,7 @@ func (s *Scheduler) scheduleOne() { defer metrics.E2eSchedulingLatency.Observe(metrics.SinceInMicroseconds(start)) b := &v1.Binding{ - ObjectMeta: v1.ObjectMeta{Namespace: pod.Namespace, Name: pod.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: pod.Namespace, Name: pod.Name}, Target: v1.ObjectReference{ Kind: "Node", Name: dest, diff --git a/plugin/pkg/scheduler/scheduler_test.go b/plugin/pkg/scheduler/scheduler_test.go index 2161c0c23f7..fe44fd4e61d 100644 --- a/plugin/pkg/scheduler/scheduler_test.go +++ b/plugin/pkg/scheduler/scheduler_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/wait" @@ -51,7 +52,7 @@ func (fc fakePodConditionUpdater) Update(pod *v1.Pod, podCondition *v1.PodCondit func podWithID(id, desiredHost string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: id, SelfLink: testapi.Default.SelfLink("pods", id)}, + ObjectMeta: metav1.ObjectMeta{Name: id, SelfLink: testapi.Default.SelfLink("pods", id)}, Spec: v1.PodSpec{ NodeName: desiredHost, }, @@ -88,7 +89,7 @@ func TestScheduler(t *testing.T) { eventBroadcaster.StartLogging(t.Logf).Stop() errS := errors.New("scheduler") errB := errors.New("binder") - testNode := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1"}} + testNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1"}} table := []struct { injectBindError error @@ -103,7 +104,7 @@ func TestScheduler(t *testing.T) { { sendPod: podWithID("foo", ""), algo: mockScheduler{testNode.Name, nil}, - expectBind: &v1.Binding{ObjectMeta: v1.ObjectMeta{Name: "foo"}, Target: v1.ObjectReference{Kind: "Node", Name: testNode.Name}}, + expectBind: &v1.Binding{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Target: v1.ObjectReference{Kind: "Node", Name: testNode.Name}}, expectAssumedPod: podWithID("foo", testNode.Name), eventReason: "Scheduled", }, { @@ -115,7 +116,7 @@ func TestScheduler(t *testing.T) { }, { sendPod: podWithID("foo", ""), algo: mockScheduler{testNode.Name, nil}, - expectBind: &v1.Binding{ObjectMeta: v1.ObjectMeta{Name: "foo"}, Target: v1.ObjectReference{Kind: "Node", Name: testNode.Name}}, + expectBind: &v1.Binding{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Target: v1.ObjectReference{Kind: "Node", Name: testNode.Name}}, expectAssumedPod: podWithID("foo", testNode.Name), injectBindError: errB, expectError: errB, @@ -185,7 +186,7 @@ func TestSchedulerNoPhantomPodAfterExpire(t *testing.T) { queuedPodStore := clientcache.NewFIFO(clientcache.MetaNamespaceKeyFunc) scache := schedulercache.New(100*time.Millisecond, stop) pod := podWithPort("pod.Name", "", 8080) - node := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1"}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1"}} scache.AddNode(&node) nodeLister := algorithm.FakeNodeLister([]*v1.Node{&node}) predicateMap := map[string]algorithm.FitPredicate{"PodFitsHostPorts": predicates.PodFitsHostPorts} @@ -226,7 +227,7 @@ func TestSchedulerNoPhantomPodAfterExpire(t *testing.T) { select { case b := <-bindingChan: expectBinding := &v1.Binding{ - ObjectMeta: v1.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Target: v1.ObjectReference{Kind: "Node", Name: node.Name}, } if !reflect.DeepEqual(expectBinding, b) { @@ -243,7 +244,7 @@ func TestSchedulerNoPhantomPodAfterDelete(t *testing.T) { queuedPodStore := clientcache.NewFIFO(clientcache.MetaNamespaceKeyFunc) scache := schedulercache.New(10*time.Minute, stop) firstPod := podWithPort("pod.Name", "", 8080) - node := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1"}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1"}} scache.AddNode(&node) nodeLister := algorithm.FakeNodeLister([]*v1.Node{&node}) predicateMap := map[string]algorithm.FitPredicate{"PodFitsHostPorts": predicates.PodFitsHostPorts} @@ -286,7 +287,7 @@ func TestSchedulerNoPhantomPodAfterDelete(t *testing.T) { select { case b := <-bindingChan: expectBinding := &v1.Binding{ - ObjectMeta: v1.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Target: v1.ObjectReference{Kind: "Node", Name: node.Name}, } if !reflect.DeepEqual(expectBinding, b) { @@ -325,7 +326,7 @@ func TestSchedulerErrorWithLongBinding(t *testing.T) { queuedPodStore := clientcache.NewFIFO(clientcache.MetaNamespaceKeyFunc) scache := schedulercache.New(test.CacheTTL, stop) - node := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1"}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1"}} scache.AddNode(&node) nodeLister := algorithm.FakeNodeLister([]*v1.Node{&node}) @@ -374,7 +375,7 @@ func setupTestSchedulerWithOnePodOnNode(t *testing.T, queuedPodStore *clientcach select { case b := <-bindingChan: expectBinding := &v1.Binding{ - ObjectMeta: v1.ObjectMeta{Name: pod.Name}, + ObjectMeta: metav1.ObjectMeta{Name: pod.Name}, Target: v1.ObjectReference{Kind: "Node", Name: node.Name}, } if !reflect.DeepEqual(expectBinding, b) { @@ -407,7 +408,7 @@ func TestSchedulerFailedSchedulingReasons(t *testing.T) { nodes := []*v1.Node{} for i := 0; i < 100; i++ { node := v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: fmt.Sprintf("machine%v", i)}, + ObjectMeta: metav1.ObjectMeta{Name: fmt.Sprintf("machine%v", i)}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ v1.ResourceCPU: *(resource.NewQuantity(cpu/2, resource.DecimalSI)), diff --git a/plugin/pkg/scheduler/schedulercache/BUILD b/plugin/pkg/scheduler/schedulercache/BUILD index d0d850db433..6126730c437 100644 --- a/plugin/pkg/scheduler/schedulercache/BUILD +++ b/plugin/pkg/scheduler/schedulercache/BUILD @@ -37,6 +37,7 @@ go_test( "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", "//plugin/pkg/scheduler/algorithm/priorities/util:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/plugin/pkg/scheduler/schedulercache/cache_test.go b/plugin/pkg/scheduler/schedulercache/cache_test.go index 2e363139795..27ade20f6ec 100644 --- a/plugin/pkg/scheduler/schedulercache/cache_test.go +++ b/plugin/pkg/scheduler/schedulercache/cache_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -533,7 +534,7 @@ func makeBasePod(nodeName, objName, cpu, mem string, ports []v1.ContainerPort) * } } return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "node_info_cache_test", Name: objName, }, diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 7e2f0abc80a..62317fca0ae 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -42,6 +42,7 @@ limitations under the License. LabelSelector LabelSelectorRequirement ListMeta + ObjectMeta OwnerReference RootPaths ServerAddressByClientCIDR @@ -150,51 +151,55 @@ func (m *ListMeta) Reset() { *m = ListMeta{} } func (*ListMeta) ProtoMessage() {} func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } +func (*ObjectMeta) ProtoMessage() {} +func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } + func (m *OwnerReference) Reset() { *m = OwnerReference{} } func (*OwnerReference) ProtoMessage() {} -func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } +func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } func (m *RootPaths) Reset() { *m = RootPaths{} } func (*RootPaths) ProtoMessage() {} -func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } +func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{19} + return fileDescriptorGenerated, []int{20} } func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } +func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } func (m *StatusCause) Reset() { *m = StatusCause{} } func (*StatusCause) ProtoMessage() {} -func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } +func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (*StatusDetails) ProtoMessage() {} -func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } +func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } func (m *Time) Reset() { *m = Time{} } func (*Time) ProtoMessage() {} -func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } +func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } func (m *Timestamp) Reset() { *m = Timestamp{} } func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } +func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } +func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (m *Verbs) Reset() { *m = Verbs{} } func (*Verbs) ProtoMessage() {} -func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } +func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (*WatchEvent) ProtoMessage() {} -func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } +func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } func init() { proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup") @@ -214,6 +219,7 @@ func init() { proto.RegisterType((*LabelSelector)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector") proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement") proto.RegisterType((*ListMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta") + proto.RegisterType((*ObjectMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta") proto.RegisterType((*OwnerReference)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference") proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths") proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR") @@ -788,6 +794,139 @@ func (m *ListMeta) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *ObjectMeta) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ObjectMeta) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.GenerateName))) + i += copy(data[i:], m.GenerateName) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Namespace))) + i += copy(data[i:], m.Namespace) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.SelfLink))) + i += copy(data[i:], m.SelfLink) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.UID))) + i += copy(data[i:], m.UID) + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ResourceVersion))) + i += copy(data[i:], m.ResourceVersion) + data[i] = 0x38 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Generation)) + data[i] = 0x42 + i++ + i = encodeVarintGenerated(data, i, uint64(m.CreationTimestamp.Size())) + n3, err := m.CreationTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + if m.DeletionTimestamp != nil { + data[i] = 0x4a + i++ + i = encodeVarintGenerated(data, i, uint64(m.DeletionTimestamp.Size())) + n4, err := m.DeletionTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.DeletionGracePeriodSeconds != nil { + data[i] = 0x50 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.DeletionGracePeriodSeconds)) + } + if len(m.Labels) > 0 { + for k := range m.Labels { + data[i] = 0x5a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x62 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.OwnerReferences) > 0 { + for _, msg := range m.OwnerReferences { + data[i] = 0x6a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Finalizers) > 0 { + for _, s := range m.Finalizers { + data[i] = 0x72 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + data[i] = 0x7a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ClusterName))) + i += copy(data[i:], m.ClusterName) + return i, nil +} + func (m *OwnerReference) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -909,11 +1048,11 @@ func (m *Status) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n3, err := m.ListMeta.MarshalTo(data[i:]) + n5, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n3 + i += n5 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Status))) @@ -930,11 +1069,11 @@ func (m *Status) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.Details.Size())) - n4, err := m.Details.MarshalTo(data[i:]) + n6, err := m.Details.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n4 + i += n6 } data[i] = 0x30 i++ @@ -1122,11 +1261,11 @@ func (m *WatchEvent) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) - n5, err := m.Object.MarshalTo(data[i:]) + n7, err := m.Object.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n5 + i += n7 return i, nil } @@ -1371,6 +1510,64 @@ func (m *ListMeta) Size() (n int) { return n } +func (m *ObjectMeta) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.GenerateName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SelfLink) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + l = m.CreationTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.DeletionTimestamp != nil { + l = m.DeletionTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.DeletionGracePeriodSeconds != nil { + n += 1 + sovGenerated(uint64(*m.DeletionGracePeriodSeconds)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.OwnerReferences) > 0 { + for _, e := range m.OwnerReferences { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Finalizers) > 0 { + for _, s := range m.Finalizers { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ClusterName) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *OwnerReference) Size() (n int) { var l int _ = l @@ -1646,6 +1843,50 @@ func (this *ListMeta) String() string { }, "") return s } +func (this *ObjectMeta) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ObjectMeta{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `GenerateName:` + fmt.Sprintf("%v", this.GenerateName) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, + `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "Time", 1), `&`, ``, 1) + `,`, + `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "Time", 1) + `,`, + `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "OwnerReference", 1), `&`, ``, 1) + `,`, + `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`, + `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`, + `}`, + }, "") + return s +} func (this *OwnerReference) String() string { if this == nil { return "nil" @@ -3777,6 +4018,643 @@ func (m *ListMeta) Unmarshal(data []byte) error { } return nil } +func (m *ObjectMeta) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenerateName", 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.GenerateName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", 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.SelfLink = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", 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.UID = k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", 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.ResourceVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Generation |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CreationTimestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DeletionTimestamp == nil { + m.DeletionTimestamp = &Time{} + } + if err := m.DeletionTimestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionGracePeriodSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DeletionGracePeriodSeconds = &v + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Labels == nil { + m.Labels = make(map[string]string) + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerReferences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerReferences = append(m.OwnerReferences, OwnerReference{}) + if err := m.OwnerReferences[len(m.OwnerReferences)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", 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.Finalizers = append(m.Finalizers, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", 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.ClusterName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *OwnerReference) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -5184,107 +6062,126 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 1628 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0xda, 0xb1, 0x6b, 0x3f, 0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56, 0x77, 0xb1, 0xe9, 0x62, 0x8f, 0x2d, 0xae, 0x2c, 0x21, 0x5a, 0x1e, 0x13, 0x75, 0x78, - 0x3f, 0x59, 0x42, 0x9b, 0xa3, 0x70, 0x2c, 0x43, 0x66, 0x34, 0x3d, 0xd2, 0x84, 0xa2, 0xbf, 0x49, - 0xc3, 0xd8, 0x81, 0x71, 0x75, 0x90, 0xab, 0x2e, 0x65, 0xfa, 0x16, 0xe4, 0x1a, 0x7c, 0x41, 0xcb, - 0x9a, 0x48, 0xd0, 0x4c, 0x96, 0xa0, 0xc2, 0xb0, 0x4e, 0xcb, 0x7c, 0x72, 0x62, 0x49, 0x91, 0x44, - 0x33, 0x5e, 0x6a, 0x50, 0x5c, 0xd8, 0x58, 0x41, 0x92, 0x84, 0x09, 0x48, 0x33, 0x0f, 0xc0, 0xff, - 0xd2, 0xc0, 0xae, 0x63, 0xa7, 0x9c, 0x9e, 0xd1, 0x66, 0xf3, 0x96, 0x2e, 0xed, 0xe0, 0x4e, 0xa4, - 0x41, 0x31, 0x2b, 0x8e, 0xba, 0xe7, 0x7a, 0x8e, 0x38, 0xed, 0x18, 0xea, 0x6d, 0xd7, 0x73, 0x90, - 0xd0, 0xe8, 0xab, 0x90, 0xed, 0x60, 0xb2, 0xcd, 0xeb, 0xcf, 0x09, 0xf1, 0x56, 0xb2, 0xed, 0x6d, - 0x71, 0x17, 0xab, 0x70, 0xd0, 0xab, 0x66, 0xc5, 0x4f, 0x14, 0x82, 0x18, 0x3f, 0x6a, 0x30, 0x11, - 0xdb, 0x95, 0xa8, 0xe0, 0x35, 0x18, 0x6f, 0xc4, 0xf8, 0x23, 0x77, 0x38, 0x25, 0x73, 0x19, 0x8f, - 0x73, 0x0b, 0x0d, 0x58, 0xea, 0x18, 0x0a, 0xea, 0x92, 0xaa, 0x7b, 0x32, 0x97, 0xb8, 0xfc, 0x2a, - 0x87, 0x7e, 0xa4, 0x98, 0x90, 0xa2, 0x3e, 0xb2, 0xf1, 0x7b, 0x78, 0x14, 0xea, 0xe6, 0xe8, 0xb3, - 0xb1, 0xdb, 0xc9, 0x0f, 0xbd, 0x60, 0x8d, 0x8f, 0xb8, 0x59, 0xc7, 0x50, 0x3a, 0xfd, 0xaf, 0xa0, - 0xf4, 0xf5, 0xfc, 0x37, 0x4f, 0xab, 0xa9, 0xc7, 0xbf, 0xcc, 0xa4, 0x8c, 0x15, 0xc8, 0x2f, 0xb5, - 0x89, 0xcd, 0x78, 0x71, 0xdf, 0x83, 0xbc, 0x23, 0x7f, 0x8b, 0x23, 0xc9, 0x58, 0xe7, 0x55, 0x0f, - 0x51, 0x36, 0x87, 0xbd, 0x6a, 0x89, 0x37, 0x57, 0x53, 0x09, 0x50, 0xe4, 0x62, 0x3c, 0x80, 0xd2, - 0xf2, 0x7e, 0xe0, 0x13, 0xb6, 0x1e, 0x30, 0x51, 0x8b, 0xff, 0x43, 0x0e, 0x0b, 0x81, 0x40, 0xcb, - 0xf7, 0x89, 0x1f, 0x9a, 0x21, 0xa9, 0xd5, 0x2f, 0x40, 0x16, 0xef, 0xdb, 0x75, 0x26, 0x19, 0x5c, - 0x92, 0x66, 0xd9, 0x65, 0x2e, 0x44, 0xa1, 0xce, 0x58, 0x07, 0xb8, 0x85, 0x23, 0xe8, 0x05, 0x98, - 0x50, 0xa7, 0x35, 0x48, 0xa2, 0xff, 0x4a, 0xe7, 0x09, 0x34, 0xa8, 0x46, 0xc3, 0xf6, 0xc6, 0x03, - 0x28, 0x08, 0xa2, 0x71, 0xe6, 0xf3, 0x14, 0x04, 0xcf, 0x24, 0x4a, 0x94, 0x82, 0xb0, 0x40, 0xa1, - 0x2e, 0xba, 0x3a, 0xe9, 0x51, 0x57, 0x27, 0x56, 0xd7, 0x26, 0x94, 0x42, 0x5f, 0x75, 0x9b, 0x13, - 0x45, 0xb8, 0x0c, 0x79, 0x95, 0xa6, 0x8c, 0x12, 0x75, 0x71, 0x05, 0x84, 0x22, 0x8b, 0x58, 0xb4, - 0x5d, 0x18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 0x32, - 0x14, 0x90, 0xef, 0xb3, 0x0d, 0x9b, 0xed, 0x52, 0xbd, 0x0a, 0xd9, 0x80, 0xff, 0x90, 0xf3, 0x83, - 0x18, 0x94, 0x84, 0x06, 0x85, 0x72, 0xe3, 0x2b, 0x0d, 0xce, 0x8d, 0x7c, 0xce, 0x79, 0xbe, 0xf5, - 0x68, 0x25, 0xab, 0x17, 0xe5, 0xdb, 0xb7, 0x43, 0x31, 0x2b, 0xfd, 0x5d, 0x28, 0x0d, 0xcc, 0x00, - 0xf2, 0xfc, 0xce, 0x4a, 0xb7, 0xd2, 0x40, 0x34, 0x34, 0x68, 0x6b, 0xfc, 0x91, 0x86, 0xdc, 0x26, - 0xb3, 0x59, 0x9b, 0xea, 0x0f, 0x20, 0xcf, 0xaf, 0x9e, 0x63, 0x33, 0x5b, 0x44, 0x4e, 0x3c, 0xf2, - 0x2a, 0xe6, 0xf5, 0x79, 0xa6, 0x24, 0x28, 0x42, 0xe4, 0x53, 0x02, 0x15, 0x71, 0x64, 0x7a, 0xd1, - 0x94, 0x10, 0x46, 0x47, 0x52, 0xcb, 0x3b, 0x65, 0x0b, 0x53, 0x6a, 0x37, 0x14, 0x35, 0xa2, 0x4e, - 0xb9, 0x16, 0x8a, 0x91, 0xd2, 0xeb, 0x57, 0x21, 0x47, 0xb0, 0x4d, 0x7d, 0x4f, 0x72, 0xa4, 0xa2, - 0x20, 0x91, 0x90, 0x1e, 0xf6, 0xaa, 0xe3, 0x12, 0x5c, 0xac, 0x91, 0xb4, 0xd6, 0xef, 0xc3, 0x29, - 0x07, 0x33, 0xdb, 0x6d, 0x52, 0xc1, 0x88, 0xe2, 0xfc, 0x3b, 0x09, 0x07, 0x35, 0x01, 0xb6, 0x14, - 0xba, 0x5a, 0x45, 0x9e, 0x93, 0x5c, 0x20, 0x05, 0xc8, 0x69, 0x5d, 0xf7, 0x1d, 0x2c, 0x68, 0x93, - 0xed, 0xd3, 0x7a, 0xd1, 0x77, 0x30, 0x12, 0x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c, 0x0c, 0x79, - 0xce, 0x24, 0xf1, 0x4e, 0x1c, 0xdf, 0xa3, 0x07, 0xbb, 0x67, 0x3a, 0x49, 0xf7, 0x34, 0xe6, 0x21, - 0xfc, 0x30, 0xe4, 0x9d, 0xd0, 0x65, 0xb8, 0x35, 0xd0, 0x09, 0x57, 0xb8, 0x00, 0x85, 0xf2, 0xd8, - 0xe8, 0xf2, 0x85, 0x06, 0xf0, 0x81, 0x78, 0xb9, 0x3b, 0xfc, 0x59, 0x9d, 0x81, 0x31, 0xde, 0xc6, - 0x87, 0x13, 0x13, 0x57, 0x40, 0x68, 0xf4, 0x7b, 0x90, 0xf3, 0xb7, 0x3f, 0xc1, 0xf2, 0x5b, 0xa2, - 0x38, 0x7f, 0x65, 0x24, 0x6b, 0xe4, 0x7f, 0x89, 0x4c, 0x64, 0x3f, 0x5c, 0xde, 0x67, 0xd8, 0xe3, - 0x39, 0xf6, 0x19, 0xb3, 0x2e, 0x40, 0x90, 0x04, 0xb3, 0x2e, 0x3e, 0x7f, 0x55, 0x49, 0xbd, 0x78, - 0x55, 0x49, 0xfd, 0xfc, 0xaa, 0x92, 0x7a, 0x7c, 0x50, 0xd1, 0x9e, 0x1f, 0x54, 0xb4, 0x17, 0x07, - 0x15, 0xed, 0xd7, 0x83, 0x8a, 0xf6, 0xe4, 0xb7, 0x4a, 0xea, 0x7e, 0xba, 0x33, 0xf7, 0x57, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x1f, 0xa7, 0xfc, 0x28, 0x67, 0x13, 0x00, 0x00, + // 1922 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6f, 0x23, 0x49, + 0x15, 0x77, 0xdb, 0xb1, 0xc7, 0x7e, 0x8e, 0x27, 0x49, 0x31, 0x23, 0xbc, 0x91, 0xb0, 0xb3, 0xbd, + 0x2b, 0x34, 0x0b, 0xbb, 0x36, 0x09, 0xb0, 0x1a, 0x06, 0x58, 0x14, 0xc7, 0x99, 0x28, 0xda, 0xc9, + 0x4c, 0x54, 0xd9, 0x19, 0xc4, 0x32, 0x42, 0x74, 0xba, 0x2b, 0x4e, 0x93, 0x76, 0x77, 0x53, 0x55, + 0xf6, 0xc4, 0xec, 0x81, 0x95, 0x00, 0x89, 0x03, 0x42, 0x73, 0xe4, 0x80, 0xd0, 0x8e, 0xe0, 0x13, + 0xf0, 0x25, 0x98, 0xe3, 0x4a, 0x7b, 0xe1, 0x80, 0x22, 0x26, 0x1c, 0x38, 0x72, 0x8f, 0x38, 0xa0, + 0xaa, 0xae, 0xea, 0x3f, 0xce, 0x78, 0xd3, 0x66, 0xf7, 0xb0, 0x27, 0x77, 0xbd, 0x3f, 0xbf, 0xf7, + 0xea, 0xd5, 0xab, 0x57, 0xef, 0x19, 0xf6, 0x4e, 0x6e, 0xb3, 0x8e, 0x1b, 0x74, 0x4f, 0x46, 0x87, + 0x84, 0xfa, 0x84, 0x13, 0xd6, 0x1d, 0x13, 0xdf, 0x09, 0x68, 0x57, 0x31, 0xac, 0xd0, 0x1d, 0x5a, + 0xf6, 0xb1, 0xeb, 0x13, 0x3a, 0xe9, 0x86, 0x27, 0x03, 0x41, 0x60, 0xdd, 0x21, 0xe1, 0x56, 0x77, + 0xbc, 0xde, 0x1d, 0x10, 0x9f, 0x50, 0x8b, 0x13, 0xa7, 0x13, 0xd2, 0x80, 0x07, 0xe8, 0xf5, 0x48, + 0xab, 0x93, 0xd6, 0xea, 0x84, 0x27, 0x03, 0x41, 0x60, 0x1d, 0xa1, 0xd5, 0x19, 0xaf, 0xaf, 0xbe, + 0x35, 0x70, 0xf9, 0xf1, 0xe8, 0xb0, 0x63, 0x07, 0xc3, 0xee, 0x20, 0x18, 0x04, 0x5d, 0xa9, 0x7c, + 0x38, 0x3a, 0x92, 0x2b, 0xb9, 0x90, 0x5f, 0x11, 0xe8, 0xea, 0x4c, 0x57, 0xe8, 0xc8, 0x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7, 0xe0, 0xaf, 0xdf, 0xdf, 0xe4, 0x81, 0xd1, + 0x14, 0x1c, 0x23, 0x8a, 0x59, 0x89, 0x49, 0x3b, 0xca, 0xbd, 0xb8, 0x42, 0x44, 0xd6, 0xb1, 0xe2, + 0x8a, 0x7e, 0x71, 0x48, 0x18, 0xb3, 0x06, 0x3a, 0x35, 0xe2, 0x7e, 0x71, 0x2f, 0x22, 0x63, 0xcd, + 0x47, 0x6f, 0x43, 0x85, 0x12, 0x8b, 0x05, 0xbe, 0xca, 0x91, 0x96, 0x86, 0xc4, 0x92, 0x7a, 0x71, + 0xd6, 0x5e, 0x54, 0xe0, 0x72, 0x8d, 0x95, 0x34, 0x7a, 0x1f, 0xae, 0x39, 0x84, 0x5b, 0xae, 0xc7, + 0x64, 0x46, 0xd4, 0x37, 0xbe, 0x99, 0x73, 0x5c, 0x95, 0x60, 0xfd, 0x48, 0xb5, 0x57, 0x17, 0x3e, + 0xa9, 0x05, 0xd6, 0x80, 0x22, 0xad, 0xed, 0xc0, 0x21, 0x32, 0x6d, 0xca, 0x49, 0x5a, 0x6f, 0x05, + 0x0e, 0xc1, 0x92, 0x63, 0x3e, 0x35, 0xa0, 0x1e, 0x21, 0x6d, 0x59, 0x23, 0x46, 0xd0, 0x7a, 0xbc, + 0x8b, 0xe8, 0xb8, 0xf5, 0x3b, 0xb4, 0xf0, 0xde, 0x24, 0x24, 0x17, 0x67, 0xed, 0x9a, 0x14, 0x13, + 0x8b, 0x78, 0x03, 0xa9, 0x18, 0x15, 0xaf, 0x88, 0xd1, 0x6b, 0x50, 0x3e, 0x72, 0x89, 0xa7, 0x3b, + 0xfd, 0xb8, 0x47, 0xbf, 0x2b, 0x88, 0x38, 0xe2, 0x99, 0x7f, 0x2c, 0x42, 0x23, 0xb3, 0xb9, 0x1c, + 0x9d, 0x4c, 0xdc, 0xfc, 0x17, 0x73, 0x0c, 0x94, 0xb3, 0xff, 0x8b, 0xf9, 0x11, 0x54, 0x6c, 0xb1, + 0x3f, 0xfd, 0x67, 0xd8, 0xfa, 0x3c, 0x47, 0x21, 0x23, 0x93, 0x64, 0x92, 0x5c, 0x32, 0xac, 0x00, + 0xd1, 0x0e, 0xac, 0x50, 0xc2, 0xe9, 0x64, 0xf3, 0x88, 0x13, 0xaa, 0x1f, 0xca, 0xb2, 0x3c, 0x97, + 0xf8, 0xad, 0xc7, 0xd3, 0x02, 0xf8, 0xb2, 0x8e, 0xe9, 0xc1, 0x82, 0x78, 0x87, 0x45, 0xd8, 0x99, + 0x82, 0x89, 0xfe, 0x3d, 0x88, 0xc3, 0xae, 0x95, 0x35, 0x5f, 0x44, 0xc7, 0xb7, 0xfc, 0x20, 0x4a, + 0xf6, 0x72, 0x12, 0x9d, 0xfb, 0x82, 0x88, 0x23, 0xde, 0x9d, 0x1b, 0x62, 0x82, 0xf9, 0xed, 0xb3, + 0x76, 0xe1, 0xe9, 0xb3, 0x76, 0xe1, 0xa3, 0x67, 0x6a, 0x9a, 0xf9, 0x31, 0xd4, 0x92, 0x57, 0xff, + 0x73, 0x36, 0x69, 0xfe, 0x14, 0xaa, 0x22, 0x93, 0x74, 0xb7, 0x7a, 0x45, 0x8d, 0xce, 0x56, 0xcf, + 0x62, 0x9e, 0xea, 0x69, 0x6e, 0x40, 0xf4, 0xf7, 0x98, 0xa8, 0x84, 0x2e, 0x27, 0xc3, 0x4c, 0x25, + 0xdc, 0x15, 0x04, 0x1c, 0xd1, 0x53, 0x03, 0xdc, 0x6f, 0x0c, 0x80, 0x1f, 0xca, 0xf9, 0x65, 0x2c, + 0x86, 0x8b, 0x35, 0x58, 0x10, 0x65, 0x7c, 0xda, 0x31, 0x79, 0x05, 0x24, 0x07, 0x3d, 0x84, 0x4a, + 0x20, 0xbb, 0x01, 0xe9, 0x54, 0x7d, 0xe3, 0xad, 0x99, 0x59, 0xa3, 0xfe, 0x2b, 0xef, 0x60, 0xeb, + 0xc9, 0xf6, 0x29, 0x27, 0xbe, 0xf0, 0x31, 0xc9, 0x98, 0xa8, 0xa5, 0xc0, 0x0a, 0xac, 0xf7, 0xfa, + 0xf3, 0x17, 0xad, 0xc2, 0xc7, 0x2f, 0x5a, 0x85, 0xbf, 0xbf, 0x68, 0x15, 0x3e, 0x3c, 0x6f, 0x19, + 0xcf, 0xcf, 0x5b, 0xc6, 0xc7, 0xe7, 0x2d, 0xe3, 0x9f, 0xe7, 0x2d, 0xe3, 0xe9, 0xbf, 0x5a, 0x85, + 0xf7, 0x8b, 0xe3, 0xf5, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xcd, 0x08, 0x9f, 0x6d, 0x18, + 0x00, 0x00, } diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index 5dd45c38486..a9d3350bd5c 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -246,6 +246,154 @@ message ListMeta { optional string resourceVersion = 2; } +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +message ObjectMeta { + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + optional string name = 1; + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + // +optional + optional string generateName = 2; + + // Namespace defines the space within each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + optional string namespace = 3; + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + optional string selfLink = 4; + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + optional string uid = 5; + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + optional string resourceVersion = 6; + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + optional int64 generation = 7; + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional Time creationTimestamp = 8; + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened + // or the resource may be deleted prior to this time. For example, a user may request that + // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional Time deletionTimestamp = 9; + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + optional int64 deletionGracePeriodSeconds = 10; + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + map labels = 11; + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + map annotations = 12; + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + repeated OwnerReference ownerReferences = 13; + + // Must be empty before the object is deleted from the registry. Each entry + // is an identifier for the responsible component that will remove the entry + // from the list. If the deletionTimestamp of the object is non-nil, entries + // in this list can only be removed. + // +optional + repeated string finalizers = 14; + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + optional string clusterName = 15; +} + // OwnerReference contains enough information to let you identify an owning // object. Currently, an owning object must be in the same namespace, so there // is no namespace field. diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/generated.proto b/staging/src/k8s.io/apimachinery/pkg/runtime/generated.proto index f5749418c9b..bf04aca1cea 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/generated.proto +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/generated.proto @@ -21,18 +21,18 @@ syntax = 'proto2'; package k8s.io.apimachinery.pkg.runtime; -import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; +import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "runtime"; // RawExtension is used to hold extensions in external versions. -// +// // To use this, make a field which has RawExtension as its type in your external, versioned // struct, and Object in your internal struct. You also need to register your // various plugin types. -// +// // // Internal package: // type MyAPIObject struct { // runtime.TypeMeta `json:",inline"` @@ -41,7 +41,7 @@ option go_package = "runtime"; // type PluginA struct { // AOption string `json:"aOption"` // } -// +// // // External package: // type MyAPIObject struct { // runtime.TypeMeta `json:",inline"` @@ -50,7 +50,7 @@ option go_package = "runtime"; // type PluginA struct { // AOption string `json:"aOption"` // } -// +// // // On the wire, the JSON will look something like this: // { // "kind":"MyAPIObject", @@ -60,7 +60,7 @@ option go_package = "runtime"; // "aOption":"foo", // }, // } -// +// // So what happens? Decode first uses json or yaml to unmarshal the serialized data into // your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. // The next step is to copy (using pkg/conversion) into the internal struct. The runtime @@ -68,13 +68,13 @@ option go_package = "runtime"; // JSON stored in RawExtension, turning it into the correct object type, and storing it // in the Object. (TODO: In the case where the object is of an unknown type, a // runtime.Unknown object will be created and stored.) -// +// // +k8s:deepcopy-gen=true // +protobuf=true // +k8s:openapi-gen=true message RawExtension { // Raw is the underlying serialization of this object. - // + // // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. optional bytes raw = 1; } @@ -86,10 +86,10 @@ message RawExtension { // ... // other fields // } // func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind -// +// // TypeMeta is provided here for convenience. You may use it directly from this package or define // your own with the same fields. -// +// // +k8s:deepcopy-gen=true // +protobuf=true // +k8s:openapi-gen=true @@ -106,7 +106,7 @@ message TypeMeta { // TypeMeta features-- kind, version, etc. // TODO: Make this object have easy access to field based accessors and settors for // metadata and field mutatation. -// +// // +k8s:deepcopy-gen=true // +protobuf=true // +k8s:openapi-gen=true diff --git a/test/e2e/apparmor.go b/test/e2e/apparmor.go index 9b0378f6ed3..6a61d65f627 100644 --- a/test/e2e/apparmor.go +++ b/test/e2e/apparmor.go @@ -19,6 +19,7 @@ package e2e import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/security/apparmor" @@ -52,7 +53,7 @@ elif ! touch %[2]s; then exit 2 fi`, deniedPath, allowedPath) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-apparmor", Annotations: map[string]string{ apparmor.ContainerAnnotationKeyPrefix + "test": profile, @@ -99,7 +100,7 @@ profile %s flags=(attach_disconnected) { `, profileName, deniedPath, allowedPath) cm := &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "apparmor-profiles", Namespace: f.Namespace.Name, }, @@ -114,13 +115,13 @@ func createAppArmorProfileLoader(f *framework.Framework) (*extensions.DaemonSet, True := true // Copied from https://github.com/kubernetes/contrib/blob/master/apparmor/loader/example-configmap.yaml loader := &extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "apparmor-loader", Namespace: f.Namespace.Name, }, Spec: extensions.DaemonSetSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "apparmor-loader"}, }, Spec: api.PodSpec{ diff --git a/test/e2e/autoscaling_utils.go b/test/e2e/autoscaling_utils.go index 965f5d7a8a0..4c58c012c32 100644 --- a/test/e2e/autoscaling_utils.go +++ b/test/e2e/autoscaling_utils.go @@ -330,7 +330,7 @@ func (rc *ResourceConsumer) CleanUp() { func runServiceAndWorkloadForResourceConsumer(c clientset.Interface, internalClient internalclientset.Interface, ns, name, kind string, replicas int, cpuLimitMillis, memLimitMb int64) { By(fmt.Sprintf("Running consuming RC %s via %s with %v replicas", name, kind, replicas)) _, err := c.Core().Services(ns).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ServiceSpec{ @@ -384,7 +384,7 @@ func runServiceAndWorkloadForResourceConsumer(c clientset.Interface, internalCli By(fmt.Sprintf("Running controller")) controllerName := name + "-ctrl" _, err = c.Core().Services(ns).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: controllerName, }, Spec: v1.ServiceSpec{ diff --git a/test/e2e/cluster_logging_utils.go b/test/e2e/cluster_logging_utils.go index e77449764f2..e36c5eabbd2 100644 --- a/test/e2e/cluster_logging_utils.go +++ b/test/e2e/cluster_logging_utils.go @@ -44,7 +44,7 @@ const ( func createSynthLogger(f *framework.Framework, linesCount int) { f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: synthLoggerPodName, Namespace: f.Namespace.Name, }, diff --git a/test/e2e/common/configmap.go b/test/e2e/common/configmap.go index 25dfb70115f..02bb3be510e 100644 --- a/test/e2e/common/configmap.go +++ b/test/e2e/common/configmap.go @@ -21,6 +21,7 @@ import ( "os" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -85,7 +86,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { containerName := "configmap-volume-test" configMap := &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -101,7 +102,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -163,7 +164,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -206,7 +207,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -253,7 +254,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -311,7 +312,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { func newConfigMap(f *framework.Framework, name string) *v1.ConfigMap { return &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -325,7 +326,7 @@ func newConfigMap(f *framework.Framework, name string) *v1.ConfigMap { func newEnvFromConfigMap(f *framework.Framework, name string) *v1.ConfigMap { return &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -352,7 +353,7 @@ func doConfigMapE2EWithoutMappings(f *framework.Framework, uid, fsGroup int64, d } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -426,7 +427,7 @@ func doConfigMapE2EWithMappings(f *framework.Framework, uid, fsGroup int64, item } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ diff --git a/test/e2e/common/container_probe.go b/test/e2e/common/container_probe.go index 5655ad94235..f3bd817e6be 100644 --- a/test/e2e/common/container_probe.go +++ b/test/e2e/common/container_probe.go @@ -96,7 +96,7 @@ var _ = framework.KubeDescribe("Probing container", func() { It("should be restarted with a exec \"cat /tmp/health\" liveness probe [Conformance]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-exec", Labels: map[string]string{"test": "liveness"}, }, @@ -123,7 +123,7 @@ var _ = framework.KubeDescribe("Probing container", func() { It("should *not* be restarted with a exec \"cat /tmp/health\" liveness probe [Conformance]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-exec", Labels: map[string]string{"test": "liveness"}, }, @@ -150,7 +150,7 @@ var _ = framework.KubeDescribe("Probing container", func() { It("should be restarted with a /healthz http liveness probe [Conformance]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-http", Labels: map[string]string{"test": "liveness"}, }, @@ -179,7 +179,7 @@ var _ = framework.KubeDescribe("Probing container", func() { // Slow by design (5 min) It("should have monotonically increasing restart count [Conformance] [Slow]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-http", Labels: map[string]string{"test": "liveness"}, }, @@ -207,7 +207,7 @@ var _ = framework.KubeDescribe("Probing container", func() { It("should *not* be restarted with a /healthz http liveness probe [Conformance]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-http", Labels: map[string]string{"test": "liveness"}, }, @@ -238,7 +238,7 @@ var _ = framework.KubeDescribe("Probing container", func() { // TODO: enable this test once the default exec handler supports timeout. Skip("The default exec handler, dockertools.NativeExecHandler, does not support timeouts due to a limitation in the Docker Remote API") runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-exec", Labels: map[string]string{"test": "liveness"}, }, @@ -297,7 +297,7 @@ func getRestartCount(p *v1.Pod) int { func makePodSpec(readinessProbe, livenessProbe *v1.Probe) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "test-webserver-" + string(uuid.NewUUID())}, + ObjectMeta: metav1.ObjectMeta{Name: "test-webserver-" + string(uuid.NewUUID())}, Spec: v1.PodSpec{ Containers: []v1.Container{ { diff --git a/test/e2e/common/docker_containers.go b/test/e2e/common/docker_containers.go index 896178f7c4d..5affc39d246 100644 --- a/test/e2e/common/docker_containers.go +++ b/test/e2e/common/docker_containers.go @@ -17,6 +17,7 @@ limitations under the License. package common import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -71,7 +72,7 @@ func entrypointTestPod() *v1.Pod { podName := "client-containers-" + string(uuid.NewUUID()) return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e/common/downward_api.go b/test/e2e/common/downward_api.go index f8ee9cb12de..05ed936900b 100644 --- a/test/e2e/common/downward_api.go +++ b/test/e2e/common/downward_api.go @@ -19,6 +19,7 @@ package common import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" @@ -153,7 +154,7 @@ var _ = framework.KubeDescribe("Downward API", func() { fmt.Sprintf("MEMORY_LIMIT=[1-9]"), } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, @@ -176,7 +177,7 @@ var _ = framework.KubeDescribe("Downward API", func() { func testDownwardAPI(f *framework.Framework, podName string, env []v1.EnvVar, expectations []string) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, diff --git a/test/e2e/common/downwardapi_volume.go b/test/e2e/common/downwardapi_volume.go index 342107790fb..5747df56f43 100644 --- a/test/e2e/common/downwardapi_volume.go +++ b/test/e2e/common/downwardapi_volume.go @@ -333,7 +333,7 @@ func downwardAPIVolumePodForUpdateTest(name string, labels, annotations map[stri func downwardAPIVolumeBasePod(name string, labels, annotations map[string]string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, Annotations: annotations, diff --git a/test/e2e/common/empty_dir.go b/test/e2e/common/empty_dir.go index 9034736ec7b..6ef352fc9cf 100644 --- a/test/e2e/common/empty_dir.go +++ b/test/e2e/common/empty_dir.go @@ -317,7 +317,7 @@ func testPodWithVolume(image, path string, source *v1.EmptyDirVolumeSource) *v1. Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e/common/expansion.go b/test/e2e/common/expansion.go index 27154792a54..17a181c483c 100644 --- a/test/e2e/common/expansion.go +++ b/test/e2e/common/expansion.go @@ -17,6 +17,7 @@ limitations under the License. package common import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -32,7 +33,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { It("should allow composing env vars into new env vars [Conformance]", func() { podName := "var-expansion-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, @@ -72,7 +73,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { It("should allow substituting values in a container's command [Conformance]", func() { podName := "var-expansion-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, @@ -102,7 +103,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { It("should allow substituting values in a container's args [Conformance]", func() { podName := "var-expansion-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, diff --git a/test/e2e/common/host_path.go b/test/e2e/common/host_path.go index 02d8e781dc5..24b93c196b6 100644 --- a/test/e2e/common/host_path.go +++ b/test/e2e/common/host_path.go @@ -139,7 +139,7 @@ func testPodWithHostVol(path string, source *v1.HostPathVolumeSource) *v1.Pod { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e/common/init_container.go b/test/e2e/common/init_container.go index f4b8fd4d0a8..6caf7cc347d 100644 --- a/test/e2e/common/init_container.go +++ b/test/e2e/common/init_container.go @@ -21,6 +21,7 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -47,7 +48,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { name := "pod-init-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -112,7 +113,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { name := "pod-init-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -182,7 +183,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -303,7 +304,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { name := "pod-init-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", diff --git a/test/e2e/common/kubelet_etc_hosts.go b/test/e2e/common/kubelet_etc_hosts.go index ae0bb80642a..c4de1b0f979 100644 --- a/test/e2e/common/kubelet_etc_hosts.go +++ b/test/e2e/common/kubelet_etc_hosts.go @@ -22,6 +22,7 @@ import ( "github.com/golang/glog" . "github.com/onsi/ginkgo" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" ) @@ -130,7 +131,7 @@ func (config *KubeletManagedHostConfig) getEtcHostsContent(podName, containerNam func (config *KubeletManagedHostConfig) createPodSpec(podName string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -186,7 +187,7 @@ func (config *KubeletManagedHostConfig) createPodSpec(podName string) *v1.Pod { func (config *KubeletManagedHostConfig) createPodSpecWithHostNetwork(podName string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e/common/pods.go b/test/e2e/common/pods.go index df83e0b5ba7..f3507653ad5 100644 --- a/test/e2e/common/pods.go +++ b/test/e2e/common/pods.go @@ -129,7 +129,7 @@ var _ = framework.KubeDescribe("Pods", func() { It("should get a host IP [Conformance]", func() { name := "pod-hostip-" + string(uuid.NewUUID()) testHostIP(podClient, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -148,7 +148,7 @@ var _ = framework.KubeDescribe("Pods", func() { name := "pod-submit-remove-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -266,7 +266,7 @@ var _ = framework.KubeDescribe("Pods", func() { name := "pod-update-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -315,7 +315,7 @@ var _ = framework.KubeDescribe("Pods", func() { name := "pod-update-activedeadlineseconds-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -356,7 +356,7 @@ var _ = framework.KubeDescribe("Pods", func() { // This pod serves its hostname via HTTP. serverName := "server-envvars-" + string(uuid.NewUUID()) serverPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serverName, Labels: map[string]string{"name": serverName}, }, @@ -381,7 +381,7 @@ var _ = framework.KubeDescribe("Pods", func() { // allow overriding the prefix in the service manifest. svcName := "fooservice" svc := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Labels: map[string]string{ "name": svcName, @@ -404,7 +404,7 @@ var _ = framework.KubeDescribe("Pods", func() { podName := "client-envvars-" + string(uuid.NewUUID()) const containerName = "env3cont" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, @@ -444,7 +444,7 @@ var _ = framework.KubeDescribe("Pods", func() { By("creating the pod") name := "pod-exec-websocket-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -514,7 +514,7 @@ var _ = framework.KubeDescribe("Pods", func() { By("creating the pod") name := "pod-logs-websocket-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -568,7 +568,7 @@ var _ = framework.KubeDescribe("Pods", func() { podName := "pod-back-off-image" containerName := "back-off" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"test": "back-off-image"}, }, @@ -609,7 +609,7 @@ var _ = framework.KubeDescribe("Pods", func() { podName := "back-off-cap" containerName := "back-off-cap" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"test": "liveness"}, }, diff --git a/test/e2e/common/privileged.go b/test/e2e/common/privileged.go index 7697b18a907..900ad676c83 100644 --- a/test/e2e/common/privileged.go +++ b/test/e2e/common/privileged.go @@ -21,6 +21,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" ) @@ -83,7 +84,7 @@ func (c *PrivilegedPodTestConfig) createPodsSpec() *v1.Pod { const image = "gcr.io/google_containers/busybox:1.24" return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.privilegedPod, Namespace: c.f.Namespace.Name, }, diff --git a/test/e2e/common/secrets.go b/test/e2e/common/secrets.go index e3e16b1437d..7711175a500 100644 --- a/test/e2e/common/secrets.go +++ b/test/e2e/common/secrets.go @@ -20,6 +20,7 @@ import ( "fmt" "os" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -96,7 +97,7 @@ var _ = framework.KubeDescribe("Secrets", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -160,7 +161,7 @@ var _ = framework.KubeDescribe("Secrets", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -196,7 +197,7 @@ var _ = framework.KubeDescribe("Secrets", func() { func secretForTest(namespace, name string) *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, @@ -222,7 +223,7 @@ func doSecretE2EWithoutMapping(f *framework.Framework, defaultMode *int32, secre } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -294,7 +295,7 @@ func doSecretE2EWithMapping(f *framework.Framework, mode *int32) { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ diff --git a/test/e2e/common/sysctl.go b/test/e2e/common/sysctl.go index 4216ef91a65..0bab46da9a8 100644 --- a/test/e2e/common/sysctl.go +++ b/test/e2e/common/sysctl.go @@ -38,7 +38,7 @@ var _ = framework.KubeDescribe("Sysctls", func() { testPod := func() *v1.Pod { podName := "sysctl-" + string(uuid.NewUUID()) pod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Annotations: map[string]string{}, }, diff --git a/test/e2e/common/volumes.go b/test/e2e/common/volumes.go index 18104e9691e..8daad193a2b 100644 --- a/test/e2e/common/volumes.go +++ b/test/e2e/common/volumes.go @@ -122,7 +122,7 @@ func startVolumeServer(f *framework.Framework, config VolumeTestConfig) *v1.Pod Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-server", Labels: map[string]string{ "role": config.prefix + "-server", @@ -198,7 +198,7 @@ func testVolumeClient(f *framework.Framework, config VolumeTestConfig, volume v1 Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-client", Labels: map[string]string{ "role": config.prefix + "-client", @@ -274,7 +274,7 @@ func injectHtml(client clientset.Interface, config VolumeTestConfig, volume v1.V Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-injector", Labels: map[string]string{ "role": config.prefix + "-injector", @@ -421,7 +421,7 @@ var _ = framework.KubeDescribe("GCP Volumes", func() { Kind: "Endpoints", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-server", }, Subsets: []v1.EndpointSubset{ diff --git a/test/e2e/cronjob.go b/test/e2e/cronjob.go index 7ed4ca0dbe5..13f14bb4139 100644 --- a/test/e2e/cronjob.go +++ b/test/e2e/cronjob.go @@ -232,7 +232,7 @@ func newTestCronJob(name, schedule string, concurrencyPolicy batch.ConcurrencyPo parallelism := int32(1) completions := int32(1) sj := &batch.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: batch.CronJobSpec{ diff --git a/test/e2e/daemon_set.go b/test/e2e/daemon_set.go index 1ba3806eb89..01e969832d4 100644 --- a/test/e2e/daemon_set.go +++ b/test/e2e/daemon_set.go @@ -94,12 +94,12 @@ var _ = framework.KubeDescribe("Daemon set [Serial]", func() { framework.Logf("Creating simple daemon set %s", dsName) _, err := c.Extensions().DaemonSets(ns).Create(&extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: dsName, }, Spec: extensions.DaemonSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: label, }, Spec: v1.PodSpec{ @@ -153,13 +153,13 @@ var _ = framework.KubeDescribe("Daemon set [Serial]", func() { nodeSelector := map[string]string{daemonsetColorLabel: "blue"} framework.Logf("Creating daemon with a node selector %s", dsName) _, err := c.Extensions().DaemonSets(ns).Create(&extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: dsName, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: complexLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: complexLabel, }, Spec: v1.PodSpec{ @@ -226,13 +226,13 @@ var _ = framework.KubeDescribe("Daemon set [Serial]", func() { }, } _, err := c.Extensions().DaemonSets(ns).Create(&extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: dsName, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: complexLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: complexLabel, }, Spec: v1.PodSpec{ diff --git a/test/e2e/density.go b/test/e2e/density.go index 857cf53ca95..36904fc2b34 100644 --- a/test/e2e/density.go +++ b/test/e2e/density.go @@ -785,7 +785,7 @@ func createRunningPodFromRC(wg *sync.WaitGroup, c clientset.Interface, name, ns, "name": name, } rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -793,7 +793,7 @@ func createRunningPodFromRC(wg *sync.WaitGroup, c clientset.Interface, name, ns, Replicas: func(i int) *int32 { x := int32(i); return &x }(1), Selector: labels, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: v1.PodSpec{ diff --git a/test/e2e/deployment.go b/test/e2e/deployment.go index 125ba623bae..3087294dff5 100644 --- a/test/e2e/deployment.go +++ b/test/e2e/deployment.go @@ -109,7 +109,7 @@ var _ = framework.KubeDescribe("Deployment", func() { func newDeployment(deploymentName string, replicas int32, podLabels map[string]string, imageName string, image string, strategyType extensions.DeploymentStrategyType, revisionHistoryLimit *int32) *extensions.Deployment { zero := int64(0) return &extensions.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: deploymentName, }, Spec: extensions.DeploymentSpec{ @@ -120,7 +120,7 @@ func newDeployment(deploymentName string, replicas int32, podLabels map[string]s }, RevisionHistoryLimit: revisionHistoryLimit, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabels, }, Spec: v1.PodSpec{ diff --git a/test/e2e/disruption.go b/test/e2e/disruption.go index 52fc9462045..c6e41286a4a 100644 --- a/test/e2e/disruption.go +++ b/test/e2e/disruption.go @@ -153,7 +153,7 @@ var _ = framework.KubeDescribe("DisruptionController", func() { Expect(err).NotTo(HaveOccurred()) e := &policy.Eviction{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: pod.Name, Namespace: ns, }, @@ -191,7 +191,7 @@ var _ = framework.KubeDescribe("DisruptionController", func() { func createPodDisruptionBudgetOrDie(cs *kubernetes.Clientset, ns string, minAvailable intstr.IntOrString) { pdb := policy.PodDisruptionBudget{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, }, @@ -207,7 +207,7 @@ func createPodDisruptionBudgetOrDie(cs *kubernetes.Clientset, ns string, minAvai func createPodsOrDie(cs *kubernetes.Clientset, ns string, n int) { for i := 0; i < n; i++ { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("pod-%d", i), Namespace: ns, Labels: map[string]string{"foo": "bar"}, @@ -269,7 +269,7 @@ func createReplicaSetOrDie(cs *kubernetes.Clientset, ns string, size int32, excl } rs := &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "rs", Namespace: ns, }, @@ -279,7 +279,7 @@ func createReplicaSetOrDie(cs *kubernetes.Clientset, ns string, size int32, excl MatchLabels: map[string]string{"foo": "bar"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar"}, }, Spec: v1.PodSpec{ diff --git a/test/e2e/dns.go b/test/e2e/dns.go index 9a9445e2655..7010652fff8 100644 --- a/test/e2e/dns.go +++ b/test/e2e/dns.go @@ -49,7 +49,7 @@ func createDNSPod(namespace, wheezyProbeCmd, jessieProbeCmd string, useAnnotatio Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dns-test-" + string(uuid.NewUUID()), Namespace: namespace, }, @@ -304,7 +304,7 @@ func verifyDNSPodIsRunning(f *framework.Framework) { func createServiceSpec(serviceName, externalName string, isHeadless bool, selector map[string]string) *v1.Service { headlessService := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, }, Spec: v1.ServiceSpec{ diff --git a/test/e2e/dns_configmap.go b/test/e2e/dns_configmap.go index 5746de5061e..a633c8ea35c 100644 --- a/test/e2e/dns_configmap.go +++ b/test/e2e/dns_configmap.go @@ -256,7 +256,7 @@ func (t *dnsConfigMapTest) createUtilPod() { TypeMeta: metav1.TypeMeta{ Kind: "Pod", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: t.f.Namespace.Name, Labels: map[string]string{"app": "e2e-dns-configmap"}, GenerateName: "e2e-dns-configmap-", @@ -285,7 +285,7 @@ func (t *dnsConfigMapTest) createUtilPod() { TypeMeta: metav1.TypeMeta{ Kind: "Service", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: t.f.Namespace.Name, Name: "e2e-dns-configmap", }, diff --git a/test/e2e/empty_dir_wrapper.go b/test/e2e/empty_dir_wrapper.go index 9fa1c4aa0cd..c5b756ac5f0 100644 --- a/test/e2e/empty_dir_wrapper.go +++ b/test/e2e/empty_dir_wrapper.go @@ -17,6 +17,7 @@ limitations under the License. package e2e import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/intstr" @@ -58,7 +59,7 @@ var _ = framework.KubeDescribe("EmptyDir wrapper volumes", func() { volumeMountPath := "/etc/secret-volume" secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -78,7 +79,7 @@ var _ = framework.KubeDescribe("EmptyDir wrapper volumes", func() { defer gitCleanup() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -178,7 +179,7 @@ func createGitServer(f *framework.Framework) (gitURL string, gitRepo string, cle labels := map[string]string{"name": gitServerPodName} gitServerPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: gitServerPodName, Labels: labels, }, @@ -201,7 +202,7 @@ func createGitServer(f *framework.Framework) (gitURL string, gitRepo string, cle httpPort := 2345 gitServerSvc := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "git-server-svc", }, Spec: v1.ServiceSpec{ @@ -258,7 +259,7 @@ func createConfigmapsForRace(f *framework.Framework) (configMapNames []string) { configMapName := fmt.Sprintf("racey-configmap-%d", i) configMapNames = append(configMapNames, configMapName) configMap := &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: configMapName, }, @@ -333,7 +334,7 @@ func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volume } rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rcName, }, Spec: v1.ReplicationControllerSpec{ @@ -342,7 +343,7 @@ func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volume "name": rcName, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": rcName}, }, Spec: v1.PodSpec{ diff --git a/test/e2e/events.go b/test/e2e/events.go index 3117d558e94..c9458fb4057 100644 --- a/test/e2e/events.go +++ b/test/e2e/events.go @@ -44,7 +44,7 @@ var _ = framework.KubeDescribe("Events", func() { name := "send-events-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", diff --git a/test/e2e/federated-ingress.go b/test/e2e/federated-ingress.go index f490fa9dc04..6e9285188cc 100644 --- a/test/e2e/federated-ingress.go +++ b/test/e2e/federated-ingress.go @@ -354,7 +354,7 @@ func createIngressOrFail(clientset *fedclientset.Clientset, namespace string) *v By(fmt.Sprintf("Creating federated ingress %q in namespace %q", FederatedIngressName, namespace)) ingress := &v1beta1.Ingress{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: FederatedIngressName, }, Spec: v1beta1.IngressSpec{ @@ -377,7 +377,7 @@ func updateIngressOrFail(clientset *fedclientset.Clientset, namespace string) (n Fail(fmt.Sprintf("Internal error: invalid parameters passed to createIngressOrFail: clientset: %v, namespace: %v", clientset, namespace)) } ingress := &v1beta1.Ingress{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: FederatedIngressName, }, Spec: v1beta1.IngressSpec{ diff --git a/test/e2e/federated-namespace.go b/test/e2e/federated-namespace.go index 1cf7f58578b..2e5fc481396 100644 --- a/test/e2e/federated-namespace.go +++ b/test/e2e/federated-namespace.go @@ -111,7 +111,7 @@ var _ = framework.KubeDescribe("Federation namespace [Feature:Federation]", func // Create resources in the namespace. event := api_v1.Event{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName(eventNamePrefix), Namespace: nsName, }, @@ -185,7 +185,7 @@ func verifyNsCascadingDeletion(nsClient clientset.NamespaceInterface, clusters m func createNamespace(nsClient clientset.NamespaceInterface) string { ns := api_v1.Namespace{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName(namespacePrefix), }, } diff --git a/test/e2e/federated-secret.go b/test/e2e/federated-secret.go index 1664301afac..5d17139e20a 100644 --- a/test/e2e/federated-secret.go +++ b/test/e2e/federated-secret.go @@ -155,7 +155,7 @@ func createSecretOrFail(clientset *fedclientset.Clientset, nsName string) *v1.Se } secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName(secretNamePrefix), Namespace: nsName, }, diff --git a/test/e2e/federated-service.go b/test/e2e/federated-service.go index ee3555adec3..18b38f94fb4 100644 --- a/test/e2e/federated-service.go +++ b/test/e2e/federated-service.go @@ -160,7 +160,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { framework.Failf("missing required env var FEDERATIONS_DOMAIN_MAP") } kubeDNSConfigMap := v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: KubeDNSConfigMapName, Namespace: KubeDNSConfigMapNamespace, }, diff --git a/test/e2e/federation-apiserver.go b/test/e2e/federation-apiserver.go index 05a160aff4c..ae972f58563 100644 --- a/test/e2e/federation-apiserver.go +++ b/test/e2e/federation-apiserver.go @@ -108,7 +108,7 @@ var _ = framework.KubeDescribe("Federation apiserver [Feature:Federation]", func func newService(name, namespace string) *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/test/e2e/federation-daemonset.go b/test/e2e/federation-daemonset.go index 09b66e5d485..e48c0c36dc8 100644 --- a/test/e2e/federation-daemonset.go +++ b/test/e2e/federation-daemonset.go @@ -159,13 +159,13 @@ func createDaemonSetOrFail(clientset *fedclientset.Clientset, namespace string) } daemonset := &v1beta1.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: FederatedDaemonSetName, Namespace: namespace, }, Spec: v1beta1.DaemonSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"aaa": "bbb"}, }, Spec: v1.PodSpec{ diff --git a/test/e2e/federation-deployment.go b/test/e2e/federation-deployment.go index 9f084baee49..ba40ccab167 100644 --- a/test/e2e/federation-deployment.go +++ b/test/e2e/federation-deployment.go @@ -278,7 +278,7 @@ func deleteDeploymentOrFail(clientset *fedclientset.Clientset, nsName string, de func newDeploymentForFed(namespace string, name string, replicas int32) *v1beta1.Deployment { return &v1beta1.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -288,7 +288,7 @@ func newDeploymentForFed(namespace string, name string, replicas int32) *v1beta1 MatchLabels: map[string]string{"name": "myrs"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "myrs"}, }, Spec: v1.PodSpec{ diff --git a/test/e2e/federation-event.go b/test/e2e/federation-event.go index d4c12efb83b..7c1c2af8260 100644 --- a/test/e2e/federation-event.go +++ b/test/e2e/federation-event.go @@ -20,6 +20,7 @@ import ( "fmt" . "github.com/onsi/ginkgo" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" @@ -71,7 +72,7 @@ func createEventOrFail(clientset *federation_clientset.Clientset, namespace stri By(fmt.Sprintf("Creating federated event %q in namespace %q", FederationEventName, namespace)) event := &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: FederationEventName, Namespace: namespace, }, diff --git a/test/e2e/federation-replicaset.go b/test/e2e/federation-replicaset.go index 9d281945133..2bf24f6ab85 100644 --- a/test/e2e/federation-replicaset.go +++ b/test/e2e/federation-replicaset.go @@ -279,7 +279,7 @@ func updateReplicaSetOrFail(clientset *fedclientset.Clientset, namespace string) func newReplicaSet(namespace string, name string, replicas int32) *v1beta1.ReplicaSet { return &v1beta1.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -289,7 +289,7 @@ func newReplicaSet(namespace string, name string, replicas int32) *v1beta1.Repli MatchLabels: map[string]string{"name": "myrs"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "myrs"}, }, Spec: v1.PodSpec{ diff --git a/test/e2e/federation-util.go b/test/e2e/federation-util.go index ac6e4620d13..8aeb04b02ba 100644 --- a/test/e2e/federation-util.go +++ b/test/e2e/federation-util.go @@ -62,7 +62,7 @@ type cluster struct { func createClusterObjectOrFail(f *framework.Framework, context *framework.E2EContext) { framework.Logf("Creating cluster object: %s (%s, secret: %s)", context.Name, context.Cluster.Cluster.Server, context.Name) cluster := federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: context.Name, }, Spec: federationapi.ClusterSpec{ @@ -143,7 +143,7 @@ func createNamespaceInClusters(clusters map[string]*cluster, f *framework.Framew // TODO(nikhiljindal): remove this once we have the namespace controller working as expected. if _, err := c.Clientset.Core().Namespaces().Get(nsName, metav1.GetOptions{}); errors.IsNotFound(err) { ns := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName, }, } @@ -254,7 +254,7 @@ func createService(clientset *fedclientset.Clientset, namespace, name string) (* By(fmt.Sprintf("Creating federated service %q in namespace %q", name, namespace)) service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -428,7 +428,7 @@ func discoverService(f *framework.Framework, name string, exists bool, podName s By(fmt.Sprintf("Looking up %q", name)) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -471,7 +471,7 @@ If creation of any pod fails, the test fails (possibly with a partially created */ func createBackendPodsOrFail(clusters map[string]*cluster, namespace string, name string) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, // Namespace: namespace, Labels: FederatedServiceLabels, diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index da183ff541e..509c3bccf89 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -459,7 +459,7 @@ func (f *Framework) CreateNamespace(baseName string, labels map[string]string) ( func (f *Framework) createFederationNamespace(baseName string) (*v1.Namespace, error) { clientset := f.FederationClientset_1_5 namespaceObj := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: fmt.Sprintf("e2e-tests-%v-", baseName), }, } @@ -640,7 +640,7 @@ func (f *Framework) CreateServiceForSimpleApp(contPort, svcPort int, appName str } Logf("Creating a service-for-%v for selecting app=%v-pod", appName, appName) service, err := f.ClientSet.Core().Services(f.Namespace.Name).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "service-for-" + appName, Labels: map[string]string{ "app": appName + "-service", @@ -666,7 +666,7 @@ func (f *Framework) CreatePodsPerNodeForSimpleApp(appName string, podSpec func(n if i <= maxCount { Logf("%v/%v : Creating container with label app=%v-pod", i, maxCount, appName) _, err := f.ClientSet.Core().Pods(f.Namespace.Name).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf(appName+"-pod-%v", i), Labels: labels, }, diff --git a/test/e2e/framework/networking_utils.go b/test/e2e/framework/networking_utils.go index 997de0153aa..88d09d455f8 100644 --- a/test/e2e/framework/networking_utils.go +++ b/test/e2e/framework/networking_utils.go @@ -323,7 +323,7 @@ func (config *NetworkingTestConfig) createNetShellPodSpec(podName string, node s Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: config.Namespace, }, @@ -367,7 +367,7 @@ func (config *NetworkingTestConfig) createTestPodSpec() *v1.Pod { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testPodName, Namespace: config.Namespace, }, @@ -397,7 +397,7 @@ func (config *NetworkingTestConfig) createTestPodSpec() *v1.Pod { func (config *NetworkingTestConfig) createNodePortService(selector map[string]string) { serviceSpec := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nodePortServiceName, }, Spec: v1.ServiceSpec{ diff --git a/test/e2e/framework/service_util.go b/test/e2e/framework/service_util.go index cb6eda4c58b..a792234b3e0 100644 --- a/test/e2e/framework/service_util.go +++ b/test/e2e/framework/service_util.go @@ -109,7 +109,7 @@ func NewServiceTestJig(client clientset.Interface, name string) *ServiceTestJig // as the jig and exposes the given port. func (j *ServiceTestJig) newServiceTemplate(namespace string, proto v1.Protocol, port int32) *v1.Service { service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: j.Name, Labels: j.Labels, @@ -487,7 +487,7 @@ func (j *ServiceTestJig) WaitForLoadBalancerDestroyOrFail(namespace, name string // name as the jig and runs the "netexec" container. func (j *ServiceTestJig) newRCTemplate(namespace string) *v1.ReplicationController { rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: j.Name, Labels: j.Labels, @@ -496,7 +496,7 @@ func (j *ServiceTestJig) newRCTemplate(namespace string) *v1.ReplicationControll Replicas: func(i int) *int32 { x := int32(i); return &x }(1), Selector: j.Labels, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: j.Labels, }, Spec: v1.PodSpec{ @@ -585,7 +585,7 @@ func (j *ServiceTestJig) waitForPodsReady(namespace string, pods []string) error // newNetexecPodSpec returns the pod spec of netexec pod func newNetexecPodSpec(podName string, httpPort, udpPort int32, hostNetwork bool) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -632,7 +632,7 @@ func (j *ServiceTestJig) LaunchNetexecPodOnNode(f *Framework, nodeName, podName func newEchoServerPodSpec(podName string) *v1.Pod { port := 8080 pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -783,7 +783,7 @@ func NewServerTest(client clientset.Interface, namespace string, serviceName str // Build default config for a service (which can then be changed) func (t *ServiceTestFixture) BuildServiceSpec() *v1.Service { service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: t.ServiceName, Namespace: t.Namespace, }, @@ -1017,7 +1017,7 @@ func StartServeHostnameService(c clientset.Interface, internalClient internalcli By("creating service " + name + " in namespace " + ns) _, err := c.Core().Services(ns).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ServiceSpec{ diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index fc0e22d26b0..b92b39c426a 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -733,7 +733,7 @@ func WaitForNamespacesDeleted(c clientset.Interface, namespaces []string, timeou } func waitForServiceAccountInNamespace(c clientset.Interface, ns, serviceAccountName string, timeout time.Duration) error { - w, err := c.Core().ServiceAccounts(ns).Watch(v1.SingleObject(v1.ObjectMeta{Name: serviceAccountName})) + w, err := c.Core().ServiceAccounts(ns).Watch(v1.SingleObject(metav1.ObjectMeta{Name: serviceAccountName})) if err != nil { return err } @@ -881,7 +881,7 @@ func CreateTestingNS(baseName string, c clientset.Interface, labels map[string]s labels["e2e-run"] = string(RunId) namespaceObj := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: fmt.Sprintf("e2e-tests-%v-", baseName), Namespace: "", Labels: labels, @@ -1261,7 +1261,7 @@ func waitForPodRunningInNamespaceSlow(c clientset.Interface, podName, namespace, } func waitTimeoutForPodRunningInNamespace(c clientset.Interface, podName, namespace, resourceVersion string, timeout time.Duration) error { - w, err := c.Core().Pods(namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) + w, err := c.Core().Pods(namespace).Watch(v1.SingleObject(metav1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) if err != nil { return err } @@ -1276,7 +1276,7 @@ func WaitForPodNoLongerRunningInNamespace(c clientset.Interface, podName, namesp } func WaitTimeoutForPodNoLongerRunningInNamespace(c clientset.Interface, podName, namespace, resourceVersion string, timeout time.Duration) error { - w, err := c.Core().Pods(namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) + w, err := c.Core().Pods(namespace).Watch(v1.SingleObject(metav1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) if err != nil { return err } @@ -1285,7 +1285,7 @@ func WaitTimeoutForPodNoLongerRunningInNamespace(c clientset.Interface, podName, } func waitTimeoutForPodReadyInNamespace(c clientset.Interface, podName, namespace, resourceVersion string, timeout time.Duration) error { - w, err := c.Core().Pods(namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) + w, err := c.Core().Pods(namespace).Watch(v1.SingleObject(metav1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) if err != nil { return err } @@ -1297,7 +1297,7 @@ func waitTimeoutForPodReadyInNamespace(c clientset.Interface, podName, namespace // The resourceVersion is used when Watching object changes, it tells since when we care // about changes to the pod. func WaitForPodNotPending(c clientset.Interface, ns, podName, resourceVersion string) error { - w, err := c.Core().Pods(ns).Watch(v1.SingleObject(v1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) + w, err := c.Core().Pods(ns).Watch(v1.SingleObject(metav1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) if err != nil { return err } @@ -2401,7 +2401,7 @@ func isNodeUntainted(node *v1.Node) bool { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "fake-not-scheduled", Namespace: "fake-not-scheduled", }, @@ -3316,7 +3316,7 @@ func WatchRecreateDeployment(c clientset.Interface, d *extensions.Deployment) er return fmt.Errorf("deployment %q does not use a Recreate strategy: %s", d.Name, d.Spec.Strategy.Type) } - w, err := c.Extensions().Deployments(d.Namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: d.Name, ResourceVersion: d.ResourceVersion})) + w, err := c.Extensions().Deployments(d.Namespace).Watch(v1.SingleObject(metav1.ObjectMeta{Name: d.Name, ResourceVersion: d.ResourceVersion})) if err != nil { return err } @@ -3804,7 +3804,7 @@ func IssueSSHCommand(cmd, provider string, node *v1.Node) error { // NewHostExecPodSpec returns the pod spec of hostexec pod func NewHostExecPodSpec(ns, name string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -3852,7 +3852,7 @@ func LaunchHostExecPod(client clientset.Interface, ns, name string) *v1.Pod { func newExecPodSpec(ns, generateName string) *v1.Pod { immediate := int64(0) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: generateName, Namespace: ns, }, @@ -3895,7 +3895,7 @@ func CreateExecPodOrFail(client clientset.Interface, ns, generateName string, tw func CreatePodOrFail(c clientset.Interface, ns, name string, labels map[string]string, containerPorts []v1.ContainerPort) { By(fmt.Sprintf("Creating pod %s in namespace %s", name, ns)) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -4847,7 +4847,7 @@ func LaunchWebserverPod(f *Framework, podName, nodeName string) (ip string) { containerName := fmt.Sprintf("%s-container", podName) port := 8080 pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -4880,7 +4880,7 @@ func LaunchWebserverPod(f *Framework, podName, nodeName string) (ip string) { func CheckConnectivityToHost(f *Framework, nodeName, podName, host string, timeout int) error { contName := fmt.Sprintf("%s-container", podName) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -5280,7 +5280,7 @@ func RcByNameContainer(name string, replicas int32, image string, labels map[str Kind: "ReplicationController", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ReplicationControllerSpec{ @@ -5289,7 +5289,7 @@ func RcByNameContainer(name string, replicas int32, image string, labels map[str "name": name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: v1.PodSpec{ diff --git a/test/e2e/garbage_collector.go b/test/e2e/garbage_collector.go index 102075dbc1e..3729a73f8a1 100644 --- a/test/e2e/garbage_collector.go +++ b/test/e2e/garbage_collector.go @@ -45,7 +45,7 @@ func getNonOrphanOptions() *v1.DeleteOptions { var zero = int64(0) var deploymentLabels = map[string]string{"app": "gc-test"} var podTemplateSpec = v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: deploymentLabels, }, Spec: v1.PodSpec{ @@ -62,7 +62,7 @@ var podTemplateSpec = v1.PodTemplateSpec{ func newOwnerDeployment(f *framework.Framework, deploymentName string) *v1beta1.Deployment { replicas := int32(2) return &v1beta1.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: deploymentName, }, Spec: v1beta1.DeploymentSpec{ @@ -84,7 +84,7 @@ func newOwnerRC(f *framework.Framework, name string) *v1.ReplicationController { Kind: "ReplicationController", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, diff --git a/test/e2e/generated_clientset.go b/test/e2e/generated_clientset.go index 0103a68c94c..e4fc5268bad 100644 --- a/test/e2e/generated_clientset.go +++ b/test/e2e/generated_clientset.go @@ -20,6 +20,7 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -58,7 +59,7 @@ func stagingClientPod(name, value string) clientv1.Pod { func testingPod(name, value string) v1.Pod { return v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -192,7 +193,7 @@ func newTestingCronJob(name string, value string) *v2alpha1.CronJob { parallelism := int32(1) completions := int32(1) return &v2alpha1.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "time": value, diff --git a/test/e2e/gke_local_ssd.go b/test/e2e/gke_local_ssd.go index 0845616975f..63b399dafcc 100644 --- a/test/e2e/gke_local_ssd.go +++ b/test/e2e/gke_local_ssd.go @@ -76,7 +76,7 @@ func testPodWithSsd(command string) *v1.Pod { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e/horizontal_pod_autoscaling.go b/test/e2e/horizontal_pod_autoscaling.go index 4e721e1b7a0..dc1fd87ea7d 100644 --- a/test/e2e/horizontal_pod_autoscaling.go +++ b/test/e2e/horizontal_pod_autoscaling.go @@ -19,7 +19,7 @@ package e2e import ( "time" - "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling/v1" "k8s.io/kubernetes/test/e2e/framework" @@ -177,7 +177,7 @@ func scaleDown(name, kind string, checkStability bool, rc *ResourceConsumer, f * func createCPUHorizontalPodAutoscaler(rc *ResourceConsumer, cpu, minReplicas, maxRepl int32) { hpa := &autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rc.name, Namespace: rc.framework.Namespace.Name, }, diff --git a/test/e2e/ingress_utils.go b/test/e2e/ingress_utils.go index f7266eb6991..15e76913bdb 100644 --- a/test/e2e/ingress_utils.go +++ b/test/e2e/ingress_utils.go @@ -306,7 +306,7 @@ func createSecret(kubeClient clientset.Interface, ing *extensions.Ingress) (host cert := c.Bytes() key := k.Bytes() secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tls.SecretName, }, Data: map[string][]byte{ diff --git a/test/e2e/initial_resources.go b/test/e2e/initial_resources.go index 6d590bcdf29..39c7ff248d4 100644 --- a/test/e2e/initial_resources.go +++ b/test/e2e/initial_resources.go @@ -22,6 +22,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" ) @@ -53,7 +54,7 @@ var _ = framework.KubeDescribe("Initial Resources [Feature:InitialResources] [Fl func runPod(f *framework.Framework, name, image string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/test/e2e/job.go b/test/e2e/job.go index 791b1bfa798..2f13275808f 100644 --- a/test/e2e/job.go +++ b/test/e2e/job.go @@ -216,7 +216,7 @@ var _ = framework.KubeDescribe("Job", func() { // newTestJob returns a job which does one of several testing behaviors. func newTestJob(behavior, name string, rPol v1.RestartPolicy, parallelism, completions int32) *batch.Job { job := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: batch.JobSpec{ @@ -224,7 +224,7 @@ func newTestJob(behavior, name string, rPol v1.RestartPolicy, parallelism, compl Completions: &completions, ManualSelector: newBool(false), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{jobSelectorKey: name}, }, Spec: v1.PodSpec{ diff --git a/test/e2e/kube_proxy.go b/test/e2e/kube_proxy.go index 6c997faca61..aedd95abb02 100644 --- a/test/e2e/kube_proxy.go +++ b/test/e2e/kube_proxy.go @@ -24,6 +24,7 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" @@ -76,7 +77,7 @@ var _ = framework.KubeDescribe("Network", func() { zero := int64(0) clientPodSpec := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "e2e-net-client", Namespace: fr.Namespace.Name, Labels: map[string]string{"app": "e2e-net-client"}, @@ -98,7 +99,7 @@ var _ = framework.KubeDescribe("Network", func() { } serverPodSpec := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "e2e-net-server", Namespace: fr.Namespace.Name, Labels: map[string]string{"app": "e2e-net-server"}, diff --git a/test/e2e/limit_range.go b/test/e2e/limit_range.go index e97074a37ce..b9b3116c1b3 100644 --- a/test/e2e/limit_range.go +++ b/test/e2e/limit_range.go @@ -149,7 +149,7 @@ func newLimitRange(name string, limitType v1.LimitType, defaultLimit, defaultRequest, maxLimitRequestRatio v1.ResourceList) *v1.LimitRange { return &v1.LimitRange{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.LimitRangeSpec{ @@ -170,7 +170,7 @@ func newLimitRange(name string, limitType v1.LimitType, // newTestPod returns a pod that has the specified requests and limits func newTestPod(f *framework.Framework, name string, requests v1.ResourceList, limits v1.ResourceList) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/test/e2e/load.go b/test/e2e/load.go index 2d531bffbe5..b33f5787a84 100644 --- a/test/e2e/load.go +++ b/test/e2e/load.go @@ -27,6 +27,7 @@ import ( "sync" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" @@ -423,7 +424,7 @@ func generateServicesForConfigs(configs []testutils.RunObjectConfig) []*v1.Servi serviceName := config.GetName() + "-svc" labels := map[string]string{"name": config.GetName()} service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Namespace: config.GetNamespace(), }, diff --git a/test/e2e/mesos.go b/test/e2e/mesos.go index f64ba7afd77..f00dbe754f5 100644 --- a/test/e2e/mesos.go +++ b/test/e2e/mesos.go @@ -83,7 +83,7 @@ var _ = framework.KubeDescribe("Mesos", func() { TypeMeta: metav1.TypeMeta{ Kind: "Pod", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Annotations: map[string]string{ "k8s.mesosphere.io/roles": "public", diff --git a/test/e2e/namespace.go b/test/e2e/namespace.go index 143eafa0e5b..bd1686c7be9 100644 --- a/test/e2e/namespace.go +++ b/test/e2e/namespace.go @@ -91,7 +91,7 @@ func ensurePodsAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) { By("Creating a pod in the namespace") pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-pod", }, Spec: v1.PodSpec{ @@ -147,7 +147,7 @@ func ensureServicesAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) { "baz": "blah", } service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, }, Spec: v1.ServiceSpec{ diff --git a/test/e2e/network_partition.go b/test/e2e/network_partition.go index d2666761476..e3033b6c4ab 100644 --- a/test/e2e/network_partition.go +++ b/test/e2e/network_partition.go @@ -93,7 +93,7 @@ func expectNodeReadiness(isReady bool, newNode chan *v1.Node) { func podOnNode(podName, nodeName string, image string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{ "name": podName, diff --git a/test/e2e/node_problem_detector.go b/test/e2e/node_problem_detector.go index 4c8a504c613..838126b7a0e 100644 --- a/test/e2e/node_problem_detector.go +++ b/test/e2e/node_problem_detector.go @@ -171,7 +171,7 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { Expect(framework.IssueSSHCommand(cmd, framework.TestContext.Provider, node)).To(Succeed()) By("Create config map for the node problem detector") _, err = c.Core().ConfigMaps(ns).Create(&v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: configName, }, Data: map[string]string{configFile: config}, @@ -179,7 +179,7 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { Expect(err).NotTo(HaveOccurred()) By("Create the node problem detector") _, err = c.Core().Pods(ns).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/test/e2e/nodeoutofdisk.go b/test/e2e/nodeoutofdisk.go index 9135462f875..33b95118fad 100644 --- a/test/e2e/nodeoutofdisk.go +++ b/test/e2e/nodeoutofdisk.go @@ -173,7 +173,7 @@ func createOutOfDiskPod(c clientset.Interface, ns, name string, milliCPU int64) podClient := c.Core().Pods(ns) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/test/e2e/opaque_resource.go b/test/e2e/opaque_resource.go index 602c5ad9b4f..8855649aa37 100644 --- a/test/e2e/opaque_resource.go +++ b/test/e2e/opaque_resource.go @@ -22,6 +22,7 @@ import ( "sync" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -139,7 +140,7 @@ var _ = framework.KubeDescribe("Opaque resources [Feature:OpaqueResources]", fun image := framework.GetPauseImageName(f.ClientSet) // This pod consumes 2 "foo" resources. pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mult-container-oir", }, Spec: v1.PodSpec{ @@ -183,7 +184,7 @@ var _ = framework.KubeDescribe("Opaque resources [Feature:OpaqueResources]", fun limits = v1.ResourceList{} // This pod consumes 6 "foo" resources. pod = &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mult-container-over-max-oir", }, Spec: v1.PodSpec{ diff --git a/test/e2e/pd.go b/test/e2e/pd.go index 7bd9aa046b2..8544ca029db 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -727,7 +727,7 @@ func testPDPod(diskNames []string, targetNode types.NodeName, readOnly bool, num Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pd-test-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ diff --git a/test/e2e/persistent_volumes.go b/test/e2e/persistent_volumes.go index 5a58fb44948..23e452eb1c7 100644 --- a/test/e2e/persistent_volumes.go +++ b/test/e2e/persistent_volumes.go @@ -775,7 +775,7 @@ func makePersistentVolume(pvConfig persistentVolumeConfig) *v1.PersistentVolume } return &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: pvConfig.namePrefix, Annotations: map[string]string{ volumehelper.VolumeGidAnnotationKey: "777", @@ -805,7 +805,7 @@ func makePersistentVolumeClaim(ns string) *v1.PersistentVolumeClaim { // Specs are expected to match this test's PersistentVolume return &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pvc-", Namespace: ns, Annotations: map[string]string{ @@ -846,7 +846,7 @@ func makePod(ns string, pvcName string, command ...string) *v1.Pod { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "client-", Namespace: ns, }, diff --git a/test/e2e/pod_gc.go b/test/e2e/pod_gc.go index 8da6ee8db40..91d21cfbb25 100644 --- a/test/e2e/pod_gc.go +++ b/test/e2e/pod_gc.go @@ -22,6 +22,7 @@ import ( . "github.com/onsi/ginkgo" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" @@ -81,7 +82,7 @@ var _ = framework.KubeDescribe("Pod garbage collector [Feature:PodGarbageCollect func createTerminatingPod(f *framework.Framework) (*v1.Pod, error) { uuid := uuid.NewUUID() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: string(uuid), Annotations: map[string]string{ "scheduler.alpha.kubernetes.io/name": "please don't schedule my pods", diff --git a/test/e2e/pods.go b/test/e2e/pods.go index efdc0da5a4e..26e209cc470 100644 --- a/test/e2e/pods.go +++ b/test/e2e/pods.go @@ -50,7 +50,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() { name := "pod-submit-remove-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -201,7 +201,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() { By("creating the pod") name := "pod-qos-class-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": name, diff --git a/test/e2e/portforward.go b/test/e2e/portforward.go index d719952af33..55af281ef50 100644 --- a/test/e2e/portforward.go +++ b/test/e2e/portforward.go @@ -28,6 +28,7 @@ import ( "syscall" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" utilversion "k8s.io/kubernetes/pkg/util/version" @@ -49,7 +50,7 @@ var ( func pfPod(expectedClientData, chunks, chunkSize, chunkIntervalMillis string, bindAddress string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, diff --git a/test/e2e/pre_stop.go b/test/e2e/pre_stop.go index 63d5b5cd4b2..b28abee043a 100644 --- a/test/e2e/pre_stop.go +++ b/test/e2e/pre_stop.go @@ -42,7 +42,7 @@ type State struct { func testPreStop(c clientset.Interface, ns string) { // This is the server that will receive the preStop notification podDescr := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "server", }, Spec: v1.PodSpec{ @@ -75,7 +75,7 @@ func testPreStop(c clientset.Interface, ns string) { framework.ExpectNoError(err, "getting pod info") preStopDescr := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "tester", }, Spec: v1.PodSpec{ diff --git a/test/e2e/proxy.go b/test/e2e/proxy.go index dab5daba2d6..fb57c6f63a4 100644 --- a/test/e2e/proxy.go +++ b/test/e2e/proxy.go @@ -25,6 +25,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/net" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -72,7 +73,7 @@ var _ = framework.KubeDescribe("Proxy", func() { start := time.Now() labels := map[string]string{"proxy-service-target": "true"} service, err := f.ClientSet.Core().Services(f.Namespace.Name).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "proxy-service-", }, Spec: v1.ServiceSpec{ diff --git a/test/e2e/rc.go b/test/e2e/rc.go index b2e43a9ab8b..b3d9d54682f 100644 --- a/test/e2e/rc.go +++ b/test/e2e/rc.go @@ -55,13 +55,13 @@ var _ = framework.KubeDescribe("ReplicationController", func() { func newRC(rsName string, replicas int32, rcPodLabels map[string]string, imageName string, image string) *v1.ReplicationController { zero := int64(0) return &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rsName, }, Spec: v1.ReplicationControllerSpec{ Replicas: func(i int32) *int32 { return &i }(replicas), Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: rcPodLabels, }, Spec: v1.PodSpec{ @@ -91,7 +91,7 @@ func ServeImageOrFail(f *framework.Framework, test string, image string) { // in contrib/for-demos/serve_hostname By(fmt.Sprintf("Creating replication controller %s", name)) controller, err := f.ClientSet.Core().ReplicationControllers(f.Namespace.Name).Create(&v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ReplicationControllerSpec{ @@ -100,7 +100,7 @@ func ServeImageOrFail(f *framework.Framework, test string, image string) { "name": name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": name}, }, Spec: v1.PodSpec{ diff --git a/test/e2e/replica_set.go b/test/e2e/replica_set.go index b6ba370e300..6bd7fb9d06b 100644 --- a/test/e2e/replica_set.go +++ b/test/e2e/replica_set.go @@ -37,13 +37,13 @@ import ( func newRS(rsName string, replicas int32, rsPodLabels map[string]string, imageName string, image string) *extensions.ReplicaSet { zero := int64(0) return &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rsName, }, Spec: extensions.ReplicaSetSpec{ Replicas: func(i int32) *int32 { return &i }(replicas), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: rsPodLabels, }, Spec: v1.PodSpec{ @@ -62,7 +62,7 @@ func newRS(rsName string, replicas int32, rsPodLabels map[string]string, imageNa func newPodQuota(name, number string) *v1.ResourceQuota { return &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ResourceQuotaSpec{ @@ -103,7 +103,7 @@ func ReplicaSetServeImageOrFail(f *framework.Framework, test string, image strin // in contrib/for-demos/serve_hostname By(fmt.Sprintf("Creating ReplicaSet %s", name)) rs, err := f.ClientSet.Extensions().ReplicaSets(f.Namespace.Name).Create(&extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: extensions.ReplicaSetSpec{ @@ -112,7 +112,7 @@ func ReplicaSetServeImageOrFail(f *framework.Framework, test string, image strin "name": name, }}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": name}, }, Spec: v1.PodSpec{ diff --git a/test/e2e/resize_nodes.go b/test/e2e/resize_nodes.go index 6ce277c5c81..9e8fdd2a3c7 100644 --- a/test/e2e/resize_nodes.go +++ b/test/e2e/resize_nodes.go @@ -138,7 +138,7 @@ func WaitForGroupSize(group string, size int32) error { func svcByName(name string, port int) *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ServiceSpec{ diff --git a/test/e2e/resource_quota.go b/test/e2e/resource_quota.go index 693fcecab34..4e5f07be17b 100644 --- a/test/e2e/resource_quota.go +++ b/test/e2e/resource_quota.go @@ -549,7 +549,7 @@ func newTestResourceQuotaWithScope(name string, scope v1.ResourceQuotaScope) *v1 hard[v1.ResourceLimitsMemory] = resource.MustParse("1Gi") } return &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: v1.ResourceQuotaSpec{Hard: hard, Scopes: []v1.ResourceQuotaScope{scope}}, } } @@ -572,7 +572,7 @@ func newTestResourceQuota(name string) *v1.ResourceQuota { hard[core.V1ResourceByStorageClass("gold", v1.ResourcePersistentVolumeClaims)] = resource.MustParse("10") hard[core.V1ResourceByStorageClass("gold", v1.ResourceRequestsStorage)] = resource.MustParse("10Gi") return &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: v1.ResourceQuotaSpec{Hard: hard}, } } @@ -580,7 +580,7 @@ func newTestResourceQuota(name string) *v1.ResourceQuota { // newTestPodForQuota returns a pod that has the specified requests and limits func newTestPodForQuota(f *framework.Framework, name string, requests v1.ResourceList, limits v1.ResourceList) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -601,7 +601,7 @@ func newTestPodForQuota(f *framework.Framework, name string, requests v1.Resourc // newTestPersistentVolumeClaimForQuota returns a simple persistent volume claim func newTestPersistentVolumeClaimForQuota(name string) *v1.PersistentVolumeClaim { return &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PersistentVolumeClaimSpec{ @@ -622,7 +622,7 @@ func newTestPersistentVolumeClaimForQuota(name string) *v1.PersistentVolumeClaim // newTestReplicationControllerForQuota returns a simple replication controller func newTestReplicationControllerForQuota(name, image string, replicas int32) *v1.ReplicationController { return &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ReplicationControllerSpec{ @@ -631,7 +631,7 @@ func newTestReplicationControllerForQuota(name, image string, replicas int32) *v "name": name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": name}, }, Spec: v1.PodSpec{ @@ -650,7 +650,7 @@ func newTestReplicationControllerForQuota(name, image string, replicas int32) *v // newTestServiceForQuota returns a simple service func newTestServiceForQuota(name string, serviceType v1.ServiceType) *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ServiceSpec{ @@ -665,7 +665,7 @@ func newTestServiceForQuota(name string, serviceType v1.ServiceType) *v1.Service func newTestConfigMapForQuota(name string) *v1.ConfigMap { return &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Data: map[string]string{ @@ -676,7 +676,7 @@ func newTestConfigMapForQuota(name string) *v1.ConfigMap { func newTestSecretForQuota(name string) *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Data: map[string][]byte{ diff --git a/test/e2e/scheduler_predicates.go b/test/e2e/scheduler_predicates.go index a65d2d5d6f4..f69797d8bcd 100644 --- a/test/e2e/scheduler_predicates.go +++ b/test/e2e/scheduler_predicates.go @@ -759,7 +759,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { func initPausePod(f *framework.Framework, conf pausePodConfig) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: conf.Name, Labels: conf.Labels, Annotations: conf.Annotations, diff --git a/test/e2e/security_context.go b/test/e2e/security_context.go index ef4867a4299..dd41f7072cb 100644 --- a/test/e2e/security_context.go +++ b/test/e2e/security_context.go @@ -37,7 +37,7 @@ import ( func scTestPod(hostIPC bool, hostPID bool) *v1.Pod { podName := "security-context-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, Annotations: map[string]string{}, diff --git a/test/e2e/service.go b/test/e2e/service.go index 9403da5f48b..d04d7fc2589 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -86,7 +86,7 @@ var _ = framework.KubeDescribe("Services", func() { }() service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, }, Spec: v1.ServiceSpec{ @@ -148,7 +148,7 @@ var _ = framework.KubeDescribe("Services", func() { By("creating service " + serviceName + " in namespace " + ns) service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, }, Spec: v1.ServiceSpec{ @@ -791,7 +791,7 @@ var _ = framework.KubeDescribe("Services", func() { By("creating service " + serviceName + " with same NodePort but different protocols in namespace " + ns) service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: t.ServiceName, Namespace: t.Namespace, }, @@ -1027,7 +1027,7 @@ var _ = framework.KubeDescribe("Services", func() { terminateSeconds := int64(600) service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: t.ServiceName, Namespace: t.Namespace, Annotations: map[string]string{endpoint.TolerateUnreadyEndpointsAnnotation: "true"}, diff --git a/test/e2e/service_accounts.go b/test/e2e/service_accounts.go index 599c8076458..e595ec4e688 100644 --- a/test/e2e/service_accounts.go +++ b/test/e2e/service_accounts.go @@ -191,7 +191,7 @@ var _ = framework.KubeDescribe("ServiceAccounts", func() { })) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pod-service-account-" + string(uuid.NewUUID()) + "-", }, Spec: v1.PodSpec{ diff --git a/test/e2e/service_latency.go b/test/e2e/service_latency.go index 912c2e02a81..b1c9b86cb94 100644 --- a/test/e2e/service_latency.go +++ b/test/e2e/service_latency.go @@ -22,6 +22,7 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" @@ -317,7 +318,7 @@ func startEndpointWatcher(f *framework.Framework, q *endpointQueries) { func singleServiceLatency(f *framework.Framework, name string, q *endpointQueries) (time.Duration, error) { // Make a service that points to that pod. svc := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "latency-svc-", }, Spec: v1.ServiceSpec{ diff --git a/test/e2e/statefulset.go b/test/e2e/statefulset.go index e1554916fa7..3b439e44e10 100644 --- a/test/e2e/statefulset.go +++ b/test/e2e/statefulset.go @@ -243,7 +243,7 @@ var _ = framework.KubeDescribe("StatefulSet", func() { expectedPod, err := f.ClientSet.Core().Pods(ns).Get(expectedPodName, metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred()) watcher, err := f.ClientSet.Core().Pods(ns).Watch(v1.SingleObject( - v1.ObjectMeta{ + metav1.ObjectMeta{ Name: expectedPod.Name, ResourceVersion: expectedPod.ResourceVersion, }, @@ -357,7 +357,7 @@ var _ = framework.KubeDescribe("StatefulSet", func() { By("Creating pod with conflicting port in namespace " + f.Namespace.Name) conflictingPort := v1.ContainerPort{HostPort: 21017, ContainerPort: 21017, Name: "conflict"} pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -389,7 +389,7 @@ var _ = framework.KubeDescribe("StatefulSet", func() { var initialStatefulPodUID types.UID By("Waiting until stateful pod " + statefulPodName + " will be recreated and deleted at least once in namespace " + f.Namespace.Name) - w, err := f.ClientSet.Core().Pods(f.Namespace.Name).Watch(v1.SingleObject(v1.ObjectMeta{Name: statefulPodName})) + w, err := f.ClientSet.Core().Pods(f.Namespace.Name).Watch(v1.SingleObject(metav1.ObjectMeta{Name: statefulPodName})) framework.ExpectNoError(err) // we need to get UID from pod in any state and wait until stateful set controller will remove pod atleast once _, err = watch.Until(statefulPodTimeout, w, func(event watch.Event) (bool, error) { @@ -1067,7 +1067,7 @@ func dec(i int64, exponent int) *inf.Dec { func newPVC(name string) v1.PersistentVolumeClaim { return v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Annotations: map[string]string{ "volume.alpha.kubernetes.io/storage-class": "anything", @@ -1110,7 +1110,7 @@ func newStatefulSet(name, ns, governingSvcName string, replicas int32, statefulP Kind: "StatefulSet", APIVersion: "apps/v1beta1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -1120,7 +1120,7 @@ func newStatefulSet(name, ns, governingSvcName string, replicas int32, statefulP }, Replicas: func(i int32) *int32 { return &i }(replicas), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, Annotations: map[string]string{}, }, diff --git a/test/e2e/third-party.go b/test/e2e/third-party.go index 6e83760c1fc..0c053229403 100644 --- a/test/e2e/third-party.go +++ b/test/e2e/third-party.go @@ -44,8 +44,8 @@ var data = `{ }` type Foo struct { - metav1.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` SomeField string `json:"someField"` OtherField int `json:"otherField"` @@ -64,7 +64,7 @@ var _ = Describe("ThirdParty resources [Flaky] [Disruptive]", func() { f := framework.NewDefaultFramework("thirdparty") rsrc := &extensions.ThirdPartyResource{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo.company.com", }, Versions: []extensions.APIVersion{ @@ -120,7 +120,7 @@ var _ = Describe("ThirdParty resources [Flaky] [Disruptive]", func() { TypeMeta: metav1.TypeMeta{ Kind: "Foo", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, SomeField: "bar", diff --git a/test/e2e/ubernetes_lite.go b/test/e2e/ubernetes_lite.go index 8c41db1d275..3d17444247d 100644 --- a/test/e2e/ubernetes_lite.go +++ b/test/e2e/ubernetes_lite.go @@ -63,7 +63,7 @@ func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string) // First create the service serviceName := "test-service" serviceSpec := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Namespace: f.Namespace.Name, }, @@ -82,7 +82,7 @@ func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string) // Now create some pods behind the service podSpec := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Labels: map[string]string{"service": serviceName}, }, @@ -192,7 +192,7 @@ func SpreadRCOrFail(f *framework.Framework, replicaCount int32, image string) { name := "ubelite-spread-rc-" + string(uuid.NewUUID()) By(fmt.Sprintf("Creating replication controller %s", name)) controller, err := f.ClientSet.Core().ReplicationControllers(f.Namespace.Name).Create(&v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -202,7 +202,7 @@ func SpreadRCOrFail(f *framework.Framework, replicaCount int32, image string) { "name": name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": name}, }, Spec: v1.PodSpec{ diff --git a/test/e2e/volume_provisioning.go b/test/e2e/volume_provisioning.go index 431aaaad1a6..65d52347587 100644 --- a/test/e2e/volume_provisioning.go +++ b/test/e2e/volume_provisioning.go @@ -142,7 +142,7 @@ var _ = framework.KubeDescribe("Dynamic provisioning", func() { func newClaim(ns string, alpha bool) *v1.PersistentVolumeClaim { claim := v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pvc-", Namespace: ns, }, @@ -179,7 +179,7 @@ func runInPodWithVolume(c clientset.Interface, ns, claimName, command string) { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pvc-volume-tester-", }, Spec: v1.PodSpec{ @@ -235,7 +235,7 @@ func newStorageClass() *storage.StorageClass { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "fast", }, Provisioner: pluginName, diff --git a/test/e2e/volumes.go b/test/e2e/volumes.go index 05fe5f4232e..c5cf1d66016 100644 --- a/test/e2e/volumes.go +++ b/test/e2e/volumes.go @@ -138,7 +138,7 @@ func startVolumeServer(client clientset.Interface, config VolumeTestConfig) *v1. Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-server", Labels: map[string]string{ "role": config.prefix + "-server", @@ -220,7 +220,7 @@ func testVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGro Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-client", Labels: map[string]string{ "role": config.prefix + "-client", @@ -300,7 +300,7 @@ func injectHtml(client clientset.Interface, config VolumeTestConfig, volume v1.V Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-injector", Labels: map[string]string{ "role": config.prefix + "-injector", @@ -452,7 +452,7 @@ var _ = framework.KubeDescribe("Volumes [Feature:Volumes]", func() { Kind: "Endpoints", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-server", }, Subsets: []v1.EndpointSubset{ @@ -589,7 +589,7 @@ var _ = framework.KubeDescribe("Volumes [Feature:Volumes]", func() { Kind: "Secret", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-secret", }, Data: map[string][]byte{ @@ -664,7 +664,7 @@ var _ = framework.KubeDescribe("Volumes [Feature:Volumes]", func() { Kind: "Secret", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-secret", }, // Must use the ceph keyring at contrib/for-tests/volumes-ceph/ceph/init.sh @@ -859,7 +859,7 @@ var _ = framework.KubeDescribe("Volumes [Feature:Volumes]", func() { Kind: "ConfigMap", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-map", }, Data: map[string]string{ diff --git a/test/e2e_node/apparmor_test.go b/test/e2e_node/apparmor_test.go index 2b9bc0422bc..4d167baf26d 100644 --- a/test/e2e_node/apparmor_test.go +++ b/test/e2e_node/apparmor_test.go @@ -147,7 +147,7 @@ func runAppArmorTest(f *framework.Framework, shouldRun bool, profile string) v1. f.ClientSet, pod.Name, f.Namespace.Name, "", framework.PodStartTimeout)) } else { // Pod should remain in the pending state. Wait for the Reason to be set to "AppArmor". - w, err := f.PodClient().Watch(v1.SingleObject(v1.ObjectMeta{Name: pod.Name})) + w, err := f.PodClient().Watch(v1.SingleObject(metav1.ObjectMeta{Name: pod.Name})) framework.ExpectNoError(err) _, err = watch.Until(framework.PodStartTimeout, w, func(e watch.Event) (bool, error) { switch e.Type { @@ -171,7 +171,7 @@ func runAppArmorTest(f *framework.Framework, shouldRun bool, profile string) v1. func createPodWithAppArmor(f *framework.Framework, profile string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("test-apparmor-%s", strings.Replace(profile, "/", "-", -1)), Annotations: map[string]string{ apparmor.ContainerAnnotationKeyPrefix + "test": profile, diff --git a/test/e2e_node/cgroup_manager_test.go b/test/e2e_node/cgroup_manager_test.go index f812e584e1a..44e3e23254b 100644 --- a/test/e2e_node/cgroup_manager_test.go +++ b/test/e2e_node/cgroup_manager_test.go @@ -17,6 +17,7 @@ limitations under the License. package e2e_node import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/kubelet/cm" @@ -68,7 +69,7 @@ func makePodToVerifyCgroups(cgroupNames []cm.CgroupName) *v1.Pod { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -106,7 +107,7 @@ func makePodToVerifyCgroupRemoved(cgroupName cm.CgroupName) *v1.Pod { cgroupFsName = cm.ConvertCgroupNameToSystemd(cm.CgroupName(cgroupName), true) } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -166,7 +167,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() { ) By("Creating a Guaranteed pod in Namespace", func() { guaranteedPod = f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -210,7 +211,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() { ) By("Creating a BestEffort pod in Namespace", func() { bestEffortPod = f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -254,7 +255,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() { ) By("Creating a Burstable pod in Namespace", func() { burstablePod = f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, diff --git a/test/e2e_node/container.go b/test/e2e_node/container.go index 74538ff4150..4ab0cc82800 100644 --- a/test/e2e_node/container.go +++ b/test/e2e_node/container.go @@ -46,7 +46,7 @@ func (cc *ConformanceContainer) Create() { imagePullSecrets = append(imagePullSecrets, v1.LocalObjectReference{Name: s}) } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cc.podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/container_manager_test.go b/test/e2e_node/container_manager_test.go index 3f8cbaf8342..0111060d903 100644 --- a/test/e2e_node/container_manager_test.go +++ b/test/e2e_node/container_manager_test.go @@ -26,6 +26,7 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" @@ -96,7 +97,7 @@ var _ = framework.KubeDescribe("Kubelet Container Manager [Serial]", func() { podClient := f.PodClient() podName := "besteffort" + string(uuid.NewUUID()) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -140,7 +141,7 @@ var _ = framework.KubeDescribe("Kubelet Container Manager [Serial]", func() { podClient := f.PodClient() podName := "guaranteed" + string(uuid.NewUUID()) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -181,7 +182,7 @@ var _ = framework.KubeDescribe("Kubelet Container Manager [Serial]", func() { podClient := f.PodClient() podName := "burstable" + string(uuid.NewUUID()) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/disk_eviction_test.go b/test/e2e_node/disk_eviction_test.go index cfffbae2b88..b13fe82f3ea 100644 --- a/test/e2e_node/disk_eviction_test.go +++ b/test/e2e_node/disk_eviction_test.go @@ -74,7 +74,7 @@ var _ = framework.KubeDescribe("Kubelet Eviction Manager [Serial] [Disruptive]", verifyPodName = "verify" + string(uuid.NewUUID()) createIdlePod(idlePodName, podClient) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: busyPodName, }, Spec: v1.PodSpec{ @@ -188,7 +188,7 @@ var _ = framework.KubeDescribe("Kubelet Eviction Manager [Serial] [Disruptive]", func createIdlePod(podName string, podClient *framework.PodClient) { podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/garbage_collector_test.go b/test/e2e_node/garbage_collector_test.go index 3d40e22620c..ef8bf72e42b 100644 --- a/test/e2e_node/garbage_collector_test.go +++ b/test/e2e_node/garbage_collector_test.go @@ -309,7 +309,7 @@ func getPods(specs []*testPodSpec) (pods []*v1.Pod) { }) } pods = append(pods, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: spec.podName}, + ObjectMeta: metav1.ObjectMeta{Name: spec.podName}, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyAlways, Containers: containers, diff --git a/test/e2e_node/image_id_test.go b/test/e2e_node/image_id_test.go index 0a27951e9cc..3e680afb601 100644 --- a/test/e2e_node/image_id_test.go +++ b/test/e2e_node/image_id_test.go @@ -35,7 +35,7 @@ var _ = framework.KubeDescribe("ImageID", func() { It("should be set to the manifest digest (from RepoDigests) when available", func() { podDesc := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-with-repodigest", }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/inode_eviction_test.go b/test/e2e_node/inode_eviction_test.go index 8b88a0ef9e4..43421204c3e 100644 --- a/test/e2e_node/inode_eviction_test.go +++ b/test/e2e_node/inode_eviction_test.go @@ -20,6 +20,7 @@ import ( "fmt" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" @@ -45,7 +46,7 @@ var _ = framework.KubeDescribe("InodeEviction [Slow] [Serial] [Disruptive] [Flak { evictionPriority: 1, // This pod should be evicted before the normal memory usage pod pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "container-inode-hog-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "container-inode-hog-pod"}, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyNever, Containers: []v1.Container{ @@ -65,7 +66,7 @@ var _ = framework.KubeDescribe("InodeEviction [Slow] [Serial] [Disruptive] [Flak { evictionPriority: 1, // This pod should be evicted before the normal memory usage pod pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "volume-inode-hog-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "volume-inode-hog-pod"}, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyNever, Containers: []v1.Container{ @@ -91,7 +92,7 @@ var _ = framework.KubeDescribe("InodeEviction [Slow] [Serial] [Disruptive] [Flak { evictionPriority: 0, // This pod should never be evicted pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "normal-memory-usage-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "normal-memory-usage-pod"}, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyNever, Containers: []v1.Container{ @@ -250,7 +251,7 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs By("making sure we can start a new pod after the test") podName := "test-admit-pod" f.PodClient().CreateSync(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/kubelet_test.go b/test/e2e_node/kubelet_test.go index 672f543f003..c9a3b54de22 100644 --- a/test/e2e_node/kubelet_test.go +++ b/test/e2e_node/kubelet_test.go @@ -40,7 +40,7 @@ var _ = framework.KubeDescribe("Kubelet", func() { podName := "busybox-scheduling-" + string(uuid.NewUUID()) It("it should print the output to logs [Conformance]", func() { podClient.CreateSync(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -74,7 +74,7 @@ var _ = framework.KubeDescribe("Kubelet", func() { BeforeEach(func() { podName = "bin-false" + string(uuid.NewUUID()) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -121,7 +121,7 @@ var _ = framework.KubeDescribe("Kubelet", func() { It("it should not write to root filesystem [Conformance]", func() { isReadOnly := true podClient.CreateSync(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/lifecycle_hook_test.go b/test/e2e_node/lifecycle_hook_test.go index 2417e07ffda..66fd3ff5d05 100644 --- a/test/e2e_node/lifecycle_hook_test.go +++ b/test/e2e_node/lifecycle_hook_test.go @@ -20,6 +20,7 @@ import ( "fmt" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/intstr" "k8s.io/kubernetes/pkg/util/uuid" @@ -109,7 +110,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { Context("when it is http hook", func() { var targetIP string podHandleHookRequest := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-handle-http-request", }, Spec: v1.PodSpec{ @@ -154,7 +155,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { } It("should execute poststart http hook properly [Conformance]", func() { podWithHook := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-with-poststart-http-hook", }, Spec: v1.PodSpec{ @@ -179,7 +180,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { }) It("should execute prestop http hook properly [Conformance]", func() { podWithHook := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-with-prestop-http-hook", }, Spec: v1.PodSpec{ @@ -208,7 +209,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { func getExecHookTestPod(name string, cmd []string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/log_path_test.go b/test/e2e_node/log_path_test.go index 44466132d01..6bbbed6236d 100644 --- a/test/e2e_node/log_path_test.go +++ b/test/e2e_node/log_path_test.go @@ -47,7 +47,7 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() { logDir := kubelet.ContainerLogsDir logPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: logPodName, }, Spec: v1.PodSpec{ @@ -75,7 +75,7 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() { expectedlogFile := logDir + "/" + logPodName + "_" + ns + "_" + logContName + "-" + logConID.ID + ".log" checkPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: checkPodName, }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/memory_eviction_test.go b/test/e2e_node/memory_eviction_test.go index b892d4c851d..69f61c45c1b 100644 --- a/test/e2e_node/memory_eviction_test.go +++ b/test/e2e_node/memory_eviction_test.go @@ -106,7 +106,7 @@ var _ = framework.KubeDescribe("MemoryEviction [Slow] [Serial] [Disruptive]", fu // This is the final check to try to prevent interference with subsequent tests. podName := "admit-best-effort-pod" f.PodClient().CreateSync(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -245,7 +245,7 @@ func createMemhogPod(f *framework.Framework, genName string, ctnName string, res } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: genName, }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/resource_collector.go b/test/e2e_node/resource_collector.go index 1dfff82170a..09c0d97cd7f 100644 --- a/test/e2e_node/resource_collector.go +++ b/test/e2e_node/resource_collector.go @@ -34,6 +34,7 @@ import ( cadvisorclient "github.com/google/cadvisor/client/v2" cadvisorapiv2 "github.com/google/cadvisor/info/v2" "github.com/opencontainers/runc/libcontainer/cgroups" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -294,7 +295,7 @@ func formatCPUSummary(summary framework.ContainersCPUSummary) string { // createCadvisorPod creates a standalone cadvisor pod for fine-grain resource monitoring. func getCadvisorPod() *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cadvisorPodName, }, Spec: v1.PodSpec{ @@ -395,7 +396,7 @@ func newTestPods(numPods int, imageName, podType string) []*v1.Pod { } pods = append(pods, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: labels, }, diff --git a/test/e2e_node/simple_mount.go b/test/e2e_node/simple_mount.go index 37f6022ab6d..3d9dc430c09 100644 --- a/test/e2e_node/simple_mount.go +++ b/test/e2e_node/simple_mount.go @@ -35,7 +35,7 @@ var _ = framework.KubeDescribe("SimpleMount", func() { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "simple-mount-pod", }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/summary_test.go b/test/e2e_node/summary_test.go index fb1cb52788b..660339d61fe 100644 --- a/test/e2e_node/summary_test.go +++ b/test/e2e_node/summary_test.go @@ -221,7 +221,7 @@ func createSummaryTestPods(f *framework.Framework, names ...string) { pods := make([]*v1.Pod, 0, len(names)) for _, name := range names { pods = append(pods, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/test/e2e_node/util.go b/test/e2e_node/util.go index 15c08f8d207..1bbd4d1d8f1 100644 --- a/test/e2e_node/util.go +++ b/test/e2e_node/util.go @@ -251,7 +251,7 @@ func makeKubeletConfigMap(nodeName string, kubeCfg *componentconfig.KubeletConfi framework.ExpectNoError(err) cmap := &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("kubelet-%s", nodeName), }, Data: map[string]string{ diff --git a/test/e2e_node/volume_manager_test.go b/test/e2e_node/volume_manager_test.go index a3ba69d2757..1c5b6975f06 100644 --- a/test/e2e_node/volume_manager_test.go +++ b/test/e2e_node/volume_manager_test.go @@ -19,6 +19,7 @@ package e2e_node import ( "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -41,7 +42,7 @@ var _ = framework.KubeDescribe("Kubelet Volume Manager", func() { By("Creating a pod with a memory backed volume that exits success without restart", func() { volumeName = "memory-volume" memoryBackedPod = f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -80,7 +81,7 @@ var _ = framework.KubeDescribe("Kubelet Volume Manager", func() { // need to create a new verification pod on each pass since updates //to the HostPath volume aren't propogated to the pod pod := f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, diff --git a/test/integration/auth/accessreview_test.go b/test/integration/auth/accessreview_test.go index b2e37f201ee..614ad270022 100644 --- a/test/integration/auth/accessreview_test.go +++ b/test/integration/auth/accessreview_test.go @@ -24,6 +24,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" @@ -248,7 +249,7 @@ func TestLocalSubjectAccessReview(t *testing.T) { name: "simple allow", namespace: "foo", sar: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "foo"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{ Verb: "list", @@ -269,7 +270,7 @@ func TestLocalSubjectAccessReview(t *testing.T) { name: "simple deny", namespace: "foo", sar: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "foo"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{ Verb: "list", @@ -291,7 +292,7 @@ func TestLocalSubjectAccessReview(t *testing.T) { name: "conflicting namespace", namespace: "foo", sar: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "foo"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{ Verb: "list", @@ -309,7 +310,7 @@ func TestLocalSubjectAccessReview(t *testing.T) { name: "missing namespace", namespace: "foo", sar: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "foo"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{ Verb: "list", diff --git a/test/integration/auth/rbac_test.go b/test/integration/auth/rbac_test.go index 66dabcfc9ea..066919b551c 100644 --- a/test/integration/auth/rbac_test.go +++ b/test/integration/auth/rbac_test.go @@ -30,6 +30,7 @@ import ( "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" "k8s.io/apiserver/pkg/authentication/authenticator" @@ -268,17 +269,17 @@ func TestRBAC(t *testing.T) { bootstrapRoles: bootstrapRoles{ clusterRoles: []rbacapi.ClusterRole{ { - ObjectMeta: api.ObjectMeta{Name: "allow-all"}, + ObjectMeta: metav1.ObjectMeta{Name: "allow-all"}, Rules: []rbacapi.PolicyRule{ruleAllowAll}, }, { - ObjectMeta: api.ObjectMeta{Name: "read-pods"}, + ObjectMeta: metav1.ObjectMeta{Name: "read-pods"}, Rules: []rbacapi.PolicyRule{ruleReadPods}, }, }, clusterRoleBindings: []rbacapi.ClusterRoleBinding{ { - ObjectMeta: api.ObjectMeta{Name: "read-pods"}, + ObjectMeta: metav1.ObjectMeta{Name: "read-pods"}, Subjects: []rbacapi.Subject{ {Kind: "User", Name: "pod-reader"}, }, @@ -306,17 +307,17 @@ func TestRBAC(t *testing.T) { bootstrapRoles: bootstrapRoles{ clusterRoles: []rbacapi.ClusterRole{ { - ObjectMeta: api.ObjectMeta{Name: "write-jobs"}, + ObjectMeta: metav1.ObjectMeta{Name: "write-jobs"}, Rules: []rbacapi.PolicyRule{ruleWriteJobs}, }, { - ObjectMeta: api.ObjectMeta{Name: "create-rolebindings"}, + ObjectMeta: metav1.ObjectMeta{Name: "create-rolebindings"}, Rules: []rbacapi.PolicyRule{ rbacapi.NewRule("create").Groups("rbac.authorization.k8s.io").Resources("rolebindings").RuleOrDie(), }, }, { - ObjectMeta: api.ObjectMeta{Name: "bind-any-clusterrole"}, + ObjectMeta: metav1.ObjectMeta{Name: "bind-any-clusterrole"}, Rules: []rbacapi.PolicyRule{ rbacapi.NewRule("bind").Groups("rbac.authorization.k8s.io").Resources("clusterroles").RuleOrDie(), }, @@ -324,12 +325,12 @@ func TestRBAC(t *testing.T) { }, clusterRoleBindings: []rbacapi.ClusterRoleBinding{ { - ObjectMeta: api.ObjectMeta{Name: "write-jobs"}, + ObjectMeta: metav1.ObjectMeta{Name: "write-jobs"}, Subjects: []rbacapi.Subject{{Kind: "User", Name: "job-writer"}}, RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "write-jobs"}, }, { - ObjectMeta: api.ObjectMeta{Name: "create-rolebindings"}, + ObjectMeta: metav1.ObjectMeta{Name: "create-rolebindings"}, Subjects: []rbacapi.Subject{ {Kind: "User", Name: "job-writer"}, {Kind: "User", Name: "nonescalating-rolebinding-writer"}, @@ -338,19 +339,19 @@ func TestRBAC(t *testing.T) { RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "create-rolebindings"}, }, { - ObjectMeta: api.ObjectMeta{Name: "bind-any-clusterrole"}, + ObjectMeta: metav1.ObjectMeta{Name: "bind-any-clusterrole"}, Subjects: []rbacapi.Subject{{Kind: "User", Name: "any-rolebinding-writer"}}, RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "bind-any-clusterrole"}, }, }, roleBindings: []rbacapi.RoleBinding{ { - ObjectMeta: api.ObjectMeta{Name: "write-jobs", Namespace: "job-namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "write-jobs", Namespace: "job-namespace"}, Subjects: []rbacapi.Subject{{Kind: "User", Name: "job-writer-namespace"}}, RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "write-jobs"}, }, { - ObjectMeta: api.ObjectMeta{Name: "create-rolebindings", Namespace: "job-namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "create-rolebindings", Namespace: "job-namespace"}, Subjects: []rbacapi.Subject{{Kind: "User", Name: "job-writer-namespace"}}, RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "create-rolebindings"}, }, diff --git a/test/integration/client/client_test.go b/test/integration/client/client_test.go index d7d5f0a9575..3f692cc81d9 100644 --- a/test/integration/client/client_test.go +++ b/test/integration/client/client_test.go @@ -71,7 +71,7 @@ func TestClient(t *testing.T) { // get a validation error pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "test", Namespace: ns.Name, }, @@ -129,7 +129,7 @@ func TestAtomicPut(t *testing.T) { TypeMeta: metav1.TypeMeta{ APIVersion: c.Core().RESTClient().APIVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "atomicrc", Namespace: ns.Name, Labels: map[string]string{ @@ -142,7 +142,7 @@ func TestAtomicPut(t *testing.T) { "foo": "bar", }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -223,7 +223,7 @@ func TestPatch(t *testing.T) { TypeMeta: metav1.TypeMeta{ APIVersion: c.Core().RESTClient().APIVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns.Name, Labels: map[string]string{}, @@ -327,7 +327,7 @@ func TestPatchWithCreateOnUpdate(t *testing.T) { defer framework.DeleteTestingNamespace(ns, s, t) endpointTemplate := &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "patchendpoint", Namespace: ns.Name, }, @@ -462,7 +462,7 @@ func TestSingleWatch(t *testing.T) { mkEvent := func(i int) *v1.Event { name := fmt.Sprintf("event-%v", i) return &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: ns.Name, Name: name, }, @@ -547,7 +547,7 @@ func TestMultiWatch(t *testing.T) { dummyEvent := func(i int) *v1.Event { name := fmt.Sprintf("unrelated-%v", i) return &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", name, time.Now().UnixNano()), Namespace: ns.Name, }, @@ -572,7 +572,7 @@ func TestMultiWatch(t *testing.T) { watchesStarted.Add(1) name := fmt.Sprintf("multi-watch-%v", i) got, err := client.Core().Pods(ns.Name).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels.Set{"watchlabel": name}, }, @@ -679,7 +679,7 @@ func TestMultiWatch(t *testing.T) { } name := fmt.Sprintf("unrelated-%v", i) _, err := client.Core().Pods(ns.Name).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -743,7 +743,7 @@ func TestMultiWatch(t *testing.T) { func runSelfLinkTestOnNamespace(t *testing.T, c clientset.Interface, namespace string) { podBody := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "selflinktest", Namespace: namespace, Labels: map[string]string{ diff --git a/test/integration/client/dynamic_client_test.go b/test/integration/client/dynamic_client_test.go index 07e1dc4a344..f0a0c84bd5e 100644 --- a/test/integration/client/dynamic_client_test.go +++ b/test/integration/client/dynamic_client_test.go @@ -74,7 +74,7 @@ func TestDynamicClient(t *testing.T) { // Create a Pod with the normal client pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "test", }, Spec: v1.PodSpec{ diff --git a/test/integration/configmap/configmap_test.go b/test/integration/configmap/configmap_test.go index ba059c3959f..124e080ad2a 100644 --- a/test/integration/configmap/configmap_test.go +++ b/test/integration/configmap/configmap_test.go @@ -23,6 +23,7 @@ package configmap import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -46,7 +47,7 @@ func TestConfigMap(t *testing.T) { func DoTestConfigMap(t *testing.T, client clientset.Interface, ns *v1.Namespace) { cfg := v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "configmap", Namespace: ns.Name, }, @@ -63,7 +64,7 @@ func DoTestConfigMap(t *testing.T, client clientset.Interface, ns *v1.Namespace) defer deleteConfigMapOrErrorf(t, client, cfg.Namespace, cfg.Name) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "XXX", Namespace: ns.Name, }, diff --git a/test/integration/evictions/evictions_test.go b/test/integration/evictions/evictions_test.go index 0b27b07498d..3f6838b3fea 100644 --- a/test/integration/evictions/evictions_test.go +++ b/test/integration/evictions/evictions_test.go @@ -169,7 +169,7 @@ func TestConcurrentEvictionRequests(t *testing.T) { func newPod(podName string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"app": "test-evictions"}, }, @@ -198,7 +198,7 @@ func addPodConditionReady(pod *v1.Pod) { func newPDB() *v1beta1.PodDisruptionBudget { return &v1beta1.PodDisruptionBudget{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-pdb", }, Spec: v1beta1.PodDisruptionBudgetSpec{ @@ -219,7 +219,7 @@ func newEviction(ns, evictionName string, deleteOption *v1.DeleteOptions) *v1bet APIVersion: "Policy/v1beta1", Kind: "Eviction", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: evictionName, Namespace: ns, }, diff --git a/test/integration/framework/master_utils.go b/test/integration/framework/master_utils.go index 978367b4305..f6264057c7e 100644 --- a/test/integration/framework/master_utils.go +++ b/test/integration/framework/master_utils.go @@ -403,7 +403,7 @@ func CreateTestingNamespace(baseName string, apiserver *httptest.Server, t *test // Currently we neither create the namespace nor delete all its contents at the end. // But as long as tests are not using the same namespaces, this should work fine. return &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ // TODO: Once we start creating namespaces, switch to GenerateName. Name: baseName, }, diff --git a/test/integration/framework/perf_utils.go b/test/integration/framework/perf_utils.go index 904265f8f45..193dd4eadcd 100644 --- a/test/integration/framework/perf_utils.go +++ b/test/integration/framework/perf_utils.go @@ -17,6 +17,7 @@ limitations under the License. package framework import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -52,7 +53,7 @@ func (p *IntegrationTestNodePreparer) PrepareNodes() error { glog.Infof("Making %d nodes", numNodes) baseNode := &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: p.nodeNamePrefix, }, Spec: v1.NodeSpec{ diff --git a/test/integration/garbagecollector/garbage_collector_test.go b/test/integration/garbagecollector/garbage_collector_test.go index 1c7342b24c3..87251f63675 100644 --- a/test/integration/garbagecollector/garbage_collector_test.go +++ b/test/integration/garbagecollector/garbage_collector_test.go @@ -74,7 +74,7 @@ func newPod(podName, podNamespace string, ownerReferences []metav1.OwnerReferenc Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: podNamespace, OwnerReferences: ownerReferences, @@ -96,14 +96,14 @@ func newOwnerRC(name, namespace string) *v1.ReplicationController { Kind: "ReplicationController", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"name": "test"}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "test"}, }, Spec: v1.PodSpec{ diff --git a/test/integration/master/master_test.go b/test/integration/master/master_test.go index 7886e23ffeb..d5c86c36700 100644 --- a/test/integration/master/master_test.go +++ b/test/integration/master/master_test.go @@ -324,7 +324,7 @@ func TestServiceAlloc(t *testing.T) { svc := func(i int) *api.Service { return &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("svc-%v", i), }, Spec: api.ServiceSpec{ @@ -408,7 +408,7 @@ func TestUpdateNodeObjects(t *testing.T) { for i := 0; i < nodes*6; i++ { c.Nodes().Delete(fmt.Sprintf("node-%d", i), nil) _, err := c.Nodes().Create(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("node-%d", i), }, }) diff --git a/test/integration/objectmeta/BUILD b/test/integration/objectmeta/BUILD index 14c2391feb3..38712fde353 100644 --- a/test/integration/objectmeta/BUILD +++ b/test/integration/objectmeta/BUILD @@ -18,6 +18,7 @@ go_test( "//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/objectmeta/objectmeta_test.go b/test/integration/objectmeta/objectmeta_test.go index c9ba5a5acbb..08608b05425 100644 --- a/test/integration/objectmeta/objectmeta_test.go +++ b/test/integration/objectmeta/objectmeta_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -35,7 +36,7 @@ func TestIgnoreClusterName(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) ns := v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-namespace", ClusterName: "cluster-name-to-ignore", }, diff --git a/test/integration/pods/pods_test.go b/test/integration/pods/pods_test.go index 59b5d34981b..bb238b19a4a 100644 --- a/test/integration/pods/pods_test.go +++ b/test/integration/pods/pods_test.go @@ -22,6 +22,7 @@ import ( "fmt" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -48,7 +49,7 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) { prototypePod := func() *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "xxx", }, Spec: v1.PodSpec{ @@ -158,7 +159,7 @@ func TestPodReadOnlyFilesystem(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "xxx", }, Spec: v1.PodSpec{ diff --git a/test/integration/quota/quota_test.go b/test/integration/quota/quota_test.go index 9eb7205c62e..6f5595c9d63 100644 --- a/test/integration/quota/quota_test.go +++ b/test/integration/quota/quota_test.go @@ -25,6 +25,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" @@ -111,7 +112,7 @@ func TestQuota(t *testing.T) { t.Logf("Took %v to scale up without quota", endTime.Sub(startTime)) quota := &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "quota", Namespace: ns.Name, }, @@ -130,7 +131,7 @@ func TestQuota(t *testing.T) { } func waitForQuota(t *testing.T, quota *v1.ResourceQuota, clientset *clientset.Clientset) { - w, err := clientset.Core().ResourceQuotas(quota.Namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: quota.Name})) + w, err := clientset.Core().ResourceQuotas(quota.Namespace).Watch(v1.SingleObject(metav1.ObjectMeta{Name: quota.Name})) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -163,7 +164,7 @@ func waitForQuota(t *testing.T, quota *v1.ResourceQuota, clientset *clientset.Cl func scale(t *testing.T, namespace string, clientset *clientset.Clientset) { target := int32(100) rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: namespace, }, @@ -171,7 +172,7 @@ func scale(t *testing.T, namespace string, clientset *clientset.Clientset) { Replicas: &target, Selector: map[string]string{"foo": "bar"}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -188,7 +189,7 @@ func scale(t *testing.T, namespace string, clientset *clientset.Clientset) { }, } - w, err := clientset.Core().ReplicationControllers(namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: rc.Name})) + w, err := clientset.Core().ReplicationControllers(namespace).Watch(v1.SingleObject(metav1.ObjectMeta{Name: rc.Name})) if err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/test/integration/replicaset/replicaset_test.go b/test/integration/replicaset/replicaset_test.go index a94b65238d3..273c667f369 100644 --- a/test/integration/replicaset/replicaset_test.go +++ b/test/integration/replicaset/replicaset_test.go @@ -49,7 +49,7 @@ func newRS(name, namespace string, replicas int) *v1beta1.ReplicaSet { Kind: "ReplicaSet", APIVersion: "extensions/v1beta1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, @@ -59,7 +59,7 @@ func newRS(name, namespace string, replicas int) *v1beta1.ReplicaSet { }, Replicas: &replicasCopy, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: testLabels(), }, Spec: v1.PodSpec{ @@ -81,7 +81,7 @@ func newMatchingPod(podName, namespace string) *v1.Pod { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: testLabels(), diff --git a/test/integration/replicationcontroller/replicationcontroller_test.go b/test/integration/replicationcontroller/replicationcontroller_test.go index f1819832dba..d53f9e65682 100644 --- a/test/integration/replicationcontroller/replicationcontroller_test.go +++ b/test/integration/replicationcontroller/replicationcontroller_test.go @@ -48,7 +48,7 @@ func newRC(name, namespace string, replicas int) *v1.ReplicationController { Kind: "ReplicationController", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, @@ -56,7 +56,7 @@ func newRC(name, namespace string, replicas int) *v1.ReplicationController { Selector: testLabels(), Replicas: &replicasCopy, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: testLabels(), }, Spec: v1.PodSpec{ @@ -78,7 +78,7 @@ func newMatchingPod(podName, namespace string) *v1.Pod { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: testLabels(), diff --git a/test/integration/scheduler/extender_test.go b/test/integration/scheduler/extender_test.go index 08ba421c21a..69b24c913a8 100644 --- a/test/integration/scheduler/extender_test.go +++ b/test/integration/scheduler/extender_test.go @@ -282,7 +282,7 @@ func DoTestPodScheduling(ns *v1.Namespace, t *testing.T, cs clientset.Interface) } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "extender-test-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "extender-test-pod"}, Spec: v1.PodSpec{ Containers: []v1.Container{{Name: "container", Image: e2e.GetPauseImageName(cs)}}, }, diff --git a/test/integration/scheduler/scheduler_test.go b/test/integration/scheduler/scheduler_test.go index 11c24b1189c..21c752e5d46 100644 --- a/test/integration/scheduler/scheduler_test.go +++ b/test/integration/scheduler/scheduler_test.go @@ -140,7 +140,7 @@ func DoTestUnschedulableNodes(t *testing.T, cs clientset.Interface, ns *v1.Names // Create a new schedulable node, since we're first going to apply // the unschedulable condition and verify that pods aren't scheduled. node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "node-scheduling-test-node"}, + ObjectMeta: metav1.ObjectMeta{Name: "node-scheduling-test-node"}, Spec: v1.NodeSpec{Unschedulable: false}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ @@ -246,7 +246,7 @@ func DoTestUnschedulableNodes(t *testing.T, cs clientset.Interface, ns *v1.Names // Create the new pod, note that this needs to happen post unschedulable // modification or we have a race in the test. pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "node-scheduling-test-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "node-scheduling-test-pod"}, Spec: v1.PodSpec{ Containers: []v1.Container{{Name: "container", Image: e2e.GetPauseImageName(cs)}}, }, @@ -341,7 +341,7 @@ func TestMultiScheduler(t *testing.T) { // 2. create a node node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "node-multi-scheduler-test-node"}, + ObjectMeta: metav1.ObjectMeta{Name: "node-multi-scheduler-test-node"}, Spec: v1.NodeSpec{Unschedulable: false}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ @@ -471,7 +471,7 @@ func TestMultiScheduler(t *testing.T) { func createPod(client clientset.Interface, name string, annotation map[string]string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: name, Annotations: annotation}, + ObjectMeta: metav1.ObjectMeta{Name: name, Annotations: annotation}, Spec: v1.PodSpec{ Containers: []v1.Container{{Name: "container", Image: e2e.GetPauseImageName(client)}}, }, @@ -507,7 +507,7 @@ func TestAllocatable(t *testing.T) { // 2. create a node without allocatable awareness node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "node-allocatable-scheduler-test-node"}, + ObjectMeta: metav1.ObjectMeta{Name: "node-allocatable-scheduler-test-node"}, Spec: v1.NodeSpec{Unschedulable: false}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ @@ -525,7 +525,7 @@ func TestAllocatable(t *testing.T) { // 3. create resource pod which requires less than Capacity podResource := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod-test-allocatable"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod-test-allocatable"}, Spec: v1.PodSpec{ Containers: []v1.Container{ { diff --git a/test/integration/scheduler_perf/BUILD b/test/integration/scheduler_perf/BUILD index 6c45316e3ed..0acf50a9c5f 100644 --- a/test/integration/scheduler_perf/BUILD +++ b/test/integration/scheduler_perf/BUILD @@ -42,6 +42,7 @@ go_test( "//test/utils:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/renstrom/dedent", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/test/integration/scheduler_perf/scheduler_test.go b/test/integration/scheduler_perf/scheduler_test.go index 73f820784a5..4ff7e966664 100644 --- a/test/integration/scheduler_perf/scheduler_test.go +++ b/test/integration/scheduler_perf/scheduler_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/plugin/pkg/scheduler/factory" "k8s.io/kubernetes/test/integration/framework" @@ -97,7 +98,7 @@ func TestSchedule100Node3KNodeAffinityPods(t *testing.T) { for i := 0; i < numGroups; i++ { podCreatorConfig.AddStrategy("sched-perf-node-affinity", config.numPods/numGroups, testutils.NewCustomCreatePodStrategy(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "sched-perf-node-affinity-pod-", Annotations: map[string]string{v1.AffinityAnnotationKey: fmt.Sprintf(affinityTemplate, i)}, }, diff --git a/test/integration/secrets/secrets_test.go b/test/integration/secrets/secrets_test.go index 8a6755cc3b2..cd3a01cf6b8 100644 --- a/test/integration/secrets/secrets_test.go +++ b/test/integration/secrets/secrets_test.go @@ -23,6 +23,7 @@ package secrets import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -54,7 +55,7 @@ func TestSecrets(t *testing.T) { func DoTestSecrets(t *testing.T, client clientset.Interface, ns *v1.Namespace) { // Make a secret object. s := v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "secret", Namespace: ns.Name, }, @@ -70,7 +71,7 @@ func DoTestSecrets(t *testing.T, client clientset.Interface, ns *v1.Namespace) { // Template for pods that use a secret. pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "XXX", Namespace: ns.Name, }, diff --git a/test/integration/serviceaccount/service_account_test.go b/test/integration/serviceaccount/service_account_test.go index 71080090b35..dae0f7eb3c8 100644 --- a/test/integration/serviceaccount/service_account_test.go +++ b/test/integration/serviceaccount/service_account_test.go @@ -69,7 +69,7 @@ func TestServiceAccountAutoCreate(t *testing.T) { ns := "test-service-account-creation" // Create namespace - _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: ns}}) + _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}}) if err != nil { t.Fatalf("could not create namespace: %v", err) } @@ -104,13 +104,13 @@ func TestServiceAccountTokenAutoCreate(t *testing.T) { name := "my-service-account" // Create namespace - _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: ns}}) + _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}}) if err != nil { t.Fatalf("could not create namespace: %v", err) } // Create service account - serviceAccount, err := c.Core().ServiceAccounts(ns).Create(&v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Name: name}}) + serviceAccount, err := c.Core().ServiceAccounts(ns).Create(&v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: name}}) if err != nil { t.Fatalf("Service Account not created: %v", err) } @@ -198,7 +198,7 @@ func TestServiceAccountTokenAutoMount(t *testing.T) { ns := "auto-mount-ns" // Create "my" namespace - _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: ns}}) + _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}}) if err != nil && !errors.IsAlreadyExists(err) { t.Fatalf("could not create namespace: %v", err) } @@ -211,7 +211,7 @@ func TestServiceAccountTokenAutoMount(t *testing.T) { // Pod to create protoPod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "protopod"}, + ObjectMeta: metav1.ObjectMeta{Name: "protopod"}, Spec: v1.PodSpec{ Containers: []v1.Container{ { @@ -278,19 +278,19 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { otherns := "other-ns" // Create "my" namespace - _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: myns}}) + _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: myns}}) if err != nil && !errors.IsAlreadyExists(err) { t.Fatalf("could not create namespace: %v", err) } // Create "other" namespace - _, err = c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: otherns}}) + _, err = c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: otherns}}) if err != nil && !errors.IsAlreadyExists(err) { t.Fatalf("could not create namespace: %v", err) } // Create "ro" user in myns - _, err = c.Core().ServiceAccounts(myns).Create(&v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Name: readOnlyServiceAccountName}}) + _, err = c.Core().ServiceAccounts(myns).Create(&v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: readOnlyServiceAccountName}}) if err != nil { t.Fatalf("Service Account not created: %v", err) } @@ -310,7 +310,7 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { doServiceAccountAPIRequests(t, roClient, myns, false, false, false) // Create "rw" user in myns - _, err = c.Core().ServiceAccounts(myns).Create(&v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Name: readWriteServiceAccountName}}) + _, err = c.Core().ServiceAccounts(myns).Create(&v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: readWriteServiceAccountName}}) if err != nil { t.Fatalf("Service Account not created: %v", err) } @@ -513,7 +513,7 @@ type testOperation func() error func doServiceAccountAPIRequests(t *testing.T, c *clientset.Clientset, ns string, authenticated bool, canRead bool, canWrite bool) { testSecret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{Name: "testSecret"}, + ObjectMeta: metav1.ObjectMeta{Name: "testSecret"}, Data: map[string][]byte{"test": []byte("data")}, } diff --git a/test/integration/storageclasses/storage_classes_test.go b/test/integration/storageclasses/storage_classes_test.go index 533a07078f1..9741f64c35a 100644 --- a/test/integration/storageclasses/storage_classes_test.go +++ b/test/integration/storageclasses/storage_classes_test.go @@ -56,7 +56,7 @@ func DoTestStorageClasses(t *testing.T, client clientset.Interface, ns *v1.Names TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "gold", }, Provisioner: provisionerPluginName, @@ -69,7 +69,7 @@ func DoTestStorageClasses(t *testing.T, client clientset.Interface, ns *v1.Names // Template for pvcs that specify a storage class pvc := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "XXX", Namespace: ns.Name, Annotations: map[string]string{ diff --git a/test/integration/thirdparty/thirdparty_test.go b/test/integration/thirdparty/thirdparty_test.go index 9d5237de22f..32613ec530a 100644 --- a/test/integration/thirdparty/thirdparty_test.go +++ b/test/integration/thirdparty/thirdparty_test.go @@ -34,7 +34,6 @@ import ( "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/restclient" @@ -54,7 +53,7 @@ func TestThirdPartyDiscovery(t *testing.T) { once := sync.Once{} deleteFoo := installThirdParty(t, client, clientConfig, &extensions.ThirdPartyResource{ - ObjectMeta: v1.ObjectMeta{Name: "foo.company.com"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo.company.com"}, Versions: []extensions.APIVersion{{Name: version}}, }, group, version, "foos", ) @@ -117,8 +116,8 @@ func TestThirdPartyMultiple(t *testing.T) { var versionsToTest = []string{"v1"} type Foo struct { - metav1.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` SomeField string `json:"someField"` OtherField int `json:"otherField"` @@ -184,7 +183,7 @@ func DoTestInstallMultipleAPIs(t *testing.T, client clientset.Interface, clientC deleteFoo := installThirdParty(t, client, clientConfig, &extensions.ThirdPartyResource{ - ObjectMeta: v1.ObjectMeta{Name: "foo.company.com"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo.company.com"}, Versions: []extensions.APIVersion{{Name: version}}, }, group, version, "foos", ) @@ -193,7 +192,7 @@ func DoTestInstallMultipleAPIs(t *testing.T, client clientset.Interface, clientC // TODO make multiple resources in one version work // deleteBar = installThirdParty(t, client, clientConfig, // &extensions.ThirdPartyResource{ - // ObjectMeta: v1.ObjectMeta{Name: "bar.company.com"}, + // ObjectMeta: metav1.ObjectMeta{Name: "bar.company.com"}, // Versions: []extensions.APIVersion{{Name: version}}, // }, group, version, "bars", // ) @@ -211,7 +210,7 @@ func testInstallThirdPartyAPIDeleteVersion(t *testing.T, client clientset.Interf deleteFoo := installThirdParty(t, client, clientConfig, &extensions.ThirdPartyResource{ - ObjectMeta: v1.ObjectMeta{Name: "foo.company.com"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo.company.com"}, Versions: []extensions.APIVersion{{Name: version}}, }, group, version, "foos", ) @@ -226,7 +225,7 @@ func testInstallThirdPartyAPIDeleteVersion(t *testing.T, client clientset.Interf } expectedObj := Foo{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "default", }, diff --git a/test/integration/volume/attach_detach_test.go b/test/integration/volume/attach_detach_test.go index 89b532e6930..edfdd2fe353 100644 --- a/test/integration/volume/attach_detach_test.go +++ b/test/integration/volume/attach_detach_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -40,7 +41,7 @@ import ( func fakePodWithVol(namespace string) *v1.Pod { fakePod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: "fakepod", }, @@ -82,7 +83,7 @@ func TestPodDeletionWithDswp(t *testing.T) { namespaceName := "test-pod-deletion" node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node-sandbox", Annotations: map[string]string{ volumehelper.ControllerManagedAttachAnnotation: "true", diff --git a/test/integration/volume/persistent_volumes_test.go b/test/integration/volume/persistent_volumes_test.go index 452e844b3b9..b99340f5447 100644 --- a/test/integration/volume/persistent_volumes_test.go +++ b/test/integration/volume/persistent_volumes_test.go @@ -244,7 +244,7 @@ func TestPersistentVolumeBindRace(t *testing.T) { counter += 1 clone, _ := api.Scheme.DeepCopy(pvc) newPvc, _ := clone.(*v1.PersistentVolumeClaim) - newPvc.ObjectMeta = v1.ObjectMeta{Name: fmt.Sprintf("fake-pvc-race-%d", counter)} + newPvc.ObjectMeta = metav1.ObjectMeta{Name: fmt.Sprintf("fake-pvc-race-%d", counter)} claim, err := testClient.PersistentVolumeClaims(ns.Name).Create(newPvc) if err != nil { t.Fatalf("Error creating newPvc: %v", err) @@ -863,7 +863,7 @@ func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "gold", }, Provisioner: provisionerPluginName, @@ -1142,7 +1142,7 @@ func createClients(ns *v1.Namespace, t *testing.T, s *httptest.Server, syncPerio func createPV(name, path, cap string, mode []v1.PersistentVolumeAccessMode, reclaim v1.PersistentVolumeReclaimPolicy) *v1.PersistentVolume { return &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{HostPath: &v1.HostPathVolumeSource{Path: path}}, Capacity: v1.ResourceList{v1.ResourceName(v1.ResourceStorage): resource.MustParse(cap)}, @@ -1154,7 +1154,7 @@ func createPV(name, path, cap string, mode []v1.PersistentVolumeAccessMode, recl func createPVC(name, namespace, cap string, mode []v1.PersistentVolumeAccessMode) *v1.PersistentVolumeClaim { return &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/test/soak/cauldron/cauldron.go b/test/soak/cauldron/cauldron.go index 511d144d4bc..641d853da8f 100644 --- a/test/soak/cauldron/cauldron.go +++ b/test/soak/cauldron/cauldron.go @@ -95,7 +95,7 @@ func main() { queries := *queriesAverage * len(nodes.Items) * *podsPerNode // Create a uniquely named namespace. - got, err := client.Core().Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{GenerateName: "serve-hostnames-"}}) + got, err := client.Core().Namespaces().Create(&api.Namespace{ObjectMeta: metav1.ObjectMeta{GenerateName: "serve-hostnames-"}}) if err != nil { glog.Fatalf("Failed to create namespace: %v", err) } @@ -124,7 +124,7 @@ func main() { for start := time.Now(); time.Since(start) < serviceCreateTimeout; time.Sleep(2 * time.Second) { t := time.Now() svc, err = client.Core().Services(ns).Create(&api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "serve-hostnames", Labels: map[string]string{ "name": "serve-hostname", @@ -174,7 +174,7 @@ func main() { glog.Infof("Creating pod %s/%s on node %s", ns, podName, node.Name) t := time.Now() _, err = client.Core().Pods(ns).Create(&api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{ "name": "serve-hostname", diff --git a/test/soak/serve_hostnames/serve_hostnames.go b/test/soak/serve_hostnames/serve_hostnames.go index 1b6c7dbc7ee..883a84eaddc 100644 --- a/test/soak/serve_hostnames/serve_hostnames.go +++ b/test/soak/serve_hostnames/serve_hostnames.go @@ -114,7 +114,7 @@ func main() { queries := *queriesAverage * len(nodes.Items) * *podsPerNode // Create the namespace - got, err := client.Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{GenerateName: "serve-hostnames-"}}) + got, err := client.Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{GenerateName: "serve-hostnames-"}}) if err != nil { glog.Fatalf("Failed to create namespace: %v", err) } @@ -143,7 +143,7 @@ func main() { for start := time.Now(); time.Since(start) < serviceCreateTimeout; time.Sleep(2 * time.Second) { t := time.Now() svc, err = client.Services(ns).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "serve-hostnames", Labels: map[string]string{ "name": "serve-hostname", @@ -193,7 +193,7 @@ func main() { glog.Infof("Creating pod %s/%s on node %s", ns, podName, node.Name) t := time.Now() _, err = client.Pods(ns).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{ "name": "serve-hostname", diff --git a/test/utils/runners.go b/test/utils/runners.go index d9dce91ec96..53e2187e298 100644 --- a/test/utils/runners.go +++ b/test/utils/runners.go @@ -228,7 +228,7 @@ func (config *DeploymentConfig) GetKind() schema.GroupKind { func (config *DeploymentConfig) create() error { deployment := &extensions.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: extensions.DeploymentSpec{ @@ -239,7 +239,7 @@ func (config *DeploymentConfig) create() error { }, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": config.Name}, }, Spec: v1.PodSpec{ @@ -292,7 +292,7 @@ func (config *ReplicaSetConfig) GetKind() schema.GroupKind { func (config *ReplicaSetConfig) create() error { rs := &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: extensions.ReplicaSetSpec{ @@ -303,7 +303,7 @@ func (config *ReplicaSetConfig) create() error { }, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": config.Name}, }, Spec: v1.PodSpec{ @@ -356,14 +356,14 @@ func (config *JobConfig) GetKind() schema.GroupKind { func (config *JobConfig) create() error { job := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: batch.JobSpec{ Parallelism: func(i int) *int32 { x := int32(i); return &x }(config.Replicas), Completions: func(i int) *int32 { x := int32(i); return &x }(config.Replicas), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": config.Name}, }, Spec: v1.PodSpec{ @@ -448,7 +448,7 @@ func (config *RCConfig) create() error { config.DNSPolicy = &dnsDefault } rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: v1.ReplicationControllerSpec{ @@ -457,7 +457,7 @@ func (config *RCConfig) create() error { "name": config.Name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": config.Name}, }, Spec: v1.PodSpec{ @@ -954,14 +954,14 @@ func createPod(client clientset.Interface, namespace string, podCount int, podTe func createController(client clientset.Interface, controllerName, namespace string, podCount int, podTemplate *v1.Pod) error { rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: controllerName, }, Spec: v1.ReplicationControllerSpec{ Replicas: func(i int) *int32 { x := int32(i); return &x }(podCount), Selector: map[string]string{"name": controllerName}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": controllerName}, }, Spec: podTemplate.Spec, @@ -986,7 +986,7 @@ func NewCustomCreatePodStrategy(podTemplate *v1.Pod) TestPodCreateStrategy { func NewSimpleCreatePodStrategy() TestPodCreateStrategy { basePod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "simple-pod-", }, Spec: MakePodSpec(), @@ -997,7 +997,7 @@ func NewSimpleCreatePodStrategy() TestPodCreateStrategy { func NewSimpleWithControllerCreatePodStrategy(controllerName string) TestPodCreateStrategy { return func(client clientset.Interface, namespace string, podCount int) error { basePod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: controllerName + "-pod-", Labels: map[string]string{"name": controllerName}, }, @@ -1021,7 +1021,7 @@ type SecretConfig struct { func (config *SecretConfig) Run() error { secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, StringData: map[string]string{}, @@ -1088,12 +1088,12 @@ func (config *DaemonConfig) Run() error { "name": config.Name + "-daemon", } daemon := &extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: extensions.DaemonSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: nameLabel, }, Spec: v1.PodSpec{ diff --git a/vendor/BUILD b/vendor/BUILD index e932b06d500..d7eeddf0079 100644 --- a/vendor/BUILD +++ b/vendor/BUILD @@ -8017,7 +8017,7 @@ go_library( "k8s.io/apimachinery/pkg/conversion/helper.go", ], tags = ["automanaged"], - deps = ["//vendor:k8s.io/apimachinery/third_party/forked/golang/reflect"], + deps = ["//third_party/forked/golang/reflect:go_default_library"], ) go_library(