Skip to content

Commit a645e77

Browse files
committed
fix: HTTPRouteInvalidNonExistentBackendRef
1 parent 80d84b9 commit a645e77

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

internal/controller/utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ func SetRouteConditionResolvedRefs(routeParentStatus *gatewayv1.RouteParentStatu
254254
if !status && strings.Contains(message, string(gatewayv1.RouteReasonInvalidKind)) {
255255
reason = string(gatewayv1.RouteReasonInvalidKind)
256256
}
257+
if !status && strings.Contains(message, "Service") && strings.Contains(message, "not found") {
258+
reason = string(gatewayv1.RouteReasonBackendNotFound)
259+
}
257260

258261
condition := metav1.Condition{
259262
Type: string(gatewayv1.RouteConditionResolvedRefs),

test/conformance/conformance_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ var skippedTestsForTraditionalRoutes = []string{
4040
tests.GatewayInvalidTLSConfiguration.ShortName,
4141
// tests.HTTPRouteInvalidBackendRefUnknownKind.ShortName,
4242
tests.HTTPRouteInvalidCrossNamespaceParentRef.ShortName,
43-
tests.HTTPRouteInvalidNonExistentBackendRef.ShortName,
4443
tests.HTTPRouteInvalidParentRefNotMatchingSectionName.ShortName,
4544
}
4645

0 commit comments

Comments
 (0)