Skip to content

'helm template' command results in a newline character being stripped #187

@mrjgreen

Description

@mrjgreen

Bug
Running the helm template command with helm v2 can result in whitespace being removed, invalidating the helm chart.

The output of range templates inserver-service.yaml and server-deployment.yaml results in:

---apiVersion: v1
kind: Service

instead of

---
apiVersion: v1
kind: Service

See this issue with Cadence template for more detail: helm/helm#7149

To Reproduce

  1. Using any helm 2.x
  2. Run helm template

Expected behavior
Helm should not strip whitespace.

Screenshots/Terminal ouput
Screen Shot 2021-05-24 at 14 21 12

Versions (please complete the following information where relevant):

  • OS: mac
  • Temporal Version 1.9.2
  • using Kubernetes and helm v2

Additional context

I think this could be fixed by changing:

{{- range $service := (list "frontend" "history" "matching" "worker") }}
{{- $serviceValues := index $.Values.server $service -}}

to

{{- range $service := (list "frontend" "history" "matching" "worker") }}
{{- $serviceValues := index $.Values.server $service }}

which will not remove whitespace.

I'm not sure if this will have any unintended impact

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions