blob: 0e1a3dfc26bedde18ffcb82380ccc3f07b9ce624 [file] [log] [blame]
vagrant1a3a3552018-03-10 23:56:32 +00001#{{ if .Values.persistence.enabled }}
2{{- $root := . -}}
3{{ range $i, $e := until (atoi (quote $root.Values.replicaCount) | default 3) }}
4---
5apiVersion: v1
6kind: PersistentVolume
7metadata:
8 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 }}
16spec:
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 }}