fix(connectivity): drop hostname scoping on inner kagent-controller route#194
Merged
Merged
Conversation
…oute
The inner kagent-controller HTTPRoute (agentgateway data-plane Gateway)
was rendered with the public hostname from kagent.controllerRoute.hostname.
In-cluster A2A callers (klaus-gateway --a2a-url -> agentgateway Service
cluster-DNS host) did not match it, so requests fell through to the MCP
catch-all route ("/") and were rejected with 406 ("client must accept both
application/json and text/event-stream"). The internal data-plane hop must
match any Host; /kagent is more specific than "/", so a hostname-less route
wins. The public route keeps its hostname.
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Problem
The Slack OBO sre-agent turn passed JWT validation (the human muster token was forwarded and accepted —
jwt.subpresent) but died with406 Not Acceptablebefore reaching the agent:Root cause: the inner
kagent-controllerHTTPRoute (on the agentgateway data-plane Gateway) is rendered withhostnames: [<public hostname>]fromkagent.controllerRoute.hostname. In-cluster A2A callers — notably klaus-gateway's--a2a-url, which targets the agentgateway Service cluster-DNS name (agentgateway.<ns>.svc.cluster.local) — send that Service host, which does not match the public hostname. The request falls through to the catch-all MCP route (agentic-platform-mcps, path/) and is handled as MCP Streamable-HTTP, which requires the client to accept bothapplication/jsonandtext/event-stream(the A2A client sends onlytext/event-stream).Fix
Remove the hostname scoping from the inner
kagent-controllerroute only. The inner hop is internal and must match any Host./kagentis more specific than the MCP/route, so a hostname-less route wins for every Host (matching the existing hostname-lessagentic-platform-mcpsandsre-agentroutes on the same Gateway). The outerkagent-controller-publicroute keeps the publichostname(required on the shared TLS Gateway).Test plan
make verify-modes+make verify-metarender guards unaffectedMade with Cursor