aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/postgres/templates/pvc-primary.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/postgres/templates/pvc-primary.yaml')
-rw-r--r--kubernetes/common/postgres/templates/pvc-primary.yaml7
1 files changed, 6 insertions, 1 deletions
diff --git a/kubernetes/common/postgres/templates/pvc-primary.yaml b/kubernetes/common/postgres/templates/pvc-primary.yaml
index 05a5088966..fa25f19077 100644
--- a/kubernetes/common/postgres/templates/pvc-primary.yaml
+++ b/kubernetes/common/postgres/templates/pvc-primary.yaml
@@ -23,7 +23,7 @@ metadata:
labels:
app: {{ include "common.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- release: "{{ .Release.Name }}"
+ release: "{{ include "common.release" . }}"
heritage: "{{ .Release.Service }}"
name: {{ include "common.fullname" . }}
{{- if .Values.persistence.annotations }}
@@ -36,5 +36,10 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size }}
+{{- if include "common.needPV" . }}
+ storageClassName: "{{ include "common.fullname" . }}-primary"
+{{- else }}
+ storageClassName: {{ include "common.storageClass" . }}
+{{- end }}
storageClassName: "{{ include "common.fullname" . }}-primary"
{{- end -}}