Repository navigation
fix(gateway): default spec.server and name the service port in status.url - #306
Merged
Merged
Conversation
….url
A Gateway without spec.server serves on 8080, but the PORT column was empty and status.url omitted the port. Default spec.server to {} so the nested host/port defaults land, and append the service port whenever it is not the scheme's implicit 80/443; HTTPRoute hostname URLs keep their implicit default.
3 tasks
inference-gateway-maintainer
Bot
marked this pull request as ready for review
October 31, 2026 20:03
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
October 31, 2026 20:03
Contributor
|
🎉 This PR is included in version 0.29.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.
Resolves #304
Summary
A
Gatewaywithoutspec.serverserves on 8080 but nothing said so: thePORTcolumn was empty andstatus.urlomitted the port, so clients dials port 80 and were refused. The fix defaultsspec.serverto{}on the CRD so the nestedhost/portdefaults land, and names the Service port instatus.urlwhenever it is not the scheme's implicit default (80 for http, 443 for https).Changes
api/v1alpha1/gateway_types.go: add+kubebuilder:default={}onspec.serverso newly created Gateways getspec.server.host: 0.0.0.0andspec.server.port: 8080(the Port printcolumn reads.spec.server.port). Explicit values, like the port the CLI sets as its workaround in feat(teleport): deploy a gateway per kubernetes workspace that holds the provider keys cli#1667, keep winning; the workaround stays harmless and can be dropped at leisure.internal/controller/gateway_controller.go: build the status URL through agatewayURLclosure that appends the Service main port (same precedence asdesiredService, via the existinggatewayServicePorthelper) when it is not the scheme default, through a newschemeDefaultPorthelper. URLs taken from an HTTPRoute hostname keep their implicit 80/443 and stay portless; the service-FQDN fallback (including when routing is enabled but the HTTPRoute is missing) now names its port, e.g.http://<name>.<ns>.svc.cluster.local:8080.manifests/crds.yaml+manifests/install.yaml.spec.servergetsspec.server.port == 8080from the apiserver default andstatus.url == http://<name>.<ns>.svc.cluster.local:8080.Notes
no docs behavior in the operator repo changed beyond the status URL formatting; the docs ticket covers it.