2 # Copyright © 2020 Orange
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 {{- define "common.log.sidecar" -}}
18 {{- if .Values.global.centralizedLoggingEnabled }}
19 - name: {{ include "common.name" . }}-filebeat
20 image: {{ include "repositoryGenerator.image.logging" . }}
21 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
24 mountPath: /usr/share/filebeat/filebeat.yml
27 mountPath: {{ .Values.log.path }}
29 mountPath: /usr/share/filebeat/data
40 {{- define "common.log.volumes" -}}
41 {{- $dot := default . .dot }}
42 {{- if $dot.Values.global.centralizedLoggingEnabled }}
43 {{- $configMapName := printf "%s-filebeat" (default (include "common.fullname" $dot) .configMapNamePrefix) }}
46 name: {{ $configMapName }}
52 {{- define "common.log.configMap" -}}
53 {{- if .Values.global.centralizedLoggingEnabled }}
57 metadata: {{- include "common.resourceMetadata" (dict "dot" . "suffix" "filebeat") | nindent 2 }}
59 {{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}