forgejo runners(arm64): run both arm64 runners as in-cluster dind pods

The Pi's host Docker is no longer the arm64 job-container daemon. Both
forgejo-runner-arm64 and forgejo-runner-deploy-arm64 now run a privileged
docker:27-dind sidecar (--mtu=1420, socket on an emptyDir shared with the
runner, data-root on a PVC), the same shape as forgejo-runner-amd64.

- labels preserved verbatim: shared keeps docker-arm64/arm64/docker, deploy
  keeps deploy-arm64 only; capacity 1 on both
- runner.ini moved from hostPath to the data PVC by copy, uuid preserved
  (4e07c1e9... / a41aad73...); the deploy runner's register init container is
  inverted into a guard so a missing file cannot burn a token and create a
  second runner
- dind limits.memory 4Gi (measured peak 3.10GiB) and 2Gi for the deploy runner
  so a CI run and a deploy cannot both claim the Pi's 7GiB
- static hostPath PVs pinned to rpi with Retain: dynamic local-path cannot
  provision there (helper pod hardcoded to siriussec)
- docker CLI/buildx come from the dind image instead of the host's docker-static
- Pi registry additionally published on 10.10.0.1:5000 (out of band on the Pi)
- RpiDindDataRootFillingUp at 70%: the real cap, since a static PV does not
  enforce its claim and kubelet_volume_stats_* does not exist here

Design and measured proof: docs/arm64-runner-dind.md (t_627c231c).
This commit is contained in:
Lance Walters 2026-10-27 02:03:11 -04:00
commit 131b9bc7c9
6 changed files with 359 additions and 125 deletions

View file

@ -127,6 +127,43 @@ spec:
raise the PVC, or clear the dind data-root deliberately (see the
DiskPressure runbook in the home-k8s skill) — do not wipe it
while the runner pod is up.
- name: dind-disk-cap
rules:
# Pi-specific cap, added with the arm64 dind cutover (kanban
# t_0da0a1cc). The two arm64 runners now hold 240 GiB of dind PVCs
# (200Gi shared + 40Gi deploy) on rpi's single root filesystem, which
# is the same disk the kubelet lives on. A static hostPath PV does NOT
# enforce its claim, and the `RunnerDindPvc*` rules cannot fire for it
# (no kubelet_volume_stats_* series on this cluster), so this node
# filesystem rule is the real growth cap: 70 % of 917 G leaves ~275 G,
# i.e. reachable while there is still room to run the prune job.
# `NodeFilesystemFillingUp` below stays at 85 % as the backstop.
- alert: RpiDindDataRootFillingUp
expr: |
(
1 - (
node_filesystem_avail_bytes{mountpoint="/", fstype=~"ext4|xfs|btrfs", instance=~"10.10.0.1:.*"}
/
node_filesystem_size_bytes{mountpoint="/", fstype=~"ext4|xfs|btrfs", instance=~"10.10.0.1:.*"}
)
) * on (instance) group_left (nodename) node_uname_info{nodename="rpi"} > 0.70
for: 30m
labels:
severity: warning
annotations:
summary: >-
rpi root filesystem is {{ $value | humanizePercentage }} full
(dind CI data-roots live here)
description: >-
The arm64 runners' dind data-roots (PVCs forgejo-runner-arm64-dind
200Gi and forgejo-runner-deploy-arm64-dind 40Gi) share rpi's only
filesystem with the kubelet. Nothing enforces those claim sizes.
Attribute the growth with
`kubectl -n forgejo exec <pod> -c dind -- docker system df -v`
(the nightly prune job prints this for every daemon and never
deletes named volumes), then reclaim with
`kubectl -n forgejo create job --from=cronjob/forgejo-runner-prune prune-manual-$(date +%s)`.
See docs/arm64-runner-dind.md §4.4.
- name: disk-capacity
rules:
- alert: NodeFilesystemFillingUp