diff --git a/gitea-runner/config.yaml b/gitea-runner/config.yaml new file mode 100644 index 0000000..9a5c203 --- /dev/null +++ b/gitea-runner/config.yaml @@ -0,0 +1,40 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: runner-config +data: + config.yaml: |- + log: + level: info + runner: + file: .runner + capacity: 1 + env_file: .env + timeout: 3h + shutdown_timeout: 0s + insecure: false + fetch_timeout: 5s + fetch_interval: 2s + labels: + - "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest" + - "ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04" + - "ubuntu-20.04:docker://docker.gitea.com/runner-images:ubuntu-20.04" + cache: + enabled: true + dir: "" + host: "" + port: 0 + external_server: "" + container: + network: "host" + privileged: false + options: + workdir_parent: + valid_volumes: [] + docker_host: "" + force_pull: true + force_rebuild: false + require_docker: false + docker_timeout: 0s + host: + workdir_parent: \ No newline at end of file diff --git a/gitea-runner/statefulset.yaml b/gitea-runner/statefulset.yaml index fb53850..c64deb1 100644 --- a/gitea-runner/statefulset.yaml +++ b/gitea-runner/statefulset.yaml @@ -26,6 +26,8 @@ spec: image: gitea/act_runner:nightly imagePullPolicy: Always env: + - name: CONFIG_FILE + value: /config/config.yaml - name: DOCKER_HOST value: tcp://localhost:2376 - name: DOCKER_CERT_PATH @@ -42,6 +44,8 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: + - name: runner-config + mountPath: /config - name: docker-certs mountPath: /certs - name: runner-data @@ -65,6 +69,9 @@ spec: terminationGracePeriodSeconds: 30 volumes: - name: docker-certs + - name: runner-config + configMap: + name: runner-config volumeClaimTemplates: - metadata: name: runner-data