Merge "[AAI] Make aai log level configurable"
[oom.git] / kubernetes / common / postgres / templates / pv-replica.yaml
index a98abef..af46f61 100644 (file)
@@ -13,7 +13,9 @@
 # # See the License for the specific language governing permissions and
 # # limitations under the License.
 */}}
+{{- if not .Values.global.postgres.useOperator }}
 {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{- if include "common.needPV" . -}}
 kind: PersistentVolume
 apiVersion: v1
 metadata:
@@ -22,7 +24,7 @@ metadata:
   labels:
     app: {{ include "common.fullname" . }}
     chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
-    release: "{{ .Release.Name }}"
+    release: "{{ include "common.release" . }}"
     heritage: "{{ .Release.Service }}"
     name: {{ include "common.fullname" . }}
 spec:
@@ -33,5 +35,7 @@ spec:
   storageClassName: "{{ include "common.fullname" . }}-replica"
   persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
   hostPath:
-    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}/replica
-{{- end -}}
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ .Values.persistence.mountSubPath }}/replica
+{{- end }}
+{{- end }}
+{{- end }}