Repository navigation
Conversation
Signed-off-by: Ivan Porta <porta.ivan@outlook.com>
GTRekter
force-pushed
the
ivanp/gateway-gwapi-res
branch
from
November 11, 2026 13:00
3e1ba1c to
bbeb8bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gateway previously built its HTTP routes exclusively from the ServiceProfile, so HTTPRoutes served by the OutboundPolicies API were ignored for gatewayed traffic.
This change make the gateway's HTTP stack follow the same discovery logic as the sidecar: the ServiceProfile is used only when it provides routes or target overrides; otherwise routes are built from the client policy, including GWAPI HTTPRoutes attached to the target Service.
Local Test
To test the change locally, I’ve spun up two k3d clusters on a shared Docker network and installed Linkerd and Linkerd multicluster on both, linked in gateway mode. The client is deployed in k3d-02, and both versions of the server in k3d-01, together with an HTTPRoute (attached to the web Service) that routes traffic to v2 of the server when the request has the x-version: v2 header. The web Service is exported, so it’s mirrored into k3d-02 as web-k3d-01; the gateway in k3d-01 runs the proxy built from this branch.
flowchart LR subgraph net["Shared Docker network: playground (172.18.0.0/16)"] subgraph src["k3d cluster 02 — source (BEL enterprise-2.19.3)"] client["client pod (ns test)<br/>curl + injected linkerd-proxy"] mirror["Service web-k3d-01 (ns test)<br/>mirror of exported web"] sm["controller-k3d-01<br/>service mirror (Link, gateway mode)"] end subgraph tgt["k3d cluster 01 — target (BEL enterprise-2.19.3)"] gw["linkerd-gateway (:4143)<br/>proxy: localhost/linkerd/proxy:gwapi-dev<br/>(this branch)"] dest["linkerd-destination<br/>policy controller"] route["HTTPRoute web-route (ns test)<br/>parentRef: Service web:80"] web["Service web :80 (exported)<br/>podinfo 'v1 backend'"] webv2["Service web-v2 :80<br/>podinfo 'v2 backend'"] end end client -- "HTTP GET web-k3d-01.test:80" --> mirror mirror -- "endpoints = gateway 172.18.0.3/.4:4143<br/>mTLS + transport header<br/>dst = web.test.svc.cluster.local:80" --> gw sm -. "mirrors exported Services<br/>probes gateway :4191" .-> gw dest -. "OutboundPolicies(web.test:80)<br/>serves HTTPRoute web-route" .-> gw route -. "attached to" .-> web gw -- "default rule" --> web gw -- "header x-version: v2" --> webv2If we send a request
If we check the gateway logs, we are going to see a similar output as the ordinary proxy.
The metrics will confirm the routing: