-
Notifications
You must be signed in to change notification settings - Fork 309
Fix ClusterParser/ClusterMultilineParser namespace filtering bug (#1778) #1779
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f5a02d6 to
b79e9e4
Compare
marcofranssen
previously approved these changes
Nov 18, 2025
Collaborator
There was a problem hiding this 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]>
b79e9e4 to
60fd08e
Compare
marcofranssen
approved these changes
Nov 18, 2025
Collaborator
marcofranssen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Note: The original code (pre-refactor) also had a bug where ClusterMultilineParsers were incorrectly filtered by namespace.
Fixes #1778