diff --git a/bedrock/Chart.yaml b/bedrock/Chart.yaml index 69c5037..0fa2464 100644 --- a/bedrock/Chart.yaml +++ b/bedrock/Chart.yaml @@ -14,7 +14,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.1.8 +version: 0.1.9 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/bedrock/templates/statefulset.yaml b/bedrock/templates/statefulset.yaml index 6c5d740..7a8f61b 100644 --- a/bedrock/templates/statefulset.yaml +++ b/bedrock/templates/statefulset.yaml @@ -51,6 +51,13 @@ spec: secret: defaultMode: 420 secretName: bedrock-server + {{- if and .Values.config.persistence.enabled .Values.config.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + {{- with .Values.config.persistence.existingClaim }} + claimName: {{ tpl . $ }} + {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -63,6 +70,7 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} +{{- if and .Values.config.persistence.enabled (not .Values.config.persistence.existingClaim) }} volumeClaimTemplates: - metadata: name: data @@ -72,3 +80,4 @@ spec: resources: requests: storage: {{ .Values.config.storageSize }} +{{- end -}} diff --git a/bedrock/values.yaml b/bedrock/values.yaml index a756d67..5cf8261 100644 --- a/bedrock/values.yaml +++ b/bedrock/values.yaml @@ -67,5 +67,8 @@ tolerations: [] affinity: {} config: - storageClassName: nfs-client-hermes - storageSize: 10Gi + persistence: + enabled: true + existingClaim: bedrock-data + storageClassName: nfs-client-hermes + storageSize: 10Gi