feat: registry pull-through caches for Talos nodes + declarative split horizon #2
Loading…
Reference in a new issue
No description provided.
Delete branch ":feat/registry-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Node-level image pulls (containerd on the Talos nodes) cross the WAN, where some connections lose packets:
postgres:17-alpinecould not be pulled for 30+ minutes and had to be side-loaded. CI already uses LAN copies; this covers the nodes.What
modules/features/registry-cache.nix(new, server whitelist): two CNCF Distribution registries in proxy mode, both on the mesh addressdocker.io→10.100.0.1:5000, anonymous upstreamghcr.io→10.100.0.1:5001, authenticated upstream (the rgxr images are private)wg0only; cache persisted under/var/lib/registry-cache; staticregistry-cacheuser; hardened unitstalos-config/patches/registry-mirrors.yaml: node mirrors for both registries. Talos falls back to upstream when a cache is down, so an outage costs speed, not availability.modules/features/incus.nix: the split-horizonraw.dnsmasqoverride (address=/yhkze.net/10.100.0.1) is now declared. Theincus-split-horizon-dnsoneshot rewrites it only on drift, and never fails boot when a cluster member is offline (the documented write constraint).networking.mdcovering design, apply and verify; the patch is added tobootstrap.md's list andgen config; the "restored by hand" note forraw.dnsmasqis replaced.Before rebuilding: add the GHCR secret (I must not touch the SOPS vault)
Rollout
rebuildon the servercurl -s http://10.100.0.1:5000/v2/_catalogandcurl -s http://10.100.0.1:5001/v2/_catalog--mode=no-reboot, registries apply live):Validation
nixos-rebuild build --flake path:.#serveron the server from this branch (result below); no switch, no eval.🤖 Generated with Claude Code
status:
nixos-rebuild build --flake path:.#serverfrom this branch on the server evaluates and builds every derivation except the sops manifest, which fails as expected:sops-nix validates keys at build time, so add the
registry-cachesecrets before (or in the same push as) merging. Otherwise the server build on master breaks until they exist. No other errors.