Added voltha-infra chart
Added voltha-stack chart
Moved "defaults" values to "global" so that they can be managed by the
macro charts
Added examples for different workflows

Change-Id: I5fb2bfa54a1be725892445e93bd8a35d608e5d14
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index f0e8676..f717ccd 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -14,7 +14,7 @@
 ---
 apiVersion: "v1"
 name: "voltha"
-version: "2.8.0"
+version: "2.8.1"
 description: "A Helm chart for Voltha based on K8S resources in Voltha project"
 keywords:
   - "onf"
diff --git a/voltha/templates/core-deploy.yaml b/voltha/templates/core-deploy.yaml
index 1fc648f..f10d8b9 100644
--- a/voltha/templates/core-deploy.yaml
+++ b/voltha/templates/core-deploy.yaml
@@ -47,6 +47,7 @@
         app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
         app.kubernetes.io/component: "core"
         app.kubernetes.io/part-of: "voltha"
+        app.kubernetes.io/stack: "{{ .Values.global.stack_name }}"
         app.kubernetes.io/managed-by: {{ quote .Release.Service }}
         helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
         {{- if hasKey .Values "extra_pod_labels" }}
@@ -82,24 +83,24 @@
                 fieldRef:
                   fieldPath: metadata.labels['app.kubernetes.io/name']
             - name: KV_STORE_DATAPATH_PREFIX
-              value: {{ .Values.defaults.kv_store_data_prefix }}
+              value: {{ tpl .Values.rw_core.kv_store_data_prefix . }}
           args:
             - "/app/rw_core"
             - "--kv_store_type=etcd"
-            - "--kv_store_address={{ .Values.services.etcd.address }}"
+            - "--kv_store_address={{ tpl .Values.services.etcd.address . }}"
             - "--grpc_address=0.0.0.0:50057"
             - "--banner"
-            - "--kafka_adapter_address={{ .Values.services.kafka.adapter.address }}"
-            - "--kafka_cluster_address={{ .Values.services.kafka.cluster.address }}"
-            - "--rw_core_topic={{ .Values.defaults.topics.core_topic }}"
+            - "--kafka_adapter_address={{ tpl .Values.services.kafka.adapter.address . }}"
+            - "--kafka_cluster_address={{ tpl .Values.services.kafka.cluster.address . }}"
+            - "--rw_core_topic={{ tpl .Values.rw_core.topics.core_topic . }}"
             - "--core_timeout={{ tpl .Values.rw_core.core_timeout . }}"
             - "--timeout_long_request={{ tpl .Values.rw_core.timeout_long_request . }}"
             - "--timeout_request={{ tpl .Values.rw_core.timeout_request . }}"
             - "--log_level={{ $log_level }}"
             - "--probe_address=:8080"
-            - "--trace_enabled={{ .Values.tracing.enabled }}"
-            - "--trace_agent_address={{ .Values.services.tracing_agent.address }}"
-            - "--log_correlation_enabled={{ .Values.log_correlation.enabled }}"
+            - "--trace_enabled={{ .Values.global.tracing.enabled }}"
+            - "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
+            - "--log_correlation_enabled={{ .Values.global.log_correlation.enabled }}"
           ports:
             - containerPort: 50057
               name: grpc
diff --git a/voltha/templates/ofagent-deploy.yaml b/voltha/templates/ofagent-deploy.yaml
index 234e965..87f76f3 100644
--- a/voltha/templates/ofagent-deploy.yaml
+++ b/voltha/templates/ofagent-deploy.yaml
@@ -47,6 +47,7 @@
         app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
         app.kubernetes.io/component: "integration"
         app.kubernetes.io/part-of: "voltha"
+        app.kubernetes.io/stack: "{{ .Values.global.stack_name }}"
         app.kubernetes.io/managed-by: {{ quote .Release.Service }}
         helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
         {{- if hasKey .Values "extra_pod_labels" }}
@@ -77,11 +78,11 @@
               fieldRef:
                 fieldPath: metadata.labels['app.kubernetes.io/name']
           - name: KV_STORE_DATAPATH_PREFIX
-            value: {{ .Values.defaults.kv_store_data_prefix }}
+            value: {{ .Values.global.kv_store_data_prefix }}
         args:
         - "/app/ofagent"
         {{- range .Values.services.controller }}
-        - "--controller={{ .address }}"
+        - "--controller={{ tpl .address $ }}"
         {{- end }}
         - "--voltha={{ template "fullname" . }}-api.{{ .Release.Namespace }}.svc:55555"
         - "--kv_store_address={{ .Values.services.etcd.address }}"
@@ -89,9 +90,9 @@
         - "--kv_store_request_timeout=60s"
         - "--log_level={{ $log_level }}"
         - "--probe=:8080"
-        - "--trace_enabled={{ .Values.tracing.enabled }}"
-        - "--trace_agent_address={{ .Values.services.tracing_agent.address }}"
-        - "--log_correlation_enabled={{ .Values.log_correlation.enabled }}"
+        - "--trace_enabled={{ .Values.global.tracing.enabled }}"
+        - "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
+        - "--log_correlation_enabled={{ .Values.global.log_correlation.enabled }}"
         {{- if .Values.securityContext.enabled }}
         securityContext:
           allowPrivilegeEscalation: false
diff --git a/voltha/values.yaml b/voltha/values.yaml
index 9dac911..644bba3 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -18,7 +18,8 @@
 # Default Values
 # The following are the default values used for every container in the
 # template.
-defaults:
+global:
+  stack_name: voltha
   log_level: "WARN"
   image_registry: ''
   image_org: "voltha/"
@@ -26,13 +27,12 @@
   image_pullPolicy: "Always"
   rw_core:
     timeout: "10s"
-  topics:
-    core_topic: "rwcore"
-
-  # Define prefix path for etcd
-  # If you're running multiple voltha stacks the this value
-  # should be unique across the stacks.
-  kv_store_data_prefix: "service/voltha"
+  # Configure Log Correlation
+  log_correlation:
+    enabled: true
+  # Configure Tracing
+  tracing:
+    enabled: true
 
 # Default security context under which the containers run
 securityContext:
@@ -65,14 +65,6 @@
 profiler:
   enabled: false
 
-# Configure Log Correlation
-log_correlation:
-  enabled: true
-
-# Configure Tracing
-tracing:
-  enabled: false
-
 # Define the replica count for everything
 replicas:
   # For R/W cores the templates translate the number of replicas
@@ -83,24 +75,27 @@
   ofagent: 1
 
 rw_core:
-  log_level: '{{ .Values.defaults.log_level }}'
-  core_timeout: '{{ .Values.defaults.rw_core.timeout }}'
-  timeout_long_request: '{{ .Values.defaults.rw_core.timeout }}'
-  timeout_request: '{{ .Values.defaults.rw_core.timeout }}'
+  log_level: '{{ .Values.global.log_level }}'
+  core_timeout: '{{ .Values.global.rw_core.timeout }}'
+  timeout_long_request: '{{ .Values.global.rw_core.timeout }}'
+  timeout_request: '{{ .Values.global.rw_core.timeout }}'
+  kv_store_data_prefix: 'service/{{ .Values.global.stack_name }}_voltha'
+  topics:
+    core_topic: "{{ .Values.global.stack_name }}_rwcore"
 
 ofagent:
-  log_level: '{{ .Values.defaults.log_level }}'
+  log_level: '{{ .Values.global.log_level }}'
 
 # Define Docker images to be used
 images:
   ofagent:
-    registry: '{{ .Values.defaults.image_registry }}'
-    repository: '{{ .Values.defaults.image_org }}voltha-ofagent-go'
-    tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}1.4.2{{- end }}{{- else }}1.4.2{{- end }}'
-    pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
+    registry: '{{ .Values.global.image_registry }}'
+    repository: '{{ .Values.global.image_org }}voltha-ofagent-go'
+    tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}1.4.2{{- end }}{{- else }}1.4.2{{- end }}'
+    pullPolicy: '{{ .Values.global.image_pullPolicy }}'
 
   rw_core:
-    registry: '{{ .Values.defaults.image_registry }}'
-    repository: '{{ .Values.defaults.image_org }}voltha-rw-core'
-    tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.6.3{{- end }}{{- else }}2.6.3{{- end }}'
-    pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
+    registry: '{{ .Values.global.image_registry }}'
+    repository: '{{ .Values.global.image_org }}voltha-rw-core'
+    tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}2.6.3{{- end }}{{- else }}2.6.3{{- end }}'
+    pullPolicy: '{{ .Values.global.image_pullPolicy }}'