@@ -124,9 +124,64 @@ type RouteForwardTo struct {
124
124
// +kubebuilder:validation:Maximum=1000000
125
125
Weight *int32 ` json:"weight,omitempty"`
126
126
}
127
-
128
127
```
129
128
129
+ A summarized diff for the changes being proposed:
130
+
131
+ ``` patch
132
+ diff --git a/apis/v1alpha2/shared_types.go b/apis/v1alpha2/shared_types.go
133
+ index 1215300..228f861 100644
134
+ --- a/apis/v1alpha2/shared_types.go
135
+ +++ b/apis/v1alpha2/shared_types.go
136
+ @@ -96,10 +96,7 @@ type GatewayReference struct {
137
+
138
+ // RouteForwardTo defines how a Route should forward a request.
139
+ type RouteForwardTo struct {
140
+ - // ServiceName refers to the name of the Service to forward matched requests
141
+ - // to. When specified, this takes the place of BackendRef. If both
142
+ - // BackendRef and ServiceName are specified, ServiceName will be given
143
+ - // precedence.
144
+ + // BackendRef is a reference to a backend to forward matched requests to.
145
+ //
146
+ // If the referent cannot be found, the rule is not included in the route.
147
+ // The controller should raise the "ResolvedRefs" condition on the Gateway
148
+ @@ -115,30 +112,16 @@ type RouteForwardTo struct {
149
+ // in the BackendPolicy resource. For custom backends, it is encouraged to
150
+ // add a semantically-equivalent field in the Custom Resource Definition.
151
+ //
152
+ - // Support: Core
153
+ - //
154
+ - // +optional
155
+ - // +kubebuilder:validation:MaxLength=253
156
+ - ServiceName *string `json:"serviceName,omitempty"`
157
+ -
158
+ - // BackendRef is a reference to a backend to forward matched requests to. If
159
+ - // both BackendRef and ServiceName are specified, ServiceName will be given
160
+ - // precedence.
161
+ - //
162
+ - // If the referent cannot be found, the rule is not included in the route.
163
+ - // The controller should raise the "ResolvedRefs" condition on the Gateway
164
+ - // with the "DegradedRoutes" reason. The gateway status for this route should
165
+ - // be updated with a condition that describes the error more specifically.
166
+ - //
167
+ - // Support: Custom
168
+ + // Support: Core (Kubernetes Service)
169
+ + // Support: Custom (any other resource)
170
+ //
171
+ // +optional
172
+ + // +kubebuilder:default={kind: "service"}
173
+ BackendRef *LocalObjectReference `json:"backendRef,omitempty"`
174
+
175
+ // Port specifies the destination port number to use for the
176
+ - // backend referenced by the ServiceName or BackendRef field.
177
+ - // If unspecified, the destination port in the request is used
178
+ - // when forwarding to a backendRef or serviceName.
179
+ + // backend referenced by BackendRef field. Port is required when the backend
180
+ + // is a Kubernetes Service.
181
+ //
182
+ // Support: Core
183
+ //
184
+ ```
130
185
For Kubernetes Services, the API will look like the following:
131
186
132
187
``` yaml
0 commit comments