blob: b0cd3bf238d179190437fda78408fbbaa4962618 [file] [log] [blame]
Mike Elliottd32d36e2018-02-12 15:54:03 -05001{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
2kind: PersistentVolumeClaim
3apiVersion: v1
4metadata:
Mandeep Khindaa57d8dd2018-03-09 14:29:37 +00005 name: {{ include "common.fullname" . }}
Mike Elliottd32d36e2018-02-12 15:54:03 -05006 namespace: {{ include "common.namespace" . }}
7 labels:
kerenj0e93fb52018-03-06 14:46:42 +00008 app: {{ include "common.name" . }}
Mike Elliottd32d36e2018-02-12 15:54:03 -05009 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
10 release: "{{ .Release.Name }}"
11 heritage: "{{ .Release.Service }}"
12{{- if .Values.persistence.annotations }}
13 annotations:
14{{ toYaml .Values.persistence.annotations | indent 4 }}
15{{- end }}
16spec:
Jerome Doucerain7bd243e2018-03-02 22:14:27 -050017 selector:
18 matchLabels:
19 name: {{ include "common.fullname" . }}
Mike Elliottd32d36e2018-02-12 15:54:03 -050020 accessModes:
21 - {{ .Values.persistence.accessMode }}
22 resources:
23 requests:
24 storage: {{ .Values.persistence.size }}
25{{- if .Values.persistence.storageClass }}
26{{- if (eq "-" .Values.persistence.storageClass) }}
27 storageClassName: ""
28{{- else }}
29 storageClassName: "{{ .Values.persistence.storageClass }}"
30{{- end }}
31{{- end }}
32{{- end -}}