feat: migrate to CDK v0.18 database-authoritative configuration #33
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
asmo/cashu-operator!33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/cdk-0.18"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Migrates the operator to the CDK v0.18 configuration model (v0.18.0-rc.0 release notes, migration guide).
CDK v0.18 stores the authoritative mint configuration in the primary database. Normal daemon startup no longer reads
config.tomland no longer applies operationalCDK_MINTD_*environment overrides — configuration is imported explicitly throughcdk-mintd config init/config apply.How it works
A new
config-initinit container runs beforemintd:This covers all cases uniformly: new mints (
init), existing v0.17 mints upgrading (initimports into the existing database; signer identity is verified against the stored mint pubkey), and configuration changes (applystaged + activated by the config-hash rolling update). Verified against CDK source that validate/init/apply never dial payment backends or read backend files, so localhost gRPC sidecars are safe.Changes
[payment_backend]/backend(was[ln]/ln_backend),tls_dir(wastls_dir_path), explicitallow_insecure = truefor plaintext gRPC processor and management RPC,[info.logging]always emitted with stderr outputenv:references, never literals (CDK rejects literals): postgres URLs, mint mnemonic, LDK RPC password/node mnemonic, Redis connection string. Values are injected from Secrets into the pod environment; the controller no longer resolvesurlSecretRefinto the ConfigMapenv:-referenced secretsspec.ldkNode.bitcoinRpc.userliteral field (xor withuserSecretRef): the RPC username is a plain field in CDK v0.18 and cannot be anenv:reference, so the operator resolves it into the import documentcashubtc/mintd:0.18.0-rc.0(bump to0.18.0on final release)config rollbackrecovery, LNBits migration path)Notes for reviewers
[signatory]) support, Electrum/BDK chain sourcesTesting
make test(unit + envtest),make vet,make lintall pass. e2e not run locally (no kind/docker on this machine) — recommend runningmake test-e2ebefore merge.