From 2a6f914840347bab2f675bc59d7b597443707abc Mon Sep 17 00:00:00 2001 From: DaanSelen Date: Wed, 8 Apr 2026 16:59:17 +0200 Subject: [PATCH] chore: add cache flushing init container --- templates/statefulset.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index f2900e8..4f98f2c 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -49,6 +49,23 @@ spec: {{- if .Values.preExtraInitContainers }} {{- toYaml .Values.preExtraInitContainers | nindent 8 }} {{- end }} + {{- if .Values.statefulset.actRunner.flushCache }} + - name: cache-flusher + image: "{{ include "gitea.actions.init.image" . }}" + command: + - sh + - -c + - | + if [[ -f /data/.runner ]]; then + echo "Removing cache at /data/.runner" + rm -v /data/.runner + else + echo "No .runner file to remove" + fi + volumeMounts: + - mountPath: /data + name: data-act-runner + {{- end }} - name: init-gitea image: "{{ include "gitea.actions.init.image" . }}" command: