diff --git a/pkg/api/serialization_test.go b/pkg/api/serialization_test.go index a6612e93809..16e2a7aace9 100644 --- a/pkg/api/serialization_test.go +++ b/pkg/api/serialization_test.go @@ -75,19 +75,6 @@ var apiObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 1).Funcs( c.Fuzz(&nsec) j.CreationTimestamp = util.Unix(sec, nsec).Rfc3339Copy() }, - func(j *api.ObjectReference, c fuzz.Continue) { - // We have to customize the randomization of TypeMetas because their - // APIVersion and Kind must remain blank in memory. - j.APIVersion = c.RandString() - j.Kind = c.RandString() - j.Namespace = c.RandString() - j.Name = c.RandString() - // TODO: Fix JSON/YAML packages and/or write custom encoding - // for uint64's. Somehow the LS *byte* of this is lost, but - // only when all 8 bytes are set. - j.ResourceVersion = strconv.FormatUint(c.RandUint64()>>8, 10) - j.FieldPath = c.RandString() - }, func(intstr *util.IntOrString, c fuzz.Continue) { // util.IntOrString will panic if its kind is set wrong. if c.RandBool() { diff --git a/pkg/api/v1beta1/conversion.go b/pkg/api/v1beta1/conversion.go index d7284483a3c..a745c97bec4 100644 --- a/pkg/api/v1beta1/conversion.go +++ b/pkg/api/v1beta1/conversion.go @@ -59,36 +59,6 @@ func init() { return nil }, - // ObjectReference has changed type of ResourceVersion internally - func(in *newer.ObjectReference, out *ObjectReference, s conversion.Scope) error { - out.APIVersion = in.APIVersion - out.Kind = in.Kind - out.Namespace = in.Namespace - out.Name = in.Name - out.FieldPath = in.FieldPath - - if len(in.ResourceVersion) > 0 { - v, err := strconv.ParseUint(in.ResourceVersion, 10, 64) - if err != nil { - return err - } - out.ResourceVersion = v - } - return nil - }, - func(in *ObjectReference, out *newer.ObjectReference, s conversion.Scope) error { - out.APIVersion = in.APIVersion - out.Kind = in.Kind - out.Namespace = in.Namespace - out.Name = in.Name - out.FieldPath = in.FieldPath - - if in.ResourceVersion != 0 { - out.ResourceVersion = strconv.FormatUint(in.ResourceVersion, 10) - } - return nil - }, - // EnvVar's Key is deprecated in favor of Name. func(in *newer.EnvVar, out *EnvVar, s conversion.Scope) error { out.Value = in.Value diff --git a/pkg/api/v1beta1/types.go b/pkg/api/v1beta1/types.go index b0180d3ddb5..5429024df1e 100644 --- a/pkg/api/v1beta1/types.go +++ b/pkg/api/v1beta1/types.go @@ -638,7 +638,7 @@ type ObjectReference struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` UID string `json:"uid,omitempty" yaml:"uid,omitempty"` APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"` - ResourceVersion uint64 `json:"resourceVersion,omitempty" yaml:"resourceVersion,omitempty"` + ResourceVersion string `json:"resourceVersion,omitempty" yaml:"resourceVersion,omitempty"` // Optional. If referring to a piece of an object instead of an entire object, this string // should contain a valid field access statement. For example, diff --git a/pkg/api/v1beta2/conversion.go b/pkg/api/v1beta2/conversion.go index abe3857ebca..59f398bedb6 100644 --- a/pkg/api/v1beta2/conversion.go +++ b/pkg/api/v1beta2/conversion.go @@ -59,36 +59,6 @@ func init() { return nil }, - // ObjectReference has changed type of ResourceVersion internally - func(in *newer.ObjectReference, out *ObjectReference, s conversion.Scope) error { - out.APIVersion = in.APIVersion - out.Kind = in.Kind - out.Namespace = in.Namespace - out.Name = in.Name - out.FieldPath = in.FieldPath - - if len(in.ResourceVersion) > 0 { - v, err := strconv.ParseUint(in.ResourceVersion, 10, 64) - if err != nil { - return err - } - out.ResourceVersion = v - } - return nil - }, - func(in *ObjectReference, out *newer.ObjectReference, s conversion.Scope) error { - out.APIVersion = in.APIVersion - out.Kind = in.Kind - out.Namespace = in.Namespace - out.Name = in.Name - out.FieldPath = in.FieldPath - - if in.ResourceVersion != 0 { - out.ResourceVersion = strconv.FormatUint(in.ResourceVersion, 10) - } - return nil - }, - // EnvVar's Key is deprecated in favor of Name. func(in *newer.EnvVar, out *EnvVar, s conversion.Scope) error { out.Value = in.Value diff --git a/pkg/api/v1beta2/types.go b/pkg/api/v1beta2/types.go index 0d45d527943..ce90515b8b2 100644 --- a/pkg/api/v1beta2/types.go +++ b/pkg/api/v1beta2/types.go @@ -649,7 +649,7 @@ type ObjectReference struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` UID string `json:"uid,omitempty" yaml:"uid,omitempty"` APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"` - ResourceVersion uint64 `json:"resourceVersion,omitempty" yaml:"resourceVersion,omitempty"` + ResourceVersion string `json:"resourceVersion,omitempty" yaml:"resourceVersion,omitempty"` // Optional. If referring to a piece of an object instead of an entire object, this string // should contain a valid field access statement. For example,