feat: add gitea actions runner deployment configuration

This commit is contained in:
2025-04-15 20:00:54 +05:30
parent 6aee55e0bd
commit da7dc53af0

View File

@@ -0,0 +1,58 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-actions-runner
namespace: default
labels:
app: gitea-actions-runner
spec:
replicas: 2
selector:
matchLabels:
app: gitea-actions-runner
template:
metadata:
labels:
app: gitea-actions-runner
spec:
initContainers:
- name: wait-for-gitea
image: busybox
command: ['sh', '-c', 'until nslookup gitea-service 3011; do echo waiting for gitea; sleep 2; done']
containers:
- name: runner
image: gitea/act_runner:latest
env:
- name: GITEA_INSTANCE_URL
value: "http://gitea-service:3011/"
- name: GITEA_RUNNER_REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
name: gitea-runner-token
key: token
- name: GITEA_RUNNER_NAME
value: "k3s-dind-runner"
- name: GITEA_RUNNER_LABELS
value: "ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye,ubuntu-20.04:docker://node:16-bullseye"
volumeMounts:
- name: var-run
mountPath: /var/run
- name: dind
image: docker:dind
securityContext:
privileged: true
env:
- name: DOCKER_TLS_CERTDIR
value: ""
volumeMounts:
- name: dind-storage
mountPath: /var/lib/docker
- name: var-run
mountPath: /var/run
volumes:
- name: dind-storage
persistentVolumeClaim:
claimName: longhorn-gitea-dind
- name: var-run
emptyDir: {}