update vgc chart

Change-Id: I2a7ccdb82c781975cf6a4bdbfa2d0cbd5ea87732
Signed-off-by: abhayk <abhayk@radisys.com>
diff --git a/VERSION b/VERSION
index 7921bd0..7bcbb38 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.4.8
+3.4.9
diff --git a/voltha-go-controller/Chart.yaml b/voltha-go-controller/Chart.yaml
index a866dbe..0b9c7b9 100644
--- a/voltha-go-controller/Chart.yaml
+++ b/voltha-go-controller/Chart.yaml
@@ -27,6 +27,6 @@
 
 ## Chart version for package voltha-stack
 ##   Increment when Chart.yaml changes
-version: "0.1.8"
+version: "0.1.9"
 
 # [EOF]
diff --git a/voltha-go-controller/templates/deployment.yaml b/voltha-go-controller/templates/deployment.yaml
index fab2f2d..33b0435 100644
--- a/voltha-go-controller/templates/deployment.yaml
+++ b/voltha-go-controller/templates/deployment.yaml
@@ -15,19 +15,48 @@
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: "{{ .Chart.Name }}"
+  name: "{{ template "fullname" . }}"
   namespace: "{{ .Release.Namespace }}"
+  {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "vgc_deployment_labels") }}
   labels:
-    release: {{ .Release.Name }}
+    {{- if hasKey .Values "extra_deployment_labels" }}
+    {{- range $key, $val := .Values.extra_deployment_labels }}
+    {{ $key }}: {{ $val | quote }}
+    {{- end }}
+    {{- end }}
+    {{- if hasKey .Values "vgc_deployment_labels" }}
+    {{- range $key, $val := .Values.vgc_deployment_labels }}
+    {{ $key }}: {{ $val | quote }}
+    {{- end }}
+    {{- end }}
+  {{- end }}
 spec:
-  replicas: {{ .Values.replicaCount }}
   selector:
     matchLabels:
-      app: "{{ .Chart.Name }}"
+      app: voltha-go-controller
+      release: {{ .Release.Name }}
   template:
     metadata:
       labels:
-        app: "{{ .Chart.Name }}"
+        app: voltha-go-controller
+        release: {{ .Release.Name }}
+        app.kubernetes.io/name: "voltha-go-controller"
+        app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
+        app.kubernetes.io/component: "controller"
+        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" }}
+        {{- range $key, $val := .Values.extra_pod_labels }}
+        {{ $key }}: {{ $val | quote }}
+        {{- end }}
+        {{- end }}
+        {{- if hasKey .Values "vgc_pod_labels" }}
+        {{- range $key, $val := .Values.vgc_pod_labels }}
+        {{ $key }}: {{ $val | quote }}
+        {{- end }}
+        {{- end }}
     spec:
       {{- if .Values.securityContext.enabled }}
       securityContext:
@@ -50,11 +79,11 @@
         - name: VOLTHA_PORT
           value: "55555"
         - name: KV_STORE_TYPE
-          value: "{{ .Values.services.kvstore.type }}"
+          value: "{{ tpl .Values.services.kvstore.type . }}"
         - name: KV_STORE_HOST
-          value: "{{ .Values.services.kvstore.address }}"
+          value: "{{ tpl .Values.services.kvstore.address . }}"
         - name: KV_STORE_PORT
-          value: "{{ .Values.services.kvstore.port }}"
+          value: "{{ tpl .Values.services.kvstore.port . }}"
         - name: KAFKA_ADAPTER_HOST
           value: "{{ tpl .Values.services.kafka.cluster.address . }}"
         - name: KAFKA_ADAPTER_PORT
diff --git a/voltha-go-controller/templates/service.yaml b/voltha-go-controller/templates/service.yaml
index 97a1172..7c2adb3 100644
--- a/voltha-go-controller/templates/service.yaml
+++ b/voltha-go-controller/templates/service.yaml
@@ -15,10 +15,8 @@
 apiVersion: v1
 kind: Service
 metadata:
-  labels:
-    name: "{{ .Chart.Name }}"
-    release: {{ .Release.Name }}
-  name: "{{ .Chart.Name }}"
+  name: "{{ tpl .Values.voltha_go_controller.endpoints.address . }}"
+  namespace: {{ .Release.Namespace }}
 spec:
   ports:
   - name: of
diff --git a/voltha-go-controller/values.yaml b/voltha-go-controller/values.yaml
index 0d0e659..d362c2d 100644
--- a/voltha-go-controller/values.yaml
+++ b/voltha-go-controller/values.yaml
@@ -16,8 +16,6 @@
 # This is a YAML-formatted file.
 # Declare variables to be passed into your templates.
 
-replicaCount: 1
-
 global:
   stack_name: voltha
   log_level: "WARN"
@@ -38,6 +36,8 @@
   uiPort: 8181
   ofPort: 6653
   uiProtocol: TCP
+  endpoints:
+    address: '{{ template "fullname" . }}'
 
 images:
   voltha_go_controller:
diff --git a/voltha-stack/Chart.yaml b/voltha-stack/Chart.yaml
index 4bade56..7e586f1 100644
--- a/voltha-stack/Chart.yaml
+++ b/voltha-stack/Chart.yaml
@@ -34,7 +34,7 @@
 
 ## Chart version for package voltha-stack
 ##   Increment when Chart.yaml changes
-version    : "2.12.15"
+version    : "2.12.16"
 
 # -----------------------------------------------------------------------
 # NOTE: Dependencies are chart versions not component/repository version
@@ -55,7 +55,7 @@
     condition  : voltha-adapter-openolt.enabled
   - name       : voltha-go-controller
     repository : file://../voltha-go-controller
-    version    : "0.1.8"
+    version    : "0.1.9"
     condition  : voltha-go-controller.enabled
 
 # [EOF]