From 3d523c5fc6b2ef1175c9d399e59b89886c71e9e8 Mon Sep 17 00:00:00 2001 From: cagarkar Date: Thu, 9 Oct 2025 10:10:39 -0400 Subject: [PATCH] build fixes and missing functions --- pkg/apis/backup/v1/cluster_exec.go | 36 ++++++++++++ pkg/apis/backup/v1/cluster_types.go | 90 +++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) diff --git a/pkg/apis/backup/v1/cluster_exec.go b/pkg/apis/backup/v1/cluster_exec.go index d7b182b..d2813ec 100755 --- a/pkg/apis/backup/v1/cluster_exec.go +++ b/pkg/apis/backup/v1/cluster_exec.go @@ -421,6 +421,42 @@ func streamParams(params url.Values, opts runtime.Object) error { return nil } +// DeepCopyObject returns a generically typed copy of an object +func (in *ClusterExec) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterExec. +func (in *ClusterExec) DeepCopy() *ClusterExec { + if in == nil { + return nil + } + out := new(ClusterExec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterExec) DeepCopyInto(out *ClusterExec) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Params != nil { + out.Params = new(url.Values) + for key, val := range *in.Params { + (*out.Params)[key] = make([]string, len(val)) + copy((*out.Params)[key], val) + } + } +} + func NewConfigFromCluster(ctx context.Context, c *Cluster) (*clientgorest.Config, kubernetes.Interface, error) { cfg := &clientgorest.Config{ diff --git a/pkg/apis/backup/v1/cluster_types.go b/pkg/apis/backup/v1/cluster_types.go index 04e5803..b5a997f 100755 --- a/pkg/apis/backup/v1/cluster_types.go +++ b/pkg/apis/backup/v1/cluster_types.go @@ -91,3 +91,93 @@ func (in *Cluster) GetArbitrarySubResources() []resource.ArbitrarySubResource { &ClusterExec{}, } } + + +// DeepCopyObject returns a generically typed copy of an object +func (in *Cluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { + if in == nil { + return nil + } + out := new(Cluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cluster) DeepCopyInto(out *Cluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status +} + +// DeepCopyObject returns a generically typed copy of an object +func (in *ClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. +func (in *ClusterList) DeepCopy() *ClusterList { + if in == nil { + return nil + } + out := new(ClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterList) DeepCopyInto(out *ClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. +func (in *ClusterSpec) DeepCopy() *ClusterSpec { + if in == nil { + return nil + } + out := new(ClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { + if in == nil { + return nil + } + out := new(ClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { + *out = *in +}