Skip to content

Commit

Permalink
Add fluent
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitoii11 committed Sep 1, 2024
1 parent c0f574d commit 673e0ef
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 0 deletions.
70 changes: 70 additions & 0 deletions mycluster/fluent/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: fluentbit
namespace: fluent
spec:
interval: 1h
chart:
spec:
# renovate: registryUrl=https://fluent.github.io/helm-charts
chart: fluentbit
version: v3.1.6
sourceRef:
kind: HelmRepository
name: fluentbit
namespace: flux-system
install:
createNamespace: true
targetNamespace: fluent
releaseName: fluent-bit
values:
kind: DaemonSet
rbac:
eventsAccess: true
flush: 1
metricsPort: 2020
logLevel: info
serviceMonitor:
enabled: true
dashboards:
enabled: true
config:
service: |
[SERVICE]
Daemon Off
Flush {{ .Values.flush }}
Log_Level {{ .Values.logLevel }}
Parsers_File /fluent-bit/etc/parsers.conf
Parsers_File /fluent-bit/etc/conf/custom_parsers.conf
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port {{ .Values.metricsPort }}
Health_Check On
inputs: |
[INPUT]
Name tail
Path /var/log/containers/*.log
multiline.parser docker, cri
Tag kube.*
Mem_Buf_Limit 5MB
Skip_Long_Lines On
[INPUT]
Name systemd
Tag host.*
Systemd_Filter _SYSTEMD_UNIT=kubelet.service
Read_From_Tail On
filters: |
[FILTER]
Name kubernetes
Match kube.*
Merge_Log On
Keep_Log Off
K8S-Logging.Parser On
K8S-Logging.Exclude On
outputs: |
[OUTPUT]
Name stdout
Match *
5 changes: 5 additions & 0 deletions mycluster/fluent/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- helm-release.yaml
4 changes: 4 additions & 0 deletions mycluster/fluent/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: fluent
9 changes: 9 additions & 0 deletions mycluster/flux-system/helm-repositories/fluentbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: fluentbit
namespace: flux-system
spec:
interval: 1h
url: https://fluent.github.io/helm-charts
1 change: 1 addition & 0 deletions mycluster/flux-system/helm-repositories/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace: flux-system
resources:
- aqua.yaml
- flagger.yaml
- fluentbit.yaml
- jetstack.yaml
- longhorn.yaml
- metallb.yaml
Expand Down
1 change: 1 addition & 0 deletions mycluster/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- adguard
- cert-manager
- flagger
- fluent
- flux-system
- metallb
- metrics-server
Expand Down

0 comments on commit 673e0ef

Please sign in to comment.