blob: 31230a9ed7dde3ae96a974359986a92c105d511e [file] [log] [blame]
Mandeep Khindaa1047f42018-03-22 02:12:15 +00001{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
2kind: PersistentVolume
3apiVersion: v1
4metadata:
5 name: {{ include "common.fullname" . }}
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 persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
19 hostPath:
20 path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
21{{- end -}}