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 without spec.server shows no port and its status.url omits 8080 #304
A Gateway without spec.server serves on 8080, but nothing in its spec or status says so. The PORT column of kubectl get gateways is empty, and status.url carries no port, so a client that dials status.url reaches port 80
and gets refused.
The effective port only lives in controller code (gatewayServerPort and desiredService fall back to 8080). spec.server is an optional pointer without a default, so the CRD default on server.port (8080) never applies when server is omitted, and the PORT printer column reads .spec.server.port. getHostAndScheme builds status.url as <scheme>://<name>.<namespace>.svc.cluster.local without the Service port.
Steps to Reproduce
Install operator v0.28.1 and label a namespace inference-gateway.com/managed=true.
Apply a Gateway without spec.server, e.g. one provider with an env var from a Secret.
kubectl get gateways and kubectl get gateway <name> -o jsonpath='{.status.url}'.
Expected Behavior
PORT shows 8080, for example by defaulting spec.server to {} (+kubebuilder:default={}) so the nested port and host defaults land.
status.url names the port the Service listens on when it is not the scheme's default, e.g. http://<name>.<namespace>.svc.cluster.local:8080. A URL from an HTTPRoute hostname keeps its implicit 80/443.
Actual Behavior
NAME URL PORT PROVIDERS
infer-gateway-ad2f918bfc2f http://infer-gateway-ad2f918bfc2f.infer-workspaces.svc.cluster.local ollama_cloud
The Service infer-gateway-ad2f918bfc2f listens on 8080/TCP. Found while deploying a Gateway per infer workspace
from the CLI, which now sets spec.server.port: 8080 explicitly to work around it.
Fixed in PR #306 (ready for review, branch fix/issue-304).
What changed (commit 3538863):
api/v1alpha1/gateway_types.go: spec.server now carries +kubebuilder:default={}, so the API server applies the nested defaults (port: 8080, host: 0.0.0.0) even when server is omitted - the PORT printcolumn (which reads .spec.server.port) renders 8080 for new Gateways. Explicit values keep winning, so the CLI workaround from feat(teleport): deploy a gateway per kubernetes workspace that holds the provider keys cli#1667 (spec.server.port: 8080) still works unchanged.
internal/controller/gateway_controller.go: status.url is now built by a gatewayURL closure that appends the Service main port (reusing the existing gatewayServicePort, same precedence as desiredService) whenever it is not the scheme's implicit default (80 for http, 443 for https, via a new small schemeDefaultPort helper). Result: http://<name>.<ns>.svc.cluster.local:8080. URLs taken from an HTTPRoute hostname keep their implicit 80/443 and stay portless.
New acceptance test (envtest): a Gateway created without spec.server gets spec.server.port == 8080 from the CRD default and status.url == http://<name>.<ns>.svc.cluster.local:8080.
Verification: task test (incl. the new test), task lint, gofmt/vet all pass, and the repo's pre-commit suite (manifest regen, generate, lint, fmt, vet, test) passed at commit time. git status is clean and the PR is viewable.
Bookkeeping: issue added to the Roadmap 2026 board and set to QA; docs ticket filed as inference-gateway/docs#1055 for the changed user-facing behavior.
Skipped: the same nil-server gap likely exists for Agent/MCP CRDs but was not touched (out of scope); existing Gateways pick up the new CRD default only on their next spec write. Risk: anything parsing status.url will now see the port appended for service URLs.
Activity
feat(teleport): deploy a gateway per kubernetes workspace that holds …
edenreich commentedon Oct 31, 2026
@infer can you fix this? use /ponytail:ponytail
inference-gateway-maintainer commentedon Oct 31, 2026
Model:
ollama_cloud/glm-5.3-flash· Action:v0.59.2· CLI:v0.238.0· Gateway:v0.60.1· View JobTodos
Pull Request
#306
✅ Infer Result: Success
Fixed in PR #306 (ready for review, branch
fix/issue-304).What changed (commit
3538863):api/v1alpha1/gateway_types.go:spec.servernow carries+kubebuilder:default={}, so the API server applies the nested defaults (port: 8080,host: 0.0.0.0) even whenserveris omitted - thePORTprintcolumn (which reads.spec.server.port) renders8080for new Gateways. Explicit values keep winning, so the CLI workaround from feat(teleport): deploy a gateway per kubernetes workspace that holds the provider keys cli#1667 (spec.server.port: 8080) still works unchanged.internal/controller/gateway_controller.go:status.urlis now built by agatewayURLclosure that appends the Service main port (reusing the existinggatewayServicePort, same precedence asdesiredService) whenever it is not the scheme's implicit default (80 for http, 443 for https, via a new smallschemeDefaultPorthelper). Result:http://<name>.<ns>.svc.cluster.local:8080. URLs taken from an HTTPRoute hostname keep their implicit 80/443 and stay portless.config/crd/bases/,manifests/crds.yaml,manifests/install.yaml.spec.servergetsspec.server.port == 8080from the CRD default andstatus.url == http://<name>.<ns>.svc.cluster.local:8080.Verification:
task test(incl. the new test),task lint, gofmt/vet all pass, and the repo's pre-commit suite (manifest regen, generate, lint, fmt, vet, test) passed at commit time.git statusis clean and the PR is viewable.Bookkeeping: issue added to the Roadmap 2026 board and set to QA; docs ticket filed as inference-gateway/docs#1055 for the changed user-facing behavior.
Skipped: the same nil-
servergap likely exists for Agent/MCP CRDs but was not touched (out of scope); existing Gateways pick up the new CRD default only on their next spec write. Risk: anything parsingstatus.urlwill now see the port appended for service URLs.Model:
ollama_cloud/glm-5.3-flash· Action:v0.59.2· CLI:v0.238.0· Gateway:v0.60.1· Exit Code:0· Duration: 5m 27sTokens: 3,689,887 in · 30,591 out · 3,720,478 total (45 requests)
Tool calls: 58 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Oct 31, 2026
🎉 This issue has been resolved in version 0.29.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀