fix(trakrf-backend): omit JWT_SECRET when placeholder/empty (bulletproof preview-rollout fix) - #133
Merged
Conversation
…er/empty
ArgoCD rendering the chart's placeholder default ("change-me") meant it owned
and reverted the operator-set JWT_SECRET on every sync/image-update — crashing
the backend's fail-fast guard (TRA-860) and silently stalling preview rollouts.
ignoreDifferences+RespectIgnoreDifferences (the trakrf-backend Application
carve-out) did not reliably survive the image-update sync path.
Bulletproof fix: only render JWT_SECRET when secrets.jwtSecret is a real,
non-default value. With the default/empty, the key is omitted, so ArgoCD never
manages /data/JWT_SECRET and the out-of-band operator value persists across ALL
sync paths. Fail-closed for fresh envs (no secret → guard refuses to boot until
a real one is set), matching the ESO+GCP-Secret-Manager direction (TRA-375).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Rendering the chart's placeholder
secrets.jwtSecret: change-memade ArgoCD own and revert the operator-setJWT_SECRETon every sync/image-update → the backend's TRA-860/#428 fail-fast guard refused to boot → preview rollouts silently stalled (new pod CrashLoopBackOff, old pod held). TheignoreDifferences+RespectIgnoreDifferencescarve-out (PR #132) did not reliably survive the image-update sync path.What
secret.yamlnow rendersJWT_SECRETonly whensecrets.jwtSecretis a real, non-default value. With the default (change-me) or empty, the key is omitted → ArgoCD never manages/data/JWT_SECRET→ the out-of-band operator-set value persists across all sync paths (selfHeal, image-update, apply-root-app).Verified via
helm template: default/empty →JWT_SECRETabsent; real value → rendered.helm lintclean.Behavior
JWT_SECRETafter deploy.ignoreDifferencescarve-out (now redundant but harmless).Chart change only — propagates via the child Application's git sync (no apply-root-app).
🤖 Generated with Claude Code