[VOL-4285] Helm charts for grpc migration

Change-Id: Ifa3423b43b236bab6c9de437b1dd7045069fe5de
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index 394da55..791e5fc 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -14,7 +14,7 @@
 ---
 apiVersion: "v1"
 name: "voltha"
-version: "2.10.4"
+version: "2.10.5"
 description: "A Helm chart for Voltha based on K8S resources in Voltha project"
 keywords:
   - "onf"
@@ -33,4 +33,4 @@
 
 # app version applies to multiple components with potentially different
 # container image versions
-appVersion: "2.9.0-dev"
+appVersion: "2.9-dev"
diff --git a/voltha/templates/api-svc.yaml b/voltha/templates/api-svc.yaml
index 7edc0ea..add4aba 100644
--- a/voltha/templates/api-svc.yaml
+++ b/voltha/templates/api-svc.yaml
@@ -19,7 +19,7 @@
   namespace: "{{ .Release.Namespace }}"
 spec:
   ports:
-    - name: grpc
+    - name: nbi-grpc
       port: 55555
       targetPort: 50057
   selector:
diff --git a/voltha/templates/core-deploy.yaml b/voltha/templates/core-deploy.yaml
index 84f13e4..fa5731b 100644
--- a/voltha/templates/core-deploy.yaml
+++ b/voltha/templates/core-deploy.yaml
@@ -88,24 +88,27 @@
             - "/app/rw_core"
             - "--kv_store_type=etcd"
             - "--kv_store_address={{ tpl .Values.services.etcd.address . }}"
-            - "--grpc_address=0.0.0.0:50057"
+            - "--grpc_nbi_address=0.0.0.0:50057"
+            - "--grpc_sbi_address=0.0.0.0:50058"
             - "--banner"
-            - "--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 . }}"
+            - "--rpc_timeout={{ tpl .Values.rw_core.rpc_timeout . }}"
+            - "--internal_timeout={{ tpl .Values.rw_core.internal_timeout . }}"
             - "--event_topic={{ .Values.rw_core.topics.event_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.global.tracing.enabled }}"
             - "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
             - "--log_correlation_enabled={{ .Values.global.log_correlation.enabled }}"
             - "--stack_id={{ tpl .Values.rw_core.stack_id . }}"
+            - "--backoff_retry_initial_interval={{ .Values.rw_core.backoff_initial_interval }}"
+            - "--backoff_retry_max_interval={{ .Values.rw_core.backoff_max_interval }}"
+            - "--backoff_retry_max_elapsed_time={{ .Values.rw_core.backoff_max_elapsed_time }}"
           ports:
             - containerPort: 50057
-              name: grpc
+              name: nbi-grpc
+            - containerPort: 50058
+              name: core-grpc
           {{- if .Values.securityContext.enabled }}
           securityContext:
             allowPrivilegeEscalation: false
@@ -114,14 +117,14 @@
             httpGet:
               path: /healthz
               port: 8080
-            initialDelaySeconds: 3
-            periodSeconds: 3
+            initialDelaySeconds: {{ .Values.probe.liveness.initial_delay_seconds }}
+            periodSeconds: {{ .Values.probe.liveness.period_seconds }}
           readinessProbe:
             httpGet:
               path: /readz
               port: 8080
-            initialDelaySeconds: 3
-            periodSeconds: 3
+            initialDelaySeconds: {{ .Values.probe.readiness.initial_delay_seconds }}
+            periodSeconds: {{ .Values.probe.readiness.period_seconds }}
           resources:
             requests:
               {{- if .Values.resources.rw_core.requests.memory }}
diff --git a/voltha/templates/core-svc.yaml b/voltha/templates/core-svc.yaml
new file mode 100644
index 0000000..e5aa343
--- /dev/null
+++ b/voltha/templates/core-svc.yaml
@@ -0,0 +1,27 @@
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: "{{ template "fullname" . }}-core"
+  namespace: "{{ .Release.Namespace }}"
+spec:
+  ports:
+    - name: core-grpc
+      port: 55558
+      targetPort: 50058
+  selector:
+    app: rw-core
+    release: "{{ .Release.Name }}"
diff --git a/voltha/values.yaml b/voltha/values.yaml
index b25670b..f703115 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -27,7 +27,8 @@
   image_tag: ~
   image_pullPolicy: "Always"
   rw_core:
-    timeout: "10s"
+    rpc_timeout: "10s"
+    internal_timeout: "10s"
   # Configure Log Correlation
   log_correlation:
     enabled: true
@@ -35,6 +36,15 @@
   tracing:
     enabled: true
 
+# Probe values
+probe:
+  liveness:
+    initial_delay_seconds: 3
+    period_seconds: 3
+  readiness:
+    initial_delay_seconds: 3
+    period_seconds: 3
+
 # Default security context under which the containers run
 securityContext:
   enabled: true
@@ -45,8 +55,6 @@
 # Define connectivity to services on which VOLTHA depends
 services:
   kafka:
-    adapter:
-      address: kafka:9092
     cluster:
       address: kafka:9092
 
@@ -79,14 +87,15 @@
 
 rw_core:
   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 }}'
+  rpc_timeout: '{{ .Values.global.rw_core.rpc_timeout }}'
+  internal_timeout: '{{ .Values.global.rw_core.internal_timeout }}'
   kv_store_data_prefix: 'service/{{ .Values.global.stack_name }}_voltha'
   stack_id: "{{ .Values.global.stack_name }}"
   topics:
-    core_topic: "{{ .Values.global.stack_name }}_rwcore"
     event_topic: "voltha.events"
+  backoff_initial_interval: 500ms
+  backoff_max_interval: 5s
+  backoff_max_elapsed_time: 0s
 
 ofagent:
   log_level: '{{ .Values.global.log_level }}'
@@ -97,13 +106,13 @@
   ofagent:
     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.6.5{{- end }}{{- else }}1.6.5{{- end }}'
+    tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}2.0.0{{- end }}{{- else }}2.0.0{{- end }}'
     pullPolicy: '{{ .Values.global.image_pullPolicy }}'
 
   rw_core:
     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.9.3{{- end }}{{- else }}2.9.3{{- end }}'
+    tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}3.0.0{{- end }}{{- else }}3.0.0{{- end }}'
     pullPolicy: '{{ .Values.global.image_pullPolicy }}'
 
 ingress: