Merge "update log helm chart from 2 to 3.0.0"
[oom.git] / kubernetes / aai / charts / aai-babel / templates / deployment.yaml
index 6b1312b..849e479 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright © 2018 Amdocs, AT&T
+# Modifications Copyright © 2018 Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -32,7 +33,7 @@ spec:
     spec:
       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 }}
@@ -75,8 +76,11 @@ spec:
             subPath: babel-auth.properties
           - mountPath: /opt/app/babel/config/auth
             name: {{ include "common.fullname" . }}-secrets
-          - mountPath: /logs
+          - mountPath: /var/log/onap
             name: {{ include "common.fullname" . }}-logs
+          - mountPath: /opt/app/babel/config/logback.xml
+            name: {{ include "common.fullname" . }}-config
+            subPath: logback.xml
           resources:
 {{ toYaml .Values.resources | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -87,6 +91,20 @@ 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: /usr/share/filebeat/filebeat.yml
+            subPath: filebeat.yml
+            name: filebeat-conf
+          - mountPath: /var/log/onap
+            name: {{ include "common.fullname" . }}-logs
+          - mountPath: /usr/share/filebeat/data
+            name: aai-filebeat
+
       volumes:
         - name: localtime
           hostPath:
@@ -99,10 +117,17 @@ spec:
               path: artifact-generator.properties
             - key: babel-auth.properties
               path: babel-auth.properties
+            - key: logback.xml
+              path: logback.xml
         - name: {{ include "common.fullname" . }}-secrets
           secret:
             secretName: {{ include "common.fullname" . }}-babel-secrets
+        - name: filebeat-conf
+          configMap:
+            name: aai-filebeat
         - name: {{ include "common.fullname" . }}-logs
           emptyDir: {}
+        - name: aai-filebeat
+          emptyDir: {}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"