Files
homelab/k8s/infra/forgejo-runner/values.yaml
T
rock 4e9484bdf8
Build and push runner images / build-runners (pull_request) Failing after 38s
fix: use proper language images for runner labels, not bare Alpine
ROOT CAUSE: All 3 runner labels pointed to code.forgejo.org/forgejo/runner:6
(bare Alpine). When Forgejo runs a workflow, it creates a container FROM the
label image — this container had no Node.js, no docker CLI, no Go/Rust,
no root access, and no apt-get. Every CI job failed.

FIX: Change runner labels to official Debian-based language images:
  golang → docker://golang:1.26-bookworm (Go + apt-get + root)
  node   → docker://node:22-bookworm (Node.js + npm + apt-get + root)
  rust   → docker://rust:1-bookworm (Rust + cargo + apt-get + root)

The runner daemon pod still uses forgejo/runner:6 — only the label image
(what workflow steps execute in) changes.

Unified CI pattern for ALL repos:
1. Install Node.js first if not present (needed for actions/checkout@v4)
2. Install docker.io via apt-get (needed for docker build/push)
3. Use actions/checkout@v4 normally
4. Build/push with docker

IMPORTANT: Runners must re-register after merge. Delete PVCs or
/data/.runner files to trigger re-registration with new labels.
2026-09-06 07:06:44 -07:00

60 lines
1.9 KiB
YAML

runner:
image:
repository: code.forgejo.org/forgejo/runner
tag: "6"
name: golang-runner
# Label image is what workflow steps run in (NOT the runner daemon image).
# golang:1.26-bookworm: Debian, root, apt-get, Go, git.
# Install Node.js/docker in workflow steps as needed.
labels: "golang:docker://golang:1.26-bookworm"
forgejoUrl: http://forgejo-gitea-http.cicd.svc.cluster.local:3000
tokenSecret: runner-token
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: "2"
memory: 4Gi
dind:
image:
repository: docker
tag: "27-dind" # pin exact release before apply
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: "2"
memory: 4Gi
persistence:
reg:
storageClass: longhorn # Unified StorageClass (3 replicas)
size: 20Gi # .runner registration file + action tool cache + actcache artifacts
dind:
storageClass: longhorn # Unified StorageClass (3 replicas)
size: 30Gi # docker layer cache — keeps rebuilds fast across restarts
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
# Pin to az-b (talos-cp-2) — more Longhorn storage than az-a (worker-1 over-provisioned).
# RWO PVCs will recreate on talos-cp-2 when nodeSelector changes.
nodeSelector:
topology.kubernetes.io/zone: az-b
# GC CronJob — prunes Docker images/volumes/build-cache and actcache across
# ALL forgejo-runner pods. Only enable in default values (golang instance);
# disable in per-runner overrides so it renders once.
gc:
enabled: true
schedule: "*/30 * * * *" # every 30 minutes
image: alpine/k8s:1.31.0
pruneAge: "30m" # Docker artifacts unused longer than this get pruned
pruneAgeHours: 0.5 # Same as pruneAge but numeric for date arithmetic in shell
actcacheMaxAgeDays: 1 # actcache files older than N days (aggressive for heavy Rust cargo builds)