Database configuration
Configure the Cloudera SQL Stream Builder's database.
By default, the Helm chart automatically creates a PostgreSQL Deployment and Service using a
public image. The Helm chart also creates a PersistentVolumeClaim, which will persist throughout
Helm uninstalls and installs using the "helm.sh/resource-policy": "keep"
annotation.
If you remove this PersistentVolumeClaim, on the next SSB restart all the data
saved by Cloudera SQL Stream Builder will be lost, and the database will be re-created.
It is recommended that you use an already existing external database, and configure Cloudera SQL Stream Builder to connect to it, instead of using the default created database. You can use MySQL/MariaDB, Oracle or PostgreSQL as a database. (See Cloudera SQL Stream Builder database support.)
You can use the following example configuration to override the default database configuration:
ssb:
database:
create: false
auth:
type: postgresql
jdbcUrl: "jdbc:postgresql://postgres-host:5432/ssb_admin"
username: test_user
password: test_password
The data provided here is kept secure as a Kubernetes secret.
External secrets and cross-namespace credentials
Instead of inline username and password values, reference an
existing Kubernetes Secret with ssb.database.auth.secretRef. When
namespace is set, the chart reads the Secret from that namespace (for example
a CloudNativePG-managed cluster) and copies the credentials into a local Secret in the Cloudera SQL Stream Builder namespace.
ssb:
database:
create: false
auth:
type: postgresql
jdbcUrl: "jdbc:postgresql://postgres-rw.other-ns.svc:5432/ssb_admin"
secretRef:
name: ssb-db-credentials
namespace: other-ns
usernameKey: username
passwordKey: password
PostgreSQL Service labels
Use ssb.database.service.labels to add labels to the bundled PostgreSQL
Service. Some storage integrations (for example Longhorn on Rancher/RKE2 or OpenStack Cinder on
Taikun) require specific Service labels for volume binding.
