fix(kanidm): fix automatic_refresh TOML generation in init container #182

Merged
unkinben merged 1 commits from benvin/kanidm_replication_fix into main 2026-05-31 00:25:22 +10:00
Owner

Summary

  • The \n escape in a shell variable wasn't interpreted as a newline when passed as a printf %s argument
  • This caused automatic_refresh = true to be appended to the partner_cert string value on the same line, breaking TOML parsing on kanidm-2
  • Fixed by using separate printf calls per peer type, with \n in the format string (not a variable) where it is correctly interpreted

Test plan

  • kanidm-2 init container generates valid TOML with automatic_refresh = true on its own line under the kanidm-0 peer section
  • kanidm-1 and kanidm-2 start successfully and auto-refresh domain UUID from kanidm-0
## Summary - The `\n` escape in a shell variable wasn't interpreted as a newline when passed as a `printf %s` argument - This caused `automatic_refresh = true` to be appended to the `partner_cert` string value on the same line, breaking TOML parsing on kanidm-2 - Fixed by using separate `printf` calls per peer type, with `\n` in the format string (not a variable) where it is correctly interpreted ## Test plan - [ ] kanidm-2 init container generates valid TOML with `automatic_refresh = true` on its own line under the kanidm-0 peer section - [ ] kanidm-1 and kanidm-2 start successfully and auto-refresh domain UUID from kanidm-0
unkinben added 1 commit 2026-05-31 00:23:31 +10:00
fix(kanidm): fix automatic_refresh toml generation in init container
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful
949b7d908c
The \n escape in a shell variable wasn't interpreted as a newline when
passed as a printf %s argument, causing automatic_refresh to be appended
to the partner_cert string on the same line, breaking TOML parsing.
Use separate printf calls per peer type instead.
unkinben merged commit 3dc8801070 into main 2026-05-31 00:25:22 +10:00
unkinben deleted branch benvin/kanidm_replication_fix 2026-05-31 00:25:22 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/argocd-apps#182