apiVersion: apps/v1 kind: Deployment metadata: name: gitea-runner namespace: platform labels: app: gitea-runner spec: replicas: 1 selector: matchLabels: app: gitea-runner template: metadata: labels: app: gitea-runner spec: containers: - name: runner image: gitea/act_runner:latest command: - sh - -c - | if [ ! -f /data/.runner ]; then act_runner register \ --instance "$GITEA_INSTANCE_URL" \ --token "$GITEA_RUNNER_REGISTRATION_TOKEN" \ --labels "$GITEA_RUNNER_LABELS" \ --config /config/config.yaml \ --no-interactive fi exec act_runner daemon --config /config/config.yaml workingDir: /data env: - name: GITEA_INSTANCE_URL value: http://gitea-helm-http.platform.svc:3000 - name: GITEA_RUNNER_REGISTRATION_TOKEN valueFrom: secretKeyRef: name: gitea-runner-token key: token - name: GITEA_RUNNER_LABELS value: "ubuntu-latest:docker://gitea.coreworlds.io/lazorgurl/runner-image:latest,linux/amd64:docker://gitea.coreworlds.io/lazorgurl/runner-image:latest,cluster:docker://gitea.coreworlds.io/lazorgurl/runner-image:latest" - name: DOCKER_HOST value: tcp://localhost:2375 volumeMounts: - name: runner-data mountPath: /data - name: runner-config mountPath: /config readOnly: true resources: requests: memory: 256Mi cpu: 200m limits: memory: 1Gi - name: dind image: docker:dind securityContext: privileged: true env: - name: DOCKER_TLS_CERTDIR value: "" volumeMounts: - name: dind-storage mountPath: /var/lib/docker resources: requests: memory: 512Mi cpu: 500m limits: memory: 4Gi volumes: - name: runner-data emptyDir: {} - name: runner-config configMap: name: gitea-runner-config - name: dind-storage emptyDir: {}