Repository navigation
Closed
Labels
releasedShipped in a release
Description
Summary
The gateway gained mutual TLS in both directions (inference-gateway/inference-gateway#818, closes inference-gateway/inference-gateway#817), but a Gateway custom resource cannot express it, so the mTLS example in that PR has to ship a plain Deployment.
New gateway settings:
| Variable | Direction | What it does |
|---|---|---|
SERVER_TLS_CLIENT_CA_PATH |
inbound | requires and verifies a client certificate signed by that bundle (tls.RequireAndVerifyClientCert) |
CLIENT_TLS_CA_PATH |
outbound | extra CA trusted on top of the system roots when calling providers |
CLIENT_TLS_CERT_PATH / CLIENT_TLS_KEY_PATH |
outbound | the certificate the gateway presents to a provider that requires mTLS |
SERVER_TLS_CERT_PATH / SERVER_TLS_KEY_PATH and CLIENT_TLS_MIN_VERSION already exist and are covered by spec.server.tls.
What is missing in the CRD
spec.server.tls.clientCARef(aSecretKeySelector, likecertificateRef/keyRef): mounted, andSERVER_TLS_CLIENT_CA_PATHset from it. cert-manager already writesca.crtinto the same Secret as the server keypair, so in practice this is one more key from one Secret.- An outbound block -
spec.client.tls(orspec.providers.tls) withcaRef,certificateRefandkeyRef- mounted, andCLIENT_TLS_CA_PATH/CLIENT_TLS_CERT_PATH/CLIENT_TLS_KEY_PATHset from it. Needed for any provider or in-cluster proxy that requires a client certificate, and for a private CA in front of a provider. - Health probes have to work while the server demands a client certificate. [BUG] Gateway with spec.server.tls never becomes Ready: probes stay HTTP on the TLS port #310 already covers
scheme: HTTPS, butscheme: HTTPSalone is not enough onceclientCARefis set: the kubelet cannot present a client certificate, so anhttpGetprobe fails the handshake no matter the scheme. Options: atcpSocketprobe when a client CA is configured (what the example does), anexecprobe running curl with the certificate, or a plain-HTTP health listener. Worth deciding together with [BUG] Gateway with spec.server.tls never becomes Ready: probes stay HTTP on the TLS port #310.
Context
- gateway PR: feat: mutual tls for the gateway server and its provider clients inference-gateway#818 -
examples/kubernetes/mtls(cert-manager issues the CA, the gateway server certificate, the gateway client certificate and the provider certificate) is the example that would move to aGatewayCR once this lands. - Generated reference for the four variables:
Configurations.mdin that PR.
Activity
edenreich commentedon Nov 1, 2026
@claude can you work on this? use /ponytail:ponytail
inference-gateway-maintainer commentedon Nov 1, 2026
Claude finished @edenreich's task in 6m 58s —— View job •
feat/issue-311-20261101-1306• Create PR ➔Done - PR #313 is open
spec.server.tlshandling in the Gateway reconcilerclientCARef+ outboundspec.client.tlsto the API typestcpSocketmanifests/task test/task lint/task vetWhat it does
Inbound -
spec.server.tls.clientCARef(aSecretKeySelector, same shape ascertificateRef/keyRef) mounts at/app/tls/client-ca/<key>and setsSERVER_TLS_CLIENT_CA_PATH. With cert-manager this is just one more key (ca.crt) off the Secret already holding the server keypair.Outbound - new
spec.client.tlswithcaRef,certificateRef,keyRef, mounted under/app/tls/client/{ca,cert,key}/<key>and emitted asCLIENT_TLS_CA_PATH/CLIENT_TLS_CERT_PATH/CLIENT_TLS_KEY_PATH. Each reference is independent, so a private provider CA works without a client certificate. Put it under its ownspec.clientblock rather thanspec.providers.tls(that one is a list) - it also leaves the obvious home forCLIENT_TLS_MIN_VERSIONlater.Probes (point 3) - when
clientCARefis set, liveness and readiness switch totcpSocketon the server port.scheme: HTTPSfrom #312 is not enough there: the kubelet has no client certificate, so the handshake fails whatever the scheme. The plain server-TLS path from #312 is untouched.Implementation is small:
secretKeyVolumesfactored out of the existingtlsVolumesclosure and reused for the client block, plusserverMTLSEnabledandclientTLSEnv. Three new specs cover the client CA mount/env/TCP probe, thespec.client.tlsmounts/env, and the absence ofCLIENT_TLS_when unset.Follow-ups filed
examples/kubernetes/mtlsonto aGatewayCR.Skipped
No example manifest in this repo (the mTLS example lives in the gateway repo, tracked above) and no validation webhook rejecting a cert without a key - the gateway already errors on that at startup. I did not run this against a real cluster with cert-manager, so the end-to-end handshake is verified only by the generated Deployment, not by live traffic. If the gateway's health listener later moves off the mTLS port, the
tcpSocketprobe becomes weaker than it needs to be and should go back tohttpGet.| Branch
feat(gateway): express mutual TLS in both directions
chore(release): 🔖 0.31.0 [skip ci]
inference-gateway-releaser commentedon Nov 1, 2026
🎉 This issue has been resolved in version 0.31.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀