Skip to content

bug: configFileFormat=yaml broken when using namespaced configuration #1689

@lucabrunox

Description

@lucabrunox

Describe the issue

When using fluentbit.configFileFormat=yaml and a Filter resource, the generated namespace filter is done with a toml text which doesn't fit the yaml file, e.g.:

[Filter]
    Name    rewrite_tag
    Match    kube.*
    Rule    $kubernetes['namespace_name'] ^(foobar)$ 1234567789.$TAG false
    Emitter_Name    re_emitted_1234567789
  filters:
    - name: lua
      match: "kube.*"
      script: /fluent-bit/config/containerd.lua
      call: containerd
      time_as_table: true

The bug is here:

" Rule $kubernetes['namespace_name'] ^(%s)$ %x.$TAG false\n", cfg.Namespace,

To Reproduce

Enable fluentbit.configFileFormat=yaml and then create a Filter resource

Expected behavior

Filter works well when file configuration is in yaml format.

Your Environment

- Fluent Operator version: 3.4.0
- Container Runtime:
- Operating system:
- Kernel version:

How did you install fluent operator?

helm upgrade --install fluent-operator fluent/fluent-operator --set configFileFormat=yaml

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions