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]: Set correct indentation for included env from .Values.extraEnv #7

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

ptitmouton
Copy link
Contributor

Hi,

I found an issue with the extraEnv option introduced in #4

Adding the following option to values.yaml:

extraEnv:
  - name: NAME
    value: VALUE
  - name: OTHER
    value: VALUE2

Leads to the following deployment.yaml in the template (which fails to deploy):

<...>
            - name: CLICKHOUSE_DATABASE_URL
              valueFrom:
                secretKeyRef:
                  key: CLICKHOUSE_DATABASE_URL
                  name: plausible-plausible-analytics
                        - name: NAME
            value: VALUE
          - name: OTHER
            value: VALUE2
<...>

There are two problems with

{{ toYaml .Values.extraEnv | indent 10 }}

  1. The first line is too much indented. This is because the spaces before {{ toYaml .Values.extraEnv | indent 10 }} are included in the output template
  2. The required indentation should be 12, not 10

In the hope I can help with this PR.

Checklist

  • Chart Version bumped

@alexnuttinck
Copy link
Member

Thanks @ptitmouton!
I also made a fix, I changed the indent function into the nindentfunction for extraEnv.
Let me now if all work for you.

@alexnuttinck alexnuttinck merged commit 24c115b into IMIO:main Feb 14, 2024
1 check passed
@ptitmouton
Copy link
Contributor Author

I did not know about nindent.
Works perfectly, thank you!

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.

2 participants