Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 1 | {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} |
| 2 | kind: PersistentVolume |
| 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 | replace "+" "_" }}" |
| 10 | release: "{{ .Release.Name }}" |
| 11 | heritage: "{{ .Release.Service }}" |
Jerome Doucerain | 7bd243e | 2018-03-02 22:14:27 -0500 | [diff] [blame] | 12 | name: {{ include "common.fullname" . }} |
Mike Elliott | d32d36e | 2018-02-12 15:54:03 -0500 | [diff] [blame] | 13 | spec: |
| 14 | capacity: |
| 15 | storage: {{ .Values.persistence.size}} |
| 16 | accessModes: |
| 17 | - {{ .Values.persistence.accessMode }} |
| 18 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 19 | hostPath: |
| 20 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} |
Jerome Doucerain | 7bd243e | 2018-03-02 22:14:27 -0500 | [diff] [blame] | 21 | {{- end -}} |