Skip to content
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
12 changes: 12 additions & 0 deletions charts/fluent-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,15 @@ Determine the container log path based on containerRuntime
/var/log/containers
{{- end -}}
{{- end }}

{{/*
Render a ClusterFluentBitConfig `service` section, merging the caller-provided
defaults with the `fluentbit.service` value (which takes precedence on conflicts).
Expects a dict with:
defaults - dict of default service fields
root - the root template context (e.g. `$`)
*/}}
{{- define "fluent-operator.fluentbitService" -}}
{{- $merged := mergeOverwrite (deepCopy .defaults) (.root.Values.fluentbit.service | default dict) -}}
{{- toYaml $merged -}}
{{- end }}
Comment thread
joshuabaird marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,11 @@ spec:
{{- end }}
configFileFormat: {{ .Values.fluentbit.configFileFormat | default "classic" | quote }}
service:
parsersFile: /fluent-bit/etc/parsers.conf
httpServer: true
{{- $defaults := dict "parsersFile" "/fluent-bit/etc/parsers.conf" "httpServer" true }}
{{- with .Values.fluentbit.logLevel }}
logLevel: {{ . | quote }}
{{- end }}
{{- with .Values.fluentbit.service.storage }}
storage:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.fluentbit.service.schedulerBase }}
schedulerBase: {{ . }}
{{- end }}
{{- with .Values.fluentbit.service.schedulerCap }}
schedulerCap: {{ . }}
{{- $defaults = set $defaults "logLevel" . }}
{{- end }}
{{- include "fluent-operator.fluentbitService" (dict "defaults" $defaults "root" $) | nindent 4 }}
inputSelector:
matchLabels:
fluentbit.fluent.io/enabled: "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ metadata:
spec:
configFileFormat: {{ .Values.fluentbit.configFileFormat | default "classic" | quote }}
service:
parsersFile: parsers.conf
{{- with .Values.fluentbit.service.schedulerBase }}
schedulerBase: {{ . }}
{{- end }}
{{- with .Values.fluentbit.service.schedulerCap }}
schedulerCap: {{ . }}
{{- end }}
{{- $defaults := dict "parsersFile" "parsers.conf" }}
{{- include "fluent-operator.fluentbitService" (dict "defaults" $defaults "root" $) | nindent 4 }}
inputSelector:
matchLabels:
fluentbit.fluent.io/enabled: "true"
Expand Down
18 changes: 8 additions & 10 deletions charts/fluent-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -530,16 +530,14 @@ fluentbit:
# -- Scheduler cap for maximum retry time (seconds)
# schedulerCap: 2000
# -- Storage configuration for Fluent Bit buffering
storage: {}
# Remove the above storage section and uncomment below section if you want to configure file-system as storage for buffer
# storage:
# path: "/host/fluent-bit-buffer/"
# backlogMemLimit: "50MB"
# checksum: "off"
# deleteIrrecoverableChunks: "on"
# maxChunksUp: 128
# metrics: "on"
# sync: normal
# storage:
# path: "/host/fluent-bit-buffer/"
# backlogMemLimit: "50MB"
# checksum: "off"
# deleteIrrecoverableChunks: "on"
# maxChunksUp: 128
# metrics: "on"
# sync: normal

# Configure the default filters in FluentBit.
# The `filter` will filter and parse the collected log information and output the logs into a uniform format. You can choose whether to turn this on or not.
Expand Down
Loading