[VOL-3091] configurable kafka topic

Make core-topic and adapter topics configurable in voltha-helm-charts
This is required to run multiple voltha stacks in a k8s deployment.

Also, read the kv_store_data_prefix via environment variable.
https://gerrit.opencord.org/#/c/19001/

Change-Id: I8fabda3ce70f1379f735796e6711f4282e57008a
diff --git a/voltha-adapter-openolt/Chart.yaml b/voltha-adapter-openolt/Chart.yaml
index 86e972e..c44c179 100644
--- a/voltha-adapter-openolt/Chart.yaml
+++ b/voltha-adapter-openolt/Chart.yaml
@@ -17,5 +17,5 @@
 description: A Helm chart for Voltha OpenOLT Adapter
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 2.4.2
+version: 2.4.3
 appVersion: 2.4.1
diff --git a/voltha-adapter-openolt/templates/adapters-openolt.yaml b/voltha-adapter-openolt/templates/adapters-openolt.yaml
index 6151c4b..aa3d6b8 100644
--- a/voltha-adapter-openolt/templates/adapters-openolt.yaml
+++ b/voltha-adapter-openolt/templates/adapters-openolt.yaml
@@ -49,7 +49,6 @@
     {{- end }}
   {{- end }}
 spec:
-  replicas: {{ .Values.replicas.adapter_open_olt }}
   selector:
     matchLabels:
       app: adapter-open-olt
@@ -80,21 +79,26 @@
         - name: adapter-open-olt
           image: '{{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_olt.tag . ) . }}'
           imagePullPolicy: {{ tpl .Values.images.adapter_open_olt.pullPolicy . }}
-          env:
+          env: 
             - name: COMPONENT_NAME
               valueFrom:
                 fieldRef:
                   fieldPath: metadata.labels['app.kubernetes.io/name']
+            - name: KV_STORE_DATAPATH_PREFIX
+              value: {{ .Values.defaults.kv_store_data_prefix }}
           args:
             - "/app/openolt"
             - "--kafka_adapter_host={{ .Values.services.kafka.adapter.service }}"
             - "--kafka_adapter_port={{ .Values.services.kafka.adapter.port }}"
             - "--kafka_cluster_host={{ .Values.services.kafka.cluster.service }}"
             - "--kafka_cluster_port={{ .Values.services.kafka.cluster.port }}"
-            - "--core_topic=rwcore"
+            - "--core_topic={{ .Values.defaults.topics.core_topic }}"
+            - "--adapter_topic={{ .Values.defaults.topics.adapter_open_olt_topic }}"
             - "--kv_store_host={{ .Values.services.etcd.service }}"
             - "--kv_store_port={{ .Values.services.etcd.port }}"
             - "--log_level={{ $log_level }}"
+            - "--current_replica={{ .Values.replicas.current_replica }}"
+            - "--total_replica={{ .Values.replicas.total_replica }}"
             - "--probe_port=8080"
           livenessProbe:
             httpGet:
diff --git a/voltha-adapter-openolt/values.yaml b/voltha-adapter-openolt/values.yaml
index 7c8fce3..4090902 100644
--- a/voltha-adapter-openolt/values.yaml
+++ b/voltha-adapter-openolt/values.yaml
@@ -20,6 +20,14 @@
   image_tag: ~
   image_org: "voltha/"
   image_pullPolicy: "Always"
+  topics:
+    core_topic: "rwcore"
+    adapter_open_olt_topic: "openolt"
+  
+  # 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"
 
 # Define connectivity to required services
 services:
@@ -42,7 +50,8 @@
 
 # Define the recplica count for everything
 replicas:
-  adapter_open_olt: 1
+  current_replica: 1
+  total_replica: 1
 
 adapter_open_olt:
   log_level: '{{ .Values.defaults.log_level }}'