diff --git a/stable/concourse/Chart.yaml b/stable/concourse/Chart.yaml index b365ffe182..642628256b 100644 --- a/stable/concourse/Chart.yaml +++ b/stable/concourse/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: concourse -version: 8.0.0 +version: 8.0.1 appVersion: 5.3.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 7e53e8eb82..bb63fc5cd4 100644 --- a/stable/concourse/templates/worker-statefulset.yaml +++ b/stable/concourse/templates/worker-statefulset.yaml @@ -51,12 +51,17 @@ spec: image: "{{ .Values.image }}:{{ .Values.imageTag }}" {{- end }} imagePullPolicy: {{ .Values.imagePullPolicy | quote }} + securityContext: + privileged: true command: - - /bin/sh + - /bin/bash args: - -ce - |- - rm -rf {{ .Values.concourse.worker.workDir }}/* + 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 }}/*" volumeMounts: - name: concourse-work-dir mountPath: {{ .Values.concourse.worker.workDir | quote }}