diff --git a/stable/fluent-bit/Chart.yaml b/stable/fluent-bit/Chart.yaml index 94cb1e238c90..9b3ccd840b48 100755 --- a/stable/fluent-bit/Chart.yaml +++ b/stable/fluent-bit/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: fluent-bit -version: 2.4.3 +version: 2.5.0 appVersion: 1.2.1 description: Fast and Lightweight Log/Data Forwarder for Linux, BSD and OSX keywords: diff --git a/stable/fluent-bit/README.md b/stable/fluent-bit/README.md index 2023878e585b..fff81b40bfcf 100644 --- a/stable/fluent-bit/README.md +++ b/stable/fluent-bit/README.md @@ -72,7 +72,7 @@ The following table lists the configurable parameters of the Fluent-Bit chart an | `backend.splunk.tls_debug` | Set TLS debug verbosity level. It accept the following values: 0-4 | `1` | | `backend.splunk.message_key` | Tag applied to all incoming logs | `kubernetes` | | **Parsers** | -| `parsers.enabled` | Enable custom parsers | `false` | +| `parsers.enabled` | Enable custom parsers (needs to be set for all parsers) | `false` | | `parsers.regex` | List of regex parsers | `NULL` | | `parsers.json` | List of json parsers | `NULL` | | `parsers.logfmt` | List of logfmt parsers | `NULL` | @@ -99,6 +99,8 @@ The following table lists the configurable parameters of the Fluent-Bit chart an | `filter.kubeTagPrefix` | Optional tag prefix used by Tail | `kube.var.log.containers.` | | `filter.mergeJSONLog` | If the log field content is a JSON string map, append the map fields as part of the log structure | `true` | | `filter.mergeLogKey` | If set, append the processed log keys under a new root key specified by this variable. | `nil` | +| `filter.lua.enabled` | Enable the use of [lua](https://docs.fluentbit.io/manual/filter/lua) filters | `false` | +| `filter.lua.raw` | Provide your Lua file; the file is mounted as `extra.lua` | `` | | | `image.fluent_bit.repository` | Image | `fluent/fluent-bit` | | `image.fluent_bit.tag` | Image tag | `1.2.1` | | `image.pullPolicy` | Image pull policy | `Always` | diff --git a/stable/fluent-bit/templates/config.yaml b/stable/fluent-bit/templates/config.yaml index 518fd46d079b..7165135abc43 100644 --- a/stable/fluent-bit/templates/config.yaml +++ b/stable/fluent-bit/templates/config.yaml @@ -14,7 +14,6 @@ data: Flush {{ .Values.service.flush }} Daemon Off Log_Level {{ .Values.service.logLevel }} - Parsers_File parsers.conf {{- if .Values.parsers.enabled }} Parsers_File parsers_custom.conf {{- end }} @@ -212,4 +211,7 @@ data: {{ end }} {{- end }} + extra.lua: |- +{{ .Values.filter.lua.raw | indent 4 }} + {{- end -}} diff --git a/stable/fluent-bit/templates/daemonset.yaml b/stable/fluent-bit/templates/daemonset.yaml index 7d8e5433185d..6a2302372666 100644 --- a/stable/fluent-bit/templates/daemonset.yaml +++ b/stable/fluent-bit/templates/daemonset.yaml @@ -91,7 +91,11 @@ spec: - name: config mountPath: /fluent-bit/etc/fluent-bit-output.conf subPath: fluent-bit-output.conf - +{{- if .Values.filter.lua.enabled }} + - name: config + mountPath: /fluent-bit/etc/extra.lua + subPath: extra.lua +{{- end }} {{- if .Values.parsers.enabled }} - name: config mountPath: /fluent-bit/etc/parsers_custom.conf diff --git a/stable/fluent-bit/values.yaml b/stable/fluent-bit/values.yaml index cd8c7d335a65..044564068352 100644 --- a/stable/fluent-bit/values.yaml +++ b/stable/fluent-bit/values.yaml @@ -254,6 +254,23 @@ filter: # fluentbit.io/exclude: true. If present, discard logs from that pod. enableExclude: true +# if true, enable support for Lua filters in final `extra.lua` file +# see documentation at https://docs.fluentbit.io/manual/filter/lua + lua: + enabled: false + raw: |- + ## example callback + # function cb_print(tag, timestamp, record) + # return code, timestamp, record + # end + ## Usage: + # [FILTER] + # Name lua + # Match * + # script extra.lua + # call cb_print + + rbac: # Specifies whether RBAC resources should be created create: true