YAML 2.0
#6029
Replies: 1 comment 9 replies
-
In the "Preserve the order of includes" section, what prevents you from doing: pipeline:
- include: "settings.conf"
inputs:
- name: dummy:
rate: 5
filters:
- name: record_modifier:
record:
- powered_by calyptia
- version 0.0.1 One array item with all those properties? |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
YAML format proposal for Fluent-bit 2.0
In the interest of stream-lining the current YAML support to make it more
consistent as well as to make sure it supports the entire current feature
set of the current INI based configuration file format I propose the
following changes:
so that they are an array of maps with a name key for the plugin type.
'record' for record_modifier.
can be processed in such a way to make it possible to replicate the
behaviour of >=1.9.
Unnest plugin configuration map
At the moment the configuration for pipelines uses a map with the properties
input, filter and output. These maps then contain an array of maps with
a single key which acts as the plugin name which is a map of properties, ie:
To more closely fit in line with the expectations of most users the format
should use an array of properties, where the name property defines the plugin
type, f.e. :
This would also simplify the parsing of the YAML configuration file format.
Allow defining properties as arrays
While this might require a bit more work, to properly support some plugins
it is necessary to be able to define the values of some properties as arrays.
The INI-based format simply defined a property multiple times to achieve this.
To do so in YAML we can simply define the value as an array.
This will increase the complexity of the parser in fluent-bit, unfortunately.
An example:
The parser can easily identify when it is either a single scalar value or an
array and act accordingly by also inferring the correct behaviour using the
plugin's config map. This will become more complicated if the first
proposal is accepted and the name is processed after any other properties...
One way around this is would be to save all the property values and process
them at the end of the section.
Preserve the order of includes
*** This feature has not been approved. If anyone can give examples documentation could be prepared to help users who wish to migrate. ***
With the manner in which the actual pipeline is defined it is impossible
to reproduce the ordering of filters, which are based on load order, at
least if a pipeline is defined inside the main configuration file.
Resolving this problem is much more difficult, and in fact may simply be
(decided to be) to dificult to attempt to solve. With the legacy of issues
that have arisen due to this at least it should be addressed in some form.
One way of solving this would be to change the pipeline into an array so
it could include interspersed declarations of:
Example
This sort of structure would reinforce the idea of load time ordering for
filters.
As it stands it would be falling into the type of being similar
to the past structure used for the definition of each plugin where it
basically used a single key map to define a plugin.... Not good...
But at the very least it does resemble the syntax that tasks use
for ansible. Which could be a bad thing... Docker-compose does
no such nesting for declaring services in its format.
Examples for each config_map type:
Here is an example, interleaved with comments, showing how to represent each of the config_map types:
References:
Beta Was this translation helpful? Give feedback.
All reactions