diff --git a/apis/v1alpha1/gateway_types.go b/apis/v1alpha1/gateway_types.go index d4c56c36d6..87fb9b66ae 100644 --- a/apis/v1alpha1/gateway_types.go +++ b/apis/v1alpha1/gateway_types.go @@ -405,7 +405,7 @@ type RouteBindingSelector struct { // Support: Core // // +optional - Selector metav1.LabelSelector `json:"selector,omitempty"` + Selector *metav1.LabelSelector `json:"selector,omitempty"` // Group is the group of the route resource to select. Omitting the value or specifying // the empty string indicates the networking.x-k8s.io API group. // For example, use the following to select an HTTPRoute: diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index f9a84110ab..e01ac49fa6 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -884,7 +884,11 @@ func (in *ParametersReference) DeepCopy() *ParametersReference { func (in *RouteBindingSelector) DeepCopyInto(out *RouteBindingSelector) { *out = *in in.Namespaces.DeepCopyInto(&out.Namespaces) - in.Selector.DeepCopyInto(&out.Selector) + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteBindingSelector.