Skip to content

Commit 303c3d7

Browse files
committed
make sure tmp folder exists (fixes #7)
1 parent 51ba409 commit 303c3d7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

templates/deployment.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ spec:
4242
args:
4343
- -c
4444
- >-
45-
mkdir -p {{ .Values.tempfolder }} &&
4645
chown "{{ .Values.userid }}:{{ .Values.groupid }}" /home/clowder/data {{ .Values.tempfolder }}
4746
securityContext:
4847
runAsUser: 0
@@ -54,6 +53,19 @@ spec:
5453
{{- . | toYaml | nindent 10 }}
5554
{{- end }}
5655
{{- end }}
56+
- name: create-tmp-folder
57+
image: busybox:latest
58+
command: ["/bin/sh"]
59+
args:
60+
- -c
61+
- >-
62+
mkdir -p {{ .Values.tempfolder }}
63+
volumeMounts:
64+
- name: data
65+
mountPath: /home/clowder/data
66+
{{- with .Values.extraVolumeMounts }}
67+
{{- . | toYaml | nindent 10 }}
68+
{{- end }}
5769
containers:
5870
- name: {{ .Chart.Name }}
5971
image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

0 commit comments

Comments
 (0)