1
0

added retainability for pv's

This commit is contained in:
sido 2018-09-11 15:48:56 +02:00
parent 04bd9cd653
commit e5cbcdf933
3 changed files with 16 additions and 4 deletions

View File

@ -110,4 +110,9 @@ questions:
default: "30Gi" default: "30Gi"
description: "Size of MOLGENIS filestore (not the database size)" description: "Size of MOLGENIS filestore (not the database size)"
type: string type: string
label: Size filestore label: Size filestore
- variable: molgenis.persistence.retain
default: false
description: "Do you want to retain the persistence volume"
type: boolean
label: Retain volume

View File

@ -1,15 +1,21 @@
{{- if .Values.molgenis.persistence.enabled -}} {{- with .Values.molgenis.persistence }}
{{- if .enabled -}}
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: {{ .Values.molgenis.persistence.name }} name: {{ .name }}
annotations: annotations:
{{- if .retain }}
volume.beta.kubernetes.io/storage-class: "nfs-provisioner-retain"
{{- else }}
volume.beta.kubernetes.io/storage-class: "nfs-provisioner" volume.beta.kubernetes.io/storage-class: "nfs-provisioner"
{{- end }}
spec: spec:
accessModes: accessModes:
- ReadWriteMany - ReadWriteMany
resources: resources:
requests: requests:
storage: {{ .Values.molgenis.persistence.size }} storage: {{ .size }}
{{- end }}
{{- end }} {{- end }}

View File

@ -33,6 +33,7 @@ molgenis:
memory: 1250Mi memory: 1250Mi
persistence: persistence:
enabled: false enabled: false
retain: false
name: molgenis-nfs-claim name: molgenis-nfs-claim
size: 30Gi size: 30Gi
services: services: