- Added Image Updater annotations to forgejo-runner Applications
- Image Updater now automatically tracks new images in Forgejo registry
- Update strategy: newest-build (latest commit SHA)
- Tag filter: commits (7-char SHA), latest, and v* releases
- Helm values track repository + tag separately for automatic updates
- Write-back via git (commits image updates to main branch)
Build and push custom runner images:
docker build -f k8s/infra/forgejo-runner/Dockerfile.golang \
-t forgejo.riotpiao.com/rock/forgejo-runner-golang:latest .
docker build -f k8s/infra/forgejo-runner/Dockerfile.rust \
-t forgejo.riotpiao.com/rock/forgejo-runner-rust:latest .
docker build -f k8s/infra/forgejo-runner/Dockerfile.node \
-t forgejo.riotpiao.com/rock/forgejo-runner-node:latest .
docker login forgejo.riotpiao.com
docker push forgejo.riotpiao.com/rock/forgejo-runner-golang:latest
docker push forgejo.riotpiao.com/rock/forgejo-runner-rust:latest
docker push forgejo.riotpiao.com/rock/forgejo-runner-node:latest
Image Updater will then:
1. Detect new images in registry
2. Update values.yaml automatically
3. Commit changes to git
4. ArgoCD syncs the new image tags
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
runner:
|
|
image:
|
|
repository: forgejo.riotpiao.com/rock/forgejo-runner-golang
|
|
tag: "latest" # Image Updater tracks and updates this
|
|
name: golang-runner
|
|
# Custom image: docker:27-cli + Node.js + Go + build tools
|
|
# - Node.js for GitHub Actions (actions/checkout@v4, etc.)
|
|
# - Docker CLI for container builds
|
|
# - Go toolchain
|
|
# - Build essentials
|
|
labels: "golang:docker://forgejo.riotpiao.com/rock/forgejo-runner-golang:latest"
|
|
forgejoUrl: http://forgejo-gitea-http.cicd.svc.cluster.local:3000
|
|
# tokenSecret: name of the K8s Secret that holds the runner registration token
|
|
# created automatically by the helmfile presync hook (see helmfile.yaml.gotmpl)
|
|
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)
|