diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 572ac39..cb4dc26 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -110,4 +110,9 @@ questions: default: "30Gi" description: "Size of MOLGENIS filestore (not the database size)" type: string - label: Size filestore \ No newline at end of file + label: Size filestore + - variable: molgenis.persistence.retain + default: false + description: "Do you want to retain the persistence volume" + type: boolean + label: Retain volume \ No newline at end of file diff --git a/molgenis/templates/persistence/molgenisPVC.yaml b/molgenis/templates/persistence/molgenisPVC.yaml index a10d9de..1335adb 100644 --- a/molgenis/templates/persistence/molgenisPVC.yaml +++ b/molgenis/templates/persistence/molgenisPVC.yaml @@ -1,15 +1,21 @@ -{{- if .Values.molgenis.persistence.enabled -}} +{{- with .Values.molgenis.persistence }} +{{- if .enabled -}} apiVersion: extensions/v1beta1 kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ .Values.molgenis.persistence.name }} + name: {{ .name }} annotations: + {{- if .retain }} + volume.beta.kubernetes.io/storage-class: "nfs-provisioner-retain" + {{- else }} volume.beta.kubernetes.io/storage-class: "nfs-provisioner" + {{- end }} spec: accessModes: - ReadWriteMany resources: requests: - storage: {{ .Values.molgenis.persistence.size }} + storage: {{ .size }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/molgenis/values.yaml b/molgenis/values.yaml index 747106a..6b6d5ee 100644 --- a/molgenis/values.yaml +++ b/molgenis/values.yaml @@ -33,6 +33,7 @@ molgenis: memory: 1250Mi persistence: enabled: false + retain: false name: molgenis-nfs-claim size: 30Gi services: