blob: ba128b95d06342ba88dde3e395f8f58f68395475 [file] [log] [blame]
Mike Elliott13fed112018-02-28 08:33:33 -05001{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
2kind: PersistentVolume
3apiVersion: v1
4metadata:
5 name: {{ include "common.fullname" . }}-data
6 namespace: {{ include "common.namespace" . }}
7 labels:
8 app: {{ include "common.name" . }}
9 chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
10 release: "{{ .Release.Name }}"
11 heritage: "{{ .Release.Service }}"
12 name: {{ include "common.fullname" . }}
13spec:
14 capacity:
15 storage: {{ .Values.persistence.size}}
16 accessModes:
17 - {{ .Values.persistence.accessMode }}
18 storageClassName: "{{ include "common.fullname" . }}-data"
19 persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
20 hostPath:
21 path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
22{{- end -}}