Skip to content

[DOCS] Gateway CRD: mutual TLS fields (clientCARef and spec.client.tls) #1063

Closed

Description

@inference-gateway-maintainer

Summary

The Gateway CRD gained mutual TLS fields in inference-gateway/operator#313 (closes inference-gateway/operator#311). The Gateway CRD reference does not cover them yet.

New fields and the gateway env vars they drive:

  • spec.server.tls.clientCARef (SecretKeySelector) - inbound. Sets SERVER_TLS_CLIENT_CA_PATH, so the gateway requires and verifies a client certificate signed by that bundle. cert-manager writes ca.crt into the same Secret as the server keypair, so this is usually one more key off the Secret already used by certificateRef/keyRef.
  • spec.client.tls.caRef - outbound. Sets CLIENT_TLS_CA_PATH, a CA trusted on top of the system roots when calling providers.
  • spec.client.tls.certificateRef / spec.client.tls.keyRef - outbound. Set CLIENT_TLS_CERT_PATH / CLIENT_TLS_KEY_PATH, the certificate the gateway presents to a provider that requires mTLS.

Behavior worth documenting: when clientCARef is set, the operator switches the liveness and readiness probes to tcpSocket on the server port. The kubelet cannot present a client certificate, so an httpGet probe fails the TLS handshake regardless of scheme. Plain server TLS (no client CA) keeps httpGet with scheme: HTTPS.

Affected pages: the Gateway CRD reference / API fields page, and wherever gateway TLS setup is described (an end-to-end mTLS walkthrough with cert-manager would pair well, mirroring examples/kubernetes/mtls in the gateway repo).

Acceptance Criteria

  • Gateway CRD reference lists spec.server.tls.clientCARef and the spec.client.tls block with the env var each one drives
  • The tcpSocket probe fallback under inbound mTLS is documented, including why httpGet cannot work
  • TLS setup docs show a cert-manager based mTLS example using a Gateway CR rather than a raw Deployment

Activity

  1. added
    documentation
    on Nov 1, 2026
  2. edenreich commented on Nov 1, 2026

    @edenreich
    Contributor

    @claude can you document this? use /ponytail:ponytail first check if it's still relevant.

  3. inference-gateway-maintainer commented on Nov 1, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 2m 40s —— View job • docs/issue-1063-20261101-1327


    Documented the Gateway CRD mutual TLS fields

    • Check whether the issue is still relevant
    • Gateway CRD reference: spec.server.tls.clientCARef + the spec.client.tls block with the env var each drives
    • Document the tcpSocket probe fallback under inbound mTLS
    • cert-manager mTLS example using a Gateway CR
    • Validate (lint:md, format:check, build) and open the PR

    Still relevant, but only half of it. The env var side (SERVER_TLS_CLIENT_CA_PATH, CLIENT_TLS_*) already landed in configuration.md under Mutual TLS. What was genuinely missing is the CRD side - operator.md had no clientCARef and no spec.client.tls at all. So I only wrote the CRD section and linked the two, rather than restating the env var semantics twice.

    What changed (operator.md, one new subsection)

    • Field -> env var -> mount path table for server.tls.clientCARef (/app/tls/client-ca) and client.tls.{caRef,certificateRef,keyRef} (/app/tls/client/{ca,cert,key}), all read off gateway_controller.go rather than guessed.
    • The inbound/outbound split, and that clientCARef is only read when spec.server.tls.enabled is true while spec.client.tls is independent of server TLS.
    • The tcpSocket probe fallback and why httpGet fails under any scheme (the kubelet cannot present a client certificate), plus the consequence worth knowing: the probe no longer calls /health, so a listening-but-unhealthy gateway stays Ready.
    • A cert-manager example with a Certificate plus a Gateway CR and the rendered env vars. It reuses the existing inference-gateway-tls fallback Secret, so certificateRef/keyRef stay unset and ca.crt off that same Secret becomes the client CA - one field instead of three.
    • spec.client.tls row in the Gateway spec field table, and a one-line cross-link from configuration.md to the new section.

    bun run format:check, bun run lint:md and bun run build all pass. The cross-link anchor was verified against the built HTML, not assumed.

    Create a PR - already opened as #1067.

    Skipped: no standalone mTLS walkthrough page and no gateway-repo examples/kubernetes/mtls content copied in - the CRD section carries the end-to-end example, and a second page would duplicate configuration.md. Risk: the mount paths and probe behavior are read from operator main, so a path rename there silently dates this page, and I did not check whether the operator version that introduced these fields is stated anywhere (other sections in the page do pin versions).
    | Branch

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

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.24 🎉

    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

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions