Nelson,Thomas(tn1381)(arthurdent3) | 4807fdf | 2018-09-19 16:52:36 -0400 | [diff] [blame] | 1 | {{ if .Values.persistence.enabled }} |
| 2 | {{- $root := . -}} |
| 3 | {{ range $i, $e := until (atoi (quote $root.Values.replicaCount) | default 3) }} |
| 4 | --- |
| 5 | apiVersion: v1 |
| 6 | kind: PersistentVolume |
| 7 | metadata: |
| 8 | name: {{ $root.Release.Name }}-{{ $root.Values.service.name }}-{{ $i }} |
| 9 | namespace: {{ $root.Release.Namespace }} |
| 10 | labels: |
| 11 | type: {{ $root.Values.persistence.storageType }} |
| 12 | app: {{ $root.Values.service.name }} |
| 13 | chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version | replace "+" "_" }} |
| 14 | release: {{ $root.Release.Name }} |
| 15 | heritage: {{ $root.Release.Service }} |
| 16 | spec: |
| 17 | capacity: |
| 18 | storage: {{ $root.Values.persistence.size }} |
| 19 | accessModes: |
| 20 | - {{ $root.Values.persistence.accessMode }} |
| 21 | hostPath: |
| 22 | path: {{ $root.Values.persistence.mountPath }}/{{ $root.Release.Name }}/{{ $root.Values.persistence.mountSubPath }}-{{$i}} |
| 23 | persistentVolumeReclaimPolicy: {{ $root.Values.persistence.volumeReclaimPolicy }} |
| 24 | {{ end }} |
| 25 | {{ end }} |