Skip to content

[FEATURE] docs: add examples for Gateway guardrails, TLS and mTLS, Agent MCP client and Orchestrator OTLP receiver #359

Description

Summary

Domain: Gateway configuration, plus one Agent and one Orchestrator feature. These user-facing fields have no manifest under examples/ and no usable snippet in README.md, so a user has to read api/v1alpha1/*_types.go to use them: guardrails (spec.guardrails, mentioned nowhere in the README or the examples), server TLS and mutual TLS in both directions (spec.server.tls and spec.client.tls, shipped in v0.31.0), the Agent's MCP client (spec.mcp on Agent, only in config/samples/), and the Orchestrator's OTLP receiver (spec.telemetry.receiver). examples/gateway-with-model-routing/ is also the only example directory without a README.

Acceptance Criteria

  • examples/gateway-with-guardrails/ (gateway.yaml, a ConfigMap holding a .rego policy, README.md) - exercise spec.guardrails.enabled, failMode, configMapRef and optionally externalUrl and externalTimeout. The controller mounts the ConfigMap at /etc/inference-gateway/guardrails and sets GUARDRAILS_ENABLED, GUARDRAILS_POLICY_DIR, GUARDRAILS_FAIL_MODE (deny becomes closed, allow becomes open), GUARDRAILS_EXTERNAL_URL and GUARDRAILS_EXTERNAL_TIMEOUT.
  • examples/gateway-with-mtls/ (gateway.yaml, README.md) - exercise spec.server.tls.enabled with certificateRef and keyRef, spec.server.tls.clientCARef for inbound client certificates, and spec.client.tls.caRef, certificateRef and keyRef for provider mTLS. Cover the default inference-gateway-tls Secret mounted at /app/tls when no refs are set, the https port name, and the switch to TCP probes under clientCARef.
  • examples/agent-with-mcp/ (or an extension of examples/agent-server/agent.yaml) - exercise the Agent's spec.mcp client (enabled, servers, endpoint, refreshInterval, the timeouts and retries, emitted as A2A_MCP_*) against the MCP from examples/mcp-server/, and spec.card.url for an agent that advertises a public URL.
  • examples/orchestrator-telemetry-receiver/ (or a block in examples/daemon/orchestrator.yaml) - exercise spec.telemetry.receiver.enabled and port, which set INFER_TELEMETRY_RECEIVER_ADDRESS and create the <name>-receiver Service, with a Gateway or Agent pushing spans to it.
  • examples/gateway-with-model-routing/README.md - add the missing walkthrough for spec.routing (config and configMapRef), including the <name>-routing ConfigMap and a request against the fast-chat alias.
  • examples/gateway-complete/gateway.yaml - show spec.service (type, port, annotations) and uncomment or document spec.serviceAccount, the two remaining Gateway blocks without an example.

Activity

  1. edenreich commented on Nov 17, 2026

    @edenreich
    Contributor

    @claude can you work on this? use /domain-driven-design /clean-architecture /ponytail:ponytail /go /go-concurrency

  2. inference-gateway-maintainer commented on Nov 17, 2026

    @inference-gateway-maintainer
    ContributorAuthor

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


    I've added the examples for #359 - PR #364 is open

    • Gather context (types, controllers, existing examples)
    • examples/gateway-with-guardrails/: a ConfigMap with two Rego policies (allow-all and block-PII), the Gateway, and a README. The README shows the policies mounted at /etc/inference-gateway/guardrails, the GUARDRAILS_* env vars, and that deny becomes closed and allow becomes open. externalUrl/externalTimeout are included as commented lines.
    • examples/gateway-with-mtls/: certificates.yaml (a throwaway cert-manager CA plus server and client certificates), gateway.yaml and a README. It covers spec.server.tls (with clientCARef for inbound client certificates), spec.client.tls for provider mTLS, the default inference-gateway-tls Secret at /app/tls, the https port name, and the switch to TCP probes.
    • examples/agent-with-mcp/: an Agent with every spec.mcp setting and its A2A_MCP_* env var, connected to the memory server from examples/mcp-server/. It also sets spec.card.url.
    • examples/orchestrator-telemetry-receiver/: an Orchestrator with the receiver turned on and a Gateway that sends its traces to orchestrator-receiver.
    • examples/gateway-with-model-routing/README.md: explains config vs configMapRef and the <name>-routing ConfigMap, and sends requests to the fast-chat alias.
    • examples/gateway-complete/gateway.yaml: adds spec.service (type, port, annotations) and uncomments spec.serviceAccount.
    • Root README.md links the new examples.
    • Committed, opened the PR, and moved the issue to QA on the board.

    Worth knowing

    • Telemetry must be on for the receiver: the operator only passes the receiver address to the daemon when spec.telemetry.enabled is true. The <name>-receiver Service is created either way. The example sets it, and the README calls this out.
    • Stale comment fixed: a comment in gateway-complete said TLS opens port 8443. It doesn't - TLS keeps the server port and renames it https. I corrected the comment.
    • Provider mTLS: the CA in spec.client.tls.caRef is trusted in addition to the normal system certificates (checked in the gateway source), so public providers keep working. To see the client certificate in use, you need your own provider that requires one, so the example leaves OPENAI_API_URL commented out.

    Testing

    • Every Gateway, Agent and Orchestrator in the new and changed manifests loads into the api/v1alpha1 types with unknown fields rejected, so there are no misspelled fields. I used a temporary test for this and didn't commit it.
    • Not tested on a cluster: none of the examples were applied to a live cluster. In particular, I haven't confirmed that the google-calendar-agent:latest image includes an MCP client that reads the A2A_MCP_* variables.

    I didn't open a [DOCS] issue because this change only adds examples and doesn't change behaviour.
    | Branch | PR #364

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

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.37.1 🎉

    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

    enhancementreleased

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions