From 857687aa25213492e813616b4ebca5f3bd7eac85 Mon Sep 17 00:00:00 2001 From: Maciej Wereski Date: Thu, 18 Nov 2021 16:28:05 +0100 Subject: [VFC] Use log template Ability to turn off filebeat is needed as it is being deprecated. To achieve that existing log helper template is used. Issue-ID: OOM-1 Signed-off-by: Maciej Wereski Change-Id: Ib3389c8e2f9221683862d3482c82f73f7f637441 --- .../templates/deployment.yaml | 22 +++------------------- .../components/vfc-huawei-vnfm-driver/values.yaml | 7 ++++++- 2 files changed, 9 insertions(+), 20 deletions(-) (limited to 'kubernetes/vfc/components/vfc-huawei-vnfm-driver') diff --git a/kubernetes/vfc/components/vfc-huawei-vnfm-driver/templates/deployment.yaml b/kubernetes/vfc/components/vfc-huawei-vnfm-driver/templates/deployment.yaml index 4f74d1ddd5..dd763b4f1e 100644 --- a/kubernetes/vfc/components/vfc-huawei-vnfm-driver/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-huawei-vnfm-driver/templates/deployment.yaml @@ -72,7 +72,7 @@ spec: mountPath: /etc/localtime readOnly: true - name: {{ include "common.fullname" . }}-logs - mountPath: /var/log/onap + mountPath: {{ .Values.log.path }} - name: {{ include "common.fullname" . }}-logconfig mountPath: /opt/vfc/hwvnfmdriver/config/log4j.properties subPath: log4j.properties @@ -88,18 +88,7 @@ spec: {{- end }} # side car containers - - name: {{ include "common.name" . }}-filebeat-onap - image: {{ include "repositoryGenerator.image.logging" . }} - 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" . }}-logs - mountPath: /var/log/onap - - name: {{ include "common.fullname" . }}-data-filebeat - mountPath: /usr/share/filebeat/data - + {{ include "common.log.sidecar" . | nindent 8 }} volumes: - name: {{ include "common.fullname" . }}-localtime hostPath: @@ -109,11 +98,6 @@ spec: - name: {{ include "common.fullname" . }}-logconfig configMap: name : {{ include "common.fullname" . }}-logging-configmap - - - name: {{ include "common.fullname" . }}-filebeat-conf - configMap: - name: {{ include "common.release" . }}-vfc-filebeat-configmap - - name: {{ include "common.fullname" . }}-data-filebeat - emptyDir: {} + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/vfc/components/vfc-huawei-vnfm-driver/values.yaml b/kubernetes/vfc/components/vfc-huawei-vnfm-driver/values.yaml index 548cab8d0f..596a1cf36d 100644 --- a/kubernetes/vfc/components/vfc-huawei-vnfm-driver/values.yaml +++ b/kubernetes/vfc/components/vfc-huawei-vnfm-driver/values.yaml @@ -86,4 +86,9 @@ resources: requests: cpu: 200m memory: 2000Mi - unlimited: {} \ No newline at end of file + unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' -- cgit 1.2.3-korg