Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some fluentbit helm opts #743

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand Down
4 changes: 4 additions & 0 deletions charts/fluent-operator/templates/fluentbit-fluentBit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ spec:
resources:
{{- toYaml .Values.fluentbit.resources | nindent 4 }}
fluentBitConfigName: fluent-bit-config
Copy link
Member

@benjaminhuo benjaminhuo May 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fluentBitConfigName and namespaceFluentBitCfgSelector should be mutually exclusive?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the former is for ClusterFluentBitConfig CR, and the latter is for namespaced FluentBitConfig CR.

This was a mistake made by whoever created/generated the FluentBit CR, they named the field corresponding to cluster level config as fluentBitConfigName.

{{- if .Values.fluentbit.namespaceFluentBitCfgSelector }}
namespaceFluentBitCfgSelector:
{{ toYaml .Values.fluentbit.namespaceFluentBitCfgSelector | indent 4 }}
{{- end }}
{{- if .Values.fluentbit.envVars }}
envVars:
{{ toYaml .Values.fluentbit.envVars | indent 4 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/fluent-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -142,6 +144,7 @@ fluentbit:
memBufLimit: 5MB
path: "/var/log/containers/*.log"
skipLongLines: true
readFromHead: false
systemd:
enable: true
path: "/var/log/journal"
Expand Down