diff --git a/pkg/apis/access/v1alpha2/traffic_target.go b/pkg/apis/access/v1alpha2/traffic_target.go index fff17a9..4fea3b9 100644 --- a/pkg/apis/access/v1alpha2/traffic_target.go +++ b/pkg/apis/access/v1alpha2/traffic_target.go @@ -22,7 +22,7 @@ type TrafficTarget struct { // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - Spec []TrafficTargetSpec `json:"spec"` + Spec TrafficTargetSpec `json:"spec"` } // TrafficTargetSpec is the specification of a TrafficTarget diff --git a/pkg/apis/access/v1alpha2/zz_generated.deepcopy.go b/pkg/apis/access/v1alpha2/zz_generated.deepcopy.go index 3943228..e874857 100644 --- a/pkg/apis/access/v1alpha2/zz_generated.deepcopy.go +++ b/pkg/apis/access/v1alpha2/zz_generated.deepcopy.go @@ -48,13 +48,7 @@ func (in *TrafficTarget) DeepCopyInto(out *TrafficTarget) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Spec != nil { - in, out := &in.Spec, &out.Spec - *out = make([]TrafficTargetSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.Spec.DeepCopyInto(&out.Spec) return }