aboutsummaryrefslogtreecommitdiffstats
path: root/deployments/helm/v2/emco/etcd/templates/pv.yaml
blob: f0cf59cead6dce3087b1f8009516f6e81066bc92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{{ if .Values.persistence.enabled }}
{{- $root := . -}}
{{ range $i, $e := until (int $root.Values.replicaCount) }}
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: {{ include "common.fullname" $root }}-data-{{ $i }}
  namespace: {{ $root.Release.Namespace }}
  labels:
    type: {{ $root.Values.persistence.storageType }}
    app: {{ include "common.fullname" $root }}
    chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version | replace "+" "_" }}
    release: {{ $root.Release.Name }}
    heritage: {{ $root.Release.Service }}
spec:
  capacity:
    storage: {{ $root.Values.persistence.storage }}
  accessModes:
    - {{ $root.Values.persistence.accessMode }}
  storageClassName: "{{ include "common.fullname" $root }}-data"
  hostPath:
    path: {{ $root.Values.persistence.mountPath }}/{{ $root.Release.Name }}/{{ $root.Values.persistence.mountSubPath }}-{{ $i }}
  persistentVolumeReclaimPolicy: {{ $root.Values.persistence.volumeReclaimPolicy }}
{{ end }}
{{ end }}