66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gitea-actions-runner
|
|
namespace: default
|
|
labels:
|
|
app: gitea-actions-runner
|
|
spec:
|
|
replicas: 1
|
|
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 nc -z -v -w30 gitea-int-service 3000; do
|
|
echo "Waiting for gitea to be ready..."
|
|
sleep 2
|
|
done
|
|
containers:
|
|
- name: runner
|
|
image: gitea/act_runner:latest
|
|
env:
|
|
- name: GITEA_INSTANCE_URL
|
|
value: "http://gitea-int-service:3000/"
|
|
- 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: {}
|