Kubernetes.K3s.installLog/services/Gitea/deployment-act-runner-dind....

77 lines
2.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: act-runner-dind
name: act-runner-dind
namespace: gitea
spec:
replicas: 1
selector:
matchLabels:
app: act-runner-dind
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
app: act-runner-dind
spec:
hostname: act-runner-dind
restartPolicy: Always
volumes:
- name: runner-config
configMap:
name: runner-config
items:
- key: dind-config.yml
path: dind-config.yml
- name: docker-certs
emptyDir: {}
- name: runner-data
persistentVolumeClaim:
claimName: act-runner-dind
containers:
- name: runner
image: gitea/act_runner:nightly
command: ["sh", "-c", "while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; /sbin/tini -- /opt/act/run.sh"]
env:
- name: CONFIG_FILE
value: /opt/act/config.yml
- 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://gitea.gitea.svc.cluster.local:3000
- name: GITEA_RUNNER_LABELS
value: dind:docker://node:21-bullseye
- name: GITEA_RUNNER_REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
name: runner-secret
key: token
volumeMounts:
- name: runner-config
mountPath: /opt/act/config.yml
subPath: dind-config.yml
- name: docker-certs
mountPath: /certs
- name: runner-data
mountPath: /data
- name: daemon
image: docker:23.0.6-dind
args:
- --mtu=1400
env:
- name: DOCKER_TLS_CERTDIR
value: /certs
securityContext:
privileged: true
volumeMounts:
- name: docker-certs
mountPath: /certs