From eced4c147352c301740190df8ba65a24536cc76e Mon Sep 17 00:00:00 2001 From: Julia McGhee Date: Sat, 21 Mar 2026 16:41:37 +0000 Subject: [PATCH] Add pnpm store cache to runner via persistent Docker volume Mount a named Docker volume (pnpm-store) into every job container at the default pnpm store path. The volume persists in the DinD sidecar across job runs, so pnpm install reuses cached packages. --- .../platform/gitea-runner/deployment.yaml | 8 ++++++++ .../platform/gitea-runner/kustomization.yaml | 1 + .../platform/gitea-runner/runner-config.yaml | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 infra/kubernetes/platform/gitea-runner/runner-config.yaml diff --git a/infra/kubernetes/platform/gitea-runner/deployment.yaml b/infra/kubernetes/platform/gitea-runner/deployment.yaml index 5e55889..a478552 100644 --- a/infra/kubernetes/platform/gitea-runner/deployment.yaml +++ b/infra/kubernetes/platform/gitea-runner/deployment.yaml @@ -30,9 +30,14 @@ spec: 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 + - name: CONFIG_FILE + value: /config/config.yaml volumeMounts: - name: runner-data mountPath: /data + - name: runner-config + mountPath: /config + readOnly: true resources: requests: memory: 256Mi @@ -60,5 +65,8 @@ spec: volumes: - name: runner-data emptyDir: {} + - name: runner-config + configMap: + name: gitea-runner-config - name: dind-storage emptyDir: {} diff --git a/infra/kubernetes/platform/gitea-runner/kustomization.yaml b/infra/kubernetes/platform/gitea-runner/kustomization.yaml index 5945673..7a91a14 100644 --- a/infra/kubernetes/platform/gitea-runner/kustomization.yaml +++ b/infra/kubernetes/platform/gitea-runner/kustomization.yaml @@ -2,4 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - deployment.yaml + - runner-config.yaml - gitea-runner-token-sealed.yaml diff --git a/infra/kubernetes/platform/gitea-runner/runner-config.yaml b/infra/kubernetes/platform/gitea-runner/runner-config.yaml new file mode 100644 index 0000000..07dd671 --- /dev/null +++ b/infra/kubernetes/platform/gitea-runner/runner-config.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: gitea-runner-config + namespace: platform +data: + config.yaml: | + log: + level: info + runner: + capacity: 1 + timeout: 3600 + container: + options: "-v pnpm-store:/root/.local/share/pnpm/store" + valid_volumes: + - "pnpm-store"