2020-12-08 15:05:25 +00:00
|
|
|
[SERVICE]
|
|
|
|
Flush {{ .Values.config.flushInterval }}
|
|
|
|
Daemon Off
|
|
|
|
Log_Level {{ .Values.config.logLevel }}
|
|
|
|
Parsers_File parsers.conf
|
|
|
|
Parsers_File custom_parsers.conf
|
|
|
|
HTTP_Server On
|
|
|
|
HTTP_Listen 0.0.0.0
|
|
|
|
HTTP_Port 2020
|
|
|
|
|
|
|
|
[INPUT]
|
|
|
|
Name tail
|
|
|
|
Path /var/log/containers/*.log
|
|
|
|
Parser cri-log
|
|
|
|
Tag cri.*
|
|
|
|
Skip_Long_Lines On
|
|
|
|
DB /var/log/flb_kube.db
|
|
|
|
DB.Sync Normal
|
2020-12-10 14:36:26 +00:00
|
|
|
{{- with .Values.config.input }}
|
|
|
|
Mem_Buf_Limit {{ default "16MB" .memBufLimit }}
|
|
|
|
Refresh_Interval {{ default 10 .refreshInterval }}
|
|
|
|
{{- end }}
|
2020-12-08 15:05:25 +00:00
|
|
|
|
|
|
|
[FILTER]
|
|
|
|
Name lua
|
|
|
|
Match cri.*
|
|
|
|
script /fluent-bit/etc/functions.lua
|
|
|
|
call reassemble_cri_logs
|
|
|
|
|
|
|
|
[FILTER]
|
|
|
|
Name kubernetes
|
|
|
|
Match cri.*
|
|
|
|
Merge_Log On
|
|
|
|
Merge_Log_Key kube
|
|
|
|
Kube_Tag_Prefix cri.var.log.containers.
|
|
|
|
Keep_Log Off
|
|
|
|
K8S-Logging.Parser Off
|
|
|
|
K8S-Logging.Exclude Off
|
|
|
|
|
|
|
|
{{- if index .Values "config" "extraRecords" }}
|
|
|
|
|
|
|
|
[FILTER]
|
|
|
|
Name record_modifier
|
|
|
|
Match cri.*
|
|
|
|
{{- range $k,$v := index .Values "config" "extraRecords" }}
|
|
|
|
Record {{ $k }} {{ $v }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
[FILTER]
|
|
|
|
Name rewrite_tag
|
|
|
|
Match cri.*
|
|
|
|
Emitter_Name kube_tag_rewriter
|
|
|
|
Rule logtag F kube.$kubernetes['namespace_name'].$kubernetes['container_name'] false
|
|
|
|
|
|
|
|
[FILTER]
|
|
|
|
Name lua
|
|
|
|
Match kube.*
|
|
|
|
script /fluent-bit/etc/functions.lua
|
|
|
|
call nest_k8s_ns
|
|
|
|
|
2020-12-10 14:44:58 +00:00
|
|
|
{{- if .Values.config.outputs }}
|
2020-12-10 14:36:26 +00:00
|
|
|
{{ .Values.config.outputs }}
|
2020-12-10 14:44:58 +00:00
|
|
|
{{- else }}
|
2020-12-10 14:36:26 +00:00
|
|
|
{{- with .Values.config.output }}
|
2020-12-08 15:05:25 +00:00
|
|
|
[OUTPUT]
|
|
|
|
Match *
|
|
|
|
Name forward
|
2020-12-10 14:36:26 +00:00
|
|
|
Host {{ .host }}
|
2020-12-08 15:05:25 +00:00
|
|
|
Port 24224
|
2020-12-10 14:36:26 +00:00
|
|
|
Shared_Key {{ .sharedKey }}
|
|
|
|
tls {{ ternary "on" "off" .tls }}
|
2020-12-08 15:05:25 +00:00
|
|
|
Send_options true
|
|
|
|
Require_ack_response true
|
|
|
|
{{- end }}
|
2020-12-10 14:44:58 +00:00
|
|
|
{{- end }}
|