fluent / fluent/fluent-operator

bug: fluentbit.io/parser annotation not working properly

Open
#1,370 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
682
Forks
328
Avg merge
2d 23h
Merged PRs (30d)
13

Description

### Describe the issue

We have a fluent-operator installed on the cluster in the `fluent` namespace, with namespace-provided configuration (filters, parsers, and output).

We have been using the `kubernetes` filter with the `k8sLoggingParser: true` option set in the `default` namespace, so we can specify a custom parser on the resource level, in the pod annotation, as described [here](https://docs.fluentbit.io/manual/pipeline/filters/kubernetes#annotation-examples-in-pod-definition).

We configured and applied the custom parsers with the namespaced `Parser` CRD on the `default` namespace.

When specifying the annotation on the pod level, the `log` field (which was not parsed via Kubernetes filter), doesn't get parsed by the parser specified via annotation. I've also tried using the parser name and the parser name with hashed namespaced suffix in the end. Both of those options didn't work.

For comparisson, I've also enabled the `k8sLoggingExclude` option, and the exclusion annotation. This seems to work as expected.

### To Reproduce

Create a namespaced `Parser` and add an annotation on the pod level that specifies that parser.

### Expected behavior

Log field is properly parsed via the custom parser specified in the annotation.

### Your Environment

```markdown
- Fluent Operator version: 3.2.0
```

### How did you install fluent operator?

Via helm.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.