Skip to content

[helm][hotfix] Go template whitespace trimming caused exceptions#2893

Open
morazow wants to merge 1 commit intoapache:mainfrom
morazow:helm-hotfix
Open

[helm][hotfix] Go template whitespace trimming caused exceptions#2893
morazow wants to merge 1 commit intoapache:mainfrom
morazow:helm-hotfix

Conversation

@morazow
Copy link
Contributor

@morazow morazow commented Mar 17, 2026

Purpose

Linked issue: close NA

In secret-jaas-config.yaml, the variable assignments between the license comment block and apiVersion use Go templating whitespace trimming ({{- ... -}}) approach.

Since assignments produce no output, they consume all surrounding whitespaces, including the newline after the last # comment line. This glues # and apiVersion: v1 into #apiVersion: v1, which YAML parses as a comment.

The resulting document has no apiVersion field, causing Helm to reject it with "apiVersion not set."

The same issue also affects serviceaccount.yaml, where the license block sits outside the {{- if .Values.serviceAccount.create }} guard, producing a comment-only YAML document when disabled.

Brief change log

Move the variable assignments before the license block so the comment to apiVersion gap is no longer merged by trimming directives.

Tests

Existing tests pass

API and Format

NA

Documentation

NA

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.

1 participant