blob: f1d38dfb14345faf6ac501cb66373e27c1b69879 [file] [log] [blame]
Dominic Lunanuova50aafc52018-03-30 02:29:23 +00001{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
2kind: PersistentVolumeClaim
3apiVersion: v1
4metadata:
5 name: {{ template "postgresql.fullname" . }}
6 labels:
7 app: {{ template "postgresql.fullname" . }}
8 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9 release: "{{ .Release.Name }}"
10 heritage: "{{ .Release.Service }}"
11{{- if .Values.persistence.annotations }}
12 annotations:
13{{ toYaml .Values.persistence.annotations | indent 4 }}
14{{- end }}
15spec:
16 accessModes:
17 - {{ .Values.persistence.accessMode | quote }}
18 resources:
19 requests:
20 storage: {{ .Values.persistence.size | quote }}
21{{- if .Values.persistence.storageClass }}
22{{- if (eq "-" .Values.persistence.storageClass) }}
23 storageClassName: ""
24{{- else }}
25 storageClassName: "{{ .Values.persistence.storageClass }}"
26{{- end }}
27{{- end }}
28{{- end -}}