blumeops/argocd/manifests/forgejo-runner/deployment.yaml
Erich Blume 8d2e180d5d
Some checks failed
Test CI / test (pull_request) Successful in 3s
Build forgejo-runner / build (push) Failing after 20s
Add subuid/subgid for rootless buildah
Buildah needs UID/GID remapping to extract images with files
owned by different users (root, shadow, etc). Configure
subordinate UID/GID ranges for the runner user.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 22:13:03 -08:00

63 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: forgejo-runner
namespace: forgejo-runner
spec:
replicas: 1
selector:
matchLabels:
app: forgejo-runner
template:
metadata:
labels:
app: forgejo-runner
spec:
serviceAccountName: forgejo-runner
containers:
- name: runner
image: registry.tail8d86e.ts.net/blumeops/forgejo-runner:v1.0.3
env:
# Use internal k8s service via Tailscale operator egress
- name: FORGEJO_INSTANCE_URL
value: "http://forge.tailscale.svc.cluster.local:3001"
- name: RUNNER_NAME
value: "k8s-runner-1"
- name: RUNNER_TOKEN
valueFrom:
secretKeyRef:
name: forgejo-runner-token
key: token
command:
- /bin/sh
- -c
- |
# Register runner if not already registered
if [ ! -f /data/.runner ]; then
forgejo-runner register \
--instance "$FORGEJO_INSTANCE_URL" \
--token "$RUNNER_TOKEN" \
--name "$RUNNER_NAME" \
--labels "ubuntu-latest:host,ubuntu-22.04:host" \
--no-interactive
fi
# Start the runner daemon with config
forgejo-runner daemon --config /config/config.yaml
volumeMounts:
- name: runner-data
mountPath: /data
- name: runner-config
mountPath: /config
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1000m"
volumes:
- name: runner-data
emptyDir: {}
- name: runner-config
configMap:
name: forgejo-runner-config