aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/charts/aai-cassandra/templates/volumes.yaml
blob: f45a4504b355bb10030e19c96da34e044f529a2e (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
#{{ if .Values.persistence.enabled }}
{{- $root := . -}}
{{ range $i, $e := until (atoi (quote $root.Values.replicaCount) | default 3) }}
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: {{ $root.Release.Name }}-{{ $root.Values.service.name }}-{{ $i }}
  namespace: {{ $root.Release.Namespace }}
  labels:
    type: {{ $root.Values.persistence.storageType }}
    app: {{ $root.Values.service.name }}
    chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version | replace "+" "_" }}
    release: {{ $root.Release.Name }}
    heritage: {{ $root.Release.Service }}
spec:
  capacity:
    storage: {{ $root.Values.persistence.size }}
  accessModes:
    - {{ $root.Values.persistence.accessMode }}
  hostPath:
    path: {{ $root.Values.persistence.mountPath }}/{{ $root.Release.Name }}/{{ $root.Values.persistence.mountSubPath }}-{{ $i }}
  persistentVolumeReclaimPolicy: {{ $root.Values.persistence.volumeReclaimPolicy }}
{{ end }}
#{{ end }}