Skip to content

[Kubernetes] - Allow multiple parsers to be defined in the annotation #9620

Description

@ABWassim

Is your feature request related to a problem? Please describe.
In the context of the Kubernetes Filter, I'd like to be able to suggest multiple parsers through the annotation. The idea is that logs could be formatted in different ways according to the context, and making one parser to handle the different cases can be hard.

Describe the solution you'd like
Each parser could be seperated by a comma like so :

fluentbit.io/parser_stderr: "parser-one,parser-two,..."
fluentbit.io/parser_stdout: "parser-three,parser-four,..."

Then we would iterate on the parsers, and use the first one that has a match.

Describe alternatives you've considered
I tried using the Parser Filter, but then we lose the Kubernetes Metadata.

Additional context
This feature was already suggested through #5526 and #8173. I am willing to work on the MR :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions