Repository navigation
fix(proxy): reserve port 8080 in proxy.entrypoints - #242
Merged
Merged
Conversation
Onebox's static configuration enables ping without naming an entrypoint, so Traefik opens its internal "traefik" entrypoint on :8080 for the health check. A proxy.entrypoints listener on 8080 passed validation and then made the managed proxy fail to start on the host with "address already in use". Refuse it at load time with an error that says why. The rendered static configuration and its digest are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Traefik names its internal entrypoint "traefik". Checked against traefik:v3.7 with ping enabled: declaring an entrypoint of that name does not fail; it silently becomes the internal entrypoint, so :8080 is no longer opened and the ping health check is served on the declared, published port. Refuse the name with an error that says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What this changes
Validation now refuses a
proxy.entrypointslistener on port 8080, the same way it already refuses 80 and 443. The error explains why the port is taken.Onebox's managed static configuration enables
ping: {}without naming anentryPoint. Traefik therefore opens its internaltraefikentrypoint on:8080to serve the health check. Before this change, a listener declared on 8080 passedob validateand planning. The managed proxy then failed to start on the host with:I found this while writing the e2e test for #241.
It also reserves the entrypoint name
traefik, which Traefik gives its internal entrypoint. I checked this againsttraefik:v3.7withping: {}. DeclaringentryPoints.traefikdoes not fail: it silently becomes the internal entrypoint, so:8080is no longer opened and the ping health check is served on the declared, published port. The name is now refused with an error that says so.Why this is correct
TestProxyEntrypointsValidateNamesAndPortsgains three cases. The nametraefikis refused. Port 8080 is refused with the ping explanation atspec.proxy.entrypoints.<name>.port; the neighbouring port 8081 is still accepted.internal/proxyis untouched, so the rendered static configuration and the proxy identity digest stay the same. No proxy restarts on upgrade.Ran
just check(passes) andgolangci-lint run ./internal/app/...(0 issues).Effect on the safety envelope
A project that declared 8080 could never have produced a working proxy, so no project that works today is newly refused.
Trade-off: the check applies even when
proxy.configships its owntraefik.ymlthat moves ping elsewhere, because the loader cannot see the static file. Such a project now has to pick another port.Checklist
just checkpasses locally.just checkverifies this).🤖 Generated with Claude Code