Skip to content

Commit 13799c1

Browse files
syn-zhuclaude
andcommitted
fix: set appProtocol on agent Services for A2A discovery
The kagent controller creates a Service for each Agent CR but does not set appProtocol on the port. Without appProtocol: kgateway.dev/a2a, AgentGateway's A2A plugin cannot discover agent Services, forcing traffic through the controller's passthrough proxy which drops HTTP headers (including traceparent). Set appProtocol: kgateway.dev/a2a on the agent Service port so AgentGateway can route directly to agent pods, preserving all headers and enabling end-to-end distributed tracing. Closes #1295 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a7fe733 commit 13799c1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

go/internal/controller/translator/agent/adk_api_translator.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,10 @@ func (a *adkApiTranslator) buildManifest(
532532
Spec: corev1.ServiceSpec{
533533
Selector: selectorLabels,
534534
Ports: []corev1.ServicePort{{
535-
Name: "http",
536-
Port: dep.Port,
537-
TargetPort: intstr.FromInt(int(dep.Port)),
535+
Name: "http",
536+
Port: dep.Port,
537+
TargetPort: intstr.FromInt(int(dep.Port)),
538+
AppProtocol: ptr.To("kgateway.dev/a2a"),
538539
}},
539540
Type: corev1.ServiceTypeClusterIP,
540541
},

0 commit comments

Comments
 (0)