fluent-operator icon indicating copy to clipboard operation
fluent-operator copied to clipboard

Readable FluentBit Config

Open frankgreco opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

The configuration is not formatting in a readable way.

[Filter]
    Name    parser
    Match    kube.*
    Key_Name    log
    Parser    json
    Unescape_Key    true

Describe the solution you'd like

[Filter]
    Name            parser
    Match           kube.*
    Key_Name        log
    Parser          json
    Unescape_Key    true

Describe alternatives you've considered

n/a

Additional context

The observed output is from the following commend.

kubectl -n fluent get secrets/fluent-bit-config -o json | jq '.data."fluent-bit.conf"' -r | base64 -d

frankgreco avatar Jun 06 '22 17:06 frankgreco

Maybe we add a tab to the insert? like \t

wenchajun avatar Jun 07 '22 01:06 wenchajun

Yea something like that. The number of types will change based on the longest key. I can take a look at this.

frankgreco avatar Jun 07 '22 01:06 frankgreco