Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 1 | {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} |
| 2 | kind: PersistentVolumeClaim |
| 3 | apiVersion: v1 |
| 4 | metadata: |
Mandeep Khinda | a57d8dd | 2018-03-09 14:29:37 +0000 | [diff] [blame] | 5 | name: {{ include "common.fullname" . }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 6 | namespace: {{ include "common.namespace" . }} |
| 7 | labels: |
kerenj | 0e93fb5 | 2018-03-06 14:46:42 +0000 | [diff] [blame] | 8 | app: {{ include "common.name" . }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 9 | 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 }} |
| 16 | spec: |
| 17 | accessModes: |
| 18 | - {{ .Values.persistence.accessMode }} |
| 19 | resources: |
| 20 | requests: |
| 21 | storage: {{ .Values.persistence.size }} |
| 22 | {{- if .Values.persistence.storageClass }} |
| 23 | {{- if (eq "-" .Values.persistence.storageClass) }} |
| 24 | storageClassName: "" |
| 25 | {{- else }} |
| 26 | storageClassName: "{{ .Values.persistence.storageClass }}" |
| 27 | {{- end }} |
| 28 | {{- end }} |
| 29 | {{- end -}} |