[AAI] Remove unused AAF proxies
[oom.git] / kubernetes / common / common / templates / _log.tpl
1 {{/*
2 # Copyright © 2020 Orange
3 #
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
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 */}}
16
17 {{- define "common.log.sidecar" -}}
18 {{- if .Values.global.centralizedLoggingEnabled }}
19 - name: {{ include "common.name" . }}-filebeat
20   image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
21   imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
22   volumeMounts:
23   - name: filebeat-conf
24     mountPath: /usr/share/filebeat/filebeat.yml
25     subPath: filebeat.yml
26   - name: logs
27     mountPath: {{ .Values.log.path }}
28   - name: filebeat-data
29     mountPath: /usr/share/filebeat/data
30 {{- end -}}
31 {{- end -}}
32
33 {{- define "common.log.volumes" -}}
34 {{- if .Values.global.centralizedLoggingEnabled }}
35 - name: filebeat-conf
36   configMap:
37     name: {{ include "common.fullname" . }}-filebeat
38 - name: filebeat-data
39   emptyDir: {}
40 {{- end -}}
41 {{- end -}}
42
43 {{- define "common.log.configMap" -}}
44 {{- if .Values.global.centralizedLoggingEnabled }}
45 ---
46 apiVersion: v1
47 kind: ConfigMap
48 metadata: {{- include "common.resourceMetadata" (dict "dot" . "suffix" "filebeat") | nindent 2 }}
49 data:
50 {{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
51 {{- end }}
52 {{- end -}}
53