From fc71f1f1ac2292fe5a675981f92fa63a410dffb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Pl=C5=BE=C3=ADk?= Date: Tue, 15 Oct 2019 15:43:53 +0200 Subject: [PATCH] Correctly quote directory name in the initContainer script. (#17920) The original quoting prevented the globbing expansion to happen, making workdir content persist across volume restarts. This PR modifies the behavior to allow for the expansion. Note: this is not a full-featured fix to this issue (e.g. doesn't handle dotfiles) and depending on how/whether concourse does any shell escaping, this might need some further work. Signed-off-by: Milan Plzik --- stable/concourse/Chart.yaml | 2 +- stable/concourse/templates/worker-statefulset.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/concourse/Chart.yaml b/stable/concourse/Chart.yaml index 78076c5a69..f3c1d88599 100644 --- a/stable/concourse/Chart.yaml +++ b/stable/concourse/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: concourse -version: 8.2.6 +version: 8.2.7 appVersion: 5.6.0 description: Concourse is a simple and scalable CI system. icon: https://avatars1.githubusercontent.com/u/7809479 diff --git a/stable/concourse/templates/worker-statefulset.yaml b/stable/concourse/templates/worker-statefulset.yaml index c8c00aa8ee..abd79d4004 100644 --- a/stable/concourse/templates/worker-statefulset.yaml +++ b/stable/concourse/templates/worker-statefulset.yaml @@ -61,7 +61,7 @@ spec: for v in $((btrfs subvolume list --sort=-ogen "{{ .Values.concourse.worker.workDir }}" || true) | awk '{print $9}'); do (btrfs subvolume show "{{ .Values.concourse.worker.workDir }}/$v" && btrfs subvolume delete "{{ .Values.concourse.worker.workDir }}/$v") || true done - rm -rf "{{ .Values.concourse.worker.workDir }}/*" + rm -rf "{{ .Values.concourse.worker.workDir }}"/* volumeMounts: - name: concourse-work-dir mountPath: {{ .Values.concourse.worker.workDir | quote }}