Skip to content

Commit cd92b83

Browse files
alexandref75ericvh
andauthored
Demo fixes (#10)
* Demo updates * Add clone of fluent-bit chart with hostname change We need hostname in the daemonset tempalte, so we have to clone the entire fluent-bit helm chart to add one line. Signed-off-by: Alexandre Peixoto Ferreira <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]> Co-authored-by: Eric Van Hensbergen <[email protected]>
1 parent aaf5e6e commit cd92b83

30 files changed

+2649
-10
lines changed

charts/demo/Chart.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ kubeVersion: ">=1.18.0-0"
2929
dependencies:
3030
- name: fluent-bit
3131
version: 0.20.9
32-
repository: https://fluent.github.io/helm-charts
33-
alias: fluent-bit
32+
repository: file://../smarter-fluent-bit
33+
alias: smarter-fluent-bit
3434
- name: smarter-gstreamer
35-
version: 0.0.2
35+
version: 0.0.4
3636
repository: https://smarter-project.github.io/gstreamer
3737
- name: smarter-pulseaudio
38-
version: 0.0.2
38+
version: 0.0.3
3939
repository: https://smarter-project.github.io/pulseaudio
4040
- name: smarter-image-detector
41-
version: 0.0.2
41+
version: 0.0.4
4242
repository: https://smarter-project.github.io/image-detector
4343
- name: smarter-audio-client
44-
version: 0.0.2
44+
version: 0.0.4
4545
repository: https://smarter-project.github.io/audio-client
4646
- name: smarter-inference
47-
version: 0.0.2
47+
version: 0.0.4
4848
repository: https://smarter-project.github.io/smarter-inference
4949
icon: https://gitlab.com/uploads/-/system/group/avatar/59012546/ARM1636_Project_Logo_ST2_RGB_V1.png
5050
sources:

charts/demo/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
global:
66
domain: example.com
77

8-
fluent-bit:
8+
smarter-fluent-bit:
99
fluentd:
1010
host: fluentbit
1111
port: 30224

charts/smarter-edge/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ kubeVersion: ">=1.18.0-0"
2929

3030
dependencies:
3131
- name: smarter-cni
32-
version: 0.0.2
32+
version: 0.0.3
3333
repository: https://smarter-project.github.io/smarter-cni
3434
- name: smarter-dns
35-
version: 0.0.2
35+
version: 0.0.4
3636
repository: https://smarter-project.github.io/smarter-dns
3737
- name: smarter-device-manager
3838
version: 0.0.7
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
annotations:
2+
artifacthub.io/changes: |
3+
- kind: changed
4+
description: "Extended with hostname in daemonset"
5+
apiVersion: v2
6+
name: smarter-fluent-bit
7+
appVersion: 1.9.9
8+
description: Fast and lightweight log processor and forwarder or Linux, OSX and BSD
9+
family operating systems.
10+
home: https://fluentbit.io/
11+
icon: https://fluentbit.io/assets/img/logo1-default.png
12+
keywords:
13+
- logging
14+
- fluent-bit
15+
- fluentd
16+
maintainers:
17+
18+
name: edsiper
19+
20+
name: naseemkullah
21+
22+
name: Towmeykaw
23+
24+
name: stevehipwell
25+
name: fluent-bit
26+
sources:
27+
- https://github.com/fluent/fluent-bit/
28+
version: 0.20.9
29+
artifacthub.io/signKey: |
30+
fingerprint: 71EDA4E3D652DC73EB09E3A5387D298C169CF24E
31+
url: https://smarter-project.github.io/documentation/pgp_keys.asc
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Fluent Bit Helm chart
2+
3+
[Fluent Bit](https://fluentbit.io) is a fast and lightweight log processor and forwarder or Linux, OSX and BSD family operating systems.
4+
5+
## Installation
6+
7+
To add the `fluent` helm repo, run:
8+
9+
```sh
10+
helm repo add fluent https://fluent.github.io/helm-charts
11+
```
12+
13+
To install a release named `fluent-bit`, run:
14+
15+
```sh
16+
helm install fluent-bit fluent/fluent-bit
17+
```
18+
19+
## Chart values
20+
21+
```sh
22+
helm show values fluent/fluent-bit
23+
```
24+
25+
## Using Lua scripts
26+
Fluent Bit allows us to build filter to modify the incoming records using custom [Lua scripts.](https://docs.fluentbit.io/manual/pipeline/filters/lua)
27+
28+
### How to use Lua scripts with this Chart
29+
30+
First, you should add your Lua scripts to `luaScripts` in values.yaml, for example:
31+
32+
```yaml
33+
luaScripts:
34+
filter_example.lua: |
35+
function filter_name(tag, timestamp, record)
36+
-- put your lua code here.
37+
end
38+
```
39+
40+
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:
41+
42+
```yaml
43+
config:
44+
filters: |
45+
[FILTER]
46+
Name lua
47+
Match <your-tag>
48+
script /fluent-bit/scripts/filter_example.lua
49+
call filter_name
50+
```
51+
Under the hood, the chart will:
52+
- Create a configmap using `luaScripts`.
53+
- Add a volumeMounts for each Lua scripts using the path `/fluent-bit/scripts/<script>`.
54+
- Add the Lua script's configmap as volume to the pod.
55+
56+
### Note
57+
Remember to set the `script` attribute in the filter using `/fluent-bit/scripts/`, otherwise the file will not be found by fluent bit.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
logLevel: debug

0 commit comments

Comments
 (0)