diff options
Diffstat (limited to 'kubernetes/pomba')
7 files changed, 82 insertions, 42 deletions
diff --git a/kubernetes/pomba/charts/pomba-contextaggregator/resources/bin/pre_start.sh b/kubernetes/pomba/charts/pomba-contextaggregator/resources/bin/pre_start.sh deleted file mode 100644 index 8a76cdd929..0000000000 --- a/kubernetes/pomba/charts/pomba-contextaggregator/resources/bin/pre_start.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# Get the list of topic from curl ressult -dmaap_mr_host=message-router -dmaap_mr_port=3904 -temp_output_file=".tmpoutput" -curl -X GET http://$dmaap_mr_host:$dmaap_mr_port/topics > $temp_output_file - -# Test topic POA-AUDIT-INIT, POA-AUDIT-RESULT, POA-RULE-VALIDATION -TOPICS="POA-AUDIT-INIT POA-RULE-VALIDATION POA-AUDIT-RESULT" -for i_topic in $TOPICS -do - echo "Looping ... topic: $i_topic" - if grep -iFq "$i_topic" $temp_output_file - then - # code if found - echo "$i_topic found." - else - # code if not found - echo "$i_topic NOT found." - curl -X POST -H "content-type: application/json" --data '{"event":"create topic"}' http://$dmaap_mr_host:$dmaap_mr_port/events/$i_topic - fi -done - -# remove the temp file -rm -f $temp_output_file diff --git a/kubernetes/pomba/charts/pomba-contextaggregator/templates/configmap.yaml b/kubernetes/pomba/charts/pomba-contextaggregator/templates/configmap.yaml index b984c52b15..6225338c76 100755 --- a/kubernetes/pomba/charts/pomba-contextaggregator/templates/configmap.yaml +++ b/kubernetes/pomba/charts/pomba-contextaggregator/templates/configmap.yaml @@ -31,15 +31,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }}-pre-start-configmap - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/bin/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: name: {{ include "common.fullname" . }}-log namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }}
\ No newline at end of file +{{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }} diff --git a/kubernetes/pomba/charts/pomba-contextaggregator/templates/deployment.yaml b/kubernetes/pomba/charts/pomba-contextaggregator/templates/deployment.yaml index 33e82ea5dc..589b2f2275 100755 --- a/kubernetes/pomba/charts/pomba-contextaggregator/templates/deployment.yaml +++ b/kubernetes/pomba/charts/pomba-contextaggregator/templates/deployment.yaml @@ -78,10 +78,6 @@ spec: - mountPath: /opt/app/config/builders name: {{ include "common.fullname" . }}-config-builders readOnly: true - - mountPath: /opt/app/bin/pre_start.sh - name: {{ include "common.fullname" . }}-pre-start - subPath: pre_start.sh - readOnly: false - name: {{ include "common.fullname" . }}-logs mountPath: /opt/app/logs readOnly: false @@ -102,6 +98,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: @@ -112,10 +122,11 @@ spec: - name: {{ include "common.fullname" . }}-config-builders configMap: name: {{ include "common.fullname" . }}-configmap-builders - - name: {{ include "common.fullname" . }}-pre-start + - name: {{ include "common.fullname" . }}-filebeat-conf configMap: - name: {{ include "common.fullname" . }}-pre-start-configmap - defaultMode: 0777 + 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 diff --git a/kubernetes/pomba/charts/pomba-data-router/templates/deployment.yaml b/kubernetes/pomba/charts/pomba-data-router/templates/deployment.yaml index cb5c210da9..71f3ac2d93 100644 --- a/kubernetes/pomba/charts/pomba-data-router/templates/deployment.yaml +++ b/kubernetes/pomba/charts/pomba-data-router/templates/deployment.yaml @@ -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 diff --git a/kubernetes/pomba/charts/pomba-sdcctxbuilder/templates/deployment.yaml b/kubernetes/pomba/charts/pomba-sdcctxbuilder/templates/deployment.yaml index 6ae5ee3e4e..247c85fbe3 100644 --- a/kubernetes/pomba/charts/pomba-sdcctxbuilder/templates/deployment.yaml +++ b/kubernetes/pomba/charts/pomba-sdcctxbuilder/templates/deployment.yaml @@ -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: diff --git a/kubernetes/pomba/charts/pomba-validation-service/templates/deployment.yaml b/kubernetes/pomba/charts/pomba-validation-service/templates/deployment.yaml index df62915b64..d8864e276f 100644 --- a/kubernetes/pomba/charts/pomba-validation-service/templates/deployment.yaml +++ b/kubernetes/pomba/charts/pomba-validation-service/templates/deployment.yaml @@ -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 diff --git a/kubernetes/pomba/resources/config/log/filebeat/filebeat.yml b/kubernetes/pomba/resources/config/log/filebeat/filebeat.yml index b0d4690754..768b1c59dc 100644 --- a/kubernetes/pomba/resources/config/log/filebeat/filebeat.yml +++ b/kubernetes/pomba/resources/config/log/filebeat/filebeat.yml @@ -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 |