Choose a database
Vesicle stores its data in PostgreSQL. The chart does not install a database server; it either configures a CloudNativePG cluster for you or connects to a server you provide.
database.provider | Database | Use when |
|---|---|---|
cnpg (default) | A CloudNativePG Cluster that the chart creates | Replicas, backups and monitoring in the cluster |
external | Your own PostgreSQL (database.host) | A managed database |
CloudNativePG (default)
Section titled “CloudNativePG (default)”The CloudNativePG operator must already be running in the cluster; the chart creates the Cluster resource for it.
database.cnpg.instancesis the number of PostgreSQL instances:1is a single read/write instance,2or more adds streaming replicas. Failover is handled by the operator. With replicas, the engine also reads from the read-only service; see Scaling and availability.- Give the database a realistic memory limit (
database.cnpg.resources). A very small limit lets PostgreSQL be killed during large room purges. - Storage is set with
database.cnpg.storage.sizeandstorageClass. database.cnpg.imageNamepoints at a mirror of the PostgreSQL image if you need one.
Passwords are never values. The chart generates the database passwords once and keeps them across upgrades, or reads Secrets that you name (database.credentials.*.existingSecret). The services connect as a role that can read and write data; only the migration job connects as the role that owns the schema.
Turn on backups before real use: Back up and restore the database.
External database
Section titled “External database”database: provider: external host: db.example.com credentials: app: existingSecret: vesicle-dbmatrix-authentication-service: database: existingSecret: mas-dbEach Secret is kubernetes.io/basic-auth with the keys username and password. The connection settings for Matrix Authentication Service are derived from the same database.* values. Backups of an external database are your responsibility.
Before you uninstall
Section titled “Before you uninstall”helm uninstall deletes the CloudNativePG cluster, and the operator normally deletes its volumes with it. Take a backup first and confirm it finished.