Make runtime opt in to deepcopy

This minimizes the number of functions generated.  It also breaks the chain of
symbol dependencies to pkg/conversion, so we can remove now-unreferenced
(previously unused but referenced) conversion deep-copies.
This commit is contained in:
Tim Hockin
2016-06-15 23:43:13 -07:00
parent dc10f10e48
commit 51394e862d
6 changed files with 6 additions and 396 deletions

View File

@@ -40,6 +40,7 @@ import (
// TypeMeta is provided here for convenience. You may use it directly from this package or define
// your own with the same fields.
//
// +k8s:deepcopy-gen=true
// +protobuf=true
type TypeMeta struct {
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
@@ -92,6 +93,7 @@ const (
// in the Object. (TODO: In the case where the object is of an unknown type, a
// runtime.Unknown object will be created and stored.)
//
// +k8s:deepcopy-gen=true
// +protobuf=true
type RawExtension struct {
// Raw is the underlying serialization of this object.
@@ -109,6 +111,7 @@ type RawExtension struct {
// TODO: Make this object have easy access to field based accessors and settors for
// metadata and field mutatation.
//
// +k8s:deepcopy-gen=true
// +protobuf=true
type Unknown struct {
TypeMeta `json:",inline" protobuf:"bytes,1,opt,name=typeMeta"`