summaryrefslogtreecommitdiffstats
path: root/kubernetes/esr/templates
diff options
context:
space:
mode:
authorLiZi <li.zi30@zte.com.cn>2018-03-14 22:07:08 -0400
committerLiZi <li.zi30@zte.com.cn>2018-03-18 21:11:11 -0400
commitd87e8b869b03cf85dcebc3d817f64d265b9ba98d (patch)
treed7fd08ad160ebcfe6d516b9eb7a85769259cf309 /kubernetes/esr/templates
parent0947cdf7e780641e1604ef3752483fa4d29efb3e (diff)
Add a filebeat container together with esr-server
With this modification, the log of esr-server will be in filebeat. Change-Id: I647fc665ed383b58c14a34d6598e41cd6842b1ec Issue-ID: AAI-756 Signed-off-by: LiZi <li.zi30@zte.com.cn>
Diffstat (limited to 'kubernetes/esr/templates')
-rw-r--r--kubernetes/esr/templates/esr-esrserver-deployment.yaml34
-rw-r--r--kubernetes/esr/templates/esr-filebeat-configmap.yaml9
-rw-r--r--kubernetes/esr/templates/esr-server-log-configmap.yaml9
3 files changed, 48 insertions, 4 deletions
diff --git a/kubernetes/esr/templates/esr-esrserver-deployment.yaml b/kubernetes/esr/templates/esr-esrserver-deployment.yaml
index 386d4014e4..a591a7e04c 100644
--- a/kubernetes/esr/templates/esr-esrserver-deployment.yaml
+++ b/kubernetes/esr/templates/esr-esrserver-deployment.yaml
@@ -17,12 +17,18 @@ spec:
name: esr-esrserver
spec:
containers:
- - image: {{ .Values.esrserver.image }}
+ - name: esr-esrserver
+ image: {{ .Values.esrserver.image }}
imagePullPolicy: {{ .Values.pullPolicy }}
- name: esr-esrserver
env:
- name: MSB_ADDR
value: {{ tpl .Values.msbaddr . }}
+ volumeMounts:
+ - name: localtime
+ mountPath: /etc/localtime
+ readOnly: true
+ - mountPath: /home/esr/works/logs
+ name: esr-server-logs
ports:
- containerPort: {{ .Values.esrserver.port }}
readinessProbe:
@@ -30,6 +36,26 @@ spec:
port: {{ .Values.esrserver.port }}
initialDelaySeconds: 5
periodSeconds: 10
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+ - name: filebeat-onap-esr-server
+ image: {{ .Values.filebeat.image }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ volumeMounts:
+ - mountPath: /usr/share/filebeat/filebeat.yml
+ subPath: filebeat.yml
+ name: filebeat-conf
+ - mountPath: /home/esr/works/logs
+ name: esr-server-logs
+ - mountPath: /usr/share/filebeat/data
+ name: esr-server-filebeat
+ volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ - name: filebeat-conf
+ configMap:
+ name: esr-filebeat-configmap
+ - name: esr-server-logs
+ emptyDir: {}
+ - name: esr-server-filebeat
+ emptyDir: {}
#{{ end }}
diff --git a/kubernetes/esr/templates/esr-filebeat-configmap.yaml b/kubernetes/esr/templates/esr-filebeat-configmap.yaml
new file mode 100644
index 0000000000..4bee5d16ce
--- /dev/null
+++ b/kubernetes/esr/templates/esr-filebeat-configmap.yaml
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableAaiAaiResources }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: esr-filebeat-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/esr/templates/esr-server-log-configmap.yaml b/kubernetes/esr/templates/esr-server-log-configmap.yaml
new file mode 100644
index 0000000000..3b94168515
--- /dev/null
+++ b/kubernetes/esr/templates/esr-server-log-configmap.yaml
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableAaiAaiResources }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: esr-esrserver-log-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/esrserver/logback.xml").AsConfig . | indent 2 }}
+#{{ end }}