63 lines
2.0 KiB
YAML
63 lines
2.0 KiB
YAML
{{- if and .Values.fluentBit.enabled (eq .Values.fluentBit.kind "Deployment") -}}
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ template "fluent-bit.appName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "fluent-bit.labels" . | nindent 4 }}
|
|
data:
|
|
fluent-bit.conf: |
|
|
[SERVICE]
|
|
Daemon Off
|
|
Flush 1
|
|
Log_Level info
|
|
storage.path {{ include "efs_root.value" . -}}/fluent-bit/storage
|
|
storage.backlog.flush_on_shutdown On
|
|
Parsers_File /fluent-bit/etc/parsers.conf
|
|
HTTP_Server On
|
|
HTTP_Listen 0.0.0.0
|
|
HTTP_Port 2020
|
|
Health_Check On
|
|
|
|
{{- with .Values.fluentBit.config.service }}
|
|
{{ tpl . $ | nindent 4 }}
|
|
{{- end }}
|
|
|
|
{{- $inputs := list
|
|
(dict "name" "inbound" "path" "inbound/*/inbound/inbound.log" "tag" "inbound.app.log*")
|
|
(dict "name" "ir" "path" "ir/*/orchestrator.log" "tag" "orchestrator.app.log*")
|
|
(dict "name" "pep-server" "path" "pep-server/*/pep-server.log" "tag" "pep-server.app.log*")
|
|
(dict "name" "sinkagent" "path" "sinkagent/*/sinkagent.log" "tag" "sinkagent.app.log*")
|
|
-}}
|
|
{{- if eq (include "parent.dataplaneMode" . ) "shared" }}
|
|
{{- $inputs = append $inputs (dict "name" "fusion-operator" "path" "fusion-operator/*/fusion-operator*.log" "tag" "fusion-operator.app.log*") }}
|
|
{{- end}}
|
|
{{- $efsRoot := include "efs_root.value" . }}
|
|
{{- range $inputs }}
|
|
[INPUT]
|
|
Name tail
|
|
Path {{ $efsRoot }}/logs/{{ .path }}
|
|
multiline.parser docker, cri
|
|
DB {{ $efsRoot }}/fluent-bit/storage/{{ .name }}-tail.db
|
|
DB.locking true
|
|
Ignore_Older 1d
|
|
storage.type filesystem
|
|
read_from_head true
|
|
Tag {{ .tag }}
|
|
Skip_Long_Lines On
|
|
{{- end }}
|
|
|
|
|
|
{{- with .Values.fluentBit.config.inputs }}
|
|
{{ tpl . $ | nindent 4 }}
|
|
{{- end }}
|
|
|
|
{{- with .Values.fluentBit.config.filters }}
|
|
{{ tpl . $ | nindent 4 }}
|
|
{{- end }}
|
|
|
|
{{- with .Values.fluentBit.config.outputs }}
|
|
{{ tpl . $ | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }} |