Commit e75355d
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]>1 parent e94ce95 commit e75355d
1 file changed
+6
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
| |||
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
| 329 | + | |
334 | 330 | | |
335 | 331 | | |
336 | 332 | | |
| |||
344 | 340 | | |
345 | 341 | | |
346 | 342 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 343 | + | |
354 | 344 | | |
355 | 345 | | |
356 | 346 | | |
| |||
0 commit comments