Parameters

The parent key for all of the following parameters is fluentbit.

namespace

type

string

default

syn-fluentbit

The namespace in which to deploy this component.

createNamespace

type

bool

default

true

Wether to create the configured namespace or not.

configMapName

type

string

default

${_instance}

The name of the generated ConfigMap.

config

type

dict

The configuration for fluent-bit itself. Any fluent-bit options can be provided verbatim under the available sections. Currently sections [SERVICE], [INPUT], [OUTPUT], [FILTER], [PARSER] and [MULTILINE_PARSER] are supported. The respective keys are service, inputs, outputs, filters, parsers and multiline_parsers.

Fluent-bit uses the strings 'On' and 'Off' for boolean configuration values. Make sure that you quote those strings to avoid them getting interpreted as booleans when the hierarchy YAML is parsed.

Repeatable fluent-bit options

Repeatable fluent-bit options can be configured by giving them as lists under the repeatable option’s key:

Repatable_Key:
 - Value1
 - Value2

Such options will be expanded to the following fluent-bit config snippet:

Repeatable_Key Value1
Repeatable_Key Value2

If only a single value needs to be configured for a repeatable option, the option can be given with a string value:

Repeatable_Key: Value1

The component doesn’t have any way to validate whether fluent-bit options are repeatable or not. Therefore, the component will treat any option with an array value as a repeatable option.

It’s the user’s responsibility to ensure that they only use array values for fluent-bit options which are repeatable.

config.service

type

dict

default

{'Flush': 1, 'Log_Level': 'info'}

Configure the fluent-bit service. See the upstream documentation for available configuration parameters.

Please note that 'HTTP_Server' shouldn’t be disabled, as otherwise the container readiness and liveness probes will fail, and the pods will go into CrashLoopBackOff.

The contents of this key will be reproduced verbatim (including capitalization of keys and values) in the fluent-bit configuration file in section [SERVICE].

The contents of Parsers_File in this key will be deduplicated, preserving the order of entries in the key. Additionally, the component will ensure that parsers.conf is always configured as the first Parsers_File. The component will always add parsers defined in config.parsers as the last Parsers_File entry.

config.inputs

type

dict

default

{'containers': {'Name': 'tail', 'Path': '/var/log/containers/*.log', 'Parser': 'docker', 'Tag': 'kube.*', 'Mem_Buf_Limit': '5MB', 'Skip_Long_lines': 'On'}, 'systemd': {'Tag': 'host.*', 'Systemd_Filter': '_SYSTEMD_UNIT=kubelet.service', 'Read_From_Tail': 'On'}}

Configure fluent-bit inputs. config.inputs should have one key per [INPUT] section that should be added to the fluent-bit configuration file.

Each key of config.inputs should contain a dict holding the configuration values for the section which will be reproduced verbatim (including capitalization of keys and values). If the dict for a section doesn’t have a key Name, the key for the section will be used as the plugin name for the section. This allows avoiding repetition, when it’s unnecessary, while still supporting having multiple inputs using the same plugin.

config.filters

type

dict

default

{'00_kubernetes:'{'Name': 'kubernetes', 'Match': 'kube.*', 'Merge_Log': 'On', 'Keep_Log': 'On', 'K8S-Logging.Parser': 'On', 'K8S-Logging.Exclude': 'On'}}

Configure fluent-bit filters. config.filters should have one key per [FILTER] section that should be added to the fluent-bit configuration file.

Each key of config.filters should contain a dict holding the configuration values for the section which will be reproduced verbatim (including capitalization of keys and values). If the dict for a section doesn’t have a key Name, the key for the section will be used as the plugin name for the section. This allows avoiding repetition, when it’s unnecessary, while still supporting having multiple filters using the same plugin.

Please note that filter order matters to fluent-bit. The component will always output filters sorted by their keys.

This behavior can be used to define sort order by prefixing keys in filters with a number (for example 00_kubernetes would come before 10_modify). When prefixing keys like this, the Name field must be provided, as fluent-bit won’t know which filter plugin to use otherwise.

config.parsers

type

dict

default

{}

Configure fluent-bit parsers. The component doesn’t configure any custom parsers. However, fluent-bit already provides a multitude of parsers in the docker image.

The component will always add line Parsers_File parsers.conf in the main fluent-bit config to make the default parsers available. The parsers provided by that file be inspected in the docs.

config.parsers should have one key per [PARSER] section that will be rendered into the fluent-bit ConfigMap in custom_parsers.conf. If config.parsers contains at least one entry, the component will add line Parsers_File custom_parsers.conf to the main fluent-bit config file. Each key of config.parsers should contain a dict holding the configuration values for the section which will be reproduced verbatim (including capitalization of keys and values).

If the dict for a section doesn’t have a key Name, the key for the section will be used as the plugin name for the section. This allows avoiding repetition, when it’s unnecessary, while still supporting having multiple parsers using the same plugin.

config.multiline_parsers

type

dict

default

{}

Configure fluent-bit multiline parsers. The component doesn’t configure any custom multiline parsers.

config.multiline_parsers should have one key per [MULTILINE_PARSER] section that will be rendered into the fluent-bit ConfigMap in custom_parsers.conf. If config.multiline_parsers contains at least one entry, the component will add line Parsers_File custom_parsers.conf to the main fluent-bit config file. Each key of config.multiline_parsers should contain a dict holding the configuration values for the section which will be reproduced verbatim (including capitalization of keys and values).

If the dict for a section doesn’t have a key Name, the key for the section will be used as the plugin name for the section. This allows avoiding repetition, when it’s unnecessary, while still supporting having multiple multiline parsers using the same plugin.

config.outputs

type

dict

default

{}

Configure fluent-bit outputs. The component defaults don’t provide any outputs, as the component can’t know where logs should be sent.

config.outputs should have one key per [OUTPUT] section that should be added to the fluent-bit configuration file. Each key of config.outputs should contain a dict holding the configuration values for the section which will be reproduced verbatim (including capitalization of keys and values). If the dict for a section doesn’t have a key Name, the key for the section will be used as the plugin name for the section. This allows avoiding repetition, when it’s unnecessary, while still supporting having multiple outputs using the same plugin.

secretName

type

string

default

${_instance}

The name of the generated secret.

secret

type

dict

default

{}

Create a custom secret which containes the key-value pairs defined in this dict.

annotations

type

dict

default

{'fluentbit.io/exclude': 'true'}

Annotations for the fluent-bit pods.

By default annotation fluentbit.io/exclude: 'true' is set. This annotation ensures that fluent-bit doesn’t process its own logs. This allows increasing the fluent-bit log level without having to worry about creating an exponential amount of logs, which could happen otherwise, as higher log levels will reproduce each processed message to stdout.

psp_enabled

type

bool

default

false

Provides a PodSecurityPolicy for the fluent-bit pods, if enabled.

monitoring.enabled

type

bool

default

false

Configures a ServiceMonitor for fluent-bit, if enabled.

monitoring.metricsPort

type

int

default

2020

Configures the port on which fluent-bit exposes its metrics.

This value is also injected into the fluent-bit configuration file in section [SERVICE] as the value for key HTTP_Port, unless HTTP_Port is explicitly set in config.service.

tolerations

type

list

default

[]

Tolerations that are configured on the fluent-bit pods.

extraVolumes

type

list of Volume

default

[syn-config]

Additional volumes that are configured on the fluent-bit pods.

extraVolumeMounts

type

list of VolumeMount

default

[syn-config]

Additional volume mounts that are configured on the fluent-bit pods.

charts.fluent-bit.version

type

string

default

See class/defaults.yml

The version of the fluent-bit Helm chart that’s used.

images.fluent_bit.image

type

string

default

docker.io/fluent/fluent-bit

images.fluent_bit.tag

type

string

default

1.7.2

helm_values

type

dict

default

see defaults.yml

All helm_values are passed to the helm chart. This allows to configure all fluentbit helm chart values.

Note that it’s your own liability to make sure you don’t break stuff by overwriting values here!

Example

# configure log-forwarding to Graylog over GELF/TCP
# The key `gelf` in `outputs` is used as the plugin name in the resulting
# configuration, since the `Name` field was omitted under key `gelf`.
config:
  outputs:
    gelf:
      Match: kube.*
      Host: graylog.example.com
      Port: 12201
      Mode: tcp
      Gelf_Host_Key: stream
      Gelf_Short_Message_Key: log
# Add field to log messages.
#
# This example showcases specifying the plugin to use by setting 'Name'.
# When 'Name' is given, the key in `filters` is ignored.
config:
  filters:
    add_cluster_name:
      Name: modify
      Match: '*'
      Add: "syn_cluster_name ${cluster:name}"
# Configure repeatable options.
#
# This example configures the `systemd` input plugin to pick up logs from
# both the kubelet and docker units.
config:
  inputs:
    systemd:
      Name: systemd
      Tag: host.*
      Systemd_Filter:
        - _SYSTEMD_UNIT=kubelet.service
        - _SYSTEMD_UNIT=docker.service
      Read_From_Tail: 'On'