gitea-runner: use proper deployment manifest

This commit is contained in:
2025-08-22 19:33:56 -04:00
parent 51eeb300db
commit dc3060a35f

View File

@@ -1,34 +1,39 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: gitea-runner annotations:
deployment.kubernetes.io/revision: "4"
labels:
app: act-runner
name: act-runner
namespace: gitea-runner
spec: spec:
progressDeadlineSeconds: 600
replicas: 1 replicas: 1
strategy: revisionHistoryLimit: 10
type: Recreate
selector: selector:
matchLabels: matchLabels:
app: gitea-runner app: act-runner
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template: template:
metadata: metadata:
creationTimestamp: null
labels: labels:
app: gitea-runner app: act-runner
spec: spec:
restartPolicy: Always
volumes:
- name: docker-certs
emptyDir: {}
- name: runner-data
persistentVolumeClaim:
claimName: gitea-runner-pvc
containers: containers:
- name: runner - command:
image: gitea/act_runner:nightly - sh
imagePullPolicy: Always - -c
command: ["sh", "-c", "while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; /sbin/tini -- run.sh"] - while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...';
sleep 5; done; /sbin/tini -- run.sh
env: env:
- name: DOCKER_HOST - name: DOCKER_HOST
value: tcp://127.0.0.1:2376 value: tcp://localhost:2376
- name: DOCKER_CERT_PATH - name: DOCKER_CERT_PATH
value: /certs/client value: /certs/client
- name: DOCKER_TLS_VERIFY - name: DOCKER_TLS_VERIFY
@@ -38,20 +43,37 @@ spec:
- name: GITEA_RUNNER_REGISTRATION_TOKEN - name: GITEA_RUNNER_REGISTRATION_TOKEN
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: gitea-runner-token key: token
key: registration-token name: runner-secret
image: gitea/act_runner:nightly
imagePullPolicy: Always
name: runner
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts: volumeMounts:
- name: docker-certs - mountPath: /certs
mountPath: /certs name: docker-certs
- name: runner-data - mountPath: /data
mountPath: /data name: runner-data
- name: daemon - env:
image: docker:23.0.6-dind
env:
- name: DOCKER_TLS_CERTDIR - name: DOCKER_TLS_CERTDIR
value: /certs value: /certs
image: docker:23.0.6-dind
imagePullPolicy: IfNotPresent
name: daemon
securityContext: securityContext:
privileged: true privileged: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts: volumeMounts:
- name: docker-certs - mountPath: /certs
mountPath: /certs name: docker-certs
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
volumes:
- name: docker-certs
- name: runner-data
persistentVolumeClaim:
claimName: act-runner-vol