From 4490b5695f348ac130675407ca9d57b0f59fdaa9 Mon Sep 17 00:00:00 2001 From: zirain Date: Sat, 25 Apr 2026 18:45:57 +0800 Subject: [PATCH 1/3] fix: reason with multiple errors rejected validation Signed-off-by: zirain --- internal/gatewayapi/status/error.go | 2 +- ...rpcroute-with-conflicting-filters.out.yaml | 2 +- ...te-with-urlrewrite-hostname-filter.in.yaml | 36 +++++++++ ...e-with-urlrewrite-hostname-filter.out.yaml | 75 ++++++++++++++++++- 4 files changed, 112 insertions(+), 3 deletions(-) diff --git a/internal/gatewayapi/status/error.go b/internal/gatewayapi/status/error.go index 7e310da62b..57b712fb8e 100644 --- a/internal/gatewayapi/status/error.go +++ b/internal/gatewayapi/status/error.go @@ -225,7 +225,7 @@ func (m *MultiStatusError) Reason() gwapiv1.RouteConditionReason { reasonList = append(reasonList, reason) } sort.Strings(reasonList) - return gwapiv1.RouteConditionReason(strings.Join(reasonList, ", ")) + return gwapiv1.RouteConditionReason(strings.Join(reasonList, ",")) } func (m *MultiStatusError) Type() gwapiv1.RouteConditionType { diff --git a/internal/gatewayapi/testdata/grpcroute-with-conflicting-filters.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-conflicting-filters.out.yaml index 798bd83c26..6138ba86ed 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-conflicting-filters.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-conflicting-filters.out.yaml @@ -80,7 +80,7 @@ grpcRoutes: message: |- Dropped Rule(s) [0]: Invalid filter ExtensionRef: unknown kind gateway.envoyproxy.io/HTTPRouteFilter. RequestMirror filter cannot be used when the rule also configures a DirectResponse filter. - reason: IncompatibleFilters, UnsupportedValue + reason: IncompatibleFilters,UnsupportedValue status: "True" type: PartiallyInvalid - lastTransitionTime: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.in.yaml index f39c951e5f..09b7115694 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.in.yaml @@ -125,6 +125,42 @@ httpRoutes: path: type: ReplacePrefixMatch replacePrefixMatch: /rewrite +- apiVersion: gateway.networking.k8s.io/v1 + kind: HTTPRoute + metadata: + namespace: default + name: httproute-5 + spec: + hostnames: + - gateway.envoyproxy.io + parentRefs: + - namespace: envoy-gateway + name: gateway-1 + sectionName: http + rules: + - matches: + - path: + value: "/not-found-filter" + backendRefs: + - name: service-1 + port: 8080 + filters: + - type: ExtensionRef + extensionRef: + group: gateway.envoyproxy.io + kind: HTTPRouteFilter + name: not-found-filter + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplacePrefixMatch + replacePrefixMatch: /rewrite + - type: ExtensionRef + extensionRef: + group: gateway.envoyproxy.io + kind: HTTPRouteFilter + name: not-found-filter httpFilters: - apiVersion: gateway.envoyproxy.io/v1alpha1 kind: HTTPRouteFilter diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.out.yaml index badf61f847..0dca8c386c 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.out.yaml @@ -16,7 +16,7 @@ gateways: protocol: HTTP status: listeners: - - attachedRoutes: 4 + - attachedRoutes: 5 conditions: - lastTransitionTime: null message: Sending translated listener configuration to the data plane @@ -222,6 +222,62 @@ httpRoutes: name: gateway-1 namespace: envoy-gateway sectionName: http +- apiVersion: gateway.networking.k8s.io/v1 + kind: HTTPRoute + metadata: + name: httproute-5 + namespace: default + spec: + hostnames: + - gateway.envoyproxy.io + parentRefs: + - name: gateway-1 + namespace: envoy-gateway + sectionName: http + rules: + - backendRefs: + - filters: + - extensionRef: + group: gateway.envoyproxy.io + kind: HTTPRouteFilter + name: not-found-filter + type: ExtensionRef + name: service-1 + port: 8080 + filters: + - type: URLRewrite + urlRewrite: + path: + replacePrefixMatch: /rewrite + type: ReplacePrefixMatch + - extensionRef: + group: gateway.envoyproxy.io + kind: HTTPRouteFilter + name: not-found-filter + type: ExtensionRef + matches: + - path: + value: /not-found-filter + status: + parents: + - conditions: + - lastTransitionTime: null + message: Route is accepted + reason: Accepted + status: "True" + type: Accepted + - lastTransitionTime: null + message: |- + Unable to translate HTTPRouteFilter: default/not-found-filter. + Failed to process route rule 0 backendRef 0: Unable to translate HTTPRouteFilter: default/not-found-filter. + reason: InvalidBackendFilters,UnsupportedValue + status: "False" + type: ResolvedRefs + controllerName: gateway.envoyproxy.io/gatewayclass-controller + parentRef: + name: gateway-1 + namespace: envoy-gateway + sectionName: http infraIR: envoy-gateway/gateway-1: proxy: @@ -355,6 +411,23 @@ xdsIR: path: fullReplace: null prefixMatchReplace: /rewrite + - directResponse: + statusCode: 500 + hostname: gateway.envoyproxy.io + isHTTP2: false + metadata: + kind: HTTPRoute + name: httproute-5 + namespace: default + name: httproute/default/httproute-5/rule/0/match/0/gateway_envoyproxy_io + pathMatch: + distinct: false + name: "" + prefix: /not-found-filter + urlRewrite: + path: + fullReplace: null + prefixMatchReplace: /rewrite - destination: metadata: kind: HTTPRoute From 6bad8862e9ffe7bebb8fd288034b8a3806fe04ac Mon Sep 17 00:00:00 2001 From: zirain Date: Sat, 25 Apr 2026 18:50:59 +0800 Subject: [PATCH 2/3] release notes Signed-off-by: zirain --- release-notes/current.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/release-notes/current.yaml b/release-notes/current.yaml index a77ca0a894..85d96d69d7 100644 --- a/release-notes/current.yaml +++ b/release-notes/current.yaml @@ -76,6 +76,7 @@ bug fixes: | Fixed gateway-helm RBAC in GatewayNamespace mode with explicit `watch.namespaces` list by adding controller-namespace secret read permissions to infra-manager. Fixed a control plane panic caused by concurrent Status mutation racing with the watchable Map coalesce goroutine. Fixed BackendTrafficPolicy rate limit `requests` values above uint32 max (4294967295) being silently truncated modulo 2^32 by the rate limit service and Envoy token bucket. The field now rejects such values at admission time with a clear schema validation error. See envoyproxy/ai-gateway#2012. + Fixed status conditions not being updated when a route is rejected due to mutiple errors. # Enhancements that improve performance. performance improvements: | From 1e0d3167a3aa5f5216db165752c71974b9065570 Mon Sep 17 00:00:00 2001 From: zirain Date: Sat, 25 Apr 2026 19:09:52 +0800 Subject: [PATCH 3/3] fix lint Signed-off-by: zirain --- release-notes/current.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-notes/current.yaml b/release-notes/current.yaml index 85d96d69d7..871279210f 100644 --- a/release-notes/current.yaml +++ b/release-notes/current.yaml @@ -76,7 +76,7 @@ bug fixes: | Fixed gateway-helm RBAC in GatewayNamespace mode with explicit `watch.namespaces` list by adding controller-namespace secret read permissions to infra-manager. Fixed a control plane panic caused by concurrent Status mutation racing with the watchable Map coalesce goroutine. Fixed BackendTrafficPolicy rate limit `requests` values above uint32 max (4294967295) being silently truncated modulo 2^32 by the rate limit service and Envoy token bucket. The field now rejects such values at admission time with a clear schema validation error. See envoyproxy/ai-gateway#2012. - Fixed status conditions not being updated when a route is rejected due to mutiple errors. + Fixed status conditions not being updated when a route is rejected due to multiple errors. # Enhancements that improve performance. performance improvements: |