feat: add raw format and rawLogKey support for Fluent Bit Kafka#2000
feat: add raw format and rawLogKey support for Fluent Bit Kafka#2000Vaibhav-C-S wants to merge 11 commits into
Conversation
Signed-off-by: Vaibhav-C-S <vaibhavsharma.c@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR extends Fluent Operator’s Fluent Bit Kafka output plugin surface area to support Fluent Bit’s raw output mode, enabling users to send a selected record field as the Kafka message payload via Raw_Log_Key.
Changes:
- Add
rawLogKeyto the Kafka output plugin API and render it asRaw_Log_Keyin generated Fluent Bit config. - Document
format: rawandrawLogKeyin the Kafka output plugin docs. - Regenerate CRDs and bundled manifests/Helm CRDs to include the new field and updated format description.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| manifests/setup/setup.yaml | Regenerated install manifest to include raw in format description and add rawLogKey schema/docs. |
| docs/plugins/fluentbit/output/kafka.md | Document format: raw and rawLogKey in the Kafka output plugin doc table. |
| config/crd/bases/fluentbit.fluent.io_outputs.yaml | Regenerated CRD base for Output to include rawLogKey and updated format description. |
| config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml | Regenerated CRD base for ClusterOutput to include rawLogKey and updated format description. |
| charts/fluent-operator/crds/fluentbit.fluent.io_outputs.yaml | Regenerated Helm CRD for Output with rawLogKey and updated format description. |
| charts/fluent-operator/crds/fluentbit.fluent.io_clusteroutputs.yaml | Regenerated Helm CRD for ClusterOutput with rawLogKey and updated format description. |
| charts/fluent-operator-fluent-bit-crds/templates/fluentbit.fluent.io_outputs.yaml | Regenerated Fluent Bit CRD chart template for Output with rawLogKey and updated format description. |
| charts/fluent-operator-fluent-bit-crds/templates/fluentbit.fluent.io_clusteroutputs.yaml | Regenerated Fluent Bit CRD chart template for ClusterOutput with rawLogKey and updated format description. |
| apis/fluentbit/v1alpha2/plugins/output/kafka_types.go | Add RawLogKey to the Kafka output API and emit Raw_Log_Key in Params. |
Signed-off-by: Vaibhav-C-S <vaibhavsharma.c@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Vaibhav Cheruvu <123824888+Vaibhav-C-S@users.noreply.github.com>
Signed-off-by: Vaibhav-C-S <vaibhavsharma.c@gmail.com>
Signed-off-by: Vaibhav-C-S <vaibhavsharma.c@gmail.com>
|
hi @joshuabaird , can you please review this pr in your free time. |
|
@Vaibhav-C-S Hi! Thanks for the PR. Could you please review Copilot's comments? |
|
yes @joshuabaird , addressing |
Signed-off-by: Vaibhav-C-S <vaibhavsharma.c@gmail.com>
Signed-off-by: Vaibhav-C-S <vaibhavsharma.c@gmail.com>
e865777 to
8b7d2c9
Compare
|
Hi @joshuabaird , i have addressed all the review comments from co-pilot, can you check in your free time? |
|
Thanks for the iterations here — the One concern before this merges: the new
The Copilot suggestion that prompted the enum assumed json/msgpack/raw were the complete set, which isn't the case. Recommendation: drop the enum and keep |
Signed-off-by: Vaibhav-C-S <vaibhavsharma.c@gmail.com>
|
@joshuabaird Thanks for the catch, I do agree adding enum validation would be a breaking change. Made the code required. Thank you. |
What this PR does / why we need it:
Adds support for Fluent Bit Kafka raw output mode in fluent-operator.
Fluent Bit's Kafka output supports
Format rawtogether withRaw_Log_Key, where the value of the configured record key is sent as the Kafka message payload. However, fluent-operator's Kafka output spec did not exposerawLogKey, and the documentedformatoptions did not includeraw.This PR adds support for:
kafka.format: rawkafka.rawLogKeyWhich issue(s) this PR fixes:
Fixes #1878
Does this PR introduced a user-facing change?
Additional documentation, usage docs, etc.:
Testing
Testing
Message received at kafka consumer:
Input
Message received at kafka consumer