Skip to content

Fix serviceAccount.automount: false being ignored - #130

Merged
alix-graylog merged 1 commit into
mainfrom
b-01
Jul 20, 2026
Merged

Fix serviceAccount.automount: false being ignored#130
alix-graylog merged 1 commit into
mainfrom
b-01

Conversation

@alix-graylog

@alix-graylog alix-graylog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Problem

Setting serviceAccount.automount: false had no effect due to a Helm template idiom where | default true treats false as empty. This is a security issue - token automounting could not be disabled even when explicitly configured.

Fixes

Solution

Replace the | default true pattern with explicit string comparison to properly handle false values:

if eq (.Values.serviceAccount.automount | toString) "false" }}false{{ else }}true{{ end }}

Changes

- Fix serviceAccount.automount in auth/sa.yaml
- Fix mongodb.serviceAccount.automount in auth/mongo-sa.yaml

Verification: Tested rendering with automount: false, automount: true, and unsetall produce correct behavior.

@alix-graylog
alix-graylog merged commit fdff2a7 into main Jul 20, 2026
9 checks passed
@alix-graylog
alix-graylog deleted the b-01 branch July 20, 2026 19:04
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