Enable Istio sidecar injection
[oom.git] / kubernetes / msb / charts / msb-iag / templates / deployment.yaml
index 2df82ac..31bb2c9 100644 (file)
@@ -15,6 +15,8 @@ spec:
       labels:
         app: {{ include "common.name" . }}
         release: {{ .Release.Name }}
+      annotations:
+        sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
     spec:
       initContainers:
       - command:
@@ -33,7 +35,7 @@ spec:
         name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
@@ -65,6 +67,8 @@ spec:
           - mountPath: /etc/localtime
             name: localtime
             readOnly: true
+          - mountPath: /usr/local/apiroute-works/logs
+            name: msb-discovery-logs
           resources:
 {{ toYaml .Values.resources | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -75,9 +79,22 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
+        # side car containers
+        - name: filebeat-onap
+          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+          - mountPath: /var/log/onap
+            name: msb-discovery-logs
+          - mountPath: /usr/share/filebeat/data
+            name: msb-discovery-filebeat
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: msb-discovery-logs
+          emptyDir: {}
+        - name: msb-discovery-filebeat
+          emptyDir: {}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"