Repository navigation
feat(gateway): validate mutual TLS field combinations - #315
Merged
Merged
Conversation
Co-authored-by: Eden Reich <[email protected]>
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
November 1, 2026 13:34
This was referenced Nov 1, 2026
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Nov 1, 2026
## [0.31.0](v0.30.0...v0.31.0) (2026-11-01) ### ✨ Features * **gateway:** express mutual TLS in both directions ([#313](#313)) ([3cd4b24](3cd4b24)), closes [#311](#311) * **gateway:** validate mutual TLS field combinations ([#315](#315)) ([d43a7ea](d43a7ea)) ### 🐛 Bug Fixes * **gateway:** probe over HTTPS when spec.server.tls is on ([#312](#312)) ([2e3400c](2e3400c))
Contributor
|
🎉 This PR is included in version 0.31.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
Closes #314.
Commit 3cd4b24 (#313) already landed the first two acceptance criteria:
spec.server.tls.clientCARefis mounted and surfaced asSERVER_TLS_CLIENT_CA_PATH, andspec.client.tls.{caRef,certificateRef,keyRef}are mounted and surfaced asCLIENT_TLS_CA_PATH/CLIENT_TLS_CERT_PATH/CLIENT_TLS_KEY_PATH. What was missing is the validation, so this PR adds only that.Two CEL rules on the CRD, matching the house pattern already used in
orchestrator_types.go, so the API server rejects the broken combinations at admission instead of the gateway crash-looping on startup:spec.server.tls:clientCARefrequiresenabled: true. Without it the controller emits noSERVER_TLS_*env vars at all, so inbound mTLS was silently ignored - which is exactly the "client CA without server certificate and key" case from the gateway's startup error.spec.client.tls:certificateRefandkeyRefmust be set together. A certificate without its key (or a key without its certificate) cannot build a client keypair. An outboundcaRefon its own stays valid, since trusting a private CA does not need a client certificate.Testing
task test- 5 new envtest cases ininternal/controller/gateway_controller_test.gocovering both rejections, the key-without-certificate direction, and the two valid shapes.internal/controllercoverage 71.6%.task fmt,task vet,task lint- clean.task manifests- regenerated CRD and install manifests are committed alongside the API change.Docs and the Helm values criterion
The CRD reference lives in
inference-gateway/docs, so the new fields are tracked there: inference-gateway/docs#1068.The issue's "Helm values" criterion has no target in the org - there is no
Chart.yamlin anyinference-gatewayrepo (gh search code --owner inference-gateway --filename Chart.yamlreturns nothing). The operator installs via kustomize (config/rendered intomanifests/install.yaml), and the new fields are Gateway CR spec fields rather than operator deployment settings, so nothing in the install manifests needs to change beyond the regenerated CRD included here. If a chart is planned, its values should surface these fields then.Generated with Claude Code