diff --git a/apis/v1alpha1/httproute_types.go b/apis/v1alpha1/httproute_types.go index bd1070cb30..035932b5b8 100644 --- a/apis/v1alpha1/httproute_types.go +++ b/apis/v1alpha1/httproute_types.go @@ -337,7 +337,7 @@ type HTTPRouteMatch struct { // // +optional // +kubebuilder:default={type: "Prefix", value: "/"} - Path HTTPPathMatch `json:"path,omitempty"` + Path *HTTPPathMatch `json:"path,omitempty"` // Headers specifies a HTTP request header matcher. // diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index f9a84110ab..b40e41f927 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -689,7 +689,11 @@ func (in *HTTPRouteList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HTTPRouteMatch) DeepCopyInto(out *HTTPRouteMatch) { *out = *in - out.Path = in.Path + if in.Path != nil { + in, out := &in.Path, &out.Path + *out = new(HTTPPathMatch) + **out = **in + } if in.Headers != nil { in, out := &in.Headers, &out.Headers *out = new(HTTPHeaderMatch)