Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging: switch to YAML config files by default #9837

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

patrick-stephens
Copy link
Contributor

@patrick-stephens patrick-stephens commented Jan 15, 2025

Resolves #9714 by switching to using YAML configuration by default for all packages and containers.

For containers we should prepare a PR for the helm chart as well but it will not break the helm chart as that explicitly uses a .conf file for now.

We should ensure this is properly notified during the release notes and beforehand for folks to do any required updates to their rollouts.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@patrick-stephens patrick-stephens force-pushed the 9714_switch_yaml_default_systemd branch 2 times, most recently from d44a034 to 1452694 Compare January 15, 2025 13:29
@patrick-stephens patrick-stephens changed the title packaging: switch to YAML config files for Linux packages by default packaging: switch to YAML config files by default Jan 15, 2025
@patrick-stephens patrick-stephens force-pushed the 9714_switch_yaml_default_systemd branch from 1452694 to a5dc8fc Compare January 15, 2025 13:30
@patrick-stephens patrick-stephens added the ok-package-test Run PR packaging tests label Jan 15, 2025
@patrick-stephens
Copy link
Contributor Author

patrick-stephens commented Jan 15, 2025

cc @stevehipwell on the helm side - the current chart uses a legacy config by default so should not be impacted by this change but maybe we should change the defaults there too?

@stevehipwell
Copy link

@patrick-stephens is the YAML support now idiomatic? I saw flush: 1 when I just gave this a quick scan.

@patrick-stephens
Copy link
Contributor Author

@patrick-stephens is the YAML support now idiomatic? I saw flush: 1 when I just gave this a quick scan.

There's no change to syntax here, this is primarily around the default config file we're using.

@stevehipwell
Copy link

So in the context of Kubernetes I think the current "YAML" format is problematic given the fact that it's not idiomatic YAML but is called YAML and looks like YAML. That said am I correct in understanding that some capabilities are only available via the YAML config?

@patrick-stephens
Copy link
Contributor Author

So in the context of Kubernetes I think the current "YAML" format is problematic given the fact that it's not idiomatic YAML but is called YAML and looks like YAML. That said am I correct in understanding that some capabilities are only available via the YAML config?

Sorry @stevehipwell missed this but yes, processors are the main one that is only available via YAML config: https://docs.fluentbit.io/manual/pipeline/processors
(All existing filters can be processors too). There's some other stuff like multi-line content that is only possible, e.g. for LUA filters.

I think the main thing on the chart side is making it easy to switch to format.

At the moment I think this is a minimal YAML config for the chart but it leaves all the default config in place:

args:
  - --workdir=/fluent-bit/etc
  - --config=/fluent-bit/etc/conf/fluent-bit.yaml

config:
 extraFiles:
  fluent-bit.yaml: |
    pipeline:
      inputs:
        - name: tail
          tag: kube.*
          path: /var/log/containers/*.log
          multiline.parser: docker, cri
      outputs:
        - name: stdout
          match: '*'

The current config forces legacy config usage as it uses fluent-bit.conf as the name and the file suffix needs to be .yml or .yaml to handle YAML format: https://github.com/fluent/helm-charts/blob/9e36dfa209c73951370f36549e63163419a8bcf7/charts/fluent-bit/templates/configmap.yaml#L12

The chart is protected against the default format changing as the args value specifies the config file directly. We need to switch this depending on if it is .conf or .yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-required ok-package-test Run PR packaging tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change systemd execstart to yml conf
3 participants