Skip to content

feat(fluentbit): add timeStrict option to parsers - #2081

Open
cvas22 wants to merge 1 commit into
fluent:masterfrom
cvas22:feat/1433-parser-time-strict
Open

cvas22 wants to merge 1 commit into
fluent:masterfrom
cvas22:feat/1433-parser-time-strict

Conversation

@cvas22

@cvas22 cvas22 commented Oct 22, 2026

Copy link
Copy Markdown

What this PR does / why we need it:

Adds an optional timeStrict field to the json, logfmt, ltsv and regex parsers (ClusterParser and Parser). It is rendered as Fluent Bit's Time_Strict parser option, so strict time parsing can be turned off. Without it, a log line whose timestamp does not exactly match Time_Format (for example no fractional seconds) is rejected with invalid time format.

When the field is not set nothing is rendered, so existing configs are unchanged.

Changes: the four parser types and their generated deepcopy, the CRDs (config, both charts, manifests/setup/setup.yaml), the parser reference docs, and a unit test for the rendered output.

Which issue(s) this PR fixes:
Fixes #1433

Special notes for your reviewer:

I updated the CRD yaml and deepcopy by hand to match what the generators produce, and did not run make manifests locally. Please check that CI shows no generated-file drift.

Unrelated, not changed here: in lstv_types.go the TimeKeep value is rendered under Time_Format instead of Time_Keep.

Tested with go test ./apis/fluentbit/v1alpha2/plugins/parser/.

Expose Fluent Bit's Time_Strict setting on the json, logfmt, ltsv and
regex parsers so users can turn off strict time parsing, e.g. when a
timestamp has no fractional seconds but the format expects them.

Fixes fluent#1433

Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
@cvas22
cvas22 marked this pull request as ready for review October 22, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Time_Strict for fluent-bit parsers

1 participant