Add missing filebeat sidecars for Pomba 69/78969/4
authorjmac <james.macnider@amdocs.com>
Thu, 21 Feb 2019 20:03:49 +0000 (20:03 +0000)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Wed, 13 Mar 2019 14:06:12 +0000 (14:06 +0000)
Change-Id: I5f2cf1d74d55df0002af75367042eaf795ea2e8c
Signed-off-by: jmac <james.macnider@amdocs.com>
Issue-ID: LOG-852

kubernetes/pomba/charts/pomba-contextaggregator/templates/deployment.yaml
kubernetes/pomba/charts/pomba-data-router/templates/deployment.yaml
kubernetes/pomba/charts/pomba-sdcctxbuilder/templates/deployment.yaml
kubernetes/pomba/charts/pomba-validation-service/templates/deployment.yaml
kubernetes/pomba/resources/config/log/filebeat/filebeat.yml

index 33e82ea..cbbe93d 100755 (executable)
@@ -102,6 +102,20 @@ spec:
         affinity:
 {{- toYaml .Values.affinity | indent 10 }}
         {{- end }}
+
+        # Filebeat sidecar container
+        - name: {{ include "common.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: /opt/app/logs
+
       volumes:
         - name: localtime
           hostPath:
@@ -116,6 +130,11 @@ spec:
           configMap:
             name: {{ include "common.fullname" . }}-pre-start-configmap
             defaultMode: 0777
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          configMap:
+            name: {{ .Release.Name }}-pomba-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
         - name:  {{ include "common.fullname" . }}-logs
           emptyDir: {}
         - name: {{ include "common.fullname" . }}-log-conf
index cb5c210..71f3ac2 100644 (file)
@@ -127,6 +127,20 @@ spec:
             port: {{ .Values.service.internalPort }}
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
+
+      # Filebeat sidecar container
+      - name: {{ include "common.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: /opt/app/logs
+
       volumes:
       - name: localtime
         hostPath:
@@ -142,6 +156,11 @@ spec:
             path: data-router.properties
           - key: schemaIngest.properties
             path: schemaIngest.properties
+      - name: {{ include "common.fullname" . }}-filebeat-conf
+        configMap:
+          name: {{ .Release.Name }}-pomba-filebeat-configmap
+      - name: {{ include "common.fullname" . }}-data-filebeat
+        emptyDir: {}
       - name: {{ include "common.fullname" . }}-dynamic-route
         configMap:
           name: {{ include "common.fullname" . }}-dynamic
index 6ae5ee3..247c85f 100644 (file)
@@ -79,6 +79,19 @@ spec:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
 
+        # Filebeat sidecar container
+        - name: {{ include "common.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: /opt/app/logs
+
       volumes:
         - name: localtime
           hostPath:
@@ -91,6 +104,11 @@ spec:
         - name: {{ include "common.fullname" . }}-log-conf
           configMap:
             name: {{ include "common.fullname" . }}-log
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          configMap:
+            name: {{ .Release.Name }}-pomba-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
         - name:  {{ include "common.fullname" . }}-logs-eelf
           emptyDir: {}
       imagePullSecrets:
index df62915..d8864e2 100644 (file)
@@ -85,14 +85,34 @@ spec:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
 
+        # Filebeat sidecar container
+        - name: {{ include "common.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: /opt/app/logs
+
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          configMap:
+            name: {{ .Release.Name }}-pomba-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
         - name: root-config-app-prop
           configMap:
             name: {{ include "common.fullname" . }}-root-config
             defaultMode: 0644
+        - name:  {{ include "common.fullname" . }}-logs
+          emptyDir: {}
         - name: properties
           configMap:
             name: {{ include "common.fullname" . }}-config-properties
index b0d4690..768b1c5 100644 (file)
@@ -3,9 +3,15 @@ filebeat.prospectors:
 - input_type: log
   #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory.
   paths:
+    - /opt/app/logs/EELF/*/*.log
+    - /opt/app/logs/EELF/*.log
     - /var/log/onap/*/*/*/*.log
     - /var/log/onap/*/*/*.log
     - /var/log/onap/*/*.log
+    - /var/log/onap/*.log
+    - /logs/*/*.log
+    - /logs/*.log
+
   #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive
   ignore_older: 48h
   # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit