diff --git a/apis/v1alpha2/httproute_types.go b/apis/v1alpha2/httproute_types.go index 518b926430..7c3a4cc9fa 100644 --- a/apis/v1alpha2/httproute_types.go +++ b/apis/v1alpha2/httproute_types.go @@ -722,9 +722,7 @@ type HTTPRequestMirrorFilter struct { // // Support: Extended for Kubernetes Service // Support: Custom for any other resource - // - // +optional - BackendRef *BackendObjectReference `json:"backendRef,omitempty"` + BackendRef BackendObjectReference `json:"backendRef"` } // HTTPBackendRef defines how a HTTPRoute should forward an HTTP request. diff --git a/apis/v1alpha2/zz_generated.deepcopy.go b/apis/v1alpha2/zz_generated.deepcopy.go index d0c786d5cf..383c680db2 100644 --- a/apis/v1alpha2/zz_generated.deepcopy.go +++ b/apis/v1alpha2/zz_generated.deepcopy.go @@ -549,11 +549,7 @@ func (in *HTTPRequestHeaderFilter) DeepCopy() *HTTPRequestHeaderFilter { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HTTPRequestMirrorFilter) DeepCopyInto(out *HTTPRequestMirrorFilter) { *out = *in - if in.BackendRef != nil { - in, out := &in.BackendRef, &out.BackendRef - *out = new(BackendObjectReference) - (*in).DeepCopyInto(*out) - } + in.BackendRef.DeepCopyInto(&out.BackendRef) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRequestMirrorFilter. diff --git a/config/crd/v1alpha2/gateway.networking.k8s.io_httproutes.yaml b/config/crd/v1alpha2/gateway.networking.k8s.io_httproutes.yaml index af01b2aca7..9ddb0d584d 100644 --- a/config/crd/v1alpha2/gateway.networking.k8s.io_httproutes.yaml +++ b/config/crd/v1alpha2/gateway.networking.k8s.io_httproutes.yaml @@ -440,6 +440,8 @@ spec: required: - name type: object + required: + - backendRef type: object requestRedirect: description: "RequestRedirect defines a schema for @@ -807,6 +809,8 @@ spec: required: - name type: object + required: + - backendRef type: object requestRedirect: description: "RequestRedirect defines a schema for a filter