KubeZero/charts/kubezero-logging/charts/fluent-bit
2022-08-24 17:13:39 +02:00
..
ci chore: fluent-bit,fluentd chart updates 2021-08-27 12:14:46 +02:00
dashboards chore: fluent-bit version bump to fix excessive logging 2021-04-07 12:00:53 +02:00
templates feat: first alpha release of v1.23.10 2022-08-24 17:13:39 +02:00
.helmignore Integrare fluent-bit into logging to allow better config 2020-12-08 07:05:25 -08:00
Chart.yaml feat: first alpha release of v1.23.10 2022-08-24 17:13:39 +02:00
README.md feat: version bump logging for 1.21 2022-01-28 17:20:03 +01:00
values.yaml feat: first alpha release of v1.23.10 2022-08-24 17:13:39 +02:00

Fluent Bit Helm chart

Fluent Bit is a fast and lightweight log processor and forwarder or Linux, OSX and BSD family operating systems.

Installation

To add the fluent helm repo, run:

helm repo add fluent https://fluent.github.io/helm-charts

To install a release named fluent-bit, run:

helm install fluent-bit fluent/fluent-bit

Chart values

helm show values fluent/fluent-bit

Using Lua scripts

Fluent Bit allows us to build filter to modify the incoming records using custom Lua scripts.

How to use Lua scripts with this Chart

First, you should add your Lua scripts to luaScripts in values.yaml, for example:

luaScripts:
 filter_example.lua: |
    function filter_name(tag, timestamp, record)
        -- put your lua code here.
    end    

After that, the Lua scripts will be ready to be used as filters. So next step is to add your Fluent bit filter to config.filters in values.yaml, for example:

config:
  filters: |
    [FILTER]
        Name    lua
        Match   <your-tag>
        script  /fluent-bit/scripts/filter_example.lua
        call    filter_name    

Under the hood, the chart will:

  • Create a configmap using luaScripts.
  • Add a volumeMounts for each Lua scripts using the path /fluent-bit/scripts/<script>.
  • Add the Lua script's configmap as volume to the pod.

Note

Remember to set the script attribute in the filter using /fluent-bit/scripts/, otherwise the file will not be found by fluent bit.