blob: b0c05fdbfd8fb91bbcc292171a8f13cd225c05f4 [file] [log] [blame]
Nelson,Thomas(tn1381)(arthurdent3)4807fdf2018-09-19 16:52:36 -04001{{ 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.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 }}
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 }}