summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/postgres/templates/pvc-replica.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/postgres/templates/pvc-replica.yaml')
-rw-r--r--kubernetes/common/postgres/templates/pvc-replica.yaml6
1 files changed, 5 insertions, 1 deletions
diff --git a/kubernetes/common/postgres/templates/pvc-replica.yaml b/kubernetes/common/postgres/templates/pvc-replica.yaml
index f740521919..1e453fbcfd 100644
--- a/kubernetes/common/postgres/templates/pvc-replica.yaml
+++ b/kubernetes/common/postgres/templates/pvc-replica.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,9 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size }}
+{{- if include "common.needPV" . }}
storageClassName: "{{ include "common.fullname" . }}-replica"
+{{- else }}
+ storageClassName: {{ include "common.storageClass" . }}
+{{- end }}
{{- end -}}