Skip to content

system_config: support built-in config files #4893

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

Merged
merged 5 commits into from
Apr 24, 2025

Conversation

kenhys
Copy link
Contributor

@kenhys kenhys commented Apr 4, 2025

Which issue(s) this PR fixes:

N/A

What this PR does / why we need it:

Currently @include directive supports to reuse configuration files, but no way to
apply specific configuration files by default (without specifying to).

For example, if this feature was merged, a specific configuration could be applied in any case for fluent-package.
By putting some conf files under /etc/fluent/conf.d/*.conf.

Docs Changes:

fluent/fluentd-docs-gitbook#577

Release Note:

@kenhys kenhys changed the title v1parser: support built-in config files PoC v1parser: support built-in config files Apr 4, 2025
@kenhys
Copy link
Contributor Author

kenhys commented Apr 4, 2025

This is just a PoC.

@kenhys kenhys force-pushed the builtin-confd branch 6 times, most recently from 238d9dc to 49f544d Compare April 10, 2025 05:30
@kenhys kenhys changed the title PoC v1parser: support built-in config files PoC system_config: support built-in config files Apr 10, 2025
@kenhys kenhys force-pushed the builtin-confd branch 9 times, most recently from b1329d3 to aa12263 Compare April 14, 2025 06:19
@kenhys kenhys changed the title PoC system_config: support built-in config files system_config: support built-in config files Apr 14, 2025
@kenhys kenhys marked this pull request as ready for review April 14, 2025 06:20
@kenhys kenhys force-pushed the builtin-confd branch 3 times, most recently from 0bd54d9 to 30467dd Compare April 15, 2025 02:28
kenhys added a commit to kenhys/fluentd-docs-gitbook that referenced this pull request Apr 15, 2025
@kenhys kenhys requested review from Watson1978 and daipom April 15, 2025 04:31
Copy link
Contributor

@daipom daipom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be necessary to add more tests.
At least, we want to confirm that some additional configs are merged correctly.

kenhys and others added 2 commits April 22, 2025 17:25
Currently @include directive supports to reuse configuration files,
but no way to apply specific configuration files by default (without
specifying to).

In the previous versions, if you want to manage multiple
configuration files, you must use @include directive explicitly.

In this commit, add an option to specify the directory
(e.g. /etc/fluent/conf.d) which stores additional configuration files.
If there are such files under specified directory, they are loaded by
default without @include directive.

If you want to disable this feature, set empty string
for config_include_dir "".

Signed-off-by: Kentaro Hayashi <[email protected]>
Co-authored-by: Daijiro Fukuda <[email protected]>
Signed-off-by: Kentaro Hayashi <[email protected]>
@kenhys
Copy link
Contributor Author

kenhys commented Apr 22, 2025

Rebased with master and squash feedback commits.

@daipom daipom added this to the v1.19.0 milestone Apr 22, 2025
kenhys added 3 commits April 22, 2025 18:27
Signed-off-by: Kentaro Hayashi <[email protected]>
Before:
  stub all Fluent::Config.build

After
  stub first Fluent::Config.build, do not stub additional Fluent::Config.build

Signed-off-by: Kentaro Hayashi <[email protected]>
@kenhys kenhys requested review from Watson1978 and daipom April 23, 2025 04:16
@kenhys
Copy link
Contributor Author

kenhys commented Apr 23, 2025

Followed feedback (Use stub.proxy)

Copy link
Contributor

@Watson1978 Watson1978 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

Copy link
Contributor

@daipom daipom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@daipom
Copy link
Contributor

daipom commented Apr 24, 2025

Could you update the description of this PR?

This is just a PoC.

@kenhys
Copy link
Contributor Author

kenhys commented Apr 24, 2025

Updated!

@kenhys kenhys merged commit 86a95d5 into fluent:master Apr 24, 2025
18 of 19 checks passed
@kenhys kenhys deleted the builtin-confd branch April 24, 2025 07:10
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.

3 participants