Closed dex4er closed 3 months ago
Tested with image: public.ecr.aws/dex4er/fluent-operator:pr-1298-1299
filter:
apiVersion: fluentbit.fluent.io/v1alpha2
kind: ClusterFilter
metadata:
name: append-tag
labels:
fluentbit.fluent.io/enabled: "true"
fluentbit.fluent.io/mode: fluentbit-only
spec:
match: "*"
filters:
- lua:
call: append_tag
code: |
function append_tag(tag, timestamp, record)
new_record = record
new_record["meta_type"] = tag
return 2, timestamp, new_record
end
output:
[Filter]
Name lua
Match *
code function append_tag(tag, timestamp, record) new_record = record; new_record["meta_type"] = tag; return 2, timestamp, new_record; end
call append_tag
What this PR does / why we need it:
It should allow to use inline code for Lua scripts
Which issue(s) this PR fixes:
Fixes #1287
Does this PR introduced a user-facing change?