<p>I get a weird new line when my chart is rendered that templates from another file using <code>{{ include }}</code>. For instance, my manifest looks like this </p>

<pre><code>      containers:
      - name: {{ .Release.Name }}
        image: {{ .Values.global.image}}:{{ .Values.global.imageTag }}
        imagePullPolicy: {{ .Values.global.pullPolicy }}
        ports:
          - containerPort: {{ .Values.gloabl.containerPort }}
{{ include "common_deployment" . }}
</code></pre>

<p>and my <code>common_deployment</code> is defined as </p>

<pre><code>{{- define "common_deployment" }}
        envFrom:
          - secretRef:
              name: {{ .Release.Name }}-secret
{{- end -}}
</code></pre>

<p>when I look at my manifest after doing a dry run on Helm, my template looks something like this </p>

<pre><code> containers:
  - name: test
    image: myrepo/myimage:latest
    imagePullPolicy: Always
    ports:
      - containerPort: 4444

envFrom:
  - secretRef:
      name: test-secret
</code></pre>

<p>Notice how there is a new lie between the <code>ports</code> and the <code>envFrom</code>. I'm wondering if this will affect how my pods will turn out because there are issues with volumes being mounted and I want to be able to make sure that this templating problem is the culprit before going down another rabbit hole.</p>

<p>You can use a hyphen to suppress the newline on template commands. You're already using it for <code>define</code> and <code>end</code>.</p>

<p>Similarly, you should use <code>{{- include ... -}}</code>.</p>
