Repository navigation
fix(helm): honor logstashFormat: false in the Elasticsearch ClusterOutput - #2113
Merged
Merged
Conversation
…tput The template piped the value through 'default true', and Sprig's default treats false as empty, so logstashFormat always rendered true. Use dig so the default only applies when the key is not set. Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
joshuabaird
approved these changes
Nov 5, 2026
joshuabaird
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this looks good. I checked it with helm template: an unset key still renders true, and false now comes through as false.
Two small notes, neither blocking:
- An explicit
logstashFormat: nullnow renders an empty value. The field gets dropped and Fluent Bit falls back to its own default (off) instead of the chart's true. That's an unlikely input, so I'm fine leaving it as is. - The Fluentd Elasticsearch and OpenSearch templates hardcode
logstashFormat: true, so Fluentd users can't turn it off either. That would be a good follow-up PR.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
fluentbit.output.es.logstashFormatis documented invalues.yamlas a commented example, but setting it tofalsehas no effect. The template renders it with| default true, and Sprig'sdefaulttreatsfalseas empty, so theesClusterOutput always getslogstashFormat: true. That makes it impossible to write to a fixedindex(or a data stream) through the chart, since Fluent Bit ignoresIndexwhenLogstash_Formatis on.The template now uses
dig "logstashFormat" true .Values.fluentbit.output.es, so the default oftruestill applies when the key is not set, and an explicitfalseis kept.Checked with
helm template(es output enabled):logstashFormat: true(full render identical to master)logstashFormat=true:truelogstashFormat=false:trueon master,falsewith this changehelm lint charts/fluent-operatorpasses, and the rendered ClusterOutput validates with kubeconform against the chart'sclusteroutputsCRD schema.Which issue(s) this PR fixes:
None, no issue was open for this.
Does this PR introduced a user-facing change?
Additional documentation, usage docs, etc.: