Gitea Actions Runners on the Mac Mini¶
The shared Gitea Actions runners move from hetzner-mgmt to the Mac mini, to free the cluster's
resources (owner, 2026-10-22). They run as rootless, ephemeral pods, one per queued job, in
the namespace ci of the one Lima VM k3s there, next to the operational agent
(ADR 0022, which
amends ADR 0021's own VM ci). The workflow inventory, the Rosetta choice and the build
measurements are in
ADR 0021; the
VM itself is on The k3s VM on the Mac Mini.
Until the cutover below is done, the runners on hetzner-mgmt (CI Runners) keep
running, and both sets take jobs (#1459 then removes the hetzner-mgmt ones). The Mac mini runners
were paused from 2026-10-24 to 2026-10-25; see Paused and resumed.
Inventory¶
Every workflow on the default branch of every repository with .gitea/workflows/, read on
2026-10-22. The general CI jobs run in containers and need Docker; the Terraform workflows
now use the dedicated host-mode runner on hetzner-mgmt. Repository and
organization Actions secrets (HARBOR_*, REPO_TOKEN, GITEA_TOKEN, MINISIGN_*, …) are stored in
Gitea and do not change.
| Repository | Workflows | Docker beyond the job container | Image builds (kaniko, linux/amd64) |
Downloads amd64 tools |
|---|---|---|---|---|
| Skatzi/platform | ci-component-tests, ci-docs-build, ci-docs, ci-keycloak, ci-manifests, ci-terraform-runner, release-docs, _terraform-{plan,apply,destroy} |
uses: docker://debian (component tests) |
ci-docs, ci-keycloak, ci-terraform-runner |
ci-manifests, ci-component-tests |
| Skatzi/taskbase | ci, deploy-dev |
postgres:16 service |
deploy-dev |
ci (staticcheck) |
| Skatzi/agent-runner | ci, image, release, prune-releases |
— | image, release (job image) |
ci, release |
| Skatzi/emiliero | ci, deploy |
— | deploy |
— |
| Skatzi/skatzi-agents | ci |
— | — | — |
| Emmalia/Helloweekly | check, image |
postgres:18 service |
image (two jobs) |
check |
| Dupondforge/botyard-control | ci, release |
postgres:16 service |
release |
— |
| Dupondforge/botyard-runner, botyard-bot-template, botyard-engine-template | ci, release, prune-releases, windows (two ubuntu-latest jobs) |
— | — | — |
| Kodexet/ServiceSite, brickLayerSite, documentation, portal, sitemaker (the cluster is closed, #1448) | ci, release, release-dev |
— | 7 jobs | — |
- Image platform. All 17 image-build jobs run in
harbor.prod.skatzi.com/library/kaniko-runner:latestwith--custom-platform linux/amd64: the images run on hetzner-mgmt (amd64).kaniko-runneris multi-arch (container-images/kaniko-runner/), so on the Mac mini kaniko and busybox run native arm64; only theRUNsteps of the amd64 images they build go through Rosetta. - Cluster-internal endpoints: none. Workflows use only
gitea.prod.skatzi.com,harbor.prod.skatzi.com,keycloak.prod.skatzi.com,docs.prod.skatzi.com, GitHub and the tool download sites. The exception is platform's reusable_terraform-*workflows, whoseTF_STATE_CONN_STRnames the in-clusterterraform-state-db. These jobs select the dedicated on-demand runner onhetzner-mgmt; see CI Runners. - Secrets from the cluster: the runners' registration token (ExternalSecret
gitea-act-runner-tokenfrom OpenBaohetzner-mgmt/gitea/act-runner). On the Mac mini the owner stores it once as a Secret in the VM. The runners' Harbor credentials (harbor-pull-secret) are not needed there. A job whose image is private, such asskatzi/ci-base, passes its owncontainer.credentials(seecontainer-images/ci-base/README.md). The privateskatzi/terraform-runneris used by the dedicated Terraform runner onhetzner-mgmt. - Not moved: jobs with
runs-on: macos-arm64(agent-runner's desktop build, onmac-mini-release) andruns-on: windows(botyard-runner) run on their own runners.
What runs where¶
Lima VM k3s (one k3s node, see The k3s VM on the Mac Mini)
├── kube-system: generic-device-plugin, /dev/net/tun as devic.es/tun components/generic-device-plugin/
├── keda: the KEDA operator only (no metrics server, no webhooks) components/keda/
└── ci: cluster/mac-mini/ci/overlay/
ScaledJob gitea-act-runner: one Job per queued job, at most 2, none when idle
pod = rootless dind (native sidecar) + one gitea-runner, registered --ephemeral
Deployment act-cache: the one actions/cache server (PVC act-cache, trimmed at 8 GiB)
PVC act-actions: the one action cache (/actions/v5), shared by the runner pods
NetworkPolicies default-deny-ingress, egress-internet-only
Role ops-agent-read: what the operational agent may read here (no exec, no Secrets)
How a job gets a pod (ADR 0022 Q5):
- Every 10 s, KEDA reads Gitea's
GET /api/v1/admin/actions/jobs?status=queuedwith aread:admintoken. It counts only jobs whose labels start withubuntu-, becausemacos-arm64andwindowsjobs wait for their own runners. - For each such job not yet covered by a starting pod, KEDA creates a Job, up to
maxReplicaCount: 2. Its strategy isaccurate: Gitea stops counting a job once a runner has taken it. - The pod starts
dindfirst.dindis a native sidecar (an init container withrestartPolicy: Always) with a startup probe ondocker info. Then the runner (gitea/runner:6.0.1) registers with--ephemeral(at most 10 tries,GITEA_MAX_REG_ATTEMPTS; since 4.1.0run.shwould otherwise retry untilactiveDeadlineSeconds), asmac-mini-<pod>, takes exactly one job and exits. - The sidecar then stops, and the Job completes. Gitea deletes the runner when its task is done
(
models/actions/task.go), so the runner list shows only runners that are working.
A pod that never gets a job, because its job was cancelled, waits for the next one. It ends after
activeDeadlineSeconds (4 h).
The pod is written out in scaled-job.yaml and does not use the component
components/gitea/act-runner/, because KEDA starts Jobs, not a Deployment. It keeps the component's
image, labels, capacity: 1, timeouts and drain on shutdown. It differs in:
- Gitea's URL,
https://gitea.prod.skatzi.com; - one more label,
ubuntu-24.04-arm, for jobs that must run on arm64 (the arm64 build ofci-base,.gitea/workflows/ci-base.yaml); - no Harbor credentials;
- its own
runner-config.yaml: - a 1 GiB tmpfs at
/tmpin every job container. Rosetta needs a/tmp, andkaniko-runnerhas none; GOTMPDIR=/var/tmp, so Go builds and links on disk rather than in that tmpfs (see Disk below);- the external cache server;
- rootless dind instead of privileged dind (below).
Rootless, not privileged¶
The ci namespace shares its node with ops-agent, which holds a cluster-admin kubeconfig for
hetzner-mgmt. Privileged dind would be root on that node. So each runner pod gets exactly what
ADR 0022 Q1
measured as enough, and nothing more:
| Setting | Why |
|---|---|
hostUsers: false |
A pod user namespace: root in the pod, and in every job, is an unprivileged UID on the node |
docker:…-dind-rootless, as UID 1000 |
dockerd runs through rootlesskit; its data is in /home/rootless/.local/share/docker. The emptyDir is mounted one level up, at /home/rootless/.local/share, so dockerd creates docker/ owned by UID 1000: mounted at docker/ itself it stays owned by root, and rootless dockerd exits with "operation not permitted" |
procMount: Unmasked, AppArmor Unconfined on dind only |
dockerd mounts /proc for each job container; the containerd profile denies mount |
devic.es/tun: 1 |
/dev/net/tun for rootlesskit's network, from the device plugin. A hostPath cannot be idmapped |
/etc/subuid, /etc/subgid = rootless:1:999 and rootless:1001:64535 (ConfigMap dind-rootless-subid) |
The image's rootless:100000:65536 does not fit in the pod's 65,536 IDs. The two ranges give job containers IDs 1–65534 (pod ID 0 must not be listed, or newuidmap fails with Could not set caps): with only the second, IDs stopped at 64535, and nobody/nogroup (65534), which apt's sandbox uses, failed with setgroups 65534 failed |
automountServiceAccountToken: false |
Jobs need no Kubernetes API |
DOCKER_HOST=tcp://127.0.0.1:2375 on dind |
The startup probe calls docker; rootless dockerd has no /var/run/docker.sock |
DOCKER_HOST=tcp://127.0.0.1:2375 on the runner |
localhost resolves to ::1 first, and rootless dockerd's port listens on IPv4 only |
startupProbe on dind, a native sidecar |
Rootless dockerd takes several seconds to listen. The runner container starts only once docker info answers; otherwise the runner fails its first contact with dockerd (#1509) |
node sysctl kernel.apparmor_restrict_unprivileged_userns=0 |
In the Lima template; Ubuntu blocks user namespaces otherwise |
A job's docker run --privileged fails, and -v /:/host mounts the dind container's own root,
not the node's (measured).
The NetworkPolicies are part of this, not hardening. dind listens on tcp://:2375 without
TLS, and without a policy any pod in the cluster reached it (measured).
default-deny-ingress: only pods incireachcipods. Measured to block 2375 from other namespaces.egress-internet-only:cipods reach cluster DNS, the cache serveract-cacheon port 8088, and public addresses only. The private ranges are excluded: the pod and service networks (ops-agent,agents, the API server's ClusterIP), the VM and the Mac (Lima's192.168.5.0/24) and the home LAN. The API server and the node, which are host-network endpoints, are blocked too: measured at the install (#1466), and again with the cache rule in ADR 0022 Q5.
The operational agent reads ci, the other way round. Its ServiceAccount in ops-agent may
get, list and watch pods, their logs and events, Jobs, Deployments, ReplicaSets and the
ScaledJob (role.yaml, role-binding.yaml; #2415). It cannot exec, read Secrets or write
anything. The ci pods get no token and still cannot reach the API server. What it reads and how
to revoke it is in
Install the operational agent → Read access to the ci namespace.
Caches and memory¶
- Caches (measured in ADR 0022 Q5).
actions/cache: the one serveract-cache(gitea-runner cache-server, PVCact-cache). Since gitea/runner 4.0.0 a job sends its cache calls to its own runner, at the pod's IP, which forwards them toact-cache: the jobs in rootlessdindreach their own pod, not the Service. The server evicts on its own every 5 minutes pastsize_limit: 8GiB(runner-config.yaml);trimbelow stays as the backstop. This is where Go modules and build cache (setup-go's defaultcache: true), npm (setup-nodecache: npm) and pip (setup-pythoncache: pip) are kept across pods. The runners register each job's token with it, so a repository reads only its own caches. The server and the runners read the shared secret from the Secretact-cache-secret, mounted as the file/run/act-cache/secret(cache.external_secret_file, gitea/runner 2.3.0; #2803). Before, each container copied the config with the secret filled in bysed.local-pathdoes not enforce the PVC's 10Gi (11 GB on 2026-11-01, #2323), so the pod'strimcontainer runs hetzner-mgmt'scomponents/gitea/act-runner/trim.shin itscachemode: every 5 minutes, past 8 GiB, it removes entries (/cache/cache/<xx>/<id>), superseded copies of a key first, then the least recently restored (CI runners → actions/cache), then logs the size (Cache at 7800M of 8192M). It leaves uploads in progress (/cache/cache/tmp) and the server'sbolt.dband.secretalone. A removed entry that no newer save superseded is a cache miss: the server drops its record at the next lookup (act/artifactcache/handler.go), and a download already running keeps reading the open file. Over 3.5 days of CI the volume stayed at or under 8192M, and the server did nearly all the eviction (measured on 2026-11-11, #2397; Cache volume).- Action cache: one for every runner pod, on the PVC
act-actions:host.workdir_parent: /actions/v5(runner-config.yaml), which gitea/runner uses as its action cache directory. The runner downloads each action commit once into<sha256 of uses>/<commit>, writes it to atmp-*directory and renames it into place, all under anflockon<dir>.lockthat holds across pods on this volume (One action cache on act-actions). A later job of any pod only reads it (1–2 s instead of 18–78 s per job). Two runners sharing one cache broke actions on hetzner-mgmt with 0.6.1 (CI Runners); 5.4.1's lock is what makes the shared cache safe. Jobs cannot write to it: the runner fetches in its own container, not in the job. Before #2846, each pod copied the cache in from the volume and copied new actions back after its job. - Tool cache: per job, inside the job container. A volume shared by all pods made the second
setup-gofaster (22.6 s → 0 s), but two jobs installing an uncached Python at once both failed withDirectory not empty. Every job could also change the Go, Node or Python that later jobs of other repositories run. So each job downloads its toolchain (10–15 s for Go). - Docker image cache: none across pods. Each pod's
dindpulls the job image again (20–45 s forrunner-images:ubuntu-latest). At peak, each running pod used about 2.5–4 GiB of the VM's disk, which is freed when the pod ends. A pull-through cache is Taskbase #1521. - Layer cache: kaniko keeps none, as before.
- Memory. Rootless dockerd starts job containers inside the
dindcontainer, so its limit, 3 GiB per pod, caps jobs, unlike privileged dind (ADR 0021). At most two pods run at once, so CI's limits add up to 6 GiB and stay under the VM's 9 GiB, whichops-agentshares. More concurrent jobs need either more VM memory or a lower limit per pod; keep the sum at 6 GiB or less rather than taking memory fromops-agent. The KEDA operator used 52 MiB, and the cache server 8–11 MiB. - Disk. A job's images, containers and files are in the pod's
docker-dataemptyDir on the VM disk (100 GiB, 96 GiB usable), sodindrequests 6 GiB ofephemeral-storageand is limited to 8 GiB. The kubelet evicts a pod past it (Evicted, "Pod ephemeral local storage usage exceeds the total limit of containers 8Gi" in its events, and the job fails in Gitea), so a runaway job cannot fill the disk for the other pod andops-agent. Measured on 2026-11-09 (#2741): 35.4 GiB used with no CI running (the images, act-cache's PVC trimmed at 8 GiB, the agents), 62 GiB free; two finished jobs had held 7.7 GiB together. Two pods at the limit take 16 GiB, which also stays under the image clean-up at 60 % use (57.6 GiB,lima/k3s.yaml). More concurrent pods need the same check: baseline plus pods × 8 GiB under 57 GiB.
The /tmp tmpfs is memory, not disk, and it is the one that filled on 2026-11-05 and 11-07:
eloro/webshop-platform's ci / test failed in the Go linker with mapping output file failed:
no space left on device. Go keeps its build directory, with every test binary, in /tmp
unless GOTMPDIR says otherwise; go test -coverpkg=./... ./... of that repository held
610 MiB there with only compiling and linking (17 binaries up to 27 MiB each), and the tests'
own files in /tmp came on top. So the Mac mini sets GOTMPDIR=/var/tmp
(runner-config.yaml), on the job's disk and inside the 8 GiB. hetzner-mgmt's runners have no
tmpfs and never failed this way. A job image without /var/tmp that runs Go fails with
go: creating work dir: stat /var/tmp: no such file or directory: set GOTMPDIR: "" in that
job's env.
One action cache on act-actions¶
Since #2846 (2026-11-11) every runner pod reads and writes one action cache on act-actions,
instead of copying /actions in at the start and new clones back after the job. #2805 checked the
source of gitea/runner 5.4.1, and the one-off Job act-actions-flock-test showed that the runner's
lock holds across two pods on this volume:
- The setting.
host.workdir_parentis the action cache directory (internal/app/run/runner.gopasses it asActionCacheDir; default$HOME/.cache/act). It is/actions/v5, a new directory on the volume, so each pod fetches into and reads from the volume. The same directory holds the scratch directories of host-mode jobs, and the runner's idle clean-up removes only those (names of 16 hex characters,isHostScratchDir). Our labels are alldocker://, and an action's<sha256 of uses>has 64 characters. The runner's free-disk check (health_check.min_free_disk_space_mb, 1024 MiB by default) now reads this volume, which is on the VM disk as before. - Everything takes the lock. The fetch (on
<sha256 of uses>), the swap of a damaged tree (installTree, on<…>/<commit>), readingaction.yml, copying the tree into the job container and reusable workflows (cloned and read under the lock,act/runner/reusable_workflow.go) all callAcquireCloneLock(act/common/git/git.go). Therefand.sizesrecords are rewritten in place, under that lock. Between pods only theflockon<dir>.lockexcludes: the in-process mutex and the shared fetch (actionFetches) hold within one runner process. - It can fail without a word. If the lock file cannot be opened (
O_RDWR|O_CREAT, mode 0600,internal/pkg/lock/lock_unix.go) orflockfails with anything butEWOULDBLOCK,AcquireCloneLockfalls back to the in-process mutex and logs nothing. Jobs would pass until two pods fetched or replaced the same action at once. WithhostUsers: falseeach pod's root is a different UID on the node, so a volume that is not idmapped would keep a pod from opening a 0600 lock file that another pod created. flock itself is per inode in one kernel, and all pods share the Lima VM's kernel and the one local-path directory. - The test, and its result. The operational agent's
mac-minicontext readsciand cannot exec or create pods (ops agent on the Mac mini), so the test landed through Git (#2805) and was removed with this change. Two pods with the runner pod's image (gitea/runner:5.4.1),hostUsers: false,fsGroupand volume: pod 0 created/actions/.flock-test.lock, opened it as the runner does and held the lock for 30 s; pod 1 opened the same file, failedflock -nwithEWOULDBLOCK, and took the lock once pod 0 let go. Result on 2026-11-11: the JobComplete(2/2 in 33 s), noFAIL:line, and
| Pod | uid_map (pod ID, host ID, count) |
Lock file | Result |
|---|---|---|---|
| 0 | 0 2784952320 65536 |
inode 64769:583843, owner 0:1000, mode 600 |
held it 30 s, released |
| 1 | 0 187826176 65536 |
inode 64769:583843, owner 0:1000, mode 600 |
excluded while pod 0 holds it, then PASS: took the lock after pod 0 released it |
The same inode and owner in both pods, with different host ranges, show an idmapped volume on
which one pod's lock excludes the other's.
- What the pod cleans up. Before run.sh, each pod removes everything in /actions except
v5: the 0.6.1 git clones (<sha256 of uses> without a ref file, never read by 5.4.1), the
5.4.1 copies of the copy step, and the test's files. A pod of the old spec still running at the
rollout may race that, harmlessly: its copy-out lands in a directory the next pod removes. A pod
killed while it downloads leaves a tmp-* directory in the action's directory
(act/common/git/fetch_action.go, os.MkdirTemp(dir, "tmp-")), so each pod also removes
/actions/v5/*/tmp-* older than a day; a download ends within the pod's 4 h
activeDeadlineSeconds. Nothing removes old commits of an action: see Operating.
- To check after the rollout. Two jobs at once on the Mac mini pass, /actions/v5/<hash>/
holds <commit>, <commit>.lock, <commit>.sizes and ref, Set up job takes less time for
the actions after the first pod, and no Cannot find module …/dist/index.js or Set up Python
failure for a working day. Rollback: revert #2846's pull request. The copy step then also copies
/actions/v5 into each pod, unused; delete v5 in the volume's directory once no pod of this
spec runs.
Install¶
The owner does this once, as the admin on the Mac mini (Taskbase #1466, the same commands), after The k3s VM on the Mac Mini → Install. No token goes into Git, a task or a comment.
alias k='sudo -iu agent-ops /opt/homebrew/bin/limactl shell k3s sudo k3s kubectl'
# 1. The registration token, from a hidden prompt. Use the instance token from
# Site Administration → Actions → Runners → "Create new runner". Do NOT reset it:
# the hetzner-mgmt runners re-register with the current one.
k -n ci get networkpolicy # Flux has created the namespace
read -rs T && printf %s "$T" | k -n ci create secret generic gitea-act-runner-token --from-file=token=/dev/stdin; unset T
# 2. KEDA's token for the queue: an access token of a site admin with the scope read:admin
# only (User Settings → Applications), from a hidden prompt.
read -rs T && printf %s "$T" | k -n ci create secret generic gitea-queued-jobs-token --from-file=token=/dev/stdin; unset T
# 3. The cache server's shared secret: random, with no newline.
openssl rand -hex 32 | tr -d '\n' | k -n ci create secret generic act-cache-secret --from-file=secret=/dev/stdin
k -n ci get pods # act-cache 1/1 Running, no runner pods
k -n ci get scaledjob # READY True
# 4. The egress policy: a TCP connect from a ci pod (act-cache runs all the time).
NODE=$(k get node -o jsonpath='{.items[0].status.addresses[0].address}')
for t in 10.43.0.1/443 "$NODE/6443" "$NODE/10250" gitea.prod.skatzi.com/443; do
if k -n ci exec deploy/act-cache -- timeout 5 bash -c "exec 3<>/dev/tcp/$t" 2>/dev/null; then echo "open $t"; else echo "blocked $t"; fi
done
# expected: blocked for the API server ClusterIP, the node's 6443 and the kubelet's 10250;
# open for gitea.prod.skatzi.com/443
From the Deployment to the ScaledJob. Before the pull request that brought the ScaledJob (#1490) is merged, create the two new Secrets with steps 2 and 3. The namespace and the registration token already exist. On merge, Flux installs KEDA, prunes the Deployment (its pods finish their jobs first) and creates the ScaledJob. Without the Secrets, the cache server and KEDA fail, and jobs wait for another runner.
If the API server or the kubelet prints open, the policy does not stop host-network endpoints.
Record that on #1466, and do not put the break-glass kubeconfig into the VM (#1452) until a fix is
merged.
Done when:
- A pushed commit's jobs run on runners named
mac-mini-gitea-act-runner-…(on the job pages). While they run,k -n ci get pods -l app=gitea-act-runnershows one pod per job, and afterwards none is leftRunning. - The egress check prints
blockedthree times andopenfor Gitea. - One image build has run (cutover step 2), and
k -n ci exec <pod> -c dind -- cat /sys/fs/cgroup/memory.peakshows the job's memory there: the limit caps jobs. - After
sudo shutdown -r now, a new job gets a pod within about 5 minutes.
Operating¶
The VM, k3s and Flux are on The k3s VM on the Mac Mini.
Changes to the runners go through Git (cluster/mac-mini/ci/overlay/, components/keda/).
Renovate updates the images in scaled-job.yaml and deployment.yaml and KEDA's chart. When the VM
is recreated, repeat install steps 1–3.
- Concurrency:
maxReplicaCountinscaled-job.yaml(2; at 3 GiB each, keep the sum at 6 GiB or less). - Caches: delete a cache by deleting its PVC's data in the VM (
k -n ci get pvc, then thelocal-pathdirectory under/var/lib/rancher/k3s/storage/). The cache server deletes entries unused for 7 days and all entries after 30 days (act/artifactcache/handler.go), and thetrimcontainer keepsact-cacheunder 8 GiB (CACHE_LIMIT_MBindeployment.yaml; its log:k -n ci logs deploy/act-cache -c trim, whoseCache at …M of 8192Mline gives the size after each pass; the operational agent reads it withkubectl --context mac-mini). For more detail, see The k3s VM on the Mac Mini → Cache volume.act-actionsis the action cache at/actions/v5: it grows by one tree per action and commit that jobs use (163 MiB for taskbase's three actions), and nothing removes old commits. To empty it, deletev5in the volume's directory while no runner pod runs; the next jobs download again. - A pod waits without a job: its job was cancelled before it started. It takes the next job,
or ends after 4 h.
k -n ci delete job <name>ends it at once.
Paused and resumed¶
From 2026-10-24 to 2026-10-25 the ScaledJob carried autoscaling.keda.sh/paused: "true" (#1459,
PR #696): image builds failed at their first download and apt failed on uid 65534. A temporary
probe runner (mac-mini-test, #1551) found three causes, fixed under #1534:
- busybox
wgetover HTTPS exits 141 under Rosetta; native arm64 busybox works.kaniko-runnerwas amd64 only, so it is now multi-arch. aptneeds uid and gid 65534: the subordinate ranges insubidcover 1–65534 (PR #688), and must leave out 0, or rootless dockerd fails with "Could not set caps" (PR #792).kaniko-runnerneeds/bin/sleep: act_runner starts every job container with/bin/sleep, which kaniko's debug image does not have. The image adds the link; a rebuild without it breaks every image build, on hetzner-mgmt too.
To pause again, set the annotation in Git (k -n ci annotate scaledjob gitea-act-runner
autoscaling.keda.sh/paused=true until Flux applies it); the hetzner-mgmt runners, while they
exist, then take every job.
Logs and metrics¶
- Job logs stay in Gitea, as before.
- Runner logs:
k -n ci logs job/<name> -c act-runner(or-c dind);k -n ci get jobskeeps the last five finished and five failed Jobs. Cache server:k -n ci logs deploy/act-cache. The operational agent reads the same logs withkubectl --context mac-mini -n ci. - Scaling:
k -n keda logs deploy/keda-operator | grep gitea-act-runnershows each poll, the running and pending Jobs and the Jobs created; a token or URL error shows there too. VM and Lima logs: The k3s VM on the Mac Mini → Logs. - Out-of-memory kills:
limactl shell k3s sudo dmesg | grep -i oom.
CI health on Platform health. The cluster's Prometheus cannot scrape the Mac mini, Gitea's
/metrics has no runner metrics, and act_runner's own metrics endpoint is off and local. So
hetzner-mgmt asks Gitea, as KEDA does: the Deployment gitea/gitea-actions-exporter
(components/gitea/actions-exporter/) reads Gitea's admin API on every scrape (every minute),
with an access token of scope read:admin from OpenBao hetzner-mgmt/gitea/actions-exporter,
property token (stored by the owner, #1468). It serves:
| Metric | Meaning |
|---|---|
gitea_actions_runners{label, status} |
Runners per runner label, online or offline (GET /api/v1/admin/actions/runners; online means polled within the last minute; a disabled runner counts as offline) |
gitea_actions_queued_jobs{labels} |
Jobs waiting for a runner, per runs-on labels joined by commas (GET /api/v1/admin/actions/jobs?status=queued) |
gitea_actions_oldest_queued_job_seconds{labels} |
How long the oldest of them has waited, counted from the first scrape that saw it queued (the API gives only the job's creation time) |
gitea_actions_scrape_success |
1 when the last read of Gitea worked; 0 is then the only series |
The runners here are ephemeral and Gitea deletes each one when its job is done, so no runner online
is normal while no job waits. Platform health shows the metrics in the row CI (Gitea Actions):
"Gitea Actions runners online and jobs waiting" and "Oldest waiting Gitea Actions job by runs-on".
The alert GiteaActionsStalled (warning, incident, component: gitea-act-runner,
components/gitea/actions-exporter/prometheus-rule.yaml) fires when:
ubuntu-latestjobs have waited for 15 minutes with noubuntu-latestrunner online (KEDA starts no pod: the VM, KEDA or its token is down);- the exporter has not read Gitea for 15 minutes;
- any job has waited 30 minutes (both runners busy for that long, or a label's own runner, such as
terraform,windowsormacos-arm64, is not there).
Its runbook is GiteaActionsStalled. Until the cutover removes them, the metrics include the hetzner-mgmt runners, which are always online. Gitea's own view stays Site Administration → Actions → Runners.
Cutover¶
- Install (above, #1466). The Mac mini and hetzner-mgmt runners now both take jobs.
- Run every repository's CI on the Mac mini runners once. A job's page names its runner. To
send all jobs to the Mac mini for the check, pause the cluster runners:
flux --context admin@mgmt-cluster suspend kustomization gitea-act-runner, thenkubectl --context admin@mgmt-cluster -n gitea scale deploy gitea-act-runner --replicas=0. Then open a pull request or re-run a recent run in each of platform, taskbase, agent-runner, emiliero, Helloweekly and botyard-control. Pass if these hold:
| Check | Where |
|---|---|
Every job ran on a mac-mini-… runner and passed, or failed the same way as on hetzner-mgmt |
each run's job pages |
An image build pushed to Harbor. Its build job time is recorded next to the hetzner-mgmt median of 64 s for the docs image (ADR 0021): the push now goes over the home uplink |
platform ci-docs (a v* tag from release-docs), or taskbase deploy-dev |
A job with a postgres service passed |
taskbase ci, botyard-control ci |
setup-python, setup-go and setup-node jobs passed, with no Directory not empty |
platform ci-docs-build, taskbase ci |
| A downloaded amd64 tool ran (Rosetta) | platform ci-manifests (kustomize, helm, kubeconform) |
| No OOM kill in the VM, and the Mac's memory stayed usable during the runs | limactl shell k3s sudo dmesg \| grep -i oom is empty; memory_pressure on the Mac stays at 20% free or more |
- Remove the cluster runners: Taskbase #1459, once the checks pass.
Rollback.
- Before #1459:
kubectl --context admin@mgmt-cluster -n gitea scale deploy gitea-act-runner --replicas=2andflux --context admin@mgmt-cluster resume kustomization gitea-act-runneron hetzner-mgmt. - After #1459: revert its pull request. Flux restores the Deployment and its ExternalSecret.
To stop the Mac mini runners for good, pause the ScaledJob in Git, as Paused and resumed describes. In an emergency, suspend Flux there and pause it by hand. Running jobs finish; KEDA starts no new pods: