Merge "Change Removed Image"
[oom.git] / kubernetes / msb / charts / msb-iag / templates / deployment.yaml
index d41518d..98ac932 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 }}
@@ -56,15 +58,17 @@ spec:
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
           - name: CONSUL_IP
-            value: {{.Release.Name}}-msb-consul.{{ include "common.namespace" . }}
+            value: msb-consul.{{ include "common.namespace" . }}
           - name: SDCLIENT_IP
-            value: {{.Release.Name}}-msb-discovery.{{ include "common.namespace" . }}
+            value: msb-discovery.{{ include "common.namespace" . }}
           - name: ROUTE_LABELS
             value: {{ .Values.config.routeLabels }}
           volumeMounts:
           - mountPath: /etc/localtime
             name: localtime
             readOnly: true
+          - mountPath: /usr/local/apiroute-works/logs
+            name: {{ include "common.fullname" . }}-logs
           resources:
 {{ toYaml .Values.resources | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -75,7 +79,32 @@ 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:
+          - name: {{ include "common.fullname" . }}-filebeat-conf
+            mountPath: /usr/share/filebeat/filebeat.yml
+            subPath: filebeat.yml
+          - name: {{ include "common.fullname" . }}-data-filebeat
+            mountPath: /usr/share/filebeat/data
+          - name: {{ include "common.fullname" . }}-logs
+            mountPath: /var/log/onap/msb/msb-iag
+          - mountPath: /opt/ajsc/etc/config/logback.xml
+            name: {{ include "common.fullname" . }}-log-conf
+            subPath: logback.xml
       volumes:
+        - name: {{ include "common.fullname" . }}-log-conf
+          configMap:
+            name: {{ include "common.fullname" . }}-log
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          configMap:
+            name: {{ .Release.Name }}-msb-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
+        - name:  {{ include "common.fullname" . }}-logs
+          emptyDir: {}
         - name: localtime
           hostPath:
             path: /etc/localtime