diff --git a/cluster/apps/gitea/gitea-act.yml b/cluster/apps/gitea/gitea-act.yml new file mode 100644 index 0000000..f7004d5 --- /dev/null +++ b/cluster/apps/gitea/gitea-act.yml @@ -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: {}