vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [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: |
Harish V Kajur | 8e7cbd2 | 2018-05-07 14:02:46 +0000 | [diff] [blame] | 8 | name: {{ $root.Release.Name }}-{{ $root.Values.service.name }}-{{ $i }} |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 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 }} |
Harish V Kajur | 8e7cbd2 | 2018-05-07 14:02:46 +0000 | [diff] [blame] | 25 | #{{ end }} |