Talos/testing1/first-cluster/apps/gitea/runner-deployment.yaml
0xWheatyz a673a1c40b fix(gitea-runner): use act-compatible images with Docker support
Update Gitea Actions runner to use catthehacker/ubuntu images which
are specifically designed for GitHub Actions/Gitea Actions and include
Docker CLI and common tools pre-installed.

Changes:
- Replace node:20-bullseye labels with catthehacker/ubuntu:act-latest
- Add ubuntu-22.04 label pointing to act-22.04 image
- Configure DOCKER_* environment variables to be passed to jobs

These images are the standard for act (local GitHub Actions runner)
and Gitea Actions, providing better compatibility with workflows
that need Docker access.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 03:22:59 +00:00

83 lines
2.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-runner
namespace: gitea
labels:
app: gitea-runner
spec:
replicas: 1
selector:
matchLabels:
app: gitea-runner
template:
metadata:
labels:
app: gitea-runner
spec:
restartPolicy: Always
volumes:
- name: docker-certs
emptyDir: {}
- name: runner-data
emptyDir: {}
containers:
- name: runner
image: gitea/act_runner:latest
imagePullPolicy: IfNotPresent
command: ["sh", "-c", "while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; act_runner register --no-interactive --instance $GITEA_INSTANCE_URL --token $GITEA_RUNNER_REGISTRATION_TOKEN --name $GITEA_RUNNER_NAME --labels $GITEA_RUNNER_LABELS && act_runner daemon"]
env:
- name: DOCKER_HOST
value: tcp://localhost:2376
- name: DOCKER_CERT_PATH
value: /certs/client
- name: DOCKER_TLS_VERIFY
value: "1"
- name: GITEA_INSTANCE_URL
value: "http://10.0.1.10/"
- name: GITEA_RUNNER_REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
name: runner-secret
key: token
- name: GITEA_RUNNER_NAME
value: "kubernetes-runner"
- name: GITEA_RUNNER_LABELS
value: "ubuntu-latest:docker://catthehacker/ubuntu:act-latest,ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04"
- name: GITEA_RUNNER_ENV_DOCKER_HOST
value: tcp://localhost:2376
- name: GITEA_RUNNER_ENV_DOCKER_CERT_PATH
value: /certs/client
- name: GITEA_RUNNER_ENV_DOCKER_TLS_VERIFY
value: "1"
volumeMounts:
- name: docker-certs
mountPath: /certs
- name: runner-data
mountPath: /data
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"
- name: daemon
image: docker:26-dind
imagePullPolicy: IfNotPresent
env:
- name: DOCKER_TLS_CERTDIR
value: /certs
securityContext:
privileged: true
volumeMounts:
- name: docker-certs
mountPath: /certs
resources:
requests:
cpu: "200m"
memory: "256Mi"
limits:
cpu: "1000m"
memory: "1Gi"