posit-dev / posit-dev/team-operator
Support separate database instances per product
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10
- Forks
- 1
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
Summary
Currently, all products (Connect, Workbench, Package Manager) must share a single PostgreSQL server. The operator creates separate databases and users per product within that server, but there is no way to point individual products at different database instances.
Use Case
Customers may need per-product database instances for:
- Sizing — Connect may have heavier database workload than Workbench
- Availability — Different RDS/Azure DB tiers or failover configurations per product
- Compliance — Isolation requirements that go beyond logical database separation
- BYO database — Customer wants to reuse an existing database server for one product but use a managed one for others
Current Behavior
- A single
main-database-urlis resolved viaDetermineMainDatabaseUrl()ininternal/get_db_secret.go - All product controllers use this same URL to create their databases
- Product CRDs have a
PostgresDatabaseConfigwith aHostfield, but reconciliation still flows through the single main database URL
Proposed Behavior
Allow each product to optionally specify its own database connection, overriding the site-level default. For example:
spec:
connect:
databaseSettings:
connectionSecret: "connect-db-secret" # optional override
workbench:
databaseSettings:
connectionSecret: "workbench-db-secret" # optional override
Products without an override would continue using the site-level mainDatabaseCredentialSecret.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading internal/get_db_secret.go and tracing DetermineMainDatabaseUrl through the product controllers and their PostgresDatabaseConfig handling. Compare how the site-level mainDatabaseCredentialSecret currently reaches each product, then define the override and fallback paths described in the issue. Done means each product can use its own connection secret while products without one retain the site-level default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- database, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100