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
+7 -4
View File
@@ -53,10 +53,13 @@ spec:
cert_file="/repl-certs/${peer}" cert_file="/repl-certs/${peer}"
[ -s "${cert_file}" ] || continue [ -s "${cert_file}" ] || continue
fqdn="${peer}.kanidm-headless.kanidm.svc.cluster.local" fqdn="${peer}.kanidm-headless.kanidm.svc.cluster.local"
refresh="" if [ "${peer}" = "kanidm-0" ]; then
[ "${peer}" = "kanidm-0" ] && refresh="\nautomatic_refresh = true" printf '\n[replication."repl://%s:8444"]\ntype = "mutual-pull"\npartner_cert = "%s"\nautomatic_refresh = true\n' \
printf '\n[replication."repl://%s:8444"]\ntype = "mutual-pull"\npartner_cert = "%s"%s\n' \ "${fqdn}" "$(cat ${cert_file})" >> /config/server.toml
"${fqdn}" "$(cat ${cert_file})" "${refresh}" >> /config/server.toml else
printf '\n[replication."repl://%s:8444"]\ntype = "mutual-pull"\npartner_cert = "%s"\n' \
"${fqdn}" "$(cat ${cert_file})" >> /config/server.toml
fi
done done
env: env:
- name: POD_NAME - name: POD_NAME