From f906bcaa2853cab52b6953b6ebef9d61e50d045d Mon Sep 17 00:00:00 2001 From: adiforluls Date: Sun, 21 May 2023 13:49:54 +0530 Subject: [PATCH] add some fluentbit helm opts Signed-off-by: adiforluls --- .../templates/fluentbit-clusterinput-tail.yaml | 1 + charts/fluent-operator/templates/fluentbit-fluentBit.yaml | 4 ++++ charts/fluent-operator/values.yaml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml b/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml index 2b1490cc1..d2c36e323 100644 --- a/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml +++ b/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml @@ -12,6 +12,7 @@ spec: tail: tag: kube.* path: {{ .Values.fluentbit.input.tail.path }} + readFromHead: {{ .Values.fluentbit.input.tail.readFromHead }} {{- if eq .Values.containerRuntime "docker" }} parser: docker {{- else if eq .Values.containerRuntime "containerd" }} diff --git a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml index aa6807c65..b538a90a0 100644 --- a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml +++ b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml @@ -18,6 +18,10 @@ spec: resources: {{- toYaml .Values.fluentbit.resources | nindent 4 }} fluentBitConfigName: fluent-bit-config + {{- if .Values.fluentbit.namespaceFluentBitCfgSelector }} + namespaceFluentBitCfgSelector: +{{ toYaml .Values.fluentbit.namespaceFluentBitCfgSelector | indent 4 }} + {{- end }} {{- if .Values.fluentbit.envVars }} envVars: {{ toYaml .Values.fluentbit.envVars | indent 4 }} diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 6b325d4f7..aec7a2ad0 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -129,6 +129,8 @@ fluentbit: # name: hostProc # readOnly: true + namespaceFluentBitCfgSelector: {} + # Set a limit of memory that Tail plugin can use when appending data to the Engine. # You can find more details here: https://docs.fluentbit.io/manual/pipeline/inputs/tail#config # If the limit is reach, it will be paused; when the data is flushed it resumes. @@ -142,6 +144,7 @@ fluentbit: memBufLimit: 5MB path: "/var/log/containers/*.log" skipLongLines: true + readFromHead: false systemd: enable: true path: "/var/log/journal"