feat: add gitea actions runner deployment configuration
This commit is contained in:
58
cluster/apps/gitea/gitea-act.yml
Normal file
58
cluster/apps/gitea/gitea-act.yml
Normal 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: {}
|
||||||
Reference in New Issue
Block a user