diff --git a/charts/demo/Chart.yaml b/charts/demo/Chart.yaml index 0d73bf8..e14dea4 100644 --- a/charts/demo/Chart.yaml +++ b/charts/demo/Chart.yaml @@ -29,22 +29,22 @@ kubeVersion: ">=1.18.0-0" dependencies: - name: fluent-bit version: 0.20.9 - repository: https://fluent.github.io/helm-charts - alias: fluent-bit + repository: file://../smarter-fluent-bit + alias: smarter-fluent-bit - name: smarter-gstreamer - version: 0.0.2 + version: 0.0.4 repository: https://smarter-project.github.io/gstreamer - name: smarter-pulseaudio - version: 0.0.2 + version: 0.0.3 repository: https://smarter-project.github.io/pulseaudio - name: smarter-image-detector - version: 0.0.2 + version: 0.0.4 repository: https://smarter-project.github.io/image-detector - name: smarter-audio-client - version: 0.0.2 + version: 0.0.4 repository: https://smarter-project.github.io/audio-client - name: smarter-inference - version: 0.0.2 + version: 0.0.4 repository: https://smarter-project.github.io/smarter-inference icon: https://gitlab.com/uploads/-/system/group/avatar/59012546/ARM1636_Project_Logo_ST2_RGB_V1.png sources: diff --git a/charts/demo/values.yaml b/charts/demo/values.yaml index f23ce69..25b47a0 100644 --- a/charts/demo/values.yaml +++ b/charts/demo/values.yaml @@ -5,7 +5,7 @@ global: domain: example.com -fluent-bit: +smarter-fluent-bit: fluentd: host: fluentbit port: 30224 diff --git a/charts/smarter-edge/Chart.yaml b/charts/smarter-edge/Chart.yaml index e9dbb60..e885ce2 100644 --- a/charts/smarter-edge/Chart.yaml +++ b/charts/smarter-edge/Chart.yaml @@ -29,10 +29,10 @@ kubeVersion: ">=1.18.0-0" dependencies: - name: smarter-cni - version: 0.0.2 + version: 0.0.3 repository: https://smarter-project.github.io/smarter-cni - name: smarter-dns - version: 0.0.2 + version: 0.0.4 repository: https://smarter-project.github.io/smarter-dns - name: smarter-device-manager version: 0.0.7 diff --git a/charts/smarter-fluent-bit/Chart.yaml b/charts/smarter-fluent-bit/Chart.yaml new file mode 100644 index 0000000..f7d622d --- /dev/null +++ b/charts/smarter-fluent-bit/Chart.yaml @@ -0,0 +1,31 @@ +annotations: + artifacthub.io/changes: | + - kind: changed + description: "Extended with hostname in daemonset" +apiVersion: v2 +name: smarter-fluent-bit +appVersion: 1.9.9 +description: Fast and lightweight log processor and forwarder or Linux, OSX and BSD + family operating systems. +home: https://fluentbit.io/ +icon: https://fluentbit.io/assets/img/logo1-default.png +keywords: +- logging +- fluent-bit +- fluentd +maintainers: +- email: eduardo@calyptia.com + name: edsiper +- email: naseem@transit.app + name: naseemkullah +- email: towmeykaw@gmail.com + name: Towmeykaw +- email: steve.hipwell@gmail.com + name: stevehipwell +name: fluent-bit +sources: +- https://github.com/fluent/fluent-bit/ +version: 0.20.9 +artifacthub.io/signKey: | + fingerprint: 71EDA4E3D652DC73EB09E3A5387D298C169CF24E + url: https://smarter-project.github.io/documentation/pgp_keys.asc \ No newline at end of file diff --git a/charts/smarter-fluent-bit/README.md b/charts/smarter-fluent-bit/README.md new file mode 100644 index 0000000..bf95f3c --- /dev/null +++ b/charts/smarter-fluent-bit/README.md @@ -0,0 +1,57 @@ +# Fluent Bit Helm chart + +[Fluent Bit](https://fluentbit.io) 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: + +```sh +helm repo add fluent https://fluent.github.io/helm-charts +``` + +To install a release named `fluent-bit`, run: + +```sh +helm install fluent-bit fluent/fluent-bit +``` + +## Chart values + +```sh +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.](https://docs.fluentbit.io/manual/pipeline/filters/lua) + +### How to use Lua scripts with this Chart + +First, you should add your Lua scripts to `luaScripts` in values.yaml, for example: + +```yaml +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](https://docs.fluentbit.io/manual/concepts/data-pipeline/filter) to `config.filters` in values.yaml, for example: + +```yaml +config: + filters: | + [FILTER] + Name lua + Match + 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/