Share PostgreSQL with Substrate - #2708
Draft
iplay88keys wants to merge 3 commits into
Draft
Conversation
Configure embedded Substrate to use Kagent's selected PostgreSQL database through a shared Secret and a separate schema. Support bundled, external, shared existing, and independently configured Substrate databases, with examples for each installation mode. Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
…tgres-with-substrate Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
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.
Note
This PR requires a substrate chart containing this PR: kagent-dev/substrate#32
Summary
substrateschema.database.postgres.urlor Kagent's bundled PostgreSQL URL.database.postgres.urlFilewithdatabase.postgres.secretRef.{name,key}.database.postgres.*, while Substrate readssubstrate.postgres.*.Substrate PostgreSQL
Enabling Substrate uses Kagent's bundled PostgreSQL by default. Kagent and
Substrate share the database connection but use separate schemas.
To share an external PostgreSQL connection, configure it once for Kagent:
To share an existing Secret, configure both charts to reference the same
name and key:
To give Substrate a separate PostgreSQL connection, disable sharing and set
the Substrate connection directly:
For a separate Secret-backed connection, leave
enabled: falseand setconnectionStringSecretRef.nameandkey.Dependency
This requires a Substrate chart release containing
postgres.connectionStringSecretRef. Update Kagent's Substrate dependency to that release before merging.Testing
helm unittest helm/kagent— 286 tests passedhelm lint helm/kagentgo test ./core/internal/database ./core/pkg/appurlFilevalue fails with migration guidance