geocrop-platform./k8s/base/gitea-runner.yaml

54 lines
1.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-runner
namespace: geocrop
spec:
replicas: 1
selector:
matchLabels:
app: gitea-runner
strategy:
type: Recreate
template:
metadata:
labels:
app: gitea-runner
spec:
serviceAccountName: gitea-runner-sa
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: runner
image: gitea/act_runner:latest
env:
- name: GITEA_INSTANCE_URL
value: http://gitea.geocrop.svc.cluster.local:3000
- name: GITEA_RUNNER_REGISTRATION_TOKEN
value: "3daF7zwBC94Q5YCb1mW1VnfPi4L7pgMxSHhKOBOn"
- name: GITEA_RUNNER_NAME
value: "k3s-runner"
- name: CONFIG_FILE
value: /config.yaml
securityContext:
privileged: false
volumeMounts:
- name: runner-data
mountPath: /data
- name: config
mountPath: /config.yaml
subPath: config.yaml
- name: docker-sock
mountPath: /var/run/docker.sock
readOnly: true
volumes:
- name: runner-data
emptyDir: {}
- name: config
configMap:
name: gitea-runner-config
- name: docker-sock
hostPath:
path: /var/run/docker.sock
type: Socket