From 4dd8e1197468f6ee883398006e92dc9e17dae21a Mon Sep 17 00:00:00 2001
From: LiZi
Date: Mon, 9 Apr 2018 07:34:04 -0400
Subject: Add a filebeat container to each service of MSB
Change-Id: I92bf908523d2b08a28c9d118b9efdc49dad56f6e
Issue-ID: MSB-185
Signed-off-by: LiZi
---
.../msb-iag/resources/config/log/logback.xml | 27 ++++++++++++++++++++++
.../msb/charts/msb-iag/templates/configmap.yaml | 7 ++++++
.../msb/charts/msb-iag/templates/deployment.yaml | 15 ++++++++++++
3 files changed, 49 insertions(+)
create mode 100644 kubernetes/msb/charts/msb-iag/resources/config/log/logback.xml
create mode 100644 kubernetes/msb/charts/msb-iag/templates/configmap.yaml
(limited to 'kubernetes/msb/charts/msb-iag')
diff --git a/kubernetes/msb/charts/msb-iag/resources/config/log/logback.xml b/kubernetes/msb/charts/msb-iag/resources/config/log/logback.xml
new file mode 100644
index 0000000000..33775962b7
--- /dev/null
+++ b/kubernetes/msb/charts/msb-iag/resources/config/log/logback.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${pattern}
+
+
\ No newline at end of file
diff --git a/kubernetes/msb/charts/msb-iag/templates/configmap.yaml b/kubernetes/msb/charts/msb-iag/templates/configmap.yaml
new file mode 100644
index 0000000000..97c720a6ab
--- /dev/null
+++ b/kubernetes/msb/charts/msb-iag/templates/configmap.yaml
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }}
diff --git a/kubernetes/msb/charts/msb-iag/templates/deployment.yaml b/kubernetes/msb/charts/msb-iag/templates/deployment.yaml
index 2df82aca59..7ca8a8e203 100644
--- a/kubernetes/msb/charts/msb-iag/templates/deployment.yaml
+++ b/kubernetes/msb/charts/msb-iag/templates/deployment.yaml
@@ -65,6 +65,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 +77,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"
--
cgit 1.2.3-korg