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

Add support for multiline postinstall and postupgrade commands #342

Conversation

badrange
Copy link
Contributor

Fixes #245

@Jancis Jancis self-requested a review November 3, 2022 10:49
Copy link
Member

@Jancis Jancis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank You! I was able to reproduce this issue. I tested this change, toYaml generates extra | symbol and it creates incorrect resource template:

        command: ["/bin/bash", "-c"]
        args:
        - |
          |
            echo Postinstall command executed
            ls -Al
            echo another command
          |
            echo Postupgrade command executed
            ls -Al
            echo another command

The solution is to remove toYaml and keep nindent

{{- $service.postinstall.command | nindent 10 }}

This generates correct template:

        command: ["/bin/bash", "-c"]
        args:
        - |
          echo Postinstall command executed
          ls -Al
          echo another command
          
          echo Postupgrade command executed
          ls -Al
          echo another command

@Jancis Jancis changed the base branch from master to feature/release-20221103 November 3, 2022 12:00
@Jancis Jancis self-requested a review November 3, 2022 12:00
@Jancis Jancis merged commit 4162b91 into wunderio:feature/release-20221103 Nov 3, 2022
@Jancis Jancis mentioned this pull request Nov 3, 2022
@badrange badrange deleted the feature/multiline-postcommand branch November 3, 2022 13:53
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.

Multiline postinstall command for frontend chart
2 participants