k8s: REGION in config.env; the no-public-address warning names --announce

REGION (place names or geohashes, comma separated) is passed to the node by the StatefulSet script, which now builds its arguments with set -- so a region is optional and PUBLIC_HOST must be set. The warning for a --public node without a public address now says which case it is (no --announce, or one that is not reachable) and the flag that fixes it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-18 23:37:55 +01:00
co-authored by Claude Sonnet 5.5
parent 4e7cbd3dbd
commit 803202e94e
6 changed files with 80 additions and 8 deletions
+17 -3
View File
@@ -37,7 +37,8 @@ so:
docker build -t git.stinnesbeck.com/nils/allmende:<tag> . && docker push git.stinnesbeck.com/nils/allmende:<tag>
```
2. **Name.** Edit `base/config.env` (`PUBLIC_HOST`, and `PUBLIC_PORT` if the
router cannot forward 4001 to 4001).
router cannot forward 4001 to 4001; `REGION` if the node should keep
listings for a region).
3. **Apply.**
```
kubectl apply -k k8s/base # with a LoadBalancer (MetalLB, kube-vip, ...)
@@ -85,8 +86,21 @@ so:
that file). The same port serves the owner API, which the admin token
protects. To keep it private, comment the file out in `base/kustomization.yaml`
and use `kubectl -n allmende port-forward svc/allmende-http 8080:8080`.
- **Regions.** A bootstrap node follows none. To make it also keep listings,
open the UI through the port-forward, sign in and choose regions.
- **Regions.** A bootstrap node follows none by default. To make it also keep
listings, either set `REGION` in `base/config.env` (a place name or a
3-character geohash, several separated by commas: `REGION=mechernich`) and
apply again, or open the UI through the port-forward, sign in and choose
regions there. A choice made in the browser is kept on the volume and wins
over `REGION` from then on; delete `/data/regions.json` to use `REGION`
again. Do not edit the `args` script in `statefulset.yaml` for this: a missing
trailing `\` there silently drops `--announce` (see below).
- **"--public, but this node has no public address" in the log** means the node
runs without `--announce`, so it only knows the pod's private address and
advertises that. Check that the live StatefulSet's `args` still contain both
`--announce` lines and that every line of the `set --` command but the last
ends in `\` (`kubectl -n allmende get statefulset allmende -o yaml`). The
warning says which case it is: no `--announce` at all, or one that is not
publicly reachable. An empty `PUBLIC_HOST` stops the pod with an error instead.
- **More than one bootstrap node** on different networks makes the network
independent of any single one. Run this on a second cluster or a VPS and add
its records next to the first.