diff --git a/stable/minecraft/Chart.yaml b/stable/minecraft/Chart.yaml index 81d598870b..f262eaed9d 100755 --- a/stable/minecraft/Chart.yaml +++ b/stable/minecraft/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: minecraft -version: 1.2.3 +version: 1.2.4 appVersion: 1.14.4 home: https://minecraft.net/ description: Minecraft server diff --git a/stable/minecraft/templates/datadir-pvc.yaml b/stable/minecraft/templates/datadir-pvc.yaml index 2225a94445..d03e11ac99 100644 --- a/stable/minecraft/templates/datadir-pvc.yaml +++ b/stable/minecraft/templates/datadir-pvc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.persistence.dataDir.enabled -}} +{{- if and .Values.persistence.dataDir.enabled (not .Values.persistence.dataDir.existingClaim ) -}} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/stable/minecraft/templates/deployment.yaml b/stable/minecraft/templates/deployment.yaml index 859cedcc31..b437de4701 100644 --- a/stable/minecraft/templates/deployment.yaml +++ b/stable/minecraft/templates/deployment.yaml @@ -201,7 +201,11 @@ spec: - name: datadir {{- if .Values.persistence.dataDir.enabled }} persistentVolumeClaim: + {{- if .Values.persistence.dataDir.existingClaim }} + claimName: {{ .Values.persistence.dataDir.existingClaim }} + {{- else }} claimName: {{ template "minecraft.fullname" . }}-datadir + {{- end }} {{- else }} emptyDir: {} {{- end }} diff --git a/stable/minecraft/values.yaml b/stable/minecraft/values.yaml index e9a58a221e..6f5bd7962d 100644 --- a/stable/minecraft/values.yaml +++ b/stable/minecraft/values.yaml @@ -173,6 +173,7 @@ persistence: dataDir: # Set this to false if you don't care to persist state between restarts. enabled: true + # existingClaim: nil Size: 1Gi podAnnotations: {}