blob: f45a4504b355bb10030e19c96da34e044f529a2e [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:
Harish V Kajur8e7cbd22018-05-07 14:02:46 +00008 name: {{ $root.Release.Name }}-{{ $root.Values.service.name }}-{{ $i }}
vagrant1a3a3552018-03-10 23:56:32 +00009 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 }}
Harish V Kajur8e7cbd22018-05-07 14:02:46 +000025#{{ end }}