Skip to content

Commit d3a2266

Browse files
committed
use data folder with S3
This will mount the data folder even when using S3 storage. This data folder in that case will be used to host the temp files. If not using persistence, make sure tempfolder points to a writeable place.
1 parent 01fc294 commit d3a2266

File tree

7 files changed

+53
-9
lines changed

7 files changed

+53
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ clowder-*.tgz
1212
secrets-*.yaml
1313
values-*.yaml
1414
*.values.yaml
15+
16+
# backup files
17+
*~

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# Change Log
22

3+
## 0.16.6
4+
5+
**Release date:** 2023-04-10
6+
7+
![AppVersion: 1.21.0](https://img.shields.io/static/v1?label=AppVersion&message=1.21.0&color=success&logo=)
8+
![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm)
9+
10+
11+
* use data folder with S3
12+
13+
### Default value changes
14+
15+
```diff
16+
diff --git a/values.yaml b/values.yaml
17+
index 4b084c8..82f1c41 100644
18+
--- a/values.yaml
19+
+++ b/values.yaml
20+
@@ -70,6 +70,8 @@ groupid: 0
21+
22+
## tempfolder is the place where clowder will safe the files when they are uploaded. Best
23+
## is for this to be on the same volume as the final storage, or on a fast storage.
24+
+## If persistence is not enabled, make sure this points to a folder writeable by the
25+
+## clowder pod.
26+
tempfolder: /home/clowder/data/tmp/
27+
28+
## helpmenu is a list of entries that are added to the help menu in clowder, each entry has
29+
@@ -188,6 +190,8 @@ minio:
30+
## Enable persistence using Persistent Volume Claims
31+
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
32+
##
33+
+## This is used for data and temp space. In case of S3 storage, this should
34+
+## be at least as big as the biggest uploaded file.
35+
persistence:
36+
enabled: true
37+
## A manually managed Persistent Volume and Claim
38+
```
39+
340
## 0.16.5
441

542
**Release date:** 2023-04-10

Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description: >
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.16.5
16+
version: 0.16.6
1717

1818
# This is the version number of the application being deployed. This version number should be
1919
# incremented each time you make changes to the application. Versions are not expected to
@@ -55,4 +55,4 @@ annotations:
5555
- name: Helm Chart
5656
url: https://github.com/clowder-framework/clowder-helm
5757
artifacthub.io/changes: |
58-
- "fix tmp folder with s3 again"
58+
- "use data folder with S3"

changelog.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ changelog="$(sed -e "1,/^## ${version}/d" -e "/^###/,\$d" -e '/^$/d' -e 's/^* /-
77
sed -i~ -e '/^ artifacthub.io\/changes: |/,$d' Chart.yaml
88
echo " artifacthub.io/changes: |" >> Chart.yaml
99
echo "${changelog}" >> Chart.yaml
10+
11+
git commit --amend Chart.yaml CHANGELOG.md

templates/deployment.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ spec:
3535
secretKeyRef:
3636
name: {{ include "clowder.fullname" . }}
3737
key: mongodb-uri
38+
{{- if .Values.persistence.enabled }}
3839
- name: setup-data-folder
3940
image: busybox:latest
4041
command: ["/bin/sh"]
@@ -47,13 +48,12 @@ spec:
4748
runAsUser: 0
4849
runAsGroup: 0
4950
volumeMounts:
50-
{{- if not (or .Values.storage.s3 .Values.minio.enabled) }}
5151
- name: data
5252
mountPath: /home/clowder/data
53-
{{- end }}
5453
{{- with .Values.extraVolumeMounts }}
5554
{{- . | toYaml | nindent 10 }}
5655
{{- end }}
56+
{{- end }}
5757
containers:
5858
- name: {{ .Chart.Name }}
5959
image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
@@ -116,7 +116,7 @@ spec:
116116
volumeMounts:
117117
- name: custom-volume
118118
mountPath: /home/clowder/custom
119-
{{- if not (or .Values.storage.s3 .Values.minio.enabled) }}
119+
{{- if .Values.persistence.enabled }}
120120
- name: data
121121
mountPath: /home/clowder/data
122122
{{- end }}
@@ -144,15 +144,15 @@ spec:
144144
path: custom.conf
145145
- key: play.plugins
146146
path: play.plugins
147-
{{- if not (or .Values.storage.s3 .Values.minio.enabled) }}
147+
{{- if .Values.persistence.enabled }}
148148
- name: data
149149
persistentVolumeClaim:
150150
{{- if $.Values.persistence.existingClaim }}
151151
claimName: {{ $.Values.persistence.existingClaim }}
152152
{{- else }}
153153
claimName: {{ include "clowder.fullname" . }}-data
154154
{{- end }}
155-
{{- end }}
155+
{{- end }}
156156
{{- with .Values.extraVolumes }}
157157
{{- . | toYaml | nindent 8 }}
158158
{{- end }}

templates/persistence.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if not (or .Values.storage.s3 .Values.minio.enabled) }}
21
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
32
kind: PersistentVolumeClaim
43
apiVersion: v1
@@ -16,4 +15,3 @@ spec:
1615
storageClassName: {{ .Values.persistence.storageClass }}
1716
{{- end -}}
1817
{{- end }}
19-
{{- end }}

values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ groupid: 0
7070

7171
## tempfolder is the place where clowder will safe the files when they are uploaded. Best
7272
## is for this to be on the same volume as the final storage, or on a fast storage.
73+
## If persistence is not enabled, make sure this points to a folder writeable by the
74+
## clowder pod.
7375
tempfolder: /home/clowder/data/tmp/
7476

7577
## helpmenu is a list of entries that are added to the help menu in clowder, each entry has
@@ -188,6 +190,8 @@ minio:
188190
## Enable persistence using Persistent Volume Claims
189191
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
190192
##
193+
## This is used for data and temp space. In case of S3 storage, this should
194+
## be at least as big as the biggest uploaded file.
191195
persistence:
192196
enabled: true
193197
## A manually managed Persistent Volume and Claim

0 commit comments

Comments
 (0)