fix(forgejo-runner): change cache mount path

This commit is contained in:
SeanOMik 2025-01-02 13:48:13 -05:00
parent 9423d5fd6d
commit c3e9f1609b
Signed by: SeanOMik
GPG key ID: FEC9E2FC15235964
2 changed files with 10 additions and 4 deletions
kubernetes/main/apps/dev/forgejo-runner/app

View file

@ -59,7 +59,7 @@ data:
enabled: true
# The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir: ""
dir: "/cache"
# The host of the cache server.
# It's not for the address to listen, but the address to connect from job containers.
# So 0.0.0.0 is a bad choice, leave it empty to detect automatically.

View file

@ -51,10 +51,16 @@ spec:
- name: runner-data
mountPath: /data
# fix permissions of cache pvc
- command: ["sh", "-c", "chown -R 1000:1000 /data/.cache"]
- command:
- "sh"
- "-c"
- |
find /cache -type d -exec chmod 775 {} +
find /cache -type f -exec chmod 664 {} +
chown -R 1000:1000 /cache
image: busybox
volumeMounts:
- mountPath: /data/.cache/actcache
- mountPath: /cache
name: forgejo-runner-cache
name: fix-permissions
containers:
@ -80,7 +86,7 @@ spec:
mountPath: /data/config.yml
subPath: config.yml
- name: forgejo-runner-cache
mountPath: /data/.cache/actcache
mountPath: /cache
- name: daemon
image: docker:27.4.1-dind
env: