[MSB] Update chart with service account

Add service account to requirements, values and deployment/statefulset

Issue-ID: OOM-2861
Signed-off-by: farida azmy <farida.azmy.ext@orange.com>
Change-Id: I6670bde473aef92399acd35b1efbfd4743438ef6
diff --git a/kubernetes/msb/components/kube2msb/requirements.yaml b/kubernetes/msb/components/kube2msb/requirements.yaml
index dbb7638..dfda28d 100644
--- a/kubernetes/msb/components/kube2msb/requirements.yaml
+++ b/kubernetes/msb/components/kube2msb/requirements.yaml
@@ -19,3 +19,4 @@
   - name: repositoryGenerator
     version: ~9.x-0
     repository: '@local'
+
diff --git a/kubernetes/msb/components/msb-consul/requirements.yaml b/kubernetes/msb/components/msb-consul/requirements.yaml
index dbb7638..ca01ea6 100644
--- a/kubernetes/msb/components/msb-consul/requirements.yaml
+++ b/kubernetes/msb/components/msb-consul/requirements.yaml
@@ -19,3 +19,6 @@
   - name: repositoryGenerator
     version: ~9.x-0
     repository: '@local'
+  - name: serviceAccount
+    version: ~9.x-0
+    repository: '@local'
diff --git a/kubernetes/msb/components/msb-consul/templates/deployment.yaml b/kubernetes/msb/components/msb-consul/templates/deployment.yaml
index 97dd178..d03829d 100644
--- a/kubernetes/msb/components/msb-consul/templates/deployment.yaml
+++ b/kubernetes/msb/components/msb-consul/templates/deployment.yaml
@@ -36,7 +36,6 @@
       annotations:
         sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
     spec:
-      serviceAccountName: msb
       containers:
         - name: {{ include "common.name" . }}
           image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
@@ -85,6 +84,7 @@
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: localtime
           hostPath:
diff --git a/kubernetes/msb/components/msb-consul/values.yaml b/kubernetes/msb/components/msb-consul/values.yaml
index 1c7fa38..258d49e 100644
--- a/kubernetes/msb/components/msb-consul/values.yaml
+++ b/kubernetes/msb/components/msb-consul/values.yaml
@@ -87,3 +87,9 @@
   fsGroup: 1000
   runAsUser: 100
   runAsGroup: 1000
+
+#Pods Service Account
+serviceAccount:
+  nameOverride: msb-consul
+  roles:
+    - read
diff --git a/kubernetes/msb/components/msb-discovery/requirements.yaml b/kubernetes/msb/components/msb-discovery/requirements.yaml
index dbb7638..ca01ea6 100644
--- a/kubernetes/msb/components/msb-discovery/requirements.yaml
+++ b/kubernetes/msb/components/msb-discovery/requirements.yaml
@@ -19,3 +19,6 @@
   - name: repositoryGenerator
     version: ~9.x-0
     repository: '@local'
+  - name: serviceAccount
+    version: ~9.x-0
+    repository: '@local'
diff --git a/kubernetes/msb/components/msb-discovery/templates/deployment.yaml b/kubernetes/msb/components/msb-discovery/templates/deployment.yaml
index e5e5f9e..00d91fe 100644
--- a/kubernetes/msb/components/msb-discovery/templates/deployment.yaml
+++ b/kubernetes/msb/components/msb-discovery/templates/deployment.yaml
@@ -36,7 +36,6 @@
       annotations:
         sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
     spec:
-      serviceAccountName: msb
       initContainers:
       - command:
         - /app/ready.py
@@ -107,6 +106,7 @@
           - mountPath: /opt/ajsc/etc/config/logback.xml
             name: {{ include "common.fullname" . }}-log-conf
             subPath: logback.xml
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: {{ include "common.fullname" . }}-log-conf
           configMap:
diff --git a/kubernetes/msb/components/msb-discovery/values.yaml b/kubernetes/msb/components/msb-discovery/values.yaml
index f0eabde..e980023 100644
--- a/kubernetes/msb/components/msb-discovery/values.yaml
+++ b/kubernetes/msb/components/msb-discovery/values.yaml
@@ -82,3 +82,9 @@
       cpu: 400m
       memory: 400Mi
   unlimited: {}
+
+#Pods Service Account
+serviceAccount:
+  nameOverride: msb-discovery
+  roles:
+    - read
diff --git a/kubernetes/msb/components/msb-eag/requirements.yaml b/kubernetes/msb/components/msb-eag/requirements.yaml
index 3fea5d0..a4fb34c 100644
--- a/kubernetes/msb/components/msb-eag/requirements.yaml
+++ b/kubernetes/msb/components/msb-eag/requirements.yaml
@@ -22,3 +22,6 @@
   - name: certInitializer
     version: ~9.x-0
     repository: '@local'
+  - name: serviceAccount
+    version: ~9.x-0
+    repository: '@local'
diff --git a/kubernetes/msb/components/msb-eag/templates/deployment.yaml b/kubernetes/msb/components/msb-eag/templates/deployment.yaml
index 113a174..c30fc34 100644
--- a/kubernetes/msb/components/msb-eag/templates/deployment.yaml
+++ b/kubernetes/msb/components/msb-eag/templates/deployment.yaml
@@ -37,7 +37,6 @@
       annotations:
         sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
     spec:
-      serviceAccountName: msb
       initContainers:
       {{ include "common.certInitializer.initContainer" . | indent 6 | trim }}
       - command:
@@ -119,6 +118,7 @@
           - mountPath: /opt/ajsc/etc/config/logback.xml
             name: {{ include "common.fullname" . }}-log-conf
             subPath: logback.xml
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         {{ include "common.certInitializer.volumes" . | indent 8 | trim }}
         - name: {{ include "common.fullname" . }}-log-conf
diff --git a/kubernetes/msb/components/msb-eag/values.yaml b/kubernetes/msb/components/msb-eag/values.yaml
index 5faae36..9345341 100644
--- a/kubernetes/msb/components/msb-eag/values.yaml
+++ b/kubernetes/msb/components/msb-eag/values.yaml
@@ -116,3 +116,9 @@
       cpu: 200m
       memory: 400Mi
   unlimited: {}
+
+#Pods Service Account
+serviceAccount:
+  nameOverride: msb-eag
+  roles:
+    - read
diff --git a/kubernetes/msb/components/msb-iag/requirements.yaml b/kubernetes/msb/components/msb-iag/requirements.yaml
index 3fea5d0..a4fb34c 100644
--- a/kubernetes/msb/components/msb-iag/requirements.yaml
+++ b/kubernetes/msb/components/msb-iag/requirements.yaml
@@ -22,3 +22,6 @@
   - name: certInitializer
     version: ~9.x-0
     repository: '@local'
+  - name: serviceAccount
+    version: ~9.x-0
+    repository: '@local'
diff --git a/kubernetes/msb/components/msb-iag/templates/deployment.yaml b/kubernetes/msb/components/msb-iag/templates/deployment.yaml
index 7bae325..2a855c7 100644
--- a/kubernetes/msb/components/msb-iag/templates/deployment.yaml
+++ b/kubernetes/msb/components/msb-iag/templates/deployment.yaml
@@ -37,7 +37,6 @@
       annotations:
         sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
     spec:
-      serviceAccountName: msb
       initContainers:
       {{ include "common.certInitializer.initContainer" . | indent 6 | trim }}
       - command:
@@ -119,6 +118,7 @@
           - mountPath: /opt/ajsc/etc/config/logback.xml
             name: {{ include "common.fullname" . }}-log-conf
             subPath: logback.xml
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         {{ include "common.certInitializer.volumes" . | indent 8 | trim }}
         - name: {{ include "common.fullname" . }}-log-conf
diff --git a/kubernetes/msb/components/msb-iag/values.yaml b/kubernetes/msb/components/msb-iag/values.yaml
index 9b9f805..21f22dd 100644
--- a/kubernetes/msb/components/msb-iag/values.yaml
+++ b/kubernetes/msb/components/msb-iag/values.yaml
@@ -117,3 +117,9 @@
       cpu: 100m
       memory: 400Mi
   unlimited: {}
+
+#Pods Service Account
+serviceAccount:
+  nameOverride: msb-iag
+  roles:
+    - read