aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-11-22 08:26:26 +0000
committerGerrit Code Review <gerrit@onap.org>2021-11-22 08:26:26 +0000
commit68a473611ac075f620e7796530351b1664846936 (patch)
treec5c8749ce1fc0c1aa98d9208e42f6890bc3b7890
parentfbab601b5119796d41c9e1c01cc2d451f5da517b (diff)
parentca5b1b5a69aa15e5cc8e5dcb73dc39c24232ab46 (diff)
Merge "[VID] Use log template"
-rw-r--r--kubernetes/vid/templates/configmap.yaml13
-rw-r--r--kubernetes/vid/templates/deployment.yaml20
-rw-r--r--kubernetes/vid/values.yaml5
3 files changed, 9 insertions, 29 deletions
diff --git a/kubernetes/vid/templates/configmap.yaml b/kubernetes/vid/templates/configmap.yaml
index 0ba466dfb9..5c423e61cc 100644
--- a/kubernetes/vid/templates/configmap.yaml
+++ b/kubernetes/vid/templates/configmap.yaml
@@ -27,18 +27,7 @@ metadata:
data:
{{ tpl (.Files.Glob "resources/config/log/vid/*").AsConfig . | indent 2 }}
---
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-filebeat-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
+{{ include "common.log.configMap" . }}
---
apiVersion: v1
kind: ConfigMap
diff --git a/kubernetes/vid/templates/deployment.yaml b/kubernetes/vid/templates/deployment.yaml
index 478b44232b..116a7cdfed 100644
--- a/kubernetes/vid/templates/deployment.yaml
+++ b/kubernetes/vid/templates/deployment.yaml
@@ -136,7 +136,7 @@ spec:
- mountPath: /etc/localtime
name: localtime
readOnly: true
- - mountPath: /var/log/onap
+ - mountPath: "{{ .Values.log.path }}"
name: vid-logs
- mountPath: /tmp/logback.xml
name: vid-logback
@@ -154,30 +154,16 @@ spec:
{{ toYaml .Values.affinity | indent 10 }}
{{- end }}
# side car containers
- - name: filebeat-onap
- image: {{ include "repositoryGenerator.image.logging" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- volumeMounts:
- - mountPath: /usr/share/filebeat/filebeat.yml
- name: filebeat-conf
- subPath: filebeat.yml
- - mountPath: /var/log/onap
- name: vid-logs
- - mountPath: /usr/share/filebeat/data
- name: vid-data-filebeat
+ {{ include "common.log.sidecar" . | nindent 8 }}
volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
- name: localtime
hostPath:
path: /etc/localtime
- - name: filebeat-conf
- configMap:
- name: {{ include "common.fullname" . }}-filebeat-configmap
+ {{ include "common.log.volumes" . | nindent 8 }}
- name: vid-cache
emptyDir: {}
- name: vid-logs
emptyDir: {}
- - name: vid-data-filebeat
- emptyDir: {}
- name: vid-logback
configMap:
name: {{ include "common.fullname" . }}-log-configmap
diff --git a/kubernetes/vid/values.yaml b/kubernetes/vid/values.yaml
index 91132e276c..aba010eb26 100644
--- a/kubernetes/vid/values.yaml
+++ b/kubernetes/vid/values.yaml
@@ -25,6 +25,7 @@ global:
service: mariadb-galera
internalPort: 3306
nameOverride: mariadb-galera
+ centralizedLoggingEnabled: true
#################################################################
# Secrets metaconfig
@@ -194,3 +195,7 @@ resources:
cpu: 200m
memory: 2Gi
unlimited: {}
+
+# Log configuration
+log:
+ path: /var/log/onap