Repository navigation
Conversation
The Fluentd Elasticsearch, OpenSearch and Kafka output templates only checked that a buffer map existed, so the buffer block was rendered even with buffer.enable: false, which is the default for the ES and Kafka outputs in values.yaml. Render it only when buffer.enable is true. Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
The template ranges over .buffer with {{ with }}, so .buffer.type and
.buffer.path looked up a nested buffer key and failed to render as soon
as any OpenSearch buffer value was set.
Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
…ock" This is already fixed in fluent#2115, keep this PR to buffer.enable only. Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
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:
Follow-up from the review on #2114: the Fluentd Elasticsearch and OpenSearch output templates ignore
buffer.enable, so thebufferblock renders even withenable: false, which is the ES default invalues.yaml. The Kafka output had the same pattern, so it is fixed here too.Each template now wraps the existing
with .bufferinif and .buffer .buffer.enable, so the block only renders whenbuffer.enableis true. Outputs without abuffermap (the OpenSearch default is{}) render as before.The
.buffer.type/.buffer.pathscope bug in the OpenSearch template is fixed separately in #2115 and is not touched here. This branch merges cleanly with both #2114 and #2115.Checked with
helm template:buffer.enable: false(the defaults): nobufferblock (before: rendered).buffer.enable: true: output identical to master.buffer.enable: false: nobufferblock (before: failed withnil pointer evaluating interface {}.type).buffer.enable: trueon top of fix(helm): use the buffer scope in the Fluentd OpenSearch output #2115:bufferblock rendered.helm lintpasses and the rendered manifests passkubeconform.Which issue(s) this PR fixes:
None, follow-up from the #2114 review.
Does this PR introduced a user-facing change?
Additional documentation, usage docs, etc.: