Skip to content

Commit b8717e0

Browse files
committed
chore(fluent): remove bitnami chart usage and exclude some messages
1 parent 930ddc5 commit b8717e0

File tree

5 files changed

+29
-22
lines changed

5 files changed

+29
-22
lines changed

docs/max_map_count.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@ sudo sysctl -w vm.max_map_count=262144
77
# edit /etc/sysctl.conf to make it permanent
88
```
99

10+
## New requirments?
11+
12+
> https://kaapana.readthedocs.io/en/latest/faq/too_many_files_open.html
13+
14+
```bash
15+
sudo sysctl -w fs.inotify.max_user_watches=10000
16+
sudo sysctl -w fs.inotify.max_user_instances=10000
17+
```

fluent/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ bash k8s-install.sh
3939

4040
## Ressources
4141

42+
* [github.com - fluent/helm-charts - Fluent Helm Charts](https://github.com/fluent/helm-charts#readme)
4243
* [logz.io - Fluentd vs. Fluent Bit: Side by Side Comparison](https://logz.io/blog/fluentd-vs-fluent-bit/)
4344
* See also [Loki](../loki/README.md)

fluent/helm/fluent-bit/values.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# https://github.com/fluent/helm-charts/blob/main/charts/fluent-bit/values.yaml
22

3+
image:
4+
tag: 4.0.8-debug
5+
36
daemonset:
47
enabled: true
58

@@ -17,6 +20,7 @@ extraVolumeMounts:
1720
readOnly: true
1821

1922
config:
23+
2024
## https://docs.fluentbit.io/manual/pipeline/inputs
2125
inputs: |
2226
[INPUT]
@@ -32,9 +36,13 @@ config:
3236
Systemd_Filter _SYSTEMD_UNIT=kubelet.service
3337
Systemd_Filter _SYSTEMD_UNIT=containerd.service
3438
35-
3639
## https://docs.fluentbit.io/manual/pipeline/filters
3740
filters: |
41+
[FILTER]
42+
Name grep
43+
Match systemd.*
44+
Exclude MESSAGE /.*TaskExit event in podsandbox handler container_id.*/
45+
Exclude MESSAGE /.*container event discarded.*/
3846
[FILTER]
3947
Name kubernetes
4048
Match kube.*
@@ -43,6 +51,10 @@ config:
4351
Kube_Tag_Prefix kube.var.log.containers.
4452
K8S-Logging.Parser On
4553
K8S-Logging.Exclude On
54+
[FILTER]
55+
Name grep
56+
Match kube.*
57+
Exclude $kubernetes['namespace_name'] kubernetes-dashboard
4658
[FILTER]
4759
Name nest
4860
Match kube.*

fluent/k8s-install.sh

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,15 @@ fi
1919
# Create namespace fluent if not exists
2020
kubectl create namespace fluent --dry-run=client -o yaml | kubectl apply -f -
2121

22-
# Deploy fluent-bit with helm
23-
helm -n fluent upgrade --install fluent-bit oci://registry-1.docker.io/bitnamicharts/fluent-bit \
24-
-f ${SCRIPT_DIR}/helm/fluent-bit/values.yaml
22+
# Add fluent repo
23+
helm repo add fluent https://fluent.github.io/helm-charts
2524

26-
# Allow fluent-bit sa to retreive infos about containers
27-
cat <<EOF | kubectl apply -f -
28-
apiVersion: rbac.authorization.k8s.io/v1
29-
kind: ClusterRoleBinding
30-
metadata:
31-
name: fluent-bit-read
32-
subjects:
33-
- kind: ServiceAccount
34-
name: fluent-bit
35-
namespace: fluent
36-
roleRef:
37-
kind: ClusterRole
38-
name: view
39-
apiGroup: rbac.authorization.k8s.io
40-
EOF
25+
# Update repos
26+
helm repo update
4127

28+
# Deploy fluent-bit with helm
29+
helm -n fluent upgrade --install fluent-bit fluent/fluent-bit \
30+
-f ${SCRIPT_DIR}/helm/fluent-bit/values.yaml
4231

4332

4433

fluent/k8s-uninstall.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22

33
# Uninstall fluent-bit with helm
44
helm -n fluent uninstall fluent-bit
5-
6-
# Remove clusterrolebinding
7-
kubectl delete clusterrolebinding fluent-bit-read

0 commit comments

Comments
 (0)