[OOM] Fixing k8s ServiceAccounts

Adding service account for the jobs
Cleanup MSB, ES and other common charts from AAF dependencies

Issue-ID: OOM-3199
Issue-ID: OOM-3114
Issue-ID: OOM-3116

Change-Id: I55bf80876c9fb3b110e538ed1a5504e0dc1d4e1a
Signed-off-by: vladimir turok <vladimir.turok@t-systems.com>
diff --git a/kubernetes/common/network-name-gen/Chart.yaml b/kubernetes/common/network-name-gen/Chart.yaml
index 4bc06f9..88336f4 100644
--- a/kubernetes/common/network-name-gen/Chart.yaml
+++ b/kubernetes/common/network-name-gen/Chart.yaml
@@ -33,4 +33,7 @@
   - name: mariadb-init

     version: ~13.x-0

     repository: 'file://../mariadb-init'

-    condition: global.mariadbGalera.globalCluster
\ No newline at end of file
+    condition: global.mariadbGalera.globalCluster

+  - name: serviceAccount

+    version: ~13.x-0

+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/common/network-name-gen/templates/deployment.yaml b/kubernetes/common/network-name-gen/templates/deployment.yaml
index 71b7846..940132f 100644
--- a/kubernetes/common/network-name-gen/templates/deployment.yaml
+++ b/kubernetes/common/network-name-gen/templates/deployment.yaml
@@ -102,6 +102,7 @@
 {{ toYaml .Values.nodeSelector | indent 10 }}
         {{- end -}}
         {{- if .Values.affinity }}
+        serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
diff --git a/kubernetes/common/network-name-gen/values.yaml b/kubernetes/common/network-name-gen/values.yaml
index 8b8848b..e3fdb80 100644
--- a/kubernetes/common/network-name-gen/values.yaml
+++ b/kubernetes/common/network-name-gen/values.yaml
@@ -72,6 +72,8 @@
     userCredentialsExternalSecret: *dbUserSecretName
     mysqlDatabase: *mysqlDbName
   nameOverride: nengdb-init
+  serviceAccount:
+    nameOverride: nengdb-init
 
 #################################################################
 # Application configuration defaults.