Repository navigation
Reserve ports for the metrics proxy and ipfs-cluster metrics - #8
Merged
Merged
Conversation
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>
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
Reserves host ports in
net.ipv4.ip_local_reserved_ports, sosite.ymlonly needs to run once for all the service metrics work:k8s/contentchange 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/hardeningalready 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-runssite.yml(andplatform.yml) on this PR. After merge, the apply waits for a required reviewer to approve theproductionrun. 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