Skip to content

Conversation

@joshuabaird
Copy link
Collaborator

@joshuabaird joshuabaird commented Nov 17, 2025

ClusterParsers and ClusterMultilineParsers are cluster-scoped resources and should not be filtered by namespace. This bug was introduced in commit 30cd0c3 (PR #1708) where the code was refactored to use a listNamespacedResources helper function that incorrectly added namespace filtering for cluster-scoped resources.

This caused ClusterParsers referenced from namespace-scoped Filters to not be generated in parsers.conf with their hash-suffixed names, leading to fluent-bit pods crashlooping with 'requested parser not found' errors.

The fix:

  1. Changes the function to use listClusterResources (which doesn't filter by namespace) for ClusterParsers and ClusterMultilineParsers.
  2. Renames ListNamespacedResources to ListFluentBitConfigResources to better reflect that it lists both namespaced and cluster-scoped resources needed by a FluentBitConfig.

Note: The original code (pre-refactor) also had a bug where ClusterMultilineParsers were incorrectly filtered by namespace.

Fixes #1778

@joshuabaird joshuabaird changed the title Fix ClusterParser namespace filtering bug (#1778) Fix ClusterParser/ClusterMultilineParser namespace filtering bug (#1778) Nov 17, 2025
@joshuabaird joshuabaird marked this pull request as ready for review November 17, 2025 23:18
marcofranssen
marcofranssen previously approved these changes Nov 18, 2025
Copy link
Collaborator

@marcofranssen marcofranssen left a comment

Choose a reason for hiding this comment

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

ClusterParsers and ClusterMultilineParsers are cluster-scoped resources
and should not be filtered by namespace. This bug was introduced in
commit 30cd0c3 (PR fluent#1708) where the code was refactored to use a
listNamespacedResources helper function that incorrectly added namespace
filtering for cluster-scoped resources.

This caused ClusterParsers referenced from namespace-scoped Filters to
not be generated in parsers.conf with their hash-suffixed names, leading
to fluent-bit pods crashlooping with 'requested parser not found' errors.

The fix:
1. Changes the function to use listClusterResources (which doesn't filter
   by namespace) for ClusterParsers and ClusterMultilineParsers.
2. Renames ListNamespacedResources to ListFluentBitConfigResources to
   better reflect that it lists both namespaced and cluster-scoped
   resources needed by a FluentBitConfig.

Note: The original code (pre-refactor) also had a bug where
ClusterMultilineParsers were incorrectly filtered by namespace.

Fixes fluent#1778

Signed-off-by: Josh Baird <[email protected]>
Signed-off-by: Josh Baird <[email protected]>
Copy link
Collaborator

@marcofranssen marcofranssen left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@marcofranssen marcofranssen merged commit 2811627 into fluent:master Nov 18, 2025
9 of 12 checks passed
sugaf1204 pushed a commit to sugaf1204/fluent-operator that referenced this pull request Dec 22, 2025
…ent#1778) (fluent#1779)

* Fix ClusterParser namespace filtering bug (fluent#1778)

ClusterParsers and ClusterMultilineParsers are cluster-scoped resources
and should not be filtered by namespace. This bug was introduced in
commit 30cd0c3 (PR fluent#1708) where the code was refactored to use a
listNamespacedResources helper function that incorrectly added namespace
filtering for cluster-scoped resources.

This caused ClusterParsers referenced from namespace-scoped Filters to
not be generated in parsers.conf with their hash-suffixed names, leading
to fluent-bit pods crashlooping with 'requested parser not found' errors.

The fix:
1. Changes the function to use listClusterResources (which doesn't filter
   by namespace) for ClusterParsers and ClusterMultilineParsers.
2. Renames ListNamespacedResources to ListFluentBitConfigResources to
   better reflect that it lists both namespaced and cluster-scoped
   resources needed by a FluentBitConfig.

Note: The original code (pre-refactor) also had a bug where
ClusterMultilineParsers were incorrectly filtered by namespace.

Fixes fluent#1778

Signed-off-by: Josh Baird <[email protected]>

* Fix linting errors.

Signed-off-by: Josh Baird <[email protected]>

---------

Signed-off-by: Josh Baird <[email protected]>
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.

bug: fluentbit ClusterParsers not propogated to namespaces in 3.5.0

2 participants