Skip to content

fix(proxy): reserve port 8080 in proxy.entrypoints - #242

Merged
vishr merged 2 commits into
mainfrom
fix/reserve-ping-port
Nov 27, 2026
Merged

vishr merged 2 commits into
mainfrom
fix/reserve-ping-port

Conversation

@vishr

@vishr vishr commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

What this changes

Validation now refuses a proxy.entrypoints listener 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 an entryPoint. Traefik therefore opens its internal traefik entrypoint on :8080 to serve the health check. Before this change, a listener declared on 8080 passed ob validate and planning. The managed proxy then failed to start on the host with:

error while building entryPoint traefik: building listener: error opening listener: listen tcp :8080: bind: address already in use

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 against traefik:v3.7 with ping: {}. Declaring entryPoints.traefik 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. The name is now refused with an error that says so.

Why this is correct

  • TestProxyEntrypointsValidateNamesAndPorts gains three cases. The name traefik is refused. Port 8080 is refused with the ping explanation at spec.proxy.entrypoints.<name>.port; the neighbouring port 8081 is still accepted.
  • internal/proxy is untouched, so the rendered static configuration and the proxy identity digest stay the same. No proxy restarts on upgrade.

Ran just check (passes) and golangci-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.config ships its own traefik.yml that moves ping elsewhere, because the loader cannot see the static file. Such a project now has to pick another port.

Checklist

  • just check passes locally.
  • Tests cover the new behaviour, including the failure paths.
  • Generated documentation is current (just check verifies this).
  • I have accepted the CLA, or will when the bot asks on my first pull request.

🤖 Generated with Claude Code

vishr and others added 2 commits November 26, 2026 19:56
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>
@vishr
vishr merged commit 3f93437 into main Nov 27, 2026
6 checks passed
@vishr
vishr deleted the fix/reserve-ping-port branch November 27, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant