From 989c91ca903c686837fe890b76b2b6dd94b0f077 Mon Sep 17 00:00:00 2001 From: Maciej Wereski Date: Wed, 17 Nov 2021 16:45:14 +0100 Subject: [MULTICLOUD] 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: I22bcac642e1f9607dc4e65e2b8b34c946b3c29cb --- .../multicloud-fcaps/templates/deployment.yaml | 20 +++----------------- .../components/multicloud-fcaps/values.yaml | 5 +++++ 2 files changed, 8 insertions(+), 17 deletions(-) (limited to 'kubernetes/multicloud/components/multicloud-fcaps') diff --git a/kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml b/kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml index b438bf0066..fc46a65052 100644 --- a/kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml +++ b/kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml @@ -60,7 +60,7 @@ spec: value: "{{ .Values.config.ssl_enabled }}" name: {{ include "common.name" . }} volumeMounts: - - mountPath: /var/log/onap + - mountPath: "{{ .Values.log.path }}" name: fcaps-log - mountPath: /opt/fcaps/fcaps/pub/config/log.yml name: fcaps-logconfig @@ -86,17 +86,7 @@ spec: failureThreshold: {{ .Values.liveness.failureThreshold }} {{ end }} # side car containers - - image: {{ include "repositoryGenerator.image.logging" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: filebeat-onap - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - name: fcaps-log - - mountPath: /usr/share/filebeat/data - name: fcaps-data-filebeat + {{ include "common.log.sidecar" . | nindent 5 }} - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.rabbitmq }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: rabbit-mq @@ -104,11 +94,7 @@ spec: volumes: - name: fcaps-log emptyDir: {} - - name: fcaps-data-filebeat - emptyDir: {} - - name: filebeat-conf - configMap: - name: multicloud-filebeat-configmap + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 5 }} - name: fcaps-logconfig configMap: name: {{ include "common.fullname" . }}-log-configmap diff --git a/kubernetes/multicloud/components/multicloud-fcaps/values.yaml b/kubernetes/multicloud/components/multicloud-fcaps/values.yaml index 39ddbae5b7..b664498eb8 100644 --- a/kubernetes/multicloud/components/multicloud-fcaps/values.yaml +++ b/kubernetes/multicloud/components/multicloud-fcaps/values.yaml @@ -95,3 +95,8 @@ serviceAccount: nameOverride: multicloud-fcaps roles: - read + +#Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' -- cgit 1.2.3-korg