What would you like to be added:
After fluent-bit PR #12058 got merged, the fluent-bit engine can now validate plugin configurations for non-native C plugins (Go, WASM). To make use of this functionality, we need to make two changes:
This follows the approach discussed in this comment.
Why is this needed:
Currently, fluent-bit does not validate some configuration errors, e.g. a string provided where an integer is expected. Using the schema validation provides better guardrails and lets us validate the entire configuration in a single step instead of making ~300 calls to fluent-bit to check individual keys.
Related Issues & PRs:
Issues:
PRs:
What would you like to be added:
After fluent-bit PR #12058 got merged, the fluent-bit engine can now validate plugin configurations for non-native C plugins (Go, WASM). To make use of this functionality, we need to make two changes:
Contribute an upstream change to fluent-bit-go to extend FLBPluginRegister so it can accept a schema with the same structure as the flb_config_map used by native C plugins. The proxy can then assign this schema to
plugin->config_map, allowing the existing flb_config_map_properties_check mechanism to validate the plugin configuration.Update our fluent-bit plugin to leverage this new schema declaration and enable configuration validation for the plugin instead of the current approach, where we try to guess if a given key exist in the configuration.
This follows the approach discussed in this comment.
Why is this needed:
Currently, fluent-bit does not validate some configuration errors, e.g. a string provided where an integer is expected. Using the schema validation provides better guardrails and lets us validate the entire configuration in a single step instead of making ~300 calls to fluent-bit to check individual keys.
Related Issues & PRs:
Issues:
PRs: