feat(netbird): structured database config with Initium init containers#2
Merged
mikkeldamsgaard merged 1 commit intomainfrom Feb 25, 2026
Merged
Conversation
Replace raw DSN configuration with structured database.* values and add Initium init containers for database readiness and creation. Changes: - Replace server.secrets.storeDsn with structured database.type, database.host, database.port, database.user, database.name, database.passwordSecret, and database.sslMode - Construct DSN internally from structured values (postgresql, mysql) - Add db-wait init container using Initium wait-for (TCP probe, 120s timeout) - Add db-seed init container using Initium seed (create_if_missing: true) - Render seed spec as seed.yaml in server ConfigMap for non-sqlite engines - Inject DB_PASSWORD via secretKeyRef into config-init for DSN rendering - Upgrade Initium image to v1.0.0 (duration string timeout format) - Add CHANGELOG.md - Add example seed configurations under examples/seed/ - Update README with structured database docs, PostgreSQL/MySQL examples, and full values reference - Add 10 new unit tests (120 total) covering init container ordering, env var injection, and database-specific rendering - E2E tests verified with SQLite, PostgreSQL, and MySQL backends Closes #1
c362667 to
b7bd8fc
Compare
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.
Summary
Replace raw DSN configuration with structured
database.*values and add Initium init containers for database readiness checking and automatic database creation.Changes
Breaking
server.secrets.storeDsnwith structureddatabase.type,database.host,database.port,database.user,database.name,database.passwordSecret, anddatabase.sslModeserver.config.store.engine— usedatabase.typeinstead (sqlite,postgresql,mysql)Added
db-waitinit container — Initiumwait-forTCP probe with 120s timeoutdb-seedinit container — Initiumseedwithcreate_if_missing: trueseed.yamlin server ConfigMap for non-sqlite enginesDB_PASSWORDenv var injection into config-init for DSN renderingexamples/seed/(PostgreSQL + MySQL)Verified
Closes Improve Database Config and Integrate Initium for DB Initialization #1