-
Notifications
You must be signed in to change notification settings - Fork 312
Description
Describe the issue
After updating from 3.4.0 to 3.5.0, I am no longer able to use ClusterParsers in namespaced Filter resources. i.e. when using a ClusterParser iso-time-field-parser from a Filter, the config is written to use iso-time-field-parser-f62fee1b43f48bd0c1bf9b7d5b22f270 but this parser isn't generated into parsers.conf (it did in 3.4.0). This causes the pods in the fluentbit daemonset to crashloop as they can't find this parser.
To Reproduce
Create a CustomParser and try and use it from a Filter resource.
apiVersion: fluentbit.fluent.io/v1alpha2
kind: ClusterParser
metadata:
name: iso-time-field-parser
labels:
fluentbit.fluent.io/enabled: "true"
fluentbit.fluent.io/mode: "k8s"
spec:
regex:
regex: /^(?<ts>.+)$/
timeKey: ts
timeFormat: "%Y-%m-%dT%H:%M:%S.%L%z"
---
apiVersion: fluentbit.fluent.io/v1alpha2
kind: Filter
metadata:
name: test-log-filter
namespace: test
labels:
fluentbit.fluent.io/enabled: "true"
fluentbit.fluent.io/mode: "k8s"
spec:
match: kube.*.test.*
filters:
- parser:
keyName: ts
reserveData: true
parser: iso-time-field-parser
The parsers.conf file only contains the non-namespaced version of the parser:
[PARSER]
Name iso-time-field-parser
Format regex
Regex /^(?<ts>.+)$/
Time_Key ts
Time_Format %Y-%m-%dT%H:%M:%S.%L%z
And the pods of the fluentbit daemonset crashloop:
[error] [filter:parser:parser.17] requested parser 'iso-time-field-parser-b2501c522c6779cd34b49614b9414d4a' not found
[error] [filter:parser:parser.17] Invalid 'parser'
[error] Failed initialize filter parser.17
[error] [engine] filter initialization failed
Expected behavior
parsers.conf contains a copy of the ClusterParser for each namespace.
e.g.
[PARSER]
Name iso-time-field-parser
Format regex
Regex /^(?<ts>.+)$/
Time_Key ts
Time_Format %Y-%m-%dT%H:%M:%S.%L%z
...
[PARSER]
Name iso-time-field-parser-f62fee1b43f48bd0c1bf9b7d5b22f270
Format regex
Regex /^(?<ts>.+)$/
Time_Key ts
Time_Format %Y-%m-%dT%H:%M:%S.%L%z
Your Environment
- Fluent Operator version: v3.5.0
- Container Runtime: EKS 1.32.9
- Operating system: Bottlerocket 1.44.0
- Kernel version:How did you install fluent operator?
kustomize + https://github.com/fluent/fluent-operator/releases/download/v3.5.0/setup.yaml
Additional context
No response