For non-XOS charts, use a global registry var, split docker image name/tag/pullPolicy

Change-Id: Icffc569e2c152e0b413f4c7b7d9a546bd9a3ef58
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index ba6029f..d0d7977 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -13,5 +13,8 @@
 # limitations under the License.
 
 name: voltha
-version: 1.0.0
 description: A Helm chart for Voltha based on K8S resources in Voltha project
+icon: https://guide.opencord.org/logos/cord.svg
+
+version: 1.0.1
+appVersion: latest
diff --git a/voltha/requirements.yaml b/voltha/requirements.yaml
index 2f6a091..b4f3bdc 100644
--- a/voltha/requirements.yaml
+++ b/voltha/requirements.yaml
@@ -1,3 +1,4 @@
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/voltha/templates/10-default-backend.yaml b/voltha/templates/10-default-backend.yaml
index 5b2cdb8..6ada98f 100644
--- a/voltha/templates/10-default-backend.yaml
+++ b/voltha/templates/10-default-backend.yaml
@@ -1,3 +1,4 @@
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -32,7 +33,8 @@
         # Any image is permissable as long as:
         # 1. It serves a 404 page at /
         # 2. It serves 200 on a /healthz endpoint
-        image: {{ .Values.httpBackendImage }}
+        image: {{ .Values.global.registry }}{{ .Values.images.http_backend.repository }}:{{ tpl .Values.images.http_backend.tag . }}
+        imagePullPolicy: {{ .Values.images.http_backend.pullPolicy }}
         livenessProbe:
           httpGet:
             path: /healthz
diff --git a/voltha/templates/60-cluster-ingress-nginx.yaml b/voltha/templates/60-cluster-ingress-nginx.yaml
index 839f4a4..62fba3f 100644
--- a/voltha/templates/60-cluster-ingress-nginx.yaml
+++ b/voltha/templates/60-cluster-ingress-nginx.yaml
@@ -1,3 +1,4 @@
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -43,7 +44,8 @@
           privileged: true
       containers:
         - name: nginx-ingress-controller
-          image: {{ .Values.ingressControllerImage }}
+          image: {{ .Values.global.registry }}{{ .Values.images.ingress_controller.repository }}:{{ tpl .Values.images.ingress_controller.tag . }}
+          imagePullPolicy: {{ .Values.images.ingress_controller.pullPolicy }}
           args:
             - /nginx-ingress-controller
             - --default-backend-service=$(POD_NAMESPACE)/default-http-backend
diff --git a/voltha/templates/alarm-generator.yaml b/voltha/templates/alarm-generator.yaml
index cef01ac..f5ef095 100644
--- a/voltha/templates/alarm-generator.yaml
+++ b/voltha/templates/alarm-generator.yaml
@@ -1,3 +1,4 @@
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,8 +32,8 @@
       serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
       containers:
         - name: alarm-generator
-          image: {{ .Values.alarmGeneratorImage }}
-          imagePullPolicy: {{ .Values.imagePullPolicy }}
+          image: {{ .Values.global.registry }}{{ .Values.images.alarm_generator.repository }}:{{ tpl .Values.images.alarm_generator.tag . }}
+          imagePullPolicy: {{ .Values.images.alarm_generator.pullPolicy }}
           env:
             - name: POD_IP
               valueFrom:
diff --git a/voltha/templates/envoy_for_etcd.yaml b/voltha/templates/envoy_for_etcd.yaml
index 4869682..92092bc 100644
--- a/voltha/templates/envoy_for_etcd.yaml
+++ b/voltha/templates/envoy_for_etcd.yaml
@@ -1,3 +1,4 @@
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -41,8 +42,8 @@
       serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
       containers:
         - name: voltha
-          image: {{ .Values.envoyForEtcdImage }}
-          imagePullPolicy: {{ .Values.imagePullPolicy }}
+          image: {{ .Values.global.registry }}{{ .Values.images.envoy_for_etcd.repository }}:{{ tpl .Values.images.envoy_for_etcd.tag . }}
+          imagePullPolicy: {{ .Values.images.envoy_for_etcd.pullPolicy }}
           env:
             - name: POD_IP
               valueFrom:
diff --git a/voltha/templates/freeradius.yaml b/voltha/templates/freeradius.yaml
index 268c047..8f9eaea 100644
--- a/voltha/templates/freeradius.yaml
+++ b/voltha/templates/freeradius.yaml
@@ -1,3 +1,4 @@
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -55,8 +56,8 @@
       serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
       containers:
         - name: freeradius
-          image: {{ .Values.freeradiusImage }}
-          imagePullPolicy: {{ .Values.imagePullPolicy }}
+          image: {{ .Values.global.registry }}{{ .Values.images.freeradius.repository }}:{{ tpl .Values.images.freeradius.tag . }}
+          imagePullPolicy: {{ .Values.images.freeradius.pullPolicy }}
           env:
             - name: POD_IP
               valueFrom:
diff --git a/voltha/templates/netconf.yaml b/voltha/templates/netconf.yaml
index 52989b8..7aa571b 100644
--- a/voltha/templates/netconf.yaml
+++ b/voltha/templates/netconf.yaml
@@ -46,8 +46,8 @@
       terminationGracePeriodSeconds: 10
       containers:
         - name: netconf
-          image: {{ .Values.netconfImage }}
-          imagePullPolicy: {{ .Values.imagePullPolicy }}
+          image: {{ .Values.global.registry }}{{ .Values.images.netconf.repository }}:{{ tpl .Values.images.netconf.tag . }}
+          imagePullPolicy: {{ .Values.images.netconf.pullPolicy }}
           ports:
             - containerPort: 830
           env:
diff --git a/voltha/templates/ofagent.yaml b/voltha/templates/ofagent.yaml
index 83d3848..c70f408 100644
--- a/voltha/templates/ofagent.yaml
+++ b/voltha/templates/ofagent.yaml
@@ -32,8 +32,8 @@
       terminationGracePeriodSeconds: 10
       containers:
         - name: ofagent
-          image: {{ .Values.ofagentImage }}
-          imagePullPolicy: {{ .Values.imagePullPolicy }}
+          image: {{ .Values.global.registry }}{{ .Values.images.ofagent.repository }}:{{ tpl .Values.images.ofagent.tag . }}
+          imagePullPolicy: {{ .Values.images.ofagent.pullPolicy }}
           env:
             - name: NAMESPACE
               valueFrom:
diff --git a/voltha/templates/vcli.yaml b/voltha/templates/vcli.yaml
index 7b962c1..2077705 100644
--- a/voltha/templates/vcli.yaml
+++ b/voltha/templates/vcli.yaml
@@ -1,3 +1,4 @@
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -48,8 +49,8 @@
       serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
       containers:
         - name: vcli
-          image: {{ .Values.vcliImage }}
-          imagePullPolicy: {{ .Values.imagePullPolicy }}
+          image: {{ .Values.global.registry }}{{ .Values.images.vcli.repository }}:{{ tpl .Values.images.vcli.tag . }}
+          imagePullPolicy: {{ .Values.images.vcli.pullPolicy }}
           env:
             - name: POD_IP
               valueFrom:
@@ -60,7 +61,7 @@
                 fieldRef:
                   fieldPath: metadata.namespace
           args:
-{{ toYaml .Values.vcli_args |  indent 12 }} 
+{{ toYaml .Values.vcli_args |  indent 12 }}
           ports:
             - containerPort: 22
               name: ssh-port
diff --git a/voltha/templates/vcore_for_etcd.yaml b/voltha/templates/vcore_for_etcd.yaml
index 4643d88..5ea1d42 100644
--- a/voltha/templates/vcore_for_etcd.yaml
+++ b/voltha/templates/vcore_for_etcd.yaml
@@ -61,8 +61,8 @@
       serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
       containers:
         - name: voltha
-          image: {{ .Values.vcoreImage }}
-          imagePullPolicy: {{ .Values.imagePullPolicy }}
+          image: {{ .Values.global.registry }}{{ .Values.images.vcore.repository }}:{{ tpl .Values.images.vcore.tag . }}
+          imagePullPolicy: {{ .Values.images.vcore.pullPolicy }}
           env:
             - name: NAMESPACE
               valueFrom:
diff --git a/voltha/values.yaml b/voltha/values.yaml
index 2dacb39..81fe079 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -1,3 +1,4 @@
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,11 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-pull_docker_registry:
-k8s_docker_registry: 'k8s.gcr.io/'
-
-imagePullPolicy: Always
-
 replicas:
   vcore: 1
   vcli: 1
@@ -25,7 +21,6 @@
   envoy_for_etcd: 1
   alarm_generator: 1
 
-
 node_ports:
   vcli_port: 30110
 
@@ -52,9 +47,9 @@
 etcd:
   operator:
     enabled: true
+
 etcd-operator:
   customResources:
-    size: 1
     createEtcdClusterCRD: true
 
 kafkaReleaseName: cord-kafka
@@ -63,19 +58,57 @@
 consul:
   enabled: false
 
-envoyForEtcdImage: 'voltha/voltha-envoy:latest'
-freeradiusImage: 'tpdock/freeradius:latest'
-netconfImage: 'voltha/voltha-netconf:latest'
-ofagentImage: 'voltha/voltha-ofagent:latest'
-vcliImage: 'voltha/voltha-cli:latest'
-vcoreImage: 'voltha/voltha-voltha:latest'
-httpBackendImage: 'gcr.io/google_containers/defaultbackend:1.4'
-ingressControllerImage: 'quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.2'
-alarmGeneratorImage: "voltha/voltha-alarm-generator:latest"
+images:
+  vcore:
+    repository: 'voltha/voltha-voltha'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  vcli:
+    repository: 'voltha/voltha-cli'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  ofagent:
+    repository: 'voltha/voltha-ofagent'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  netconf:
+    repository: 'voltha/voltha-netconf'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  envoy_for_etcd:
+    repository: 'voltha/voltha-envoy'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  alarm_generator:
+    repository: 'voltha/voltha-alarm-generator'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  freeradius:
+    repository: 'tpdock/freeradius'
+    tag: '2.2.9'
+    pullPolicy: 'Always'
+
+  http_backend:
+    repository: 'gcr.io/google_containers/defaultbackend'
+    tag: '1.4'
+    pullPolicy: 'Always'
+
+  ingress_controller:
+    repository: 'quay.io/kubernetes-ingress-controller/nginx-ingress-controller'
+    tag: '0.10.2'
+    pullPolicy: 'Always'
+
 
 # Need the namespace global for kafka
 global:
   namespace: voltha
+  registry: ''
 
 vcli_args:
 - "/cli/cli/setup.sh"