thingsboard-ce-k8s
thingsboard-ce-k8s copied to clipboard
Allow using external Postgres and existing Secrets
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
I committed charts/
by mistake, will remove them.
@pon0marev
I committed
charts/
by mistake, will remove them.
Done