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 diff --git a/release-notes/current.yaml b/release-notes/current.yaml index a77ca0a894..871279210f 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 multiple errors. # Enhancements that improve performance. performance improvements: |