Skip to content

[DOCS] Document Gateway.spec.a2a and Agent CR discovery #952

Closed

Description

@inference-gateway-maintainer

Summary

The Gateway CRD in inference-gateway/operator gained a new optional spec.a2a block (operator PR inference-gateway/operator#269, issue inference-gateway/operator#268). It lets an operator user turn the gateway into an A2A server and have the operator discover Agent CRs by label selector, rendering them into A2A_AGENTS.

New user-facing fields:

  • spec.a2a.enabled - renders A2A_ENABLED.
  • spec.a2a.agents[] ({name, url}) - static entries rendered into A2A_AGENTS as <name>=<url>.
  • spec.a2a.serviceDiscovery (enabled, namespace, selector) - discovers Agent CRs 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 - renders A2A_RESOURCE_URL, defaulting to <scheme>://<first HTTPRoute hostname>/a2a.
  • spec.a2a.timeouts.client, spec.a2a.timeouts.streamIdle, spec.a2a.cardRefreshInterval - render A2A_CLIENT_TIMEOUT, A2A_STREAM_IDLE_TIMEOUT and A2A_CARD_REFRESH_INTERVAL.
  • New status fields status.a2aAgents / status.a2aAgentCount and an A2A print column on kubectl get gateways.

Note the gateway-side support is inference-gateway/inference-gateway#756, which is still open; the docs for spec.a2a should land alongside it.

Affected pages

  • The Gateway CRD reference (the spec.mcp section is the closest existing model - spec.a2a mirrors its shape).
  • Any operator "deploying agents" / A2A guide that currently stops at the Agent CR, since the gateway can now front them.

Acceptance Criteria

  • The Gateway CRD reference documents every spec.a2a field and the env var each one renders.
  • Label-selector discovery of Agent CRs is documented, including the status.card.url to Service URL fallback.
  • The alias rules are stated: aliases must match ^[a-z0-9_-]+$ and be unique, per-agent credentials go into the URL as basic auth, and an invalid or duplicate alias degrades to a bare URL.
  • status.a2aAgentCount and the new A2A print column are covered.

Activity

  1. added
    documentation
    on Oct 3, 2026
  2. edenreich commented on Oct 3, 2026

    @edenreich
    Contributor

    @claude can you document this? use /ponytail:ponytail

  3. added theissue type on Oct 3, 2026
  4. inference-gateway-maintainer commented on Oct 3, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 3m 33s —— View job • docs/issue-952-20261003-2053 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-952-20261003-2053?quick_pull=1&title=Issue%20%23952%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23952%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documenting Gateway.spec.a2a

    • Gather context (operator.md Gateway CRD, spec.mcp as the model, Agent CR section)
    • Read the upstream operator CRD + controller for exact field shapes, defaults and fallback behavior
    • Write the spec.a2a reference, discovery + alias rules, status fields and print columns
    • Validate (lint:md, format:check, build - all pass)
    • Commit and open PR

    What landed

    All changes are in operator.md:

    • New ## A2A Agents (spec.a2a) section - field table for enabled, agents[].{name,url}, serviceDiscovery.{enabled,namespace,selector}, resourceUrl, timeouts.client, timeouts.streamIdle, cardRefreshInterval, each with the env var it renders (A2A_ENABLED, A2A_AGENTS, A2A_RESOURCE_URL, A2A_CLIENT_TIMEOUT, A2A_STREAM_IDLE_TIMEOUT, A2A_CARD_REFRESH_INTERVAL).
    • ### Discovering Agent CRs - label-selector discovery, the status.card.url to in-cluster Service URL fallback, the Agent watch that re-renders A2A_AGENTS without a Gateway edit, union/dedup-on-URL/sort, and the logged-and-ignored discovery error.
    • ### Alias rules - ^[a-z0-9_-]+$, unique across static and discovered agents, degrade-to-bare-URL on failure, per-agent credentials as basic auth in the URL (the gateway does not forward the caller's bearer token).
    • ### Protected resource URL - the <scheme>://<first HTTPRoute hostname>/a2a default and when to pin it.
    • Runnable Gateway example plus the resulting pod env vars.
    • Gateway CRD field table rows for a2a.*; the Agent CR section now names the gateway as a dispatcher (it previously said the gateway never calls agents) and notes metadata.name as the discovery alias.
    • Status section: status.a2aAgents[] / status.a2aAgentCount and the MCPS / A2A print columns on kubectl get gateways.

    Field shapes, defaults and behavior came from the operator CRD and controller rather than the issue summary, so the A2A column example matches the actual printcolumn order.

    Not done: no links to generated configuration.md anchors for the A2A_* variables - gateway-side support is unreleased and the schema does not carry them yet, so the section instead states that spec.a2a is ignored by older gateway images. a2a.md was left alone; it is a CLI-oriented page and the acceptance criteria are covered by the operator reference.

    PR

    #953
    | Branch

  5. moved this from Todo to In progress in 2026on Oct 3, 2026
  6. inference-gateway-releaser commented on Oct 4, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.21 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions