mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
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:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user