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

Allow using external Postgres and existing Secrets #111

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adrianAzoitei
Copy link

@adrianAzoitei adrianAzoitei commented Dec 8, 2023

Why was this needed

Support for an external PostgreSQL instance is implicit, but confusing to configure. Users still have to deploy the postgresql-ha subchart and just use a serviceName pointing to an external PostgreSQL.
Specifying credentials is done via values.yaml or --set at the command line, which could be insecure, depending on who else has access to the server. Using existing Secrets is a pretty common pattern for this.

What was implemented

  • allow disabling postgresql-ha
  • add keys and templates for rendering credentials and connection details for external PostgreSQL
  • reuse existing secret approach for Cassandra as used in subchart

How it was tested

Ran helm template with the following overriding values:

cassandra:
  enabled: true
  dbUser:
  #   user: setplease
  #   password: setplease
    existingSecret: test-cassandra-secret

postgresql-ha:
  enabled: false

externalPostgres:
  host: localhost
  port: 5432
  database: thingsboard
  # existingSecret:
  #   name: test-postgres-secret
  #   username: username
  #   password: password

- allow disabling postgresql-ha
- add keys and templates for rendering credentials and connection details for external PostgreSQL
- reuse existing secret approach for Cassandra as used in subchart
@@ -25,14 +25,15 @@ home: https://github.com/thingsboard/thingsboard-ce-k8s/
dependencies:
- name: postgresql-ha
version: 8.5.2
repository: https://charts.bitnami.com/bitnami
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
Copy link
Author

Choose a reason for hiding this comment

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

These versions are no longer available on https://charts.bitnami.com/bitnami.

@adrianAzoitei
Copy link
Author

I committed charts/ by mistake, will remove them.

@adrianAzoitei
Copy link
Author

@pon0marev

@adrianAzoitei
Copy link
Author

I committed charts/ by mistake, will remove them.

Done

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.

None yet

1 participant