fix: federatedworkspace clusterSelector zero value
Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
@@ -70,7 +70,7 @@ type Template struct {
|
|||||||
|
|
||||||
type Placement struct {
|
type Placement struct {
|
||||||
Clusters []Cluster `json:"clusters,omitempty"`
|
Clusters []Cluster `json:"clusters,omitempty"`
|
||||||
ClusterSelector ClusterSelector `json:"clusterSelector,omitempty"`
|
ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ClusterSelector struct {
|
type ClusterSelector struct {
|
||||||
|
|||||||
@@ -125,7 +125,11 @@ func (in *Placement) DeepCopyInto(out *Placement) {
|
|||||||
*out = make([]Cluster, len(*in))
|
*out = make([]Cluster, len(*in))
|
||||||
copy(*out, *in)
|
copy(*out, *in)
|
||||||
}
|
}
|
||||||
in.ClusterSelector.DeepCopyInto(&out.ClusterSelector)
|
if in.ClusterSelector != nil {
|
||||||
|
in, out := &in.ClusterSelector, &out.ClusterSelector
|
||||||
|
*out = new(ClusterSelector)
|
||||||
|
(*in).DeepCopyInto(*out)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
|
||||||
|
|||||||
Reference in New Issue
Block a user