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

fix: intendation corrected in fluentbit-fluentBit.yaml #454

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

momoXD007
Copy link
Contributor

@momoXD007 momoXD007 commented Nov 22, 2022

I created this PR because I was struggling to add (multiple) annotations to my fluent-bits. I noticed that this code (

{{ toYaml .Values.fluentbit.annotations | indent 4 }}
) is the problem. To my understanding if multiple annotations are supplied through the values, it will generate output such as this:

  annotations:
      key0: value0
    key1: value1
    key2: value2

Note that there are 6 spaces before key0 and only 4 spaces before key1 and key2.

The above issue only manifests if multiple annotations are supplied. If one only key0 and value0 are supplied it will work just fine as all keys and values and are intended the same way but as soon as there is more than one key/value pair. key-pair one will be intended two more spaces to the right than all the others as the statement that generates this output itself has two spaces before it.

The above error-pattern seems to be repeated several times in the code. I tried to fix all occurrences in this file.

What this PR does / why we need it:

Which issue(s) this PR fixes:

This fixes an issue where annotations and VolumeMounts do not work if more than one is supplied.

Does this PR introduced a user-facing change?


Additional documentation, usage docs, etc.:


Signed-off-by: Michael J. Wieneke <m.wieneke@sap.com>
@benjaminhuo
Copy link
Member

Thank you for the contribution @momoXD007

@benjaminhuo benjaminhuo merged commit 2bf4de4 into fluent:master Nov 23, 2022
@momoXD007 momoXD007 deleted the fixing_template_indentation branch November 23, 2022 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants