Local persistent store for Postgres

Change-Id: I6af6402a5826300352cf24e268dd043771541446
diff --git a/xos-core/templates/db-deployment.yaml b/xos-core/templates/db-deployment.yaml
index d508962..82f1507 100644
--- a/xos-core/templates/db-deployment.yaml
+++ b/xos-core/templates/db-deployment.yaml
@@ -43,3 +43,12 @@
                 secretKeyRef:
                   name: xos-db-secrets
                   key: password
+      {{- if .Values.needDBPersistence }}
+          volumeMounts:
+            - name: db-pv-storage
+              mountPath: "/var/lib/postgresql/data"
+      volumes:
+        - name: db-pv-storage
+          persistentVolumeClaim:
+            claimName: {{ .Values.dbPvClaimName }}
+      {{- end }}