Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(providers): single database mode #1101

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

vkrizan
Copy link
Contributor

@vkrizan vkrizan commented Dec 9, 2024

Creates a new database provider mode named single.
The aim of the mode is to create a single database instance and share it
between the apps by separating them by Posgres schemas.
Each app gets a schema created by the name of the requested database.
Schemas are created under environment's database, with the same name as
the ClowdEnv.

Adds the following refactorings:

  • provutils.DefaultPGPort to set port constant
  • provutils.DefaultPGAdminUsername to set default PG admin user
  • provutils.PGAdminConnectionStr that builds sanitized connection string to PG from a DatabaseConfig using admin creds
  • provutils.ReadDbConfigFromSecret to reuse read of DatabaseConfigs from secrets, optionally using a cache

RHINENG-14526

@vkrizan
Copy link
Contributor Author

vkrizan commented Dec 9, 2024

@psav I've opted for "single" as the name of the db mode. Suggestions and reviews are welcome. Thank you.

Creates a new database provider mode named `single`.
The aim of the mode is to create a single database instance and share it
between the apps by separating them by Posgres schemas.
Each app gets a schema created by the name of the requested database.
Schemas are created under environment's database, with the same name as
the ClowdEnv.

RHINENG-14526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant