Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions internal/gatewayapi/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -1117,16 +1117,6 @@ func (t *Translator) processUDPRouteParentRefs(udpRoute *UDPRouteContext, resour
metav1.ConditionFalse,
resolveErrs.Reason(),
resolveErrs.Error())

// TODO: zhaohuabing should we set the accepted condition to false here?
status.SetRouteStatusCondition(routeStatus,
parentRef.routeParentStatusIdx,
udpRoute.GetGeneration(),
gwapiv1.RouteConditionAccepted,
metav1.ConditionFalse,
"Failed to process the settings associated with the UDP route.",
resolveErrs.Error(),
)
} else {
status.SetRouteStatusCondition(routeStatus,
parentRef.routeParentStatusIdx,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ udpRoutes:
parents:
- conditions:
- lastTransitionTime: null
message: UDP Port 8080 not found on Service default/service-1
reason: Failed to process the settings associated with the UDP route.
status: "False"
message: Route is accepted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, the prev one is better for debuging.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still get the UDP Port 8080 not found on Service default/service-1 message in the ResolvedRefs condition.

reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: null
message: UDP Port 8080 not found on Service default/service-1
Expand All @@ -100,3 +100,11 @@ xdsIR:
- address: 0.0.0.0
name: envoy-gateway/gateway-1/udp
port: 10162
route:
destination:
metadata:
kind: UDPRoute
name: udproute-1
namespace: default
name: udproute/default/udproute-1/rule/-1
name: udproute/default/udproute-1
Copy link
Member Author

@zhaohuabing zhaohuabing May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For HTTPRoute, we generate a route with a 500 direct response for routes with failed backends. However, there's no similar mechanism for UDP/TCP/TLS Route.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you plug this IR into xds translator test so we can see what this inconsistent state looks like ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a test in the xDS - it'll generate a cluster without endpoints.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# UDP route with no endpoints, this will happen when the Gateway API translator failed to resolve the backendRefs
udp:
- name: "udp-route"
address: "0.0.0.0"
port: 10162
route:
destination:
metadata:
kind: UDPRoute
name: udproute-1
namespace: default
name: udproute/default/udproute-1/rule/-1
name: udproute/default/udproute-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- circuitBreakers:
thresholds:
- maxRetries: 1024
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
resourceApiVersion: V3
serviceName: udproute/default/udproute-1/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: UDPRoute
name: udproute-1
namespace: default
name: udproute/default/udproute-1/rule/-1
perConnectionBufferLimitBytes: 32768
type: EDS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- clusterName: udproute/default/udproute-1/rule/-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- address:
socketAddress:
address: 0.0.0.0
portValue: 10162
protocol: UDP
listenerFilters:
- name: envoy.filters.udp_listener.udp_proxy
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig
matcher:
onNoMatch:
action:
name: route
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.udp.udp_proxy.v3.Route
cluster: udproute/default/udproute-1/rule/-1
statPrefix: service
name: udp-route
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Loading