Repository navigation
feat(gateway): add spec.a2a with Agent CR discovery - #269
Merged
Merged
Conversation
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
October 3, 2026 20:36
This was referenced Oct 3, 2026
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Oct 3, 2026
## [0.27.0](v0.26.0...v0.27.0) (2026-10-03) ### ✨ Features * **gateway:** add spec.a2a with Agent CR discovery ([#269](#269)) ([e707643](e707643)) ### 🐛 Bug Fixes * **gateway:** apply service type and annotations ([#260](#260)) ([1a78570](1a78570)) ### 👷 CI * **deps:** bump the gomod group with 4 updates ([#263](#263)) ([8c30df5](8c30df5)) ### 📚 Documentation * **agents:** add code readability guidelines ([#261](#261)) ([1b8157d](1b8157d)) * **agents:** add code readability guidelines ([#262](#262)) ([41c8e79](41c8e79)) * document gateway api crds and namespace label ([#258](#258)) ([a49a634](a49a634)) * fix install docs pinned version and stale claims ([#257](#257)) ([849e6f5](849e6f5)) * fix readme monitoring labels, configmap and status ([#256](#256)) ([31516bd](31516bd)) * fix removed and renamed CRD fields in docs ([#259](#259)) ([e81ea37](e81ea37)) ### 🔧 Miscellaneous * **deps:** bump claude-code 2.1.278 -> 2.1.280 ([#249](#249)) ([8888466](8888466)) * **deps:** bump claude-code 2.1.280 -> 2.1.283 ([#264](#264)) ([68d42bb](68d42bb)) * **deps:** bump claude-code 2.1.283 -> 2.1.285 ([#267](#267)) ([a940cb0](a940cb0)) * **deps:** bump infer CLI v0.205.3 -> v0.208.0 ([#250](#250)) ([3bcf0b1](3bcf0b1)) * **deps:** bump infer CLI v0.208.0 -> v0.218.0 ([#265](#265)) ([e08051d](e08051d)) * **deps:** bump infer CLI v0.218.0 -> v0.221.1 ([#266](#266)) ([a75538a](a75538a))
Contributor
|
🎉 This PR is included in version 0.27.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Oct 4, 2026
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.
Summary
Adds
Gateway.spec.a2aso the operator can render the gateway's A2A server configuration, including label-selector discovery ofAgentCRs. The gateway never talks to the Kubernetes API, so turningAgentCRs intoA2A_AGENTSis the operator's job.API (
api/v1alpha1/gateway_types.go)spec.a2a.enabled->A2A_ENABLED.spec.a2a.agents[]({name, url}) -> static entries inA2A_AGENTSas<name>=<url>.spec.a2a.serviceDiscovery(enabled,namespace,selector) -> listsAgentCRs matching the selector and appends<metadata.name>=<status.card.url>, falling back to the in-cluster Service URL when the card URL is not reported yet.spec.a2a.resourceUrl->A2A_RESOURCE_URL, defaulting to<scheme>://<first HTTPRoute hostname>/a2athe same way the MCP resource URL does.spec.a2a.timeouts.client/spec.a2a.timeouts.streamIdle/spec.a2a.cardRefreshInterval->A2A_CLIENT_TIMEOUT,A2A_STREAM_IDLE_TIMEOUT,A2A_CARD_REFRESH_INTERVAL, emitted only when set so the gateway's own defaults apply otherwise.status.a2aAgents+status.a2aAgentCount, with anA2Aprint column.Controller (
internal/controller/gateway_controller.go)AgentCRs and re-renders the Deployment when a matching Agent is created, updated or deleted, so theA2A_AGENTSenv var changes trigger a rollout.^[a-z0-9_-]+$grammar the gateway shares betweenMCP_SERVERSandA2A_AGENTS; an invalid or duplicate alias degrades to a bare URL rather than dropping the agent.toolsis reserved for MCP only, so it stays a valid A2A alias.Refactors pulled out of the duplication
aliasedEndpointsnow carries the shared alias/dedup/sort logic for bothMCP_SERVERSandA2A_AGENTS.routedResourceURL(gateway, path)backs bothmcpResourceURLanda2aResourceURL.gatewaysSelecting(ctx, obj, discovery)backs both the MCP and Agent watch mappers.Behaviour of the existing MCP path is unchanged; the existing MCP tests cover the refactor.
Testing
task test(169 specs, all green),task lint(0 issues),task generate,task manifests.Downstream impact
The
GatewayCRD grows a new optional block, so the Helm chart values and the docs pages for the Gateway CRD will need thespec.a2areference once this lands. Gateway-side support is inference-gateway/inference-gateway#756, which is still open -spec.a2arenders env vars that only take effect on a gateway image carrying that PR.Closes #268