summaryrefslogtreecommitdiffstats
path: root/kubernetes/clamp/templates
diff options
context:
space:
mode:
authorac2550 <ac2550@intl.att.com>2018-05-24 15:47:05 +0200
committerac2550 <ac2550@intl.att.com>2018-05-24 15:47:05 +0200
commitde0098901aa59824ca38a3c0354d8a93a3ba9deb (patch)
tree69a820827a0cf372906a6f0d2fea9be4efe5e702 /kubernetes/clamp/templates
parent07d87e7559c14993dc0cb6919c60fb2d1b5757b7 (diff)
Adding logging for the main CLAMP
Issue-ID: CLAMP-170 Change-Id: I0dcd730efdbe02b333db91629d1e5f90024efb9e Signed-off-by: ac2550 <ac2550@intl.att.com>
Diffstat (limited to 'kubernetes/clamp/templates')
-rw-r--r--kubernetes/clamp/templates/configmap.yaml8
-rw-r--r--kubernetes/clamp/templates/deployment.yaml29
2 files changed, 37 insertions, 0 deletions
diff --git a/kubernetes/clamp/templates/configmap.yaml b/kubernetes/clamp/templates/configmap.yaml
index 7a66c64755..e0ed211717 100644
--- a/kubernetes/clamp/templates/configmap.yaml
+++ b/kubernetes/clamp/templates/configmap.yaml
@@ -25,3 +25,11 @@ metadata:
data:
{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
spring_application_json: {{ tpl .Values.config.springApplicationJson . | quote }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ .Release.Name }}-clamp-filebeat-configmap
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/clamp/templates/deployment.yaml b/kubernetes/clamp/templates/deployment.yaml
index 38eabeb968..fb06d834f4 100644
--- a/kubernetes/clamp/templates/deployment.yaml
+++ b/kubernetes/clamp/templates/deployment.yaml
@@ -46,9 +46,24 @@ spec:
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
name: {{ include "common.name" . }}-readiness
containers:
+ # side car containers
+ - 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/datag
+ - name: {{ include "common.fullname" . }}-logs
+ mountPath: /var/log/onap
- name: {{ include "common.name" . }}
image: "{{ include "common.repository" . }}/{{ .Values.image }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ args:
+ - "-Dcom.att.eelf.logging.file=file:/opt/clamp/logback.xml"
+ - ""
ports:
- containerPort: {{ .Values.service.internalPort }}
# disable liveness probe when breakpoints set in debugger
@@ -66,9 +81,14 @@ spec:
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
volumeMounts:
+ - name: {{ include "common.fullname" . }}-logs
+ mountPath: /var/log/onap
- mountPath: /opt/clamp/sdc-controllers-config.json
name: {{ include "common.fullname" . }}-config
subPath: sdc-controllers-config.json
+ - mountPath: /opt/clamp/logback.xml
+ name: {{ include "common.fullname" . }}-config
+ subPath: logback.xml
env:
- name: SPRING_APPLICATION_JSON
valueFrom:
@@ -92,5 +112,14 @@ spec:
items:
- key: sdc-controllers-config.json
path: sdc-controllers-config.json
+ - key: logback.xml
+ path: logback.xml
+ - name: {{ include "common.fullname" . }}-filebeat-conf
+ configMap:
+ name: {{ .Release.Name }}-clamp-filebeat-configmap
+ - name: {{ include "common.fullname" . }}-data-filebeat
+ emptyDir: {}
+ - name: {{ include "common.fullname" . }}-logs
+ emptyDir: {}
imagePullSecrets:
- name: "{{ include "common.namespace" . }}-docker-registry-key"