[BUG] Helm Secret stringData values are rendered without quotes
Pre-flight checklist
- I have searched existing issues and this bug has not been reported yet
- I am running the latest available version of TREK
- I have read the Troubleshooting guide and my issue is not covered there
TREK version
4.3.3
Describe the bug
When generateEncryptionKey=true, the chart writes values directly under Kubernetes Secret.stringData without quote. That means string values such as "true", "12345", or "null" can render as YAML booleans/numbers/null instead of strings.
The data branch already quotes its base64-encoded values.
Steps to reproduce
From the current dev chart, run:
helm template trek charts/trek --set generateEncryptionKey=true --set-string secretEnv.ADMIN_PASSWORD=true --set-string secretEnv.OIDC_CLIENT_SECRET=12345 --set-string secretEnv.AMAP_API_SECRET=nullBefore the fix, the rendered Secret contains:
stringData:
ADMIN_PASSWORD: true
OIDC_CLIENT_SECRET: 12345
AMAP_API_SECRET: nullExpected behavior
stringData:
ADMIN_PASSWORD: "true"
OIDC_CLIENT_SECRET: "12345"
AMAP_API_SECRET: "null"Generated and recovered ENCRYPTION_KEY values should also be quoted.
Deployment method
Kubernetes / Helm
Host OS
No response
Accessing TREK from
Desktop browser
Browser (if applicable)
No response
Relevant logs or error output
Screenshots
No response
Additional context
The fix is limited to charts/trek/templates/secret.yaml and its regression tests in server/tests/unit/app-config/config-templates.test.ts. The change was approved in Discord #github-pr (https://discord.com/channels/1488298068427411591/1553534228849758278)
Source: liketrek/TREK