Skip to content

config: implement storage inheritance option #10396

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 2 commits into from
Jun 4, 2025
Merged

Conversation

niedbalski
Copy link
Collaborator

Adds storage inheritance logic allowing input instances to inherit global storage configuration.

Example configuration with global storage inheritance:

[SERVICE]
    storage.type filesystem
    storage.inherit on
    storage.path /tmp/fluent-bit-test
    flush 1
    daemon off

[INPUT]
    name dummy
    tag test.inherit
    # This input inherits filesystem storage from service

[INPUT] 
    name dummy
    tag test.override
    storage.type memory
    # This input overrides with explicit memory storage

[OUTPUT]
    name stdout
    match *

Expected behavior:

  • First input uses filesystem storage (inherited from service)
  • Second input uses memory storage (explicit override)
  • Input instances without explicit storage.type inherit from global config when storage.inherit=on

Example configuration without global storage:

[SERVICE]
    storage.path /tmp/fluent-bit-test
    flush 1
    daemon off

[INPUT]
    name dummy
    tag test.default
    # Uses default memory storage (no inheritance)

[INPUT] 
    name dummy
    tag test.explicit
    storage.type filesystem
    # Uses explicit filesystem storage

[OUTPUT]
    name stdout
    match *

Expected behavior:

  • First input defaults to memory storage
  • Second input uses filesystem storage (explicit configuration)
  • No inheritance occurs when storage.inherit is not enabled

@niedbalski niedbalski changed the title config: implement storage inheritance and fix test crashes config: implement storage inheritance option May 28, 2025
@niedbalski niedbalski self-assigned this May 28, 2025
@niedbalski niedbalski requested a review from celalettin1286 May 28, 2025 15:44
@niedbalski niedbalski force-pushed the fix-storage-inherit-test branch from e413143 to 739e32d Compare May 29, 2025 14:41
@niedbalski niedbalski marked this pull request as ready for review May 29, 2025 16:50
@niedbalski niedbalski requested a review from cosmo0920 May 30, 2025 08:34
Copy link
Contributor

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

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

The logic seems good to me. But I found a nitpick. So, I still leave a comment now.

Copy link
Contributor

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

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

From my side, it looks good.

@edsiper
Copy link
Member

edsiper commented Jun 2, 2025

@niedbalski thank you. would you pls cleanup the commit history ?

@niedbalski niedbalski force-pushed the fix-storage-inherit-test branch from 29a9279 to e95a1c8 Compare June 4, 2025 12:44
@edsiper edsiper merged commit 7447770 into master Jun 4, 2025
52 checks passed
@edsiper edsiper deleted the fix-storage-inherit-test branch June 4, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants