Skip to content

Commit

Permalink
chore: remove tcp options from the UDPRoute IR (envoyproxy#4084)
Browse files Browse the repository at this point in the history
* remove tcp options from the UDPRoute IR

Signed-off-by: Huabing Zhao <[email protected]>

* fix check

Signed-off-by: Huabing Zhao <[email protected]>

---------

Signed-off-by: Huabing Zhao <[email protected]>
  • Loading branch information
zhaohuabing authored Aug 22, 2024
1 parent 2c54de2 commit ada279e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 39 deletions.
3 changes: 0 additions & 3 deletions internal/gatewayapi/backendtrafficpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,6 @@ func (t *Translator) translateBackendTrafficPolicyForRoute(policy *egv1a1.Backen

if strings.HasPrefix(r.Destination.Name, prefix) {
r.LoadBalancer = lb
r.Timeout = to
r.BackendConnection = bc
r.DNS = ds
}
}
Expand Down Expand Up @@ -518,7 +516,6 @@ func (t *Translator) translateBackendTrafficPolicyForGateway(policy *egv1a1.Back
// only set attributes which weren't already set by a more
// specific policy
setIfNil(&route.LoadBalancer, lb)
setIfNil(&route.Timeout, ct)
setIfNil(&route.DNS, ds)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,3 @@ xdsIR:
consistentHash:
sourceIP: true
name: udproute/default/udp-app-1
timeout:
http:
connectionIdleTimeout: 16s
maxConnectionDuration: 17s
tcp:
connectTimeout: 15s
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,3 @@ xdsIR:
consistentHash:
sourceIP: true
name: udproute/default/udp-app-1
timeout:
http:
connectionIdleTimeout: 16s
maxConnectionDuration: 17s
tcp:
connectTimeout: 15s
4 changes: 0 additions & 4 deletions internal/ir/xds.go
Original file line number Diff line number Diff line change
Expand Up @@ -1556,10 +1556,6 @@ type UDPRoute struct {
Destination *RouteDestination `json:"destination,omitempty" yaml:"destination,omitempty"`
// load balancer policy to use when routing to the backend endpoints.
LoadBalancer *LoadBalancer `json:"loadBalancer,omitempty" yaml:"loadBalancer,omitempty"`
// Request and connection timeout settings
Timeout *Timeout `json:"timeout,omitempty" yaml:"timeout,omitempty"`
// settings of upstream connection
BackendConnection *BackendConnection `json:"backendConnection,omitempty" yaml:"backendConnection,omitempty"`
// DNS is used to configure how DNS resolution is handled by the Envoy Proxy cluster
DNS *DNS `json:"dns,omitempty" yaml:"dns,omitempty"`
}
Expand Down
10 changes: 0 additions & 10 deletions internal/ir/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 6 additions & 9 deletions internal/xds/translator/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,15 +686,12 @@ type UDPRouteTranslator struct {

func (route *UDPRouteTranslator) asClusterArgs(extra *ExtraArgs) *xdsClusterArgs {
return &xdsClusterArgs{
name: route.Destination.Name,
settings: route.Destination.Settings,
loadBalancer: route.LoadBalancer,
timeout: route.Timeout,
tSocket: nil,
endpointType: buildEndpointType(route.Destination.Settings),
metrics: extra.metrics,
backendConnection: route.BackendConnection,
dns: route.DNS,
name: route.Destination.Name,
settings: route.Destination.Settings,
loadBalancer: route.LoadBalancer,
endpointType: buildEndpointType(route.Destination.Settings),
metrics: extra.metrics,
dns: route.DNS,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
lbPolicy: LEAST_REQUEST
name: udp-route-dest
outlierDetection: {}
perConnectionBufferLimitBytes: 100000000
perConnectionBufferLimitBytes: 32768
type: EDS

0 comments on commit ada279e

Please sign in to comment.