Skip to content

Commit

Permalink
feat: custom tail because of non multiline mode in operator templates
Browse files Browse the repository at this point in the history
  • Loading branch information
web-mi committed Jul 19, 2023
1 parent 54eede5 commit a3b310a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
annotations: {{ .Values.filter.kubernetescustom.kubernetes.annotations }}
mergeLog: true
mergeLogTrim: true
bufferSize: "1M"
bufferSize: "3M"
useKubelet: false
- nest:
addPrefix: kubernetes_
Expand Down
25 changes: 25 additions & 0 deletions charts/fluentbit/templates/fluentbit-clusterinput-custom-tail.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if .Values.input.customtail.enable -}}
apiVersion: fluentbit.fluent.io/v1alpha2
kind: ClusterInput
metadata:
name: customtail
labels:
fluentbit.fluent.io/enabled: "true"
fluentbit.fluent.io/component: logging
spec:
tail:
tag: kube.*
bufferMaxSize: {{ .Values.input.customtail.bufferMaxSize }}
{{- if and .Values.input.customtail.multilineParser }}
multilineParser: {{ .Values.input.customtail.multilineParser }}
{{- else }}
parser: {{ .Values.input.customtail.parser }}
{{- end }}
path: {{ .Values.input.customtail.path }}
readFromHead: {{ .Values.input.customtail.readFromHead }}
refreshIntervalSeconds: {{ .Values.input.customtail.refreshIntervalSeconds }}
memBufLimit: {{ .Values.input.customtail.memBufLimit }}
skipLongLines: {{ .Values.input.customtail.skipLongLines }}
db: {{ .Values.input.customtail.db }}
dbSync: {{ .Values.input.customtail.dbSync }}
{{- end }}
12 changes: 12 additions & 0 deletions charts/fluentbit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ ingress:
input:
http:
enable: false
customtail:
tag: kube.*
bufferMaxSize: 3M
path: /var/log/containers/*.log
readFromHead: false
multilineParser: docker, cri
parser: cri
refreshIntervalSeconds: 10
memBufLimit: 3MB
skipLongLines: true
db: /fluent-bit/tail/pos.db
dbSync: Normal
output:
opensearch: {}
httpopensearch:
Expand Down

0 comments on commit a3b310a

Please sign in to comment.