You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Gateway with spec.server.tls never becomes Ready: probes stay HTTP on the TLS port #310
A Gateway with spec.server.tls.enabled never becomes Ready. The controller keeps the liveness and readiness probes at scheme: HTTP on the server port, but the gateway then serves TLS on that port (ListenAndServeTLS on SERVER_PORT). Every probe gets HTTP 400 and the liveness probe restarts the container. The controller also adds a hard-coded 8443 container port named https, which duplicates the http port when spec.server.port is 8443 and points at nothing otherwise.
Found while moving inference-gateway/cli's examples/kubernetes-session-teleport-netbird (inference-gateway/cli#1671) to TLS on the gateway hop.
Steps to Reproduce
Install operator v0.30.0 and issue a certificate into a Secret gateway-tls (for example with cert-manager).
Apply a Gateway (image ghcr.io/inference-gateway/inference-gateway:0.60.1) with:
Inspect the Deployment and the pod: kubectl get deploy gateway -o jsonpath='{.spec.template.spec.containers[0].readinessProbe.httpGet}' and kubectl get events --field-selector reason=Unhealthy.
Expected Behavior
The probes use scheme: HTTPS whenever spec.server.tls.enabled is set, and the pod becomes Ready.
The container declares one port, spec.server.port, named https when TLS is on.
Actual Behavior
readinessProbe.httpGet is {"path":"/health","port":8443,"scheme":"HTTP"}. The kubelet reports Liveness probe failed: HTTP probe failed with statuscode: 400 and restarts the container, so the pod sits at 1/2 with restarts and the old ReplicaSet never scales down.
The container ports are [{"containerPort":8443,"name":"http"},{"containerPort":8443,"name":"https"}]. With the default port 8080, https 8443 is declared while the gateway serves TLS on 8080.
All four symptoms came from the same hard-coded 8443 assumption in three spots, so the fix is one helper plus three deletions:
New healthProbe(gateway) builds both probes and sets Scheme: HTTPS when TLS is on. The two probes were identical literals, so the duplication goes away with it.
buildContainerPorts no longer appends 8443/https. One port, spec.server.port, named via a new serverPortName helper.
desiredService drops the phantom 8443 port, names the main port after the scheme, and targets the container port by name - which also fixes a latent bug where a spec.service.port differing from spec.server.port targeted its own number instead of the container port.
gatewayServicePort no longer returns 8443 when TLS is on without an explicit port: the gateway serves TLS on the default 8080 there, so the Service and status.url now match reality.
Worth knowing: under TLS the Service port name changes http -> https. Nothing in this repo selects it by name (the HTTPRoute backendRef uses the number), but anything of yours that does needs updating. Docs ticket filed as inference-gateway/docs#1061.
Not done / not checked: no e2e run against a real cluster with a cert-manager Secret, so the "pod actually goes Ready with ghcr.io/inference-gateway/inference-gateway:0.60.1" leg is unverified - envtest cannot run probes. I also did not add a caBundle/self-signed-cert path for the probe: the kubelet's HTTPS prober skips certificate verification, so a self-signed cert is fine, but that is a property of the kubelet, not something this PR enforces.
| branch fix/issue-310-20261101-1240
Activity
edenreich commentedon Nov 1, 2026
@claude can you work on this? use /ponytail:ponytail /go /go-concurrency
inference-gateway-maintainer commentedon Nov 1, 2026
Claude finished @edenreich's task in 6m 52s —— View job •
fix/issue-310-20261101-1240• [Create PR ➔](https://github.com/inference-gateway/operator/compare/main...fix/issue-310-20261101-1240?quick_pull=1&title=Issue%20%23310%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23310%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Fixed: TLS probes and the phantom 8443 ports
internal/controller/gateway_controller.go(probes, container ports, Service ports)scheme: HTTPSwhenspec.server.tls.enabledspec.server.port, namedhttpsunder TLS8443port, named the main port after the schemegatewayServicePort: no more8443fallback (TLS with no explicit port serves on8080)task fmt/vet/lint/test- 237 specs pass, 0 lint issuesAll four symptoms came from the same hard-coded
8443assumption in three spots, so the fix is one helper plus three deletions:healthProbe(gateway)builds both probes and setsScheme: HTTPSwhen TLS is on. The two probes were identical literals, so the duplication goes away with it.buildContainerPortsno longer appends8443/https. One port,spec.server.port, named via a newserverPortNamehelper.desiredServicedrops the phantom8443port, names the main port after the scheme, and targets the container port by name - which also fixes a latent bug where aspec.service.portdiffering fromspec.server.porttargeted its own number instead of the container port.gatewayServicePortno longer returns8443when TLS is on without an explicit port: the gateway serves TLS on the default8080there, so the Service andstatus.urlnow match reality.Worth knowing: under TLS the Service port name changes
http->https. Nothing in this repo selects it by name (the HTTPRoute backendRef uses the number), but anything of yours that does needs updating. Docs ticket filed as inference-gateway/docs#1061.Not done / not checked: no e2e run against a real cluster with a cert-manager Secret, so the "pod actually goes Ready with
ghcr.io/inference-gateway/inference-gateway:0.60.1" leg is unverified - envtest cannot run probes. I also did not add acaBundle/self-signed-cert path for the probe: the kubelet's HTTPS prober skips certificate verification, so a self-signed cert is fine, but that is a property of the kubelet, not something this PR enforces.| branch
fix/issue-310-20261101-1240inference-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 📦🚀
docs(examples): add kubernetes-session-teleport-netbird to teleport o…