Repository navigation
fix(gateway): probe over HTTPS when spec.server.tls is on - #312
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 12:47
This was referenced Nov 1, 2026
Closed
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
A Gateway with
spec.server.tls.enablednever became Ready: the controller left the liveness and readiness probes atscheme: HTTPwhile the gateway serves TLS onSERVER_PORT, so every probe got HTTP 400 and the liveness probe restarted the container. The root cause of the rest of the report is the same hard-coded8443assumption in three places.Changes, all in
internal/controller/gateway_controller.go:healthProbe(gateway)builds both probes and setsScheme: HTTPSwhenspec.server.tls.enabledis set. Both probes were identical literals, so this also removes the duplication.buildContainerPortsno longer appends a hard-coded8443/httpscontainer port. The container declares exactly one server port,spec.server.port, namedhttpswhen TLS is on andhttpotherwise (newserverPortNamehelper).desiredServicedrops the phantom hard-coded8443Service port, names the main port after the scheme, and targets the container port by name - so aspec.service.portthat differs fromspec.server.portnow routes to the right container port instead of to its own number.gatewayServicePortno longer falls back to8443when TLS is on with no explicit port: the gateway serves TLS on the default8080in that case, so the Service andstatus.urlnow point at the port the process actually listens on.Tests
Three specs added to
internal/controller/gateway_controller_test.go: HTTPS probes plus the singlehttpscontainer port under TLS, HTTP probes with no8443port when TLS is off, and the Service port/name/targetPort under TLS with no explicit port.task test(237 specs, envtest),task lint(0 issues),task fmt,task vetall pass. No API types changed, so no manifest or deepcopy regeneration.Behavior change to note
Under TLS, the Gateway Service port is renamed
http->httpsand the extra8443port disappears. Anything selecting the Service port by the namehttpunder TLS must switch tohttps.status.urlkeeps the same shape.Closes #310