...
1apiVersion: fluentbit.fluent.io/v1alpha2
2kind: ClusterFilter
3metadata:
4 name: zzz-k8s-container-replay
5 labels:
6 fluentbit.fluent.io/enabled: "true"
7spec:
8 filters:
9 # removing the severity key here ensures that when the log entry is retagged with
10 # rewrite_tag that the severity from the replay container doesn't get used as the
11 # severity for the replayed log
12 - modify:
13 alias: k8s-replay-remove
14 rules:
15 - remove: "severity"
16 # use the "original-tag" part of a log record as the value to use
17 # for the new tag. This is the tag that was used in the original
18 # log record and is printed out by the logreplay container. We need to use
19 # the original tag so that the log message can be passed back through the
20 # fluent-bit pipeline and parsed by any existing filters that match for that tag
21 # ref: https://docs.fluentbit.io/manual/v/dev-2.2/pipeline/filters/rewrite-tag
22 - customPlugin:
23 config: |-
24 Name rewrite_tag
25 Alias replay-tag
26 Rule $original-tag ^(k8s_container.*)$ $original-tag false
27 Emitter_Mem_Buf_Limit 50M
28 Emitter_Name log_replayer
29 match: "k8s_container.fluent-operator_lr-*"
View as plain text