Fix persistent volume to be mapped to Release.Name

Change-Id: I98754174e50537df2e82a9d9b40f471edff19e69
Issue-ID: OOM-907
Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
diff --git a/kubernetes/common/mysql/templates/nfs-provisoner.yaml b/kubernetes/common/mysql/templates/nfs-provisoner.yaml
index d6c6e8c..355ad38 100644
--- a/kubernetes/common/mysql/templates/nfs-provisoner.yaml
+++ b/kubernetes/common/mysql/templates/nfs-provisoner.yaml
@@ -74,5 +74,5 @@
       volumes:
         - name: export-volume
           hostPath:
-            path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
+            path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
 {{ end }}
diff --git a/kubernetes/common/mysql/templates/pv.yaml b/kubernetes/common/mysql/templates/pv.yaml
index 1cc92ac..824dcbb 100644
--- a/kubernetes/common/mysql/templates/pv.yaml
+++ b/kubernetes/common/mysql/templates/pv.yaml
@@ -34,5 +34,5 @@
   storageClassName: "{{ include "common.fullname" . }}-data"
   persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
   hostPath:
-    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
 {{- end -}}
diff --git a/kubernetes/common/postgres/templates/pv.yaml b/kubernetes/common/postgres/templates/pv.yaml
index e08c934..144a3f7 100644
--- a/kubernetes/common/postgres/templates/pv.yaml
+++ b/kubernetes/common/postgres/templates/pv.yaml
@@ -33,7 +33,7 @@
   storageClassName: "{{ include "common.fullname" . }}-data"
   persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
   hostPath:
-    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}0
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}0
 ---
 kind: PersistentVolume
 apiVersion: v1
@@ -54,5 +54,5 @@
   storageClassName: "{{ include "common.fullname" . }}-data"
   persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
   hostPath:
-    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}1
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}1
 {{- end -}}
diff --git a/kubernetes/common/postgres/templates/statefulset.yaml b/kubernetes/common/postgres/templates/statefulset.yaml
index e42e9eb..c3f8674 100644
--- a/kubernetes/common/postgres/templates/statefulset.yaml
+++ b/kubernetes/common/postgres/templates/statefulset.yaml
@@ -126,7 +126,7 @@
           path: /etc/localtime
       - name: {{ include "common.fullname" . }}-init
         hostPath:
-          path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountInitPath }}
+          path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountInitPath }}
       - name: {{ include "common.fullname" . }}-backup
         emptyDir: {}
 #{{ if not .Values.persistence.enabled }}