Generated with Claude Code
Description
The MCPGatewayExtension controller creates an HTTPRoute (mcp-gateway-route) targeting only the listener specified in spec.targetRef.sectionName. When a Gateway has both HTTP and HTTPS listeners for the same hostname, the HTTPS listener gets 0 attached routes and TLS traffic cannot reach the broker.
Steps to Reproduce
-
Create a Gateway with both HTTP and HTTPS listeners on the same hostname:
listeners:
- name: mcp
hostname: team-a.mcp.example.com
port: 8080
protocol: HTTP
- name: mcp-https
hostname: team-a.mcp.example.com
port: 8443
protocol: HTTPS
tls:
mode: Terminate
certificateRefs:
- name: gateway-tls-cert
-
Create an MCPGatewayExtension targeting the HTTP listener:
spec:
targetRef:
sectionName: mcp
name: team-a-gateway
-
The controller creates mcp-gateway-route with parentRefs[0].sectionName: mcp only.
-
Verify:
$ kubectl get gateway -n team-a -o jsonpath='{range .status.listeners[*]}{.name}: {.attachedRoutes}{"\n"}{end}'
mcp: 1
mcp-https: 0
-
MCP requests over HTTPS fail — the HTTPS listener has no route to the broker.
Expected Behavior
The controller should create HTTPRoute(s) that attach to all listeners serving the same hostname, or at minimum allow specifying multiple sectionName targets. This would allow TLS traffic to reach the broker without manually creating a second HTTPRoute.
Current Workaround
Manually create a second HTTPRoute targeting the HTTPS listener:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: mcp-gateway-route-tls
namespace: team-a
spec:
hostnames:
- team-a.mcp.example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: team-a-gateway
sectionName: mcp-https
rules:
- matches:
- path:
type: PathPrefix
value: /mcp
backendRefs:
- name: mcp-gateway
port: 8080
Notes
Description
The MCPGatewayExtension controller creates an HTTPRoute (
mcp-gateway-route) targeting only the listener specified inspec.targetRef.sectionName. When a Gateway has both HTTP and HTTPS listeners for the same hostname, the HTTPS listener gets 0 attached routes and TLS traffic cannot reach the broker.Steps to Reproduce
Create a Gateway with both HTTP and HTTPS listeners on the same hostname:
Create an MCPGatewayExtension targeting the HTTP listener:
The controller creates
mcp-gateway-routewithparentRefs[0].sectionName: mcponly.Verify:
MCP requests over HTTPS fail — the HTTPS listener has no route to the broker.
Expected Behavior
The controller should create HTTPRoute(s) that attach to all listeners serving the same hostname, or at minimum allow specifying multiple
sectionNametargets. This would allow TLS traffic to reach the broker without manually creating a second HTTPRoute.Current Workaround
Manually create a second HTTPRoute targeting the HTTPS listener:
Notes