mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
refactor: Move versioned/watch to meta/v1
This commit is contained in:
parent
b7d03ed3d5
commit
e5019de260
@ -23,7 +23,6 @@ go_library(
|
||||
"//pkg/conversion:go_default_library",
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
const GroupName = "apiregistration.k8s.io"
|
||||
@ -54,6 +53,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&kapi.DeleteOptions{},
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
],
|
||||
)
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
const GroupName = "apiregistration.k8s.io"
|
||||
@ -44,6 +43,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&v1.DeleteOptions{},
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
],
|
||||
)
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: "testgroup.k8s.io", Version: "v1"}
|
||||
@ -44,7 +43,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&metav1.Status{},
|
||||
&metav1.ExportOptions{},
|
||||
)
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,6 @@ go_library(
|
||||
"//pkg/apis/meta/v1:go_default_library",
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -56,6 +55,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{})
|
||||
|
||||
// Add the watch version that applies
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
],
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -44,7 +43,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&metav1.ExportOptions{},
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,6 @@ go_test(
|
||||
"//pkg/util/sets:go_default_library",
|
||||
"//pkg/util/uuid:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/davecgh/go-spew/spew",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/golang/protobuf/proto",
|
||||
|
@ -47,7 +47,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/util/diff"
|
||||
"k8s.io/kubernetes/pkg/util/sets"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
var fuzzIters = flag.Int("fuzz-iters", 20, "How many fuzzing iterations to do.")
|
||||
@ -445,7 +444,7 @@ func TestObjectWatchFraming(t *testing.T) {
|
||||
if err := embedded.Encode(v1secret, obj); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
event := &versioned.Event{Type: string(watch.Added)}
|
||||
event := &metav1.Event{Type: string(watch.Added)}
|
||||
event.Object.Raw = obj.Bytes()
|
||||
obj = &bytes.Buffer{}
|
||||
if err := s.Encode(event, obj); err != nil {
|
||||
@ -457,7 +456,7 @@ func TestObjectWatchFraming(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
sr = streaming.NewDecoder(framer.NewFrameReader(ioutil.NopCloser(out)), s)
|
||||
outEvent := &versioned.Event{}
|
||||
outEvent := &metav1.Event{}
|
||||
res, _, err = sr.Decode(nil, outEvent)
|
||||
if err != nil || outEvent.Type != string(watch.Added) {
|
||||
t.Fatalf("%v: %#v", err, outEvent)
|
||||
|
@ -48,7 +48,6 @@ go_library(
|
||||
"//pkg/util/rand:go_default_library",
|
||||
"//pkg/util/sets:go_default_library",
|
||||
"//pkg/util/validation/field:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/gogo/protobuf/sortkeys",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
|
@ -23,10 +23,10 @@ import (
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/conversion"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/util/validation/field"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -123,15 +123,15 @@ func addFastPathConversionFuncs(scheme *runtime.Scheme) error {
|
||||
return true, Convert_api_Endpoints_To_v1_Endpoints(a, b, s)
|
||||
}
|
||||
|
||||
case *versioned.Event:
|
||||
case *metav1.Event:
|
||||
switch b := objB.(type) {
|
||||
case *versioned.InternalEvent:
|
||||
return true, versioned.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s)
|
||||
case *metav1.InternalEvent:
|
||||
return true, metav1.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s)
|
||||
}
|
||||
case *versioned.InternalEvent:
|
||||
case *metav1.InternalEvent:
|
||||
switch b := objB.(type) {
|
||||
case *versioned.Event:
|
||||
return true, versioned.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s)
|
||||
case *metav1.Event:
|
||||
return true, metav1.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s)
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
|
@ -36,7 +36,7 @@ func TestPodLogOptions(t *testing.T) {
|
||||
tailLines := int64(2)
|
||||
limitBytes := int64(3)
|
||||
|
||||
versionedLogOptions := &versioned.PodLogOptions{
|
||||
versionedLogOptions := &metav1.PodLogOptions{
|
||||
Container: "mycontainer",
|
||||
Follow: true,
|
||||
Previous: true,
|
||||
@ -71,7 +71,7 @@ func TestPodLogOptions(t *testing.T) {
|
||||
|
||||
// unversioned -> query params
|
||||
{
|
||||
actualParameters, err := codec.EncodeParameters(unversionedLogOptions, versioned.SchemeGroupVersion)
|
||||
actualParameters, err := codec.EncodeParameters(unversionedLogOptions, metav1.SchemeGroupVersion)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@ -82,7 +82,7 @@ func TestPodLogOptions(t *testing.T) {
|
||||
|
||||
// versioned -> query params
|
||||
{
|
||||
actualParameters, err := codec.EncodeParameters(versionedLogOptions, versioned.SchemeGroupVersion)
|
||||
actualParameters, err := codec.EncodeParameters(versionedLogOptions, metav1.SchemeGroupVersion)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@ -93,8 +93,8 @@ func TestPodLogOptions(t *testing.T) {
|
||||
|
||||
// query params -> versioned
|
||||
{
|
||||
convertedLogOptions := &versioned.PodLogOptions{}
|
||||
err := codec.DecodeParameters(expectedParameters, versioned.SchemeGroupVersion, convertedLogOptions)
|
||||
convertedLogOptions := &metav1.PodLogOptions{}
|
||||
err := codec.DecodeParameters(expectedParameters, metav1.SchemeGroupVersion, convertedLogOptions)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@ -106,7 +106,7 @@ func TestPodLogOptions(t *testing.T) {
|
||||
// query params -> unversioned
|
||||
{
|
||||
convertedLogOptions := &api.PodLogOptions{}
|
||||
err := codec.DecodeParameters(expectedParameters, versioned.SchemeGroupVersion, convertedLogOptions)
|
||||
err := codec.DecodeParameters(expectedParameters, metav1.SchemeGroupVersion, convertedLogOptions)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@ -126,7 +126,7 @@ func TestPodSpecConversion(t *testing.T) {
|
||||
i := &api.PodSpec{
|
||||
ServiceAccountName: name,
|
||||
}
|
||||
v := versioned.PodSpec{}
|
||||
v := metav1.PodSpec{}
|
||||
if err := api.Scheme.Convert(i, &v, nil); err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
@ -140,7 +140,7 @@ func TestPodSpecConversion(t *testing.T) {
|
||||
// Test v1 -> internal. Either DeprecatedServiceAccount, ServiceAccountName,
|
||||
// or both should translate to ServiceAccountName. ServiceAccountName wins
|
||||
// if both are set.
|
||||
testCases := []*versioned.PodSpec{
|
||||
testCases := []*metav1.PodSpec{
|
||||
// New
|
||||
{ServiceAccountName: name},
|
||||
// Alias
|
||||
@ -167,14 +167,14 @@ func TestResourceListConversion(t *testing.T) {
|
||||
bigMilliQuantity.Add(resource.MustParse("12345m"))
|
||||
|
||||
tests := []struct {
|
||||
input versioned.ResourceList
|
||||
input metav1.ResourceList
|
||||
expected api.ResourceList
|
||||
}{
|
||||
{ // No changes necessary.
|
||||
input: versioned.ResourceList{
|
||||
versioned.ResourceMemory: resource.MustParse("30M"),
|
||||
versioned.ResourceCPU: resource.MustParse("100m"),
|
||||
versioned.ResourceStorage: resource.MustParse("1G"),
|
||||
input: metav1.ResourceList{
|
||||
metav1.ResourceMemory: resource.MustParse("30M"),
|
||||
metav1.ResourceCPU: resource.MustParse("100m"),
|
||||
metav1.ResourceStorage: resource.MustParse("1G"),
|
||||
},
|
||||
expected: api.ResourceList{
|
||||
api.ResourceMemory: resource.MustParse("30M"),
|
||||
@ -183,9 +183,9 @@ func TestResourceListConversion(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{ // Nano-scale values should be rounded up to milli-scale.
|
||||
input: versioned.ResourceList{
|
||||
versioned.ResourceCPU: resource.MustParse("3.000023m"),
|
||||
versioned.ResourceMemory: resource.MustParse("500.000050m"),
|
||||
input: metav1.ResourceList{
|
||||
metav1.ResourceCPU: resource.MustParse("3.000023m"),
|
||||
metav1.ResourceMemory: resource.MustParse("500.000050m"),
|
||||
},
|
||||
expected: api.ResourceList{
|
||||
api.ResourceCPU: resource.MustParse("4m"),
|
||||
@ -193,9 +193,9 @@ func TestResourceListConversion(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{ // Large values should still be accurate.
|
||||
input: versioned.ResourceList{
|
||||
versioned.ResourceCPU: *bigMilliQuantity.Copy(),
|
||||
versioned.ResourceStorage: *bigMilliQuantity.Copy(),
|
||||
input: metav1.ResourceList{
|
||||
metav1.ResourceCPU: *bigMilliQuantity.Copy(),
|
||||
metav1.ResourceStorage: *bigMilliQuantity.Copy(),
|
||||
},
|
||||
expected: api.ResourceList{
|
||||
api.ResourceCPU: *bigMilliQuantity.Copy(),
|
||||
|
@ -29,7 +29,7 @@ import (
|
||||
)
|
||||
|
||||
func roundTrip(t *testing.T, obj runtime.Object) runtime.Object {
|
||||
codec := api.Codecs.LegacyCodec(versioned.SchemeGroupVersion)
|
||||
codec := api.Codecs.LegacyCodec(metav1.SchemeGroupVersion)
|
||||
data, err := runtime.Encode(codec, obj)
|
||||
if err != nil {
|
||||
t.Errorf("%v\n %#v", err, obj)
|
||||
@ -51,15 +51,15 @@ func roundTrip(t *testing.T, obj runtime.Object) runtime.Object {
|
||||
|
||||
func TestSetDefaultReplicationController(t *testing.T) {
|
||||
tests := []struct {
|
||||
rc *versioned.ReplicationController
|
||||
rc *metav1.ReplicationController
|
||||
expectLabels bool
|
||||
expectSelector bool
|
||||
}{
|
||||
{
|
||||
rc: &versioned.ReplicationController{
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
rc: &metav1.ReplicationController{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"foo": "bar",
|
||||
},
|
||||
@ -71,15 +71,15 @@ func TestSetDefaultReplicationController(t *testing.T) {
|
||||
expectSelector: true,
|
||||
},
|
||||
{
|
||||
rc: &versioned.ReplicationController{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
rc: &metav1.ReplicationController{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"bar": "foo",
|
||||
},
|
||||
},
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"foo": "bar",
|
||||
},
|
||||
@ -91,18 +91,18 @@ func TestSetDefaultReplicationController(t *testing.T) {
|
||||
expectSelector: true,
|
||||
},
|
||||
{
|
||||
rc: &versioned.ReplicationController{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
rc: &metav1.ReplicationController{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"bar": "foo",
|
||||
},
|
||||
},
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Selector: map[string]string{
|
||||
"some": "other",
|
||||
},
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"foo": "bar",
|
||||
},
|
||||
@ -114,13 +114,13 @@ func TestSetDefaultReplicationController(t *testing.T) {
|
||||
expectSelector: false,
|
||||
},
|
||||
{
|
||||
rc: &versioned.ReplicationController{
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
rc: &metav1.ReplicationController{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Selector: map[string]string{
|
||||
"some": "other",
|
||||
},
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"foo": "bar",
|
||||
},
|
||||
@ -136,7 +136,7 @@ func TestSetDefaultReplicationController(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
rc := test.rc
|
||||
obj2 := roundTrip(t, runtime.Object(rc))
|
||||
rc2, ok := obj2.(*versioned.ReplicationController)
|
||||
rc2, ok := obj2.(*metav1.ReplicationController)
|
||||
if !ok {
|
||||
t.Errorf("unexpected object: %v", rc2)
|
||||
t.FailNow()
|
||||
@ -166,14 +166,14 @@ func newInt(val int32) *int32 {
|
||||
|
||||
func TestSetDefaultReplicationControllerReplicas(t *testing.T) {
|
||||
tests := []struct {
|
||||
rc versioned.ReplicationController
|
||||
rc metav1.ReplicationController
|
||||
expectReplicas int32
|
||||
}{
|
||||
{
|
||||
rc: versioned.ReplicationController{
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
rc: metav1.ReplicationController{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"foo": "bar",
|
||||
},
|
||||
@ -184,11 +184,11 @@ func TestSetDefaultReplicationControllerReplicas(t *testing.T) {
|
||||
expectReplicas: 1,
|
||||
},
|
||||
{
|
||||
rc: versioned.ReplicationController{
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
rc: metav1.ReplicationController{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Replicas: newInt(0),
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"foo": "bar",
|
||||
},
|
||||
@ -199,11 +199,11 @@ func TestSetDefaultReplicationControllerReplicas(t *testing.T) {
|
||||
expectReplicas: 0,
|
||||
},
|
||||
{
|
||||
rc: versioned.ReplicationController{
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
rc: metav1.ReplicationController{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Replicas: newInt(3),
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"foo": "bar",
|
||||
},
|
||||
@ -218,7 +218,7 @@ func TestSetDefaultReplicationControllerReplicas(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
rc := &test.rc
|
||||
obj2 := roundTrip(t, runtime.Object(rc))
|
||||
rc2, ok := obj2.(*versioned.ReplicationController)
|
||||
rc2, ok := obj2.(*metav1.ReplicationController)
|
||||
if !ok {
|
||||
t.Errorf("unexpected object: %v", rc2)
|
||||
t.FailNow()
|
||||
@ -247,14 +247,14 @@ func TestSetDefaultReplicationControllerImagePullPolicy(t *testing.T) {
|
||||
})
|
||||
|
||||
tests := []struct {
|
||||
rc versioned.ReplicationController
|
||||
expectPullPolicy versioned.PullPolicy
|
||||
rc metav1.ReplicationController
|
||||
expectPullPolicy metav1.PullPolicy
|
||||
}{
|
||||
{
|
||||
rc: versioned.ReplicationController{
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
rc: metav1.ReplicationController{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Annotations: map[string]string{
|
||||
"pod.beta.kubernetes.io/init-containers": string(containersWithoutPullPolicy),
|
||||
},
|
||||
@ -262,13 +262,13 @@ func TestSetDefaultReplicationControllerImagePullPolicy(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
expectPullPolicy: versioned.PullAlways,
|
||||
expectPullPolicy: metav1.PullAlways,
|
||||
},
|
||||
{
|
||||
rc: versioned.ReplicationController{
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
rc: metav1.ReplicationController{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Annotations: map[string]string{
|
||||
"pod.beta.kubernetes.io/init-containers": string(containersWithPullPolicy),
|
||||
},
|
||||
@ -276,14 +276,14 @@ func TestSetDefaultReplicationControllerImagePullPolicy(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
expectPullPolicy: versioned.PullIfNotPresent,
|
||||
expectPullPolicy: metav1.PullIfNotPresent,
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
rc := &test.rc
|
||||
obj2 := roundTrip(t, runtime.Object(rc))
|
||||
rc2, ok := obj2.(*versioned.ReplicationController)
|
||||
rc2, ok := obj2.(*metav1.ReplicationController)
|
||||
if !ok {
|
||||
t.Errorf("unexpected object: %v", rc2)
|
||||
t.FailNow()
|
||||
@ -298,33 +298,33 @@ func TestSetDefaultReplicationControllerImagePullPolicy(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSetDefaultService(t *testing.T) {
|
||||
svc := &versioned.Service{}
|
||||
svc := &metav1.Service{}
|
||||
obj2 := roundTrip(t, runtime.Object(svc))
|
||||
svc2 := obj2.(*versioned.Service)
|
||||
if svc2.Spec.SessionAffinity != versioned.ServiceAffinityNone {
|
||||
t.Errorf("Expected default session affinity type:%s, got: %s", versioned.ServiceAffinityNone, svc2.Spec.SessionAffinity)
|
||||
svc2 := obj2.(*metav1.Service)
|
||||
if svc2.Spec.SessionAffinity != metav1.ServiceAffinityNone {
|
||||
t.Errorf("Expected default session affinity type:%s, got: %s", metav1.ServiceAffinityNone, svc2.Spec.SessionAffinity)
|
||||
}
|
||||
if svc2.Spec.Type != versioned.ServiceTypeClusterIP {
|
||||
t.Errorf("Expected default type:%s, got: %s", versioned.ServiceTypeClusterIP, svc2.Spec.Type)
|
||||
if svc2.Spec.Type != metav1.ServiceTypeClusterIP {
|
||||
t.Errorf("Expected default type:%s, got: %s", metav1.ServiceTypeClusterIP, svc2.Spec.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaultSecretVolumeSource(t *testing.T) {
|
||||
s := versioned.PodSpec{}
|
||||
s.Volumes = []versioned.Volume{
|
||||
s := metav1.PodSpec{}
|
||||
s.Volumes = []metav1.Volume{
|
||||
{
|
||||
VolumeSource: versioned.VolumeSource{
|
||||
Secret: &versioned.SecretVolumeSource{},
|
||||
VolumeSource: metav1.VolumeSource{
|
||||
Secret: &metav1.SecretVolumeSource{},
|
||||
},
|
||||
},
|
||||
}
|
||||
pod := &versioned.Pod{
|
||||
pod := &metav1.Pod{
|
||||
Spec: s,
|
||||
}
|
||||
output := roundTrip(t, runtime.Object(pod))
|
||||
pod2 := output.(*versioned.Pod)
|
||||
pod2 := output.(*metav1.Pod)
|
||||
defaultMode := pod2.Spec.Volumes[0].VolumeSource.Secret.DefaultMode
|
||||
expectedMode := versioned.SecretVolumeSourceDefaultMode
|
||||
expectedMode := metav1.SecretVolumeSourceDefaultMode
|
||||
|
||||
if defaultMode == nil || *defaultMode != expectedMode {
|
||||
t.Errorf("Expected secret DefaultMode %v, got %v", expectedMode, defaultMode)
|
||||
@ -332,21 +332,21 @@ func TestSetDefaultSecretVolumeSource(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSetDefaultConfigMapVolumeSource(t *testing.T) {
|
||||
s := versioned.PodSpec{}
|
||||
s.Volumes = []versioned.Volume{
|
||||
s := metav1.PodSpec{}
|
||||
s.Volumes = []metav1.Volume{
|
||||
{
|
||||
VolumeSource: versioned.VolumeSource{
|
||||
ConfigMap: &versioned.ConfigMapVolumeSource{},
|
||||
VolumeSource: metav1.VolumeSource{
|
||||
ConfigMap: &metav1.ConfigMapVolumeSource{},
|
||||
},
|
||||
},
|
||||
}
|
||||
pod := &versioned.Pod{
|
||||
pod := &metav1.Pod{
|
||||
Spec: s,
|
||||
}
|
||||
output := roundTrip(t, runtime.Object(pod))
|
||||
pod2 := output.(*versioned.Pod)
|
||||
pod2 := output.(*metav1.Pod)
|
||||
defaultMode := pod2.Spec.Volumes[0].VolumeSource.ConfigMap.DefaultMode
|
||||
expectedMode := versioned.ConfigMapVolumeSourceDefaultMode
|
||||
expectedMode := metav1.ConfigMapVolumeSourceDefaultMode
|
||||
|
||||
if defaultMode == nil || *defaultMode != expectedMode {
|
||||
t.Errorf("Expected ConfigMap DefaultMode %v, got %v", expectedMode, defaultMode)
|
||||
@ -354,21 +354,21 @@ func TestSetDefaultConfigMapVolumeSource(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSetDefaultDownwardAPIVolumeSource(t *testing.T) {
|
||||
s := versioned.PodSpec{}
|
||||
s.Volumes = []versioned.Volume{
|
||||
s := metav1.PodSpec{}
|
||||
s.Volumes = []metav1.Volume{
|
||||
{
|
||||
VolumeSource: versioned.VolumeSource{
|
||||
DownwardAPI: &versioned.DownwardAPIVolumeSource{},
|
||||
VolumeSource: metav1.VolumeSource{
|
||||
DownwardAPI: &metav1.DownwardAPIVolumeSource{},
|
||||
},
|
||||
},
|
||||
}
|
||||
pod := &versioned.Pod{
|
||||
pod := &metav1.Pod{
|
||||
Spec: s,
|
||||
}
|
||||
output := roundTrip(t, runtime.Object(pod))
|
||||
pod2 := output.(*versioned.Pod)
|
||||
pod2 := output.(*metav1.Pod)
|
||||
defaultMode := pod2.Spec.Volumes[0].VolumeSource.DownwardAPI.DefaultMode
|
||||
expectedMode := versioned.DownwardAPIVolumeSourceDefaultMode
|
||||
expectedMode := metav1.DownwardAPIVolumeSourceDefaultMode
|
||||
|
||||
if defaultMode == nil || *defaultMode != expectedMode {
|
||||
t.Errorf("Expected DownwardAPI DefaultMode %v, got %v", expectedMode, defaultMode)
|
||||
@ -376,50 +376,50 @@ func TestSetDefaultDownwardAPIVolumeSource(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSetDefaultSecret(t *testing.T) {
|
||||
s := &versioned.Secret{}
|
||||
s := &metav1.Secret{}
|
||||
obj2 := roundTrip(t, runtime.Object(s))
|
||||
s2 := obj2.(*versioned.Secret)
|
||||
s2 := obj2.(*metav1.Secret)
|
||||
|
||||
if s2.Type != versioned.SecretTypeOpaque {
|
||||
t.Errorf("Expected secret type %v, got %v", versioned.SecretTypeOpaque, s2.Type)
|
||||
if s2.Type != metav1.SecretTypeOpaque {
|
||||
t.Errorf("Expected secret type %v, got %v", metav1.SecretTypeOpaque, s2.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaultPersistentVolume(t *testing.T) {
|
||||
pv := &versioned.PersistentVolume{}
|
||||
pv := &metav1.PersistentVolume{}
|
||||
obj2 := roundTrip(t, runtime.Object(pv))
|
||||
pv2 := obj2.(*versioned.PersistentVolume)
|
||||
pv2 := obj2.(*metav1.PersistentVolume)
|
||||
|
||||
if pv2.Status.Phase != versioned.VolumePending {
|
||||
t.Errorf("Expected volume phase %v, got %v", versioned.VolumePending, pv2.Status.Phase)
|
||||
if pv2.Status.Phase != metav1.VolumePending {
|
||||
t.Errorf("Expected volume phase %v, got %v", metav1.VolumePending, pv2.Status.Phase)
|
||||
}
|
||||
if pv2.Spec.PersistentVolumeReclaimPolicy != versioned.PersistentVolumeReclaimRetain {
|
||||
t.Errorf("Expected pv reclaim policy %v, got %v", versioned.PersistentVolumeReclaimRetain, pv2.Spec.PersistentVolumeReclaimPolicy)
|
||||
if pv2.Spec.PersistentVolumeReclaimPolicy != metav1.PersistentVolumeReclaimRetain {
|
||||
t.Errorf("Expected pv reclaim policy %v, got %v", metav1.PersistentVolumeReclaimRetain, pv2.Spec.PersistentVolumeReclaimPolicy)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaultPersistentVolumeClaim(t *testing.T) {
|
||||
pvc := &versioned.PersistentVolumeClaim{}
|
||||
pvc := &metav1.PersistentVolumeClaim{}
|
||||
obj2 := roundTrip(t, runtime.Object(pvc))
|
||||
pvc2 := obj2.(*versioned.PersistentVolumeClaim)
|
||||
pvc2 := obj2.(*metav1.PersistentVolumeClaim)
|
||||
|
||||
if pvc2.Status.Phase != versioned.ClaimPending {
|
||||
t.Errorf("Expected claim phase %v, got %v", versioned.ClaimPending, pvc2.Status.Phase)
|
||||
if pvc2.Status.Phase != metav1.ClaimPending {
|
||||
t.Errorf("Expected claim phase %v, got %v", metav1.ClaimPending, pvc2.Status.Phase)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaulEndpointsProtocol(t *testing.T) {
|
||||
in := &versioned.Endpoints{Subsets: []versioned.EndpointSubset{
|
||||
{Ports: []versioned.EndpointPort{{}, {Protocol: "UDP"}, {}}},
|
||||
in := &metav1.Endpoints{Subsets: []metav1.EndpointSubset{
|
||||
{Ports: []metav1.EndpointPort{{}, {Protocol: "UDP"}, {}}},
|
||||
}}
|
||||
obj := roundTrip(t, runtime.Object(in))
|
||||
out := obj.(*versioned.Endpoints)
|
||||
out := obj.(*metav1.Endpoints)
|
||||
|
||||
for i := range out.Subsets {
|
||||
for j := range out.Subsets[i].Ports {
|
||||
if in.Subsets[i].Ports[j].Protocol == "" {
|
||||
if out.Subsets[i].Ports[j].Protocol != versioned.ProtocolTCP {
|
||||
t.Errorf("Expected protocol %s, got %s", versioned.ProtocolTCP, out.Subsets[i].Ports[j].Protocol)
|
||||
if out.Subsets[i].Ports[j].Protocol != metav1.ProtocolTCP {
|
||||
t.Errorf("Expected protocol %s, got %s", metav1.ProtocolTCP, out.Subsets[i].Ports[j].Protocol)
|
||||
}
|
||||
} else {
|
||||
if out.Subsets[i].Ports[j].Protocol != in.Subsets[i].Ports[j].Protocol {
|
||||
@ -431,16 +431,16 @@ func TestSetDefaulEndpointsProtocol(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSetDefaulServiceTargetPort(t *testing.T) {
|
||||
in := &versioned.Service{Spec: versioned.ServiceSpec{Ports: []versioned.ServicePort{{Port: 1234}}}}
|
||||
in := &metav1.Service{Spec: metav1.ServiceSpec{Ports: []metav1.ServicePort{{Port: 1234}}}}
|
||||
obj := roundTrip(t, runtime.Object(in))
|
||||
out := obj.(*versioned.Service)
|
||||
out := obj.(*metav1.Service)
|
||||
if out.Spec.Ports[0].TargetPort != intstr.FromInt(1234) {
|
||||
t.Errorf("Expected TargetPort to be defaulted, got %v", out.Spec.Ports[0].TargetPort)
|
||||
}
|
||||
|
||||
in = &versioned.Service{Spec: versioned.ServiceSpec{Ports: []versioned.ServicePort{{Port: 1234, TargetPort: intstr.FromInt(5678)}}}}
|
||||
in = &metav1.Service{Spec: metav1.ServiceSpec{Ports: []metav1.ServicePort{{Port: 1234, TargetPort: intstr.FromInt(5678)}}}}
|
||||
obj = roundTrip(t, runtime.Object(in))
|
||||
out = obj.(*versioned.Service)
|
||||
out = obj.(*metav1.Service)
|
||||
if out.Spec.Ports[0].TargetPort != intstr.FromInt(5678) {
|
||||
t.Errorf("Expected TargetPort to be unchanged, got %v", out.Spec.Ports[0].TargetPort)
|
||||
}
|
||||
@ -448,42 +448,42 @@ func TestSetDefaulServiceTargetPort(t *testing.T) {
|
||||
|
||||
func TestSetDefaultServicePort(t *testing.T) {
|
||||
// Unchanged if set.
|
||||
in := &versioned.Service{Spec: versioned.ServiceSpec{
|
||||
Ports: []versioned.ServicePort{
|
||||
in := &metav1.Service{Spec: metav1.ServiceSpec{
|
||||
Ports: []metav1.ServicePort{
|
||||
{Protocol: "UDP", Port: 9376, TargetPort: intstr.FromString("p")},
|
||||
{Protocol: "UDP", Port: 8675, TargetPort: intstr.FromInt(309)},
|
||||
},
|
||||
}}
|
||||
out := roundTrip(t, runtime.Object(in)).(*versioned.Service)
|
||||
if out.Spec.Ports[0].Protocol != versioned.ProtocolUDP {
|
||||
t.Errorf("Expected protocol %s, got %s", versioned.ProtocolUDP, out.Spec.Ports[0].Protocol)
|
||||
out := roundTrip(t, runtime.Object(in)).(*metav1.Service)
|
||||
if out.Spec.Ports[0].Protocol != metav1.ProtocolUDP {
|
||||
t.Errorf("Expected protocol %s, got %s", metav1.ProtocolUDP, out.Spec.Ports[0].Protocol)
|
||||
}
|
||||
if out.Spec.Ports[0].TargetPort != intstr.FromString("p") {
|
||||
t.Errorf("Expected port %v, got %v", in.Spec.Ports[0].Port, out.Spec.Ports[0].TargetPort)
|
||||
}
|
||||
if out.Spec.Ports[1].Protocol != versioned.ProtocolUDP {
|
||||
t.Errorf("Expected protocol %s, got %s", versioned.ProtocolUDP, out.Spec.Ports[1].Protocol)
|
||||
if out.Spec.Ports[1].Protocol != metav1.ProtocolUDP {
|
||||
t.Errorf("Expected protocol %s, got %s", metav1.ProtocolUDP, out.Spec.Ports[1].Protocol)
|
||||
}
|
||||
if out.Spec.Ports[1].TargetPort != intstr.FromInt(309) {
|
||||
t.Errorf("Expected port %v, got %v", in.Spec.Ports[1].Port, out.Spec.Ports[1].TargetPort)
|
||||
}
|
||||
|
||||
// Defaulted.
|
||||
in = &versioned.Service{Spec: versioned.ServiceSpec{
|
||||
Ports: []versioned.ServicePort{
|
||||
in = &metav1.Service{Spec: metav1.ServiceSpec{
|
||||
Ports: []metav1.ServicePort{
|
||||
{Protocol: "", Port: 9376, TargetPort: intstr.FromString("")},
|
||||
{Protocol: "", Port: 8675, TargetPort: intstr.FromInt(0)},
|
||||
},
|
||||
}}
|
||||
out = roundTrip(t, runtime.Object(in)).(*versioned.Service)
|
||||
if out.Spec.Ports[0].Protocol != versioned.ProtocolTCP {
|
||||
t.Errorf("Expected protocol %s, got %s", versioned.ProtocolTCP, out.Spec.Ports[0].Protocol)
|
||||
out = roundTrip(t, runtime.Object(in)).(*metav1.Service)
|
||||
if out.Spec.Ports[0].Protocol != metav1.ProtocolTCP {
|
||||
t.Errorf("Expected protocol %s, got %s", metav1.ProtocolTCP, out.Spec.Ports[0].Protocol)
|
||||
}
|
||||
if out.Spec.Ports[0].TargetPort != intstr.FromInt(int(in.Spec.Ports[0].Port)) {
|
||||
t.Errorf("Expected port %v, got %v", in.Spec.Ports[0].Port, out.Spec.Ports[0].TargetPort)
|
||||
}
|
||||
if out.Spec.Ports[1].Protocol != versioned.ProtocolTCP {
|
||||
t.Errorf("Expected protocol %s, got %s", versioned.ProtocolTCP, out.Spec.Ports[1].Protocol)
|
||||
if out.Spec.Ports[1].Protocol != metav1.ProtocolTCP {
|
||||
t.Errorf("Expected protocol %s, got %s", metav1.ProtocolTCP, out.Spec.Ports[1].Protocol)
|
||||
}
|
||||
if out.Spec.Ports[1].TargetPort != intstr.FromInt(int(in.Spec.Ports[1].Port)) {
|
||||
t.Errorf("Expected port %v, got %v", in.Spec.Ports[1].Port, out.Spec.Ports[1].TargetPort)
|
||||
@ -491,33 +491,33 @@ func TestSetDefaultServicePort(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSetDefaultNamespace(t *testing.T) {
|
||||
s := &versioned.Namespace{}
|
||||
s := &metav1.Namespace{}
|
||||
obj2 := roundTrip(t, runtime.Object(s))
|
||||
s2 := obj2.(*versioned.Namespace)
|
||||
s2 := obj2.(*metav1.Namespace)
|
||||
|
||||
if s2.Status.Phase != versioned.NamespaceActive {
|
||||
t.Errorf("Expected phase %v, got %v", versioned.NamespaceActive, s2.Status.Phase)
|
||||
if s2.Status.Phase != metav1.NamespaceActive {
|
||||
t.Errorf("Expected phase %v, got %v", metav1.NamespaceActive, s2.Status.Phase)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaultPodSpecHostNetwork(t *testing.T) {
|
||||
portNum := int32(8080)
|
||||
s := versioned.PodSpec{}
|
||||
s := metav1.PodSpec{}
|
||||
s.HostNetwork = true
|
||||
s.Containers = []versioned.Container{
|
||||
s.Containers = []metav1.Container{
|
||||
{
|
||||
Ports: []versioned.ContainerPort{
|
||||
Ports: []metav1.ContainerPort{
|
||||
{
|
||||
ContainerPort: portNum,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
pod := &versioned.Pod{
|
||||
pod := &metav1.Pod{
|
||||
Spec: s,
|
||||
}
|
||||
obj2 := roundTrip(t, runtime.Object(pod))
|
||||
pod2 := obj2.(*versioned.Pod)
|
||||
pod2 := obj2.(*metav1.Pod)
|
||||
s2 := pod2.Spec
|
||||
|
||||
hostPortNum := s2.Containers[0].Ports[0].HostPort
|
||||
@ -528,10 +528,10 @@ func TestSetDefaultPodSpecHostNetwork(t *testing.T) {
|
||||
|
||||
func TestSetDefaultNodeExternalID(t *testing.T) {
|
||||
name := "node0"
|
||||
n := &versioned.Node{}
|
||||
n := &metav1.Node{}
|
||||
n.Name = name
|
||||
obj2 := roundTrip(t, runtime.Object(n))
|
||||
n2 := obj2.(*versioned.Node)
|
||||
n2 := obj2.(*metav1.Node)
|
||||
if n2.Spec.ExternalID != name {
|
||||
t.Errorf("Expected default External ID: %s, got: %s", name, n2.Spec.ExternalID)
|
||||
}
|
||||
@ -541,18 +541,18 @@ func TestSetDefaultNodeExternalID(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSetDefaultNodeStatusAllocatable(t *testing.T) {
|
||||
capacity := versioned.ResourceList{
|
||||
versioned.ResourceCPU: resource.MustParse("1000m"),
|
||||
versioned.ResourceMemory: resource.MustParse("10G"),
|
||||
capacity := metav1.ResourceList{
|
||||
metav1.ResourceCPU: resource.MustParse("1000m"),
|
||||
metav1.ResourceMemory: resource.MustParse("10G"),
|
||||
}
|
||||
allocatable := versioned.ResourceList{
|
||||
versioned.ResourceCPU: resource.MustParse("500m"),
|
||||
versioned.ResourceMemory: resource.MustParse("5G"),
|
||||
allocatable := metav1.ResourceList{
|
||||
metav1.ResourceCPU: resource.MustParse("500m"),
|
||||
metav1.ResourceMemory: resource.MustParse("5G"),
|
||||
}
|
||||
tests := []struct {
|
||||
capacity versioned.ResourceList
|
||||
allocatable versioned.ResourceList
|
||||
expectedAllocatable versioned.ResourceList
|
||||
capacity metav1.ResourceList
|
||||
allocatable metav1.ResourceList
|
||||
expectedAllocatable metav1.ResourceList
|
||||
}{{ // Everything set, no defaulting.
|
||||
capacity: capacity,
|
||||
allocatable: allocatable,
|
||||
@ -571,18 +571,18 @@ func TestSetDefaultNodeStatusAllocatable(t *testing.T) {
|
||||
expectedAllocatable: nil,
|
||||
}}
|
||||
|
||||
copyResourceList := func(rl versioned.ResourceList) versioned.ResourceList {
|
||||
copyResourceList := func(rl metav1.ResourceList) metav1.ResourceList {
|
||||
if rl == nil {
|
||||
return nil
|
||||
}
|
||||
copy := make(versioned.ResourceList, len(rl))
|
||||
copy := make(metav1.ResourceList, len(rl))
|
||||
for k, v := range rl {
|
||||
copy[k] = *v.Copy()
|
||||
}
|
||||
return copy
|
||||
}
|
||||
|
||||
resourceListsEqual := func(a versioned.ResourceList, b versioned.ResourceList) bool {
|
||||
resourceListsEqual := func(a metav1.ResourceList, b metav1.ResourceList) bool {
|
||||
if len(a) != len(b) {
|
||||
return false
|
||||
}
|
||||
@ -599,13 +599,13 @@ func TestSetDefaultNodeStatusAllocatable(t *testing.T) {
|
||||
}
|
||||
|
||||
for i, testcase := range tests {
|
||||
node := versioned.Node{
|
||||
Status: versioned.NodeStatus{
|
||||
node := metav1.Node{
|
||||
Status: metav1.NodeStatus{
|
||||
Capacity: copyResourceList(testcase.capacity),
|
||||
Allocatable: copyResourceList(testcase.allocatable),
|
||||
},
|
||||
}
|
||||
node2 := roundTrip(t, runtime.Object(&node)).(*versioned.Node)
|
||||
node2 := roundTrip(t, runtime.Object(&node)).(*metav1.Node)
|
||||
actual := node2.Status.Allocatable
|
||||
expected := testcase.expectedAllocatable
|
||||
if !resourceListsEqual(expected, actual) {
|
||||
@ -615,24 +615,24 @@ func TestSetDefaultNodeStatusAllocatable(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSetDefaultObjectFieldSelectorAPIVersion(t *testing.T) {
|
||||
s := versioned.PodSpec{
|
||||
Containers: []versioned.Container{
|
||||
s := metav1.PodSpec{
|
||||
Containers: []metav1.Container{
|
||||
{
|
||||
Env: []versioned.EnvVar{
|
||||
Env: []metav1.EnvVar{
|
||||
{
|
||||
ValueFrom: &versioned.EnvVarSource{
|
||||
FieldRef: &versioned.ObjectFieldSelector{},
|
||||
ValueFrom: &metav1.EnvVarSource{
|
||||
FieldRef: &metav1.ObjectFieldSelector{},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
pod := &versioned.Pod{
|
||||
pod := &metav1.Pod{
|
||||
Spec: s,
|
||||
}
|
||||
obj2 := roundTrip(t, runtime.Object(pod))
|
||||
pod2 := obj2.(*versioned.Pod)
|
||||
pod2 := obj2.(*metav1.Pod)
|
||||
s2 := pod2.Spec
|
||||
|
||||
apiVersion := s2.Containers[0].Env[0].ValueFrom.FieldRef.APIVersion
|
||||
@ -643,88 +643,88 @@ func TestSetDefaultObjectFieldSelectorAPIVersion(t *testing.T) {
|
||||
|
||||
func TestSetMinimumScalePod(t *testing.T) {
|
||||
// verify we default if limits are specified (and that request=0 is preserved)
|
||||
s := versioned.PodSpec{}
|
||||
s.Containers = []versioned.Container{
|
||||
s := metav1.PodSpec{}
|
||||
s.Containers = []metav1.Container{
|
||||
{
|
||||
Resources: versioned.ResourceRequirements{
|
||||
Requests: versioned.ResourceList{
|
||||
versioned.ResourceMemory: resource.MustParse("1n"),
|
||||
Resources: metav1.ResourceRequirements{
|
||||
Requests: metav1.ResourceList{
|
||||
metav1.ResourceMemory: resource.MustParse("1n"),
|
||||
},
|
||||
Limits: versioned.ResourceList{
|
||||
versioned.ResourceCPU: resource.MustParse("2n"),
|
||||
Limits: metav1.ResourceList{
|
||||
metav1.ResourceCPU: resource.MustParse("2n"),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
pod := &versioned.Pod{
|
||||
pod := &metav1.Pod{
|
||||
Spec: s,
|
||||
}
|
||||
versioned.SetObjectDefaults_Pod(pod)
|
||||
metav1.SetObjectDefaults_Pod(pod)
|
||||
|
||||
if expect := resource.MustParse("1m"); expect.Cmp(pod.Spec.Containers[0].Resources.Requests[versioned.ResourceMemory]) != 0 {
|
||||
if expect := resource.MustParse("1m"); expect.Cmp(pod.Spec.Containers[0].Resources.Requests[metav1.ResourceMemory]) != 0 {
|
||||
t.Errorf("did not round resources: %#v", pod.Spec.Containers[0].Resources)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaultRequestsPod(t *testing.T) {
|
||||
// verify we default if limits are specified (and that request=0 is preserved)
|
||||
s := versioned.PodSpec{}
|
||||
s.Containers = []versioned.Container{
|
||||
s := metav1.PodSpec{}
|
||||
s.Containers = []metav1.Container{
|
||||
{
|
||||
Resources: versioned.ResourceRequirements{
|
||||
Requests: versioned.ResourceList{
|
||||
versioned.ResourceMemory: resource.MustParse("0"),
|
||||
Resources: metav1.ResourceRequirements{
|
||||
Requests: metav1.ResourceList{
|
||||
metav1.ResourceMemory: resource.MustParse("0"),
|
||||
},
|
||||
Limits: versioned.ResourceList{
|
||||
versioned.ResourceCPU: resource.MustParse("100m"),
|
||||
versioned.ResourceMemory: resource.MustParse("1Gi"),
|
||||
Limits: metav1.ResourceList{
|
||||
metav1.ResourceCPU: resource.MustParse("100m"),
|
||||
metav1.ResourceMemory: resource.MustParse("1Gi"),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
pod := &versioned.Pod{
|
||||
pod := &metav1.Pod{
|
||||
Spec: s,
|
||||
}
|
||||
output := roundTrip(t, runtime.Object(pod))
|
||||
pod2 := output.(*versioned.Pod)
|
||||
pod2 := output.(*metav1.Pod)
|
||||
defaultRequest := pod2.Spec.Containers[0].Resources.Requests
|
||||
if requestValue := defaultRequest[versioned.ResourceCPU]; requestValue.String() != "100m" {
|
||||
if requestValue := defaultRequest[metav1.ResourceCPU]; requestValue.String() != "100m" {
|
||||
t.Errorf("Expected request cpu: %s, got: %s", "100m", requestValue.String())
|
||||
}
|
||||
if requestValue := defaultRequest[versioned.ResourceMemory]; requestValue.String() != "0" {
|
||||
if requestValue := defaultRequest[metav1.ResourceMemory]; requestValue.String() != "0" {
|
||||
t.Errorf("Expected request memory: %s, got: %s", "0", requestValue.String())
|
||||
}
|
||||
|
||||
// verify we do nothing if no limits are specified
|
||||
s = versioned.PodSpec{}
|
||||
s.Containers = []versioned.Container{{}}
|
||||
pod = &versioned.Pod{
|
||||
s = metav1.PodSpec{}
|
||||
s.Containers = []metav1.Container{{}}
|
||||
pod = &metav1.Pod{
|
||||
Spec: s,
|
||||
}
|
||||
output = roundTrip(t, runtime.Object(pod))
|
||||
pod2 = output.(*versioned.Pod)
|
||||
pod2 = output.(*metav1.Pod)
|
||||
defaultRequest = pod2.Spec.Containers[0].Resources.Requests
|
||||
if requestValue := defaultRequest[versioned.ResourceCPU]; requestValue.String() != "0" {
|
||||
if requestValue := defaultRequest[metav1.ResourceCPU]; requestValue.String() != "0" {
|
||||
t.Errorf("Expected 0 request value, got: %s", requestValue.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestDefaultRequestIsNotSetForReplicationController(t *testing.T) {
|
||||
s := versioned.PodSpec{}
|
||||
s.Containers = []versioned.Container{
|
||||
s := metav1.PodSpec{}
|
||||
s.Containers = []metav1.Container{
|
||||
{
|
||||
Resources: versioned.ResourceRequirements{
|
||||
Limits: versioned.ResourceList{
|
||||
versioned.ResourceCPU: resource.MustParse("100m"),
|
||||
Resources: metav1.ResourceRequirements{
|
||||
Limits: metav1.ResourceList{
|
||||
metav1.ResourceCPU: resource.MustParse("100m"),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
rc := &versioned.ReplicationController{
|
||||
Spec: versioned.ReplicationControllerSpec{
|
||||
rc := &metav1.ReplicationController{
|
||||
Spec: metav1.ReplicationControllerSpec{
|
||||
Replicas: newInt(3),
|
||||
Template: &versioned.PodTemplateSpec{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
Template: &metav1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"foo": "bar",
|
||||
},
|
||||
@ -734,59 +734,59 @@ func TestDefaultRequestIsNotSetForReplicationController(t *testing.T) {
|
||||
},
|
||||
}
|
||||
output := roundTrip(t, runtime.Object(rc))
|
||||
rc2 := output.(*versioned.ReplicationController)
|
||||
rc2 := output.(*metav1.ReplicationController)
|
||||
defaultRequest := rc2.Spec.Template.Spec.Containers[0].Resources.Requests
|
||||
requestValue := defaultRequest[versioned.ResourceCPU]
|
||||
requestValue := defaultRequest[metav1.ResourceCPU]
|
||||
if requestValue.String() != "0" {
|
||||
t.Errorf("Expected 0 request value, got: %s", requestValue.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaultLimitRangeItem(t *testing.T) {
|
||||
limitRange := &versioned.LimitRange{
|
||||
ObjectMeta: versioned.ObjectMeta{
|
||||
limitRange := &metav1.LimitRange{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test-defaults",
|
||||
},
|
||||
Spec: versioned.LimitRangeSpec{
|
||||
Limits: []versioned.LimitRangeItem{{
|
||||
Type: versioned.LimitTypeContainer,
|
||||
Max: versioned.ResourceList{
|
||||
versioned.ResourceCPU: resource.MustParse("100m"),
|
||||
Spec: metav1.LimitRangeSpec{
|
||||
Limits: []metav1.LimitRangeItem{{
|
||||
Type: metav1.LimitTypeContainer,
|
||||
Max: metav1.ResourceList{
|
||||
metav1.ResourceCPU: resource.MustParse("100m"),
|
||||
},
|
||||
Min: versioned.ResourceList{
|
||||
versioned.ResourceMemory: resource.MustParse("100Mi"),
|
||||
Min: metav1.ResourceList{
|
||||
metav1.ResourceMemory: resource.MustParse("100Mi"),
|
||||
},
|
||||
Default: versioned.ResourceList{},
|
||||
DefaultRequest: versioned.ResourceList{},
|
||||
Default: metav1.ResourceList{},
|
||||
DefaultRequest: metav1.ResourceList{},
|
||||
}},
|
||||
},
|
||||
}
|
||||
|
||||
output := roundTrip(t, runtime.Object(limitRange))
|
||||
limitRange2 := output.(*versioned.LimitRange)
|
||||
limitRange2 := output.(*metav1.LimitRange)
|
||||
defaultLimit := limitRange2.Spec.Limits[0].Default
|
||||
defaultRequest := limitRange2.Spec.Limits[0].DefaultRequest
|
||||
|
||||
// verify that default cpu was set to the max
|
||||
defaultValue := defaultLimit[versioned.ResourceCPU]
|
||||
defaultValue := defaultLimit[metav1.ResourceCPU]
|
||||
if defaultValue.String() != "100m" {
|
||||
t.Errorf("Expected default cpu: %s, got: %s", "100m", defaultValue.String())
|
||||
}
|
||||
// verify that default request was set to the limit
|
||||
requestValue := defaultRequest[versioned.ResourceCPU]
|
||||
requestValue := defaultRequest[metav1.ResourceCPU]
|
||||
if requestValue.String() != "100m" {
|
||||
t.Errorf("Expected request cpu: %s, got: %s", "100m", requestValue.String())
|
||||
}
|
||||
// verify that if a min is provided, it will be the default if no limit is specified
|
||||
requestMinValue := defaultRequest[versioned.ResourceMemory]
|
||||
requestMinValue := defaultRequest[metav1.ResourceMemory]
|
||||
if requestMinValue.String() != "100Mi" {
|
||||
t.Errorf("Expected request memory: %s, got: %s", "100Mi", requestMinValue.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetDefaultProbe(t *testing.T) {
|
||||
originalProbe := versioned.Probe{}
|
||||
expectedProbe := versioned.Probe{
|
||||
originalProbe := metav1.Probe{}
|
||||
expectedProbe := metav1.Probe{
|
||||
InitialDelaySeconds: 0,
|
||||
TimeoutSeconds: 1,
|
||||
PeriodSeconds: 10,
|
||||
@ -794,13 +794,13 @@ func TestSetDefaultProbe(t *testing.T) {
|
||||
FailureThreshold: 3,
|
||||
}
|
||||
|
||||
pod := &versioned.Pod{
|
||||
Spec: versioned.PodSpec{
|
||||
Containers: []versioned.Container{{LivenessProbe: &originalProbe}},
|
||||
pod := &metav1.Pod{
|
||||
Spec: metav1.PodSpec{
|
||||
Containers: []metav1.Container{{LivenessProbe: &originalProbe}},
|
||||
},
|
||||
}
|
||||
|
||||
output := roundTrip(t, runtime.Object(pod)).(*versioned.Pod)
|
||||
output := roundTrip(t, runtime.Object(pod)).(*metav1.Pod)
|
||||
actualProbe := *output.Spec.Containers[0].LivenessProbe
|
||||
if actualProbe != expectedProbe {
|
||||
t.Errorf("Expected probe: %+v\ngot: %+v\n", expectedProbe, actualProbe)
|
||||
|
@ -20,7 +20,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -95,6 +94,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{})
|
||||
|
||||
// Add the watch version that applies
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ go_library(
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/util/intstr:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
],
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -50,7 +49,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&metav1.ExportOptions{},
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/gogo/protobuf/sortkeys",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -53,7 +52,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&LocalSubjectAccessReview{},
|
||||
)
|
||||
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
],
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -51,6 +50,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&metav1.ExportOptions{},
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ go_library(
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/util/intstr:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
],
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -50,6 +49,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&metav1.ExportOptions{},
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ go_library(
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/util/intstr:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
],
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -55,6 +54,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{})
|
||||
scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{})
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
],
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -57,7 +56,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
)
|
||||
|
||||
// Add the watch version that applies
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@ go_library(
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/util/intstr:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/gogo/protobuf/sortkeys",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -70,6 +69,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&NetworkPolicyList{},
|
||||
)
|
||||
// Add the watch version that applies
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -53,6 +53,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
|
||||
&ImageReview{},
|
||||
)
|
||||
// versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
// metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ go_library(
|
||||
"time_proto.go",
|
||||
"types.go",
|
||||
"types_swagger_doc_generated.go",
|
||||
"watch.go",
|
||||
"well_known_labels.go",
|
||||
"zz_generated.deepcopy.go",
|
||||
"zz_generated.defaults.go",
|
||||
@ -35,6 +36,7 @@ go_library(
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/selection:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//vendor:github.com/go-openapi/spec",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/gogo/protobuf/sortkeys",
|
||||
|
@ -31,6 +31,7 @@ limitations under the License.
|
||||
APIResourceList
|
||||
APIVersions
|
||||
Duration
|
||||
Event
|
||||
ExportOptions
|
||||
GetOptions
|
||||
GroupKind
|
||||
@ -101,95 +102,99 @@ func (m *Duration) Reset() { *m = Duration{} }
|
||||
func (*Duration) ProtoMessage() {}
|
||||
func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
|
||||
|
||||
func (m *Event) Reset() { *m = Event{} }
|
||||
func (*Event) ProtoMessage() {}
|
||||
func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
|
||||
|
||||
func (m *ExportOptions) Reset() { *m = ExportOptions{} }
|
||||
func (*ExportOptions) ProtoMessage() {}
|
||||
func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
|
||||
func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
|
||||
|
||||
func (m *GetOptions) Reset() { *m = GetOptions{} }
|
||||
func (*GetOptions) ProtoMessage() {}
|
||||
func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
|
||||
func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
|
||||
|
||||
func (m *GroupKind) Reset() { *m = GroupKind{} }
|
||||
func (*GroupKind) ProtoMessage() {}
|
||||
func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
|
||||
func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
|
||||
|
||||
func (m *GroupResource) Reset() { *m = GroupResource{} }
|
||||
func (*GroupResource) ProtoMessage() {}
|
||||
func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
|
||||
func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
|
||||
|
||||
func (m *GroupVersion) Reset() { *m = GroupVersion{} }
|
||||
func (*GroupVersion) ProtoMessage() {}
|
||||
func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
|
||||
func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
|
||||
|
||||
func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} }
|
||||
func (*GroupVersionForDiscovery) ProtoMessage() {}
|
||||
func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptorGenerated, []int{11}
|
||||
return fileDescriptorGenerated, []int{12}
|
||||
}
|
||||
|
||||
func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} }
|
||||
func (*GroupVersionKind) ProtoMessage() {}
|
||||
func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
|
||||
func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
|
||||
|
||||
func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} }
|
||||
func (*GroupVersionResource) ProtoMessage() {}
|
||||
func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
|
||||
func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
|
||||
|
||||
func (m *LabelSelector) Reset() { *m = LabelSelector{} }
|
||||
func (*LabelSelector) ProtoMessage() {}
|
||||
func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
|
||||
func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
|
||||
|
||||
func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} }
|
||||
func (*LabelSelectorRequirement) ProtoMessage() {}
|
||||
func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptorGenerated, []int{15}
|
||||
return fileDescriptorGenerated, []int{16}
|
||||
}
|
||||
|
||||
func (m *ListMeta) Reset() { *m = ListMeta{} }
|
||||
func (*ListMeta) ProtoMessage() {}
|
||||
func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
|
||||
func (*ListMeta) 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 init() {
|
||||
proto.RegisterType((*APIGroup)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.APIGroup")
|
||||
@ -198,6 +203,7 @@ func init() {
|
||||
proto.RegisterType((*APIResourceList)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.APIResourceList")
|
||||
proto.RegisterType((*APIVersions)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.APIVersions")
|
||||
proto.RegisterType((*Duration)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.Duration")
|
||||
proto.RegisterType((*Event)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.Event")
|
||||
proto.RegisterType((*ExportOptions)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.ExportOptions")
|
||||
proto.RegisterType((*GetOptions)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.GetOptions")
|
||||
proto.RegisterType((*GroupKind)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.GroupKind")
|
||||
@ -448,6 +454,36 @@ func (m *Duration) MarshalTo(data []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *Event) 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 *Event) MarshalTo(data []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
data[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(data, i, uint64(len(m.Type)))
|
||||
i += copy(data[i:], m.Type)
|
||||
data[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(data, i, uint64(m.Object.Size()))
|
||||
n3, err := m.Object.MarshalTo(data[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n3
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *ExportOptions) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
data = make([]byte, size)
|
||||
@ -903,11 +939,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:])
|
||||
n4, err := m.ListMeta.MarshalTo(data[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n3
|
||||
i += n4
|
||||
data[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(data, i, uint64(len(m.Status)))
|
||||
@ -924,11 +960,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:])
|
||||
n5, err := m.Details.MarshalTo(data[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n4
|
||||
i += n5
|
||||
}
|
||||
data[i] = 0x30
|
||||
i++
|
||||
@ -1209,6 +1245,16 @@ func (m *Duration) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *Event) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Type)
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
l = m.Object.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ExportOptions) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
@ -1524,6 +1570,17 @@ func (this *Duration) String() string {
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *Event) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&Event{`,
|
||||
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
|
||||
`Object:` + strings.Replace(strings.Replace(this.Object.String(), "RawExtension", "k8s_io_kubernetes_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *ExportOptions) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
@ -2408,6 +2465,115 @@ func (m *Duration) Unmarshal(data []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *Event) 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: Event: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Type", 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.Type = string(data[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Object", 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.Object.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
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 *ExportOptions) Unmarshal(data []byte) error {
|
||||
l := len(data)
|
||||
iNdEx := 0
|
||||
@ -5018,102 +5184,105 @@ var (
|
||||
)
|
||||
|
||||
var fileDescriptorGenerated = []byte{
|
||||
// 1543 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 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9, 0xd5, 0x5f, 0x6e, 0xbb, 0xd8, 0x63, 0xcb, 0x6b, 0x2b, 0x88, 0x56, 0x27, 0x44,
|
||||
0x0d, 0xae, 0xa7, 0x49, 0x67, 0x6b, 0x1c, 0x8a, 0x65, 0xc8, 0x7c, 0x66, 0xc7, 0x9a, 0x50, 0xf4,
|
||||
0x92, 0x24, 0x0c, 0x07, 0x26, 0xd5, 0x11, 0xde, 0x76, 0x29, 0xd3, 0xef, 0x42, 0xa1, 0xc5, 0x17,
|
||||
0xb4, 0xaa, 0x89, 0xf4, 0x2e, 0xa7, 0x49, 0x4f, 0x21, 0x58, 0x67, 0x65, 0x36, 0x05, 0xb1, 0xa4,
|
||||
0x48, 0x62, 0x19, 0xbf, 0x6a, 0x50, 0x5e, 0xda, 0x5c, 0x43, 0x98, 0xfa, 0x5d, 0xd2, 0xc4, 0x29,
|
||||
0xc8, 0xb2, 0x08, 0xc0, 0x7f, 0x69, 0x60, 0x37, 0xb1, 0x53, 0xcd, 0xce, 0x69, 0xf3, 0x45, 0x4b,
|
||||
0x97, 0x76, 0x70, 0x27, 0xd2, 0xa0, 0x98, 0x15, 0x47, 0xdd, 0x73, 0x3d, 0x47, 0x9c, 0x73, 0x0c,
|
||||
0xf5, 0x96, 0xeb, 0x39, 0x48, 0x68, 0xf4, 0x0f, 0x20, 0xdf, 0xc3, 0x64, 0x9b, 0xd7, 0x9e, 0x53,
|
||||
0xe1, 0x52, 0x9a, 0xcd, 0xdd, 0xe7, 0x0e, 0x56, 0xe9, 0x60, 0x50, 0xcf, 0x8b, 0x4f, 0x14, 0x42,
|
||||
0x18, 0x3f, 0x69, 0x30, 0x15, 0xdb, 0x93, 0xa8, 0xde, 0x55, 0x98, 0x6c, 0xc5, 0x98, 0x23, 0xf7,
|
||||
0x37, 0x23, 0x33, 0x99, 0x8c, 0xb3, 0x0a, 0x25, 0x2c, 0xf5, 0x26, 0x94, 0x88, 0x44, 0x52, 0xb7,
|
||||
0xa3, 0x91, 0xb2, 0xf4, 0x2a, 0x83, 0x61, 0x9c, 0x98, 0x90, 0xa2, 0x21, 0xae, 0xf1, 0x57, 0x78,
|
||||
0x0c, 0xea, 0xbe, 0xe8, 0xf3, 0xb1, 0x1b, 0xc9, 0x8f, 0xbb, 0x64, 0x4d, 0x8e, 0xb9, 0x4f, 0x27,
|
||||
0x50, 0x39, 0xfb, 0x1f, 0xa0, 0xf2, 0xb5, 0xe2, 0x77, 0x4f, 0xeb, 0x99, 0xc7, 0xbf, 0xcf, 0x65,
|
||||
0x8c, 0x35, 0x28, 0xae, 0x74, 0x89, 0xcd, 0x78, 0x61, 0xaf, 0x43, 0xd1, 0x91, 0xdf, 0xe2, 0x38,
|
||||
0x72, 0xd6, 0xeb, 0xaa, 0x6f, 0x28, 0x9b, 0xc3, 0x41, 0xbd, 0xc2, 0x5b, 0xa3, 0xa9, 0x04, 0x28,
|
||||
0x72, 0x31, 0x1e, 0x42, 0x65, 0xf5, 0x51, 0xe0, 0x13, 0xb6, 0x11, 0x30, 0x51, 0x89, 0x37, 0xa1,
|
||||
0x80, 0x85, 0x40, 0xa0, 0x15, 0x87, 0x94, 0x0f, 0xcd, 0x90, 0xd4, 0xea, 0x17, 0x21, 0x8f, 0x1f,
|
||||
0xd9, 0x4d, 0x26, 0xb9, 0x5b, 0x91, 0x66, 0xf9, 0x55, 0x2e, 0x44, 0xa1, 0xce, 0xd8, 0x00, 0xb8,
|
||||
0x89, 0x23, 0xe8, 0x25, 0x98, 0x52, 0x67, 0x95, 0x24, 0xd0, 0xff, 0xa5, 0xf3, 0x14, 0x4a, 0xaa,
|
||||
0xd1, 0xa8, 0xbd, 0xf1, 0x10, 0x4a, 0x82, 0x64, 0x9c, 0xf3, 0x3c, 0x05, 0xc1, 0x31, 0x89, 0x12,
|
||||
0xa5, 0x20, 0x2c, 0x50, 0xa8, 0x8b, 0x2e, 0x4d, 0x76, 0xdc, 0xa5, 0x89, 0xd5, 0xb5, 0x0d, 0x95,
|
||||
0xd0, 0x57, 0xdd, 0xe3, 0x54, 0x11, 0x2e, 0x43, 0x51, 0xa5, 0x29, 0xa3, 0x44, 0x9d, 0x5b, 0x01,
|
||||
0xa1, 0xc8, 0x22, 0x16, 0x6d, 0x17, 0x12, 0x17, 0x26, 0x5d, 0xb0, 0x4b, 0x70, 0x46, 0x92, 0x56,
|
||||
0xc6, 0x9a, 0x92, 0x66, 0x67, 0x54, 0xcd, 0x94, 0x3e, 0x16, 0xe9, 0x4b, 0xa8, 0x8e, 0x6b, 0xf8,
|
||||
0xaf, 0x70, 0xa5, 0xd3, 0xa7, 0x62, 0x7c, 0xab, 0xc1, 0x74, 0x1c, 0x29, 0xfd, 0xf1, 0xa5, 0x0f,
|
||||
0x72, 0x72, 0x7b, 0x8c, 0x55, 0xe4, 0x07, 0x0d, 0x66, 0x12, 0x5b, 0x3b, 0xd5, 0x89, 0x9f, 0x22,
|
||||
0xa9, 0x38, 0x39, 0x72, 0xa7, 0x20, 0xc7, 0x2f, 0x59, 0xa8, 0xdc, 0xb6, 0xb7, 0x71, 0x7b, 0x0b,
|
||||
0xb7, 0x71, 0x93, 0xf9, 0x44, 0xef, 0x43, 0xb9, 0x63, 0xb3, 0xe6, 0xae, 0x90, 0xaa, 0xe7, 0xcb,
|
||||
0x4a, 0xd3, 0x92, 0x12, 0x38, 0xe6, 0xfa, 0x10, 0x64, 0xd5, 0x63, 0xa4, 0x6f, 0xfd, 0x4f, 0x26,
|
||||
0x54, 0x8e, 0x69, 0x50, 0x3c, 0x96, 0x98, 0x36, 0xc4, 0x7a, 0xf5, 0x51, 0xc0, 0xfb, 0xd2, 0x69,
|
||||
0x47, 0x9c, 0x44, 0x02, 0x08, 0x7f, 0xd6, 0x75, 0x09, 0xee, 0x60, 0x8f, 0x0d, 0xa7, 0x8d, 0xf5,
|
||||
0x11, 0x74, 0x74, 0x24, 0xde, 0xec, 0x7b, 0x30, 0x3d, 0x9a, 0xba, 0x3e, 0x0d, 0xb9, 0x3d, 0xdc,
|
||||
0x0f, 0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 0x84, 0x09, 0x67, 0xe5, 0xa8,
|
||||
0xe8, 0xca, 0x59, 0xe9, 0x79, 0x6d, 0x3c, 0xdb, 0xf3, 0x43, 0xa2, 0xe7, 0x87, 0xb5, 0xb9, 0xc3,
|
||||
0x85, 0x28, 0xd4, 0x5d, 0x9b, 0xe1, 0xef, 0xf5, 0xd7, 0xfb, 0xf5, 0xcc, 0x93, 0xfd, 0x7a, 0xe6,
|
||||
0xe9, 0xbe, 0x7c, 0xbb, 0x3f, 0x86, 0x12, 0x8f, 0x46, 0x99, 0xdd, 0x09, 0xfe, 0xed, 0x90, 0xc6,
|
||||
0x27, 0x50, 0xe4, 0x3c, 0x12, 0xef, 0xc3, 0xc9, 0xbd, 0x39, 0xd9, 0x37, 0xb3, 0x69, 0xfa, 0xa6,
|
||||
0xb1, 0x08, 0xe1, 0x1f, 0x41, 0xde, 0x03, 0x5d, 0x86, 0x3b, 0x89, 0x1e, 0xb8, 0xc6, 0x05, 0x28,
|
||||
0x94, 0x0f, 0xc7, 0x15, 0xeb, 0x8d, 0x67, 0x2f, 0x6a, 0x99, 0xe7, 0x2f, 0x6a, 0x99, 0xdf, 0x5e,
|
||||
0xd4, 0x32, 0x8f, 0x0f, 0x6a, 0xda, 0xb3, 0x83, 0x9a, 0xf6, 0xfc, 0xa0, 0xa6, 0xfd, 0x71, 0x50,
|
||||
0xd3, 0x9e, 0xfc, 0x59, 0xcb, 0x3c, 0xc8, 0xf6, 0x16, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x9c,
|
||||
0xf8, 0xe2, 0x2b, 0x70, 0x12, 0x00, 0x00,
|
||||
// 1599 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x57, 0x4f, 0x6f, 0x1b, 0x45,
|
||||
0x1b, 0xf7, 0xda, 0xb1, 0x6b, 0x3f, 0x8e, 0x9b, 0x74, 0xdf, 0x54, 0xaf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x46, 0xa1, 0x58, 0x86, 0xe4, 0x33, 0x3d, 0xd2,
|
||||
0x84, 0xa2, 0x57, 0x90, 0x30, 0x1c, 0x18, 0x57, 0x47, 0x78, 0xdb, 0xa5, 0x4c, 0xbf, 0x0b, 0x85,
|
||||
0x16, 0x5f, 0xd0, 0xaa, 0x26, 0xe8, 0x5d, 0x4e, 0x43, 0x4f, 0x21, 0x58, 0x67, 0x25, 0x9b, 0x82,
|
||||
0x58, 0x52, 0x24, 0xb1, 0x8c, 0x9f, 0x35, 0x28, 0x2f, 0xac, 0xaf, 0x20, 0x4c, 0xfd, 0x2e, 0x69,
|
||||
0xe2, 0x14, 0xc5, 0x32, 0x0f, 0xc0, 0x7f, 0x69, 0x60, 0x37, 0xb1, 0x53, 0xcd, 0xce, 0x68, 0xb3,
|
||||
0x45, 0x4b, 0x97, 0x76, 0x70, 0x27, 0xd2, 0xa0, 0x98, 0x15, 0x47, 0xdd, 0x71, 0x3d, 0x47, 0x9c,
|
||||
0x73, 0x0c, 0xf5, 0x96, 0xeb, 0x39, 0x48, 0x68, 0xf4, 0xf7, 0x21, 0xdf, 0xc3, 0x64, 0x93, 0xe7,
|
||||
0x9e, 0x97, 0xc2, 0xa5, 0x34, 0x9b, 0xbb, 0xcf, 0x1d, 0xac, 0xd2, 0xfe, 0xa0, 0x9e, 0x17, 0x7f,
|
||||
0x51, 0x08, 0x61, 0xfc, 0xa0, 0xc1, 0x44, 0x6c, 0x4f, 0x22, 0x7b, 0x57, 0x61, 0xbc, 0x15, 0xab,
|
||||
0x1c, 0xb9, 0xbf, 0x29, 0xc9, 0x64, 0x3c, 0x5e, 0x55, 0x28, 0x61, 0xa9, 0x37, 0xa1, 0x44, 0x24,
|
||||
0x92, 0xba, 0x1d, 0x8d, 0x94, 0xa9, 0x57, 0x0c, 0x86, 0x71, 0x62, 0x42, 0x8a, 0x86, 0xb8, 0xc6,
|
||||
0x1f, 0xe1, 0x31, 0xa8, 0xfb, 0xa2, 0xcf, 0xc6, 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49, 0x2d, 0xef, 0x90, 0x1d, 0x4c, 0xa9, 0xdd, 0x52, 0x65, 0x11, 0x75, 0xc8, 0xd5, 0x50, 0x8c,
|
||||
0x94, 0x5e, 0x7f, 0x0b, 0x0a, 0x04, 0xdb, 0xd4, 0xf7, 0x64, 0x7d, 0xd4, 0x14, 0x24, 0x12, 0xd2,
|
||||
0x83, 0x41, 0x7d, 0x5c, 0x82, 0x8b, 0x35, 0x92, 0xd6, 0xfa, 0x87, 0x70, 0xc6, 0xc1, 0xcc, 0x76,
|
||||
0xdb, 0x54, 0xd4, 0x43, 0x79, 0x7e, 0x2e, 0xd5, 0x78, 0x28, 0xa0, 0x96, 0x42, 0x47, 0xab, 0xcc,
|
||||
0x19, 0xc9, 0x05, 0x52, 0x70, 0xbc, 0xa0, 0x9b, 0xbe, 0x83, 0x45, 0xc9, 0xe4, 0x87, 0x05, 0xbd,
|
||||
0xe8, 0x3b, 0x18, 0x09, 0x8d, 0xf1, 0x54, 0x83, 0x72, 0x88, 0xb4, 0x68, 0x77, 0x29, 0xd6, 0xe7,
|
||||
0xa2, 0x3d, 0x84, 0x47, 0x7d, 0x21, 0x3e, 0xbe, 0x1d, 0x0c, 0xea, 0x25, 0x61, 0x26, 0x66, 0x39,
|
||||
0x45, 0x3f, 0x96, 0xa1, 0xec, 0x09, 0x19, 0xba, 0x08, 0xf9, 0x2d, 0x17, 0xb7, 0xd5, 0xcb, 0x16,
|
||||
0xbd, 0x49, 0x37, 0xb8, 0x10, 0x85, 0x3a, 0xe3, 0xdb, 0x2c, 0x54, 0x12, 0x9b, 0x4b, 0xf1, 0x11,
|
||||
0x14, 0x3d, 0x76, 0xd9, 0x14, 0x03, 0xd4, 0xe8, 0xaf, 0x9e, 0x0f, 0xa0, 0xd0, 0xe4, 0xfb, 0x53,
|
||||
0x9f, 0x9c, 0x8d, 0xf4, 0x07, 0x21, 0xf2, 0x32, 0xac, 0x22, 0xb1, 0xa4, 0x48, 0xc2, 0xe9, 0x37,
|
||||
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12, 0x00, 0x00,
|
||||
}
|
||||
|
@ -111,6 +111,21 @@ message Duration {
|
||||
optional int64 duration = 1;
|
||||
}
|
||||
|
||||
// Event represents a single event to a watched resource.
|
||||
//
|
||||
// +protobuf=true
|
||||
// +k8s:openapi-gen=false
|
||||
message Event {
|
||||
optional string type = 1;
|
||||
|
||||
// Object is:
|
||||
// * If Type is Added or Modified: the new state of the object.
|
||||
// * If Type is Deleted: the state of the object immediately before deletion.
|
||||
// * If Type is Error: *Status is recommended; other types may make sense
|
||||
// depending on context.
|
||||
optional k8s.io.kubernetes.pkg.runtime.RawExtension object = 2;
|
||||
}
|
||||
|
||||
// ExportOptions is the query options to the standard REST get call.
|
||||
message ExportOptions {
|
||||
// Should this value be exported. Export strips fields that a user can not specify.
|
||||
|
@ -22,6 +22,7 @@ package v1
|
||||
|
||||
import (
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
runtime "k8s.io/kubernetes/pkg/runtime"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
@ -34,6 +35,7 @@ func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
|
||||
{Fn: DeepCopy_v1_APIResourceList, InType: reflect.TypeOf(&APIResourceList{})},
|
||||
{Fn: DeepCopy_v1_APIVersions, InType: reflect.TypeOf(&APIVersions{})},
|
||||
{Fn: DeepCopy_v1_Duration, InType: reflect.TypeOf(&Duration{})},
|
||||
{Fn: DeepCopy_v1_Event, InType: reflect.TypeOf(&Event{})},
|
||||
{Fn: DeepCopy_v1_ExportOptions, InType: reflect.TypeOf(&ExportOptions{})},
|
||||
{Fn: DeepCopy_v1_GetOptions, InType: reflect.TypeOf(&GetOptions{})},
|
||||
{Fn: DeepCopy_v1_GroupKind, InType: reflect.TypeOf(&GroupKind{})},
|
||||
@ -42,6 +44,7 @@ func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
|
||||
{Fn: DeepCopy_v1_GroupVersionForDiscovery, InType: reflect.TypeOf(&GroupVersionForDiscovery{})},
|
||||
{Fn: DeepCopy_v1_GroupVersionKind, InType: reflect.TypeOf(&GroupVersionKind{})},
|
||||
{Fn: DeepCopy_v1_GroupVersionResource, InType: reflect.TypeOf(&GroupVersionResource{})},
|
||||
{Fn: DeepCopy_v1_InternalEvent, InType: reflect.TypeOf(&InternalEvent{})},
|
||||
{Fn: DeepCopy_v1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})},
|
||||
{Fn: DeepCopy_v1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})},
|
||||
{Fn: DeepCopy_v1_ListMeta, InType: reflect.TypeOf(&ListMeta{})},
|
||||
@ -161,6 +164,18 @@ func DeepCopy_v1_Duration(in interface{}, out interface{}, c *conversion.Cloner)
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_Event(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*Event)
|
||||
out := out.(*Event)
|
||||
*out = *in
|
||||
if err := runtime.DeepCopy_runtime_RawExtension(&in.Object, &out.Object, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ExportOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*ExportOptions)
|
||||
@ -233,6 +248,23 @@ func DeepCopy_v1_GroupVersionResource(in interface{}, out interface{}, c *conver
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_InternalEvent(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*InternalEvent)
|
||||
out := out.(*InternalEvent)
|
||||
*out = *in
|
||||
// in.Object is kind 'Interface'
|
||||
if in.Object != nil {
|
||||
if newVal, err := c.DeepCopy(&in.Object); err != nil {
|
||||
return err
|
||||
} else {
|
||||
out.Object = *newVal.(*runtime.Object)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_LabelSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*LabelSelector)
|
||||
|
@ -21,7 +21,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/util/intstr:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -52,6 +51,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
// Add the watch version that applies
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ go_library(
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/util/intstr:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/gogo/protobuf/sortkeys",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -52,6 +51,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
// Add the watch version that applies
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/util/sets:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
const GroupName = "rbac.authorization.k8s.io"
|
||||
@ -62,6 +61,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&metav1.ExportOptions{},
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
"//vendor:k8s.io/apiserver/pkg/authentication/user",
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
const GroupName = "rbac.authorization.k8s.io"
|
||||
@ -57,6 +56,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&metav1.ExportOptions{},
|
||||
&metav1.GetOptions{},
|
||||
)
|
||||
versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ go_library(
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/types:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/gogo/protobuf/proto",
|
||||
"//vendor:github.com/gogo/protobuf/sortkeys",
|
||||
"//vendor:github.com/ugorji/go/codec",
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
@ -52,6 +51,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&StorageClassList{},
|
||||
)
|
||||
|
||||
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ go_library(
|
||||
"//pkg/api/validation/path:go_default_library",
|
||||
"//pkg/apis/meta/v1:go_default_library",
|
||||
"//pkg/client/metrics:go_default_library",
|
||||
"//pkg/client/restclient/watch:go_default_library",
|
||||
"//pkg/client/transport:go_default_library",
|
||||
"//pkg/client/unversioned/clientcmd/api:go_default_library",
|
||||
"//pkg/fields:go_default_library",
|
||||
@ -41,7 +42,6 @@ go_library(
|
||||
"//pkg/util/sets:go_default_library",
|
||||
"//pkg/version:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/golang/glog",
|
||||
],
|
||||
)
|
||||
@ -77,7 +77,6 @@ go_test(
|
||||
"//pkg/util/intstr:go_default_library",
|
||||
"//pkg/util/testing:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/google/gofuzz",
|
||||
],
|
||||
)
|
||||
|
42
pkg/client/restclient/watch/BUILD
Normal file
42
pkg/client/restclient/watch/BUILD
Normal file
@ -0,0 +1,42 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
"go_test",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"decoder.go",
|
||||
"encoder.go",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/apis/meta/v1:go_default_library",
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/serializer/streaming:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_xtest",
|
||||
srcs = [
|
||||
"decoder_test.go",
|
||||
"encoder_test.go",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/testapi:go_default_library",
|
||||
"//pkg/apis/meta/v1:go_default_library",
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/serializer/streaming:go_default_library",
|
||||
"//pkg/util/wait:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
],
|
||||
)
|
@ -50,7 +50,6 @@ go_test(
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/runtime/serializer/streaming:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -34,7 +34,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/runtime/serializer/streaming"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
func getJSON(version, kind, name string) []byte {
|
||||
@ -459,7 +458,7 @@ func TestWatch(t *testing.T) {
|
||||
t.Errorf("Watch(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
|
||||
}
|
||||
|
||||
enc := versioned.NewEncoder(streaming.NewEncoder(w, dynamicCodec{}), dynamicCodec{})
|
||||
enc := metav1.NewEncoder(streaming.NewEncoder(w, dynamicCodec{}), dynamicCodec{})
|
||||
for _, e := range tc.events {
|
||||
enc.Encode(&e)
|
||||
}
|
||||
|
@ -2081,6 +2081,30 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
|
||||
Dependencies: []string{
|
||||
"v1.EventSource", "v1.ObjectMeta", "v1.ObjectReference", "v1.Time"},
|
||||
},
|
||||
"v1.Event": {
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Event represents a single event to a watched resource.",
|
||||
Properties: map[string]spec.Schema{
|
||||
"type": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"object": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.",
|
||||
Ref: spec.MustCreateRef("#/definitions/runtime.RawExtension"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"type", "object"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"runtime.RawExtension"},
|
||||
},
|
||||
"v1.EventList": {
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
@ -2972,6 +2996,30 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
|
||||
},
|
||||
Dependencies: []string{},
|
||||
},
|
||||
"v1.InternalEvent": {
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "InternalEvent makes watch.Event versioned",
|
||||
Properties: map[string]spec.Schema{
|
||||
"Type": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"Object": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.",
|
||||
Ref: spec.MustCreateRef("#/definitions/runtime.Object"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"Type", "Object"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"runtime.Object"},
|
||||
},
|
||||
"v1.Job": {
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
@ -15065,28 +15113,4 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
|
||||
},
|
||||
Dependencies: []string{},
|
||||
},
|
||||
"versioned.Event": {
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Event represents a single event to a watched resource.",
|
||||
Properties: map[string]spec.Schema{
|
||||
"type": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"object": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.",
|
||||
Ref: spec.MustCreateRef("#/definitions/runtime.RawExtension"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"type", "object"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"runtime.RawExtension"},
|
||||
},
|
||||
}
|
||||
|
@ -73,7 +73,6 @@ go_test(
|
||||
"//pkg/util/sets:go_default_library",
|
||||
"//pkg/util/wait:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//plugin/pkg/admission/admit:go_default_library",
|
||||
"//plugin/pkg/admission/deny:go_default_library",
|
||||
"//vendor:github.com/emicklei/go-restful",
|
||||
|
@ -54,7 +54,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/util/diff"
|
||||
"k8s.io/kubernetes/pkg/util/sets"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
"k8s.io/kubernetes/plugin/pkg/admission/admit"
|
||||
"k8s.io/kubernetes/plugin/pkg/admission/deny"
|
||||
|
||||
@ -161,7 +160,7 @@ func addTestTypes() {
|
||||
// served in the tests.
|
||||
api.Scheme.AddKnownTypes(testGroup2Version, &SimpleXGSubresource{}, &metav1.ExportOptions{})
|
||||
api.Scheme.AddKnownTypes(testInternalGroup2Version, &SimpleXGSubresource{}, &metav1.ExportOptions{})
|
||||
versioned.AddToGroupVersion(api.Scheme, testGroupVersion)
|
||||
metav1.AddToGroupVersion(api.Scheme, testGroupVersion)
|
||||
}
|
||||
|
||||
func addNewTestTypes() {
|
||||
@ -179,7 +178,7 @@ func addNewTestTypes() {
|
||||
&api.DeleteOptions{}, &genericapitesting.SimpleGetOptions{}, &genericapitesting.SimpleRoot{},
|
||||
&v1.Pod{},
|
||||
)
|
||||
versioned.AddToGroupVersion(api.Scheme, newGroupVersion)
|
||||
metav1.AddToGroupVersion(api.Scheme, newGroupVersion)
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -65,7 +65,6 @@ go_library(
|
||||
"//pkg/util/strategicpatch:go_default_library",
|
||||
"//pkg/util/wsstream:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/emicklei/go-restful",
|
||||
"//vendor:github.com/evanphx/json-patch",
|
||||
"//vendor:github.com/golang/glog",
|
||||
|
@ -24,6 +24,7 @@ import (
|
||||
"time"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/errors"
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/genericapiserver/api/handlers/negotiation"
|
||||
"k8s.io/kubernetes/pkg/httplog"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
@ -31,7 +32,6 @@ import (
|
||||
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
|
||||
"k8s.io/kubernetes/pkg/util/wsstream"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
|
||||
"github.com/emicklei/go-restful"
|
||||
"golang.org/x/net/websocket"
|
||||
@ -178,7 +178,7 @@ func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
flusher.Flush()
|
||||
|
||||
var unknown runtime.Unknown
|
||||
internalEvent := &versioned.InternalEvent{}
|
||||
internalEvent := &metav1.InternalEvent{}
|
||||
buf := &bytes.Buffer{}
|
||||
ch := s.Watching.ResultChan()
|
||||
for {
|
||||
@ -207,7 +207,7 @@ func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
event.Object = &unknown
|
||||
|
||||
// the internal event will be versioned by the encoder
|
||||
*internalEvent = versioned.InternalEvent(event)
|
||||
*internalEvent = metav1.InternalEvent(event)
|
||||
if err := e.Encode(internalEvent); err != nil {
|
||||
utilruntime.HandleError(fmt.Errorf("unable to encode watch object: %v (%#v)", err, e))
|
||||
// client disconnect.
|
||||
@ -237,7 +237,7 @@ func (s *WatchServer) HandleWS(ws *websocket.Conn) {
|
||||
}()
|
||||
|
||||
var unknown runtime.Unknown
|
||||
internalEvent := &versioned.InternalEvent{}
|
||||
internalEvent := &metav1.InternalEvent{}
|
||||
buf := &bytes.Buffer{}
|
||||
streamBuf := &bytes.Buffer{}
|
||||
ch := s.Watching.ResultChan()
|
||||
@ -265,7 +265,7 @@ func (s *WatchServer) HandleWS(ws *websocket.Conn) {
|
||||
event.Object = &unknown
|
||||
|
||||
// the internal event will be versioned by the encoder
|
||||
*internalEvent = versioned.InternalEvent(event)
|
||||
*internalEvent = metav1.InternalEvent(event)
|
||||
if err := s.Encoder.Encode(internalEvent, streamBuf); err != nil {
|
||||
// encoding error
|
||||
utilruntime.HandleError(fmt.Errorf("unable to encode event: %v", err))
|
||||
|
@ -43,7 +43,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/util/diff"
|
||||
"k8s.io/kubernetes/pkg/util/wait"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
// watchJSON defines the expected JSON wire equivalent of watch.Event
|
||||
@ -334,7 +333,7 @@ func TestWatchRead(t *testing.T) {
|
||||
// Send
|
||||
w.Action(action, object)
|
||||
// Test receive
|
||||
var got versioned.Event
|
||||
var got metav1.Event
|
||||
_, _, err := d.Decode(nil, &got)
|
||||
if err != nil {
|
||||
t.Fatalf("%s: Unexpected error: %v", name, err)
|
||||
@ -356,7 +355,7 @@ func TestWatchRead(t *testing.T) {
|
||||
}
|
||||
w.Stop()
|
||||
|
||||
var got versioned.Event
|
||||
var got metav1.Event
|
||||
_, _, err := d.Decode(nil, &got)
|
||||
if err == nil {
|
||||
t.Errorf("Unexpected non-error")
|
||||
|
@ -203,7 +203,6 @@ go_test(
|
||||
"//pkg/util/term:go_default_library",
|
||||
"//pkg/util/wait:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/spf13/cobra",
|
||||
"//vendor:github.com/stretchr/testify/assert",
|
||||
"//vendor:k8s.io/heapster/metrics/apis/metrics/v1alpha1",
|
||||
|
@ -40,7 +40,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/runtime/serializer/json"
|
||||
"k8s.io/kubernetes/pkg/runtime/serializer/streaming"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
func testData() (*api.PodList, *api.ServiceList, *api.ReplicationControllerList) {
|
||||
@ -891,7 +890,7 @@ func TestWatchOnlyList(t *testing.T) {
|
||||
|
||||
func watchBody(codec runtime.Codec, events []watch.Event) io.ReadCloser {
|
||||
buf := bytes.NewBuffer([]byte{})
|
||||
enc := versioned.NewEncoder(streaming.NewEncoder(buf, codec), codec)
|
||||
enc := metav1.NewEncoder(streaming.NewEncoder(buf, codec), codec)
|
||||
for i := range events {
|
||||
enc.Encode(&events[i])
|
||||
}
|
||||
|
@ -73,7 +73,6 @@ go_test(
|
||||
"//pkg/util/errors:go_default_library",
|
||||
"//pkg/util/testing:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
"//vendor:github.com/ghodss/yaml",
|
||||
"//vendor:github.com/stretchr/testify/assert",
|
||||
],
|
||||
|
@ -45,7 +45,6 @@ import (
|
||||
utilerrors "k8s.io/kubernetes/pkg/util/errors"
|
||||
utiltesting "k8s.io/kubernetes/pkg/util/testing"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
func stringBody(body string) io.ReadCloser {
|
||||
@ -55,7 +54,7 @@ func stringBody(body string) io.ReadCloser {
|
||||
func watchBody(events ...watch.Event) string {
|
||||
buf := &bytes.Buffer{}
|
||||
codec := testapi.Default.Codec()
|
||||
enc := versioned.NewEncoder(streaming.NewEncoder(buf, codec), codec)
|
||||
enc := metav1.NewEncoder(streaming.NewEncoder(buf, codec), codec)
|
||||
for _, e := range events {
|
||||
enc.Encode(&e)
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ go_library(
|
||||
"//pkg/util/validation/field:go_default_library",
|
||||
"//pkg/util/yaml:go_default_library",
|
||||
"//pkg/watch:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
@ -61,7 +60,6 @@ go_test(
|
||||
"//pkg/apis/meta/v1:go_default_library",
|
||||
"//pkg/runtime:go_default_library",
|
||||
"//pkg/runtime/schema:go_default_library",
|
||||
"//pkg/watch/versioned:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -35,7 +35,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/util/yaml"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
type thirdPartyObjectConverter struct {
|
||||
@ -535,9 +534,9 @@ func (t *thirdPartyResourceDataEncoder) Encode(obj runtime.Object, stream io.Wri
|
||||
|
||||
_, err = stream.Write(encBytes)
|
||||
return err
|
||||
case *versioned.InternalEvent:
|
||||
event := &versioned.Event{}
|
||||
err := versioned.Convert_versioned_InternalEvent_to_versioned_Event(obj, event, nil)
|
||||
case *metav1.InternalEvent:
|
||||
event := &metav1.Event{}
|
||||
err := metav1.Convert_versioned_InternalEvent_to_versioned_Event(obj, event, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ import (
|
||||
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/watch/versioned"
|
||||
)
|
||||
|
||||
type Foo struct {
|
||||
@ -239,10 +238,10 @@ func TestEncodeToStreamForInternalEvent(t *testing.T) {
|
||||
Kind: "Foo",
|
||||
}, delegate: testapi.Extensions.Codec()}
|
||||
buf := bytes.NewBuffer([]byte{})
|
||||
expected := &versioned.Event{
|
||||
expected := &metav1.Event{
|
||||
Type: "Added",
|
||||
}
|
||||
err := e.Encode(&versioned.InternalEvent{
|
||||
err := e.Encode(&metav1.InternalEvent{
|
||||
Type: "Added",
|
||||
}, buf)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user