VOL-1891 - support adding labels on install

Change-Id: Iff41309926de67691a2642904d53356e15d2531f
diff --git a/voltha/templates/rw-core.yaml b/voltha/templates/rw-core.yaml
index fe8682f..022aa9c 100644
--- a/voltha/templates/rw-core.yaml
+++ b/voltha/templates/rw-core.yaml
@@ -65,6 +65,19 @@
 metadata:
   name: voltha-rw-core-{{ $cluster }}{{ $cluster_core_id }}
   serviceAccountName: {{ $root.Values.serviceaccount }}
+  {{- if or (hasKey $root.Values "extra_deployment_labels") (hasKey $root.Values "rw_core_deployment_labels") }}
+  labels:
+    {{- if hasKey $root.Values "extra_deployment_labels" }}
+    {{- range $key, $val := $root.Values.extra_deployment_labels }}
+    {{ $key }}: {{ $val | quote }}
+    {{- end }}
+    {{- end }}
+    {{- if hasKey $root.Values "rw_core_deployment_labels" }}
+    {{- range $key, $val := $root.Values.rw_core_deployment_labels }}
+    {{ $key }}: {{ $val | quote }}
+    {{- end }}
+    {{- end }}
+  {{- end }}
 spec:
   replicas: 1
   selector:
@@ -84,6 +97,16 @@
         app.kubernetes.io/part-of: "voltha"
         app.kubernetes.io/managed-by: {{ quote $root.Release.Service }}
         helm.sh/chart: "{{ $root.Chart.Name }}-{{ $root.Chart.Version }}"
+        {{- if hasKey $root.Values "extra_pod_labels" }}
+        {{- range $key, $val := $root.Values.extra_pod_labels }}
+        {{ $key }}: {{ $val | quote }}
+        {{- end }}
+        {{- end }}
+        {{- if hasKey $root.Values "rw_core_pod_labels" }}
+        {{- range $key, $val := $root.Values.rw_core_pod_labels }}
+        {{ $key }}: {{ $val | quote }}
+        {{- end }}
+        {{- end }}
       annotations:
         cni: "calico"
     spec: