OOM-1373 Add missing label release to components

Issue-ID: OOM-1373

Change-Id: Ifc6593a7e8f8622bfec29b942c5c75cdb59c997d
Signed-off-by: sushil masal <sushil.masal@amdocs.com>
diff --git a/kubernetes/common/mysql/templates/configmap.yaml b/kubernetes/common/mysql/templates/configmap.yaml
index d8c29fb..65ac5f2 100644
--- a/kubernetes/common/mysql/templates/configmap.yaml
+++ b/kubernetes/common/mysql/templates/configmap.yaml
@@ -19,6 +19,11 @@
 metadata:
   name: {{ include "common.fullname" . }}-db-configmap
   namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 data:
   master.cnf: |
     # Apply this config only on the master.
diff --git a/kubernetes/common/mysql/templates/service.yaml b/kubernetes/common/mysql/templates/service.yaml
index dc63e31..e1771c6 100644
--- a/kubernetes/common/mysql/templates/service.yaml
+++ b/kubernetes/common/mysql/templates/service.yaml
@@ -41,6 +41,9 @@
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
   ports:
     - name: nfs
@@ -65,6 +68,9 @@
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
   ports:
     - port: {{ .Values.service.internalPort }}
@@ -80,6 +86,9 @@
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
   ports:
     - port: {{ .Values.service.internalPort }}
@@ -96,6 +105,9 @@
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
   ports:
     - port: {{ .Values.service.internalPort }}
@@ -112,7 +124,11 @@
   name: {{ include "common.servicename" . }}-nodeport
   namespace: {{ include "common.namespace" . }}
   labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
   ports:
   - name: {{ .Values.service.portName | default .Values.service.name }}-1
diff --git a/kubernetes/common/mysql/templates/statefulset.yaml b/kubernetes/common/mysql/templates/statefulset.yaml
index f73b10f..c3f8ae2 100644
--- a/kubernetes/common/mysql/templates/statefulset.yaml
+++ b/kubernetes/common/mysql/templates/statefulset.yaml
@@ -31,7 +31,9 @@
     metadata:
       labels:
         app: {{ include "common.name" . }}
+        chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
         release: {{ .Release.Name }}
+        heritage: {{ .Release.Service }}
     spec:
       initContainers:
 #{{ if not .Values.disableNfsProvisioner }}
@@ -244,6 +246,10 @@
   - metadata:
       name: {{ include "common.fullname" . }}-mysql
       labels:
+        app: {{ include "common.name" . }}
+        chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+        release: {{ .Release.Name }}
+        heritage: {{ .Release.Service }}
         name: {{ include "common.fullname" . }}
     spec:
       accessModes: [ {{ .Values.persistence.accessMode }} ]
diff --git a/kubernetes/common/mysql/templates/storageclass.yaml b/kubernetes/common/mysql/templates/storageclass.yaml
index 4edb477..bbe4562 100644
--- a/kubernetes/common/mysql/templates/storageclass.yaml
+++ b/kubernetes/common/mysql/templates/storageclass.yaml
@@ -20,5 +20,10 @@
 metadata:
   name: "{{ include "common.fullname" . }}-mysql"
   namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 provisioner: {{ include "common.fullname" . }}/nfs
 {{ end }}