Skip to content

ADR 29: Standardize database connections #321

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

Merged
merged 22 commits into from
Aug 22, 2023
Merged

Conversation

razvan
Copy link
Member

@razvan razvan commented Dec 6, 2022

Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick pass, just doing minor writing stuff.
Some questions, just writing them down, would suggest to have a call about them:

  1. Is DatabaseConnection namespaced? Would be fine for me. If not we would have to use a SecretClass as Secrets are namespaced
  2. What do you think of a complex enum within DatabaseConnection?
  3. I personally don't like putting something like driver pr protocol into the global CRD. That seems like a implementation detail of the individual product to me

Just throwing in an idea that should address the above points

apiVersion: databaseconnection.stackable.tech/v1alpha1
kind: DatabaseConnection
metadata:
    name: druid-metadata-connection
    namespace: default
spec:
  database:
    postgresql:
      host: druid-postgresql # mandatory
      port: 5432 # defaults to some port number - depending on wether tls is enabled
      schema: druid # defaults to druid
      credentials: druid-postgresql-credentials # mandatory. key username and password
      parameters: "" # optional
    redis:
      host: airflow-redis-master # mandatory
      port: 6379 # defaults to some port number - depending on wether tls is enabled
      schema: druid # defaults to druid
      credentials: airflow-redis-credentials # optional. key password. In case redis also supports usernames key username and password
      parameters: "" # optional
    derby:
      location: /tmp/derby/ # optional, defaults to /tmp/derby-{metadata.name}/derby.db
      parameters: "create=true" # optional

When we add tls support, things get more tricky

@razvan razvan changed the title ADR025 Database connection object ADR026 Database connection object Dec 9, 2022
@razvan razvan marked this pull request as ready for review December 12, 2022 08:25
@netlify
Copy link

netlify bot commented Aug 22, 2023

Deploy Preview for stackable-docs ready!

Name Link
🔨 Latest commit fd414be
🔍 Latest deploy log https://app.netlify.com/sites/stackable-docs/deploys/64e4bfcb238a3a000798b574
😎 Deploy Preview https://deploy-preview-321--stackable-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sbernauer sbernauer changed the title ADR026 Database connection object ADR 29: Standardize database connections Aug 22, 2023
@sbernauer sbernauer force-pushed the adr-database-connection branch from 48f33a8 to fd414be Compare August 22, 2023 14:01
Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@razvan razvan added this pull request to the merge queue Aug 22, 2023
Merged via the queue into main with commit 762a35d Aug 22, 2023
@razvan razvan deleted the adr-database-connection branch August 22, 2023 14:44
@lfrancke lfrancke added the release-note/action-required Denotes a PR that introduces potentially breaking changes that require user action. label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sdp release-note/action-required Denotes a PR that introduces potentially breaking changes that require user action. type/feature-improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generic Database connection design
5 participants