XOS/NEM charts, use a global registry var, split docker image name/tag/pullPolicy

Change-Id: I7f3457882830de050d1357254fc5483faf91d03f
diff --git a/xos-db/Chart.yaml b/xos-db/Chart.yaml
index 677cbc9..e66aac5 100644
--- a/xos-db/Chart.yaml
+++ b/xos-db/Chart.yaml
@@ -14,4 +14,9 @@
 # limitations under the License.
 
 name: xos-db
-version: 0.1.0-dev0
+version: 1.0.0
+
+icon: https://www.postgresql.org/media/img/about/press/elephant.png
+
+# Postgres container from: https://hub.docker.com/_/postgres/
+appVersion: '10.3-alpine'
diff --git a/xos-db/templates/db-deployment.yaml b/xos-db/templates/db-deployment.yaml
index a3d3e91..d467b05 100644
--- a/xos-db/templates/db-deployment.yaml
+++ b/xos-db/templates/db-deployment.yaml
@@ -28,8 +28,8 @@
     spec:
       containers:
         - name: xos-db
-          image: {{ .Values.postgresImage | quote }}
-          imagePullPolicy: {{ .Values.imagePullPolicy }}
+          image:  {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
           ports:
             - containerPort: 5432
               protocol: TCP
diff --git a/xos-db/values.yaml b/xos-db/values.yaml
index 8bb026d..8428769 100644
--- a/xos-db/values.yaml
+++ b/xos-db/values.yaml
@@ -15,8 +15,13 @@
 
 # XOS Postgres database related values
 
-imagePullPolicy: 'Always'
-postgresImage: 'postgres:10.3-alpine'
+image:
+  repository: 'postgres'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ""
 
 # Database name/username/password
 xosDBName: 'xos'