Skip to content

Reserve ports for the metrics proxy and ipfs-cluster metrics - #8

Merged
TakGN merged 2 commits into
mainfrom
metrics-proxy-port
Oct 19, 2026
Merged

TakGN merged 2 commits into
mainfrom
metrics-proxy-port

Conversation

@TakGN

@TakGN TakGN commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

What

Reserves host ports in net.ipv4.ip_local_reserved_ports, so site.yml only needs to run once for all the service metrics work:

Port For Status
9810 The metrics proxy's routes: a metrics-only Traefik on every box's host network, ipni/infra#177 (https://github.com/ipni/infra/pull/177) In use once infra#177 merges
9811 That proxy's ping Same
8888 ipfs-cluster's Prometheus metrics on the content node Reserved ahead of time; enabled later with the content step (needs a k8s/content change and a content pod restart)

Without the reservation, an outbound socket could take one of these as its source port, and the listener would fail to re-bind after a restart. Same convention as every other host-network port. Nothing listens on any of them today on any box (checked with ss).

The one proxy covers every service: content, needle and route-origin are just more routes on it in ipni/infra. Their loopback endpoints already exist (checked on chic1: content kubo 5021, needle 8190-8193, Envoy admin 9901 and 9904). So this is the only workers change the metrics work needs.

Not changed

No firewall rule. roles/hardening already allows the pod network (10.42.0.0/16 and cni0), which is where Alloy scrapes from. Nothing else can reach these ports (ufw default deny).

Rollout

group_vars/ changes, so CI dry-runs site.yml (and platform.yml) on this PR. After merge, the apply waits for a required reviewer to approve the production run. It only changes a sysctl: no service restarts.

Merge this before infra#177, so the ports are reserved before the proxy binds them.

🤖 Generated with Claude Code

TakGN and others added 2 commits October 19, 2026 14:01
ipni/infra runs a metrics-only Traefik on the host network of every box
(kubernetes/platform/metrics-proxy) so Alloy can scrape the bootstrappers'
kubo and WSS Envoy, which serve their metrics on loopback only. It binds
9810 (the routes) and 9811 (its ping). Reserve both, like every other
host-network port, so an outbound socket cannot take one as its source
port and stop the proxy re-binding after a restart.

No firewall change: roles/hardening already allows the pod network
(10.42.0.0/16 and cni0), which is where Alloy scrapes from, and nothing
else reaches these ports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The content node's ipfs-cluster peer can serve Prometheus metrics (pins,
peers) on 8888. They are off today; turning them on needs an environment
change in k8s/content and a content pod restart, which belongs with the
content metrics step. Reserving the port now, while site.yml runs for the
metrics proxy anyway, saves a second run. Nothing listens on 8888 on any
box (checked with ss), so the reservation has no effect until then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TakGN TakGN changed the title Reserve ports 9810-9811 for the metrics proxy Reserve ports for the metrics proxy and ipfs-cluster metrics Oct 19, 2026
@TakGN
TakGN merged commit 6719ee6 into main Oct 19, 2026
9 checks passed
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