Skip to content

Commit f5fe13b

Browse files
authored
Add configuration to mount alternative volume to /data (#209)
1 parent 9cfee6e commit f5fe13b

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

charts/minecraft/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: minecraft
3-
version: 4.18.0
3+
version: 4.19.0
44
appVersion: SeeValues
55
home: https://minecraft.net/
66
description: Minecraft server

charts/minecraft/templates/NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ You can watch for EXTERNAL-IP to populate by running:
3939

4040
{{- end }}
4141

42-
{{- if .Values.persistence.dataDir.enabled }}
42+
{{- if or .Values.persistence.dataDir.enabled .Values.persistence.altDataVolumeName }}
4343
{{- else }}
4444

4545
############################################################################

charts/minecraft/templates/deployment.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,14 @@ spec:
149149
volumeMounts:
150150
- name: tmp
151151
mountPath: /tmp
152+
{{- if .Values.persistence.altDataVolumeName }}
153+
- name: {{ .Values.persistence.altDataVolumeName }}
154+
mountPath: /data
155+
{{- else }}
152156
- name: datadir
153157
mountPath: /data
154158
readOnly: true
159+
{{- end }}
155160
- name: backupdir
156161
mountPath: {{ default "/backups" .Values.mcbackup.destDir }}
157162
{{- if or (eq .Values.mcbackup.backupMethod "rclone") (eq (include "isResticWithRclone" $) "true") }}
@@ -413,11 +418,16 @@ spec:
413418
volumeMounts:
414419
- name: tmp
415420
mountPath: /tmp
421+
{{- if .Values.persistence.altDataVolumeName }}
422+
- name: {{ .Values.persistence.altDataVolumeName }}
423+
mountPath: /data
424+
{{- else }}
416425
- name: datadir
417426
mountPath: /data
418427
{{- if (and .Values.persistence.dataDir.enabled .Values.persistence.dataDir.subPath) }}
419428
subPath: {{ .Values.persistence.dataDir.subPath }}
420429
{{- end }}
430+
{{- end }}
421431
- name: backupdir
422432
mountPath: {{ default "/backups" .Values.mcbackup.destDir }}
423433
readOnly: true

charts/minecraft/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ envFrom: []
399399
persistence:
400400
labels: {}
401401
annotations: {}
402+
## specify an alternative volume to be mounted to /data instead of datadir.
403+
# altDataVolumeName: ""
402404
## minecraft data Persistent Volume Storage Class
403405
## If defined, storageClassName: <storageClass>
404406
## If set to "-", storageClassName: "", which disables dynamic provisioning

0 commit comments

Comments
 (0)