-
Notifications
You must be signed in to change notification settings - Fork 251
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
feat: support yaml config file #1208
Conversation
@cw-Guo Thanks, that's great to have yaml config files |
@benjaminhuo The idea behind this implementation can be found in the origin issue# 1008 To support processor, a We might add a new CRD for processors in the furture. (In practice, any filter can be a processor, without errors but this usage is not documented in the offical documents.) A few LoadAsYaml functions haven't been implemented, I will try to implement them in the following few days. |
To run it, a new image for fluent-bit need to be built. |
// ConfigFileFormat defines the format of the config file, default is "classic", | ||
// available options are "classic" and "yaml" | ||
// +kubebuilder:validation:Enum:=classic;yaml | ||
ConfigFileFormat *string `json:"configFileFormat,omitempty"` |
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.
What would be the default configuration format?
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.
the default will be the classic mode.
I left a comment in the proposal about an edge case. And would like to see some test cases here if possible (unit tests at-least). |
i will add more tests. For custom plugin, i will also try to incooperate it but i am afraid it will be hard. |
Thoughts:
This is just my opinion, I'd let other maintainers pitch in as well on the PR. |
@adiforluls I can probably add one more field in the custom plugin to take in the unsupported plugins, just like the current processor implementation. |
@benjaminhuo @adiforluls @wanjunlei @wenchajun @Gentleelephant |
Sure, we'll review this. Thanks for the contribution. |
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.
Given it touches a lot of files like fluent-watcher binaries, I'd definitely want other reviewers to go through the change as well, but in terms of overall configuration and cases LGTM.
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
Signed-off-by: juicer <[email protected]>
I have some questions and suggestions.
Just some suggestions, not blocking this pr. |
Signed-off-by: juicer <[email protected]>
@wanjunlei ❤️ Thanks for the review and suggestions. I have fixed the import orders.
I am not too sure about how the namespace CRDs work. I didn't use it in my previous experience. But I did add support for: They are passed in to fluentbitconfig_controller.go. From my understanding, this will be enough but please correct me if i understand it wronly.
I agree that we don't want to maintain two sets of configuration files and I am also against splicing yaml files. But I also hasitate to make the (hard) decision for the users. Avoiding breaking changes is the start point of my design. I am afraid only supporting yaml config file format would possibly make some users abandon the project. If the community has decided to only support the yaml config file format, I am happy to see that a refractor for fluent-operator or a newer api version. |
OK, got it. The namespace CRD just needs to change the FIlter and Output. |
The old config file format might exist for some time for the yaml format to mature and catch up. |
Thanks @cw-Guo very much for such a big enhancement! I've invited you as fluent-operator maintainer. |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1008
Does this PR introduced a user-facing change?
Additional documentation, usage docs, etc.: