bitnami/postgresql chart is used as a database for Waldur.
Add bitnami
repo to helm:
helm repo add bitnami https://charts.bitnami.com/bitnami
Install postgresql
release:
helm install postgresql bitnami/postgresql --version 11.9.1 -f postgresql-values.yaml
NB: the values postgresql.enabled
and postgresqlha.enabled
must be false
.
You can change default PostgreSQL config with the following variables in postgresql-values.yaml
:
auth.database
- name of a database. NB: must matchpostgresql.database
value inwaldur/values.yaml
auth.username
- name of a database user. NB: must matchpostgresql.username
value inwaldur/values.yaml
auth.password
- password of a database userprimary.persistence.size
- size of a databaseimage.tag
- tag ofPostgreSQL
image. Possible tags for default image can be found hereimage.registry
- registry ofPostgreSQL
image.
More information related to possible values here.
Waldur Helm chart supports PostgreSQL installation as a dependency.
For this, set postgresql.enabled
to true
and update related settings in postgresql
section in waldur/values.yaml
NB: the value postgresqlha.enabled
and externalDB.enabled
must be false
.
Prior Waldur installation, update chart dependencies:
helm dependency update
In order to enable /api/query/ endpoint please make sure that read-only user is configured.
-- Create a read-only user
CREATE USER readonly WITH PASSWORD '{readonly_password}'
-- Grant read-only access to the database
GRANT CONNECT ON DATABASE '{database_name}' TO '{readonly_username}'
-- Grant read-only access to the schema
GRANT USAGE ON SCHEMA public TO '{readonly_username}'
-- Grant read-only access to existing tables
GRANT SELECT ON ALL TABLES IN SCHEMA public TO '{readonly_username}'
-- Grant read-only access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO '{readonly_username}'
-- Revoke access to authtoken_token table
REVOKE SELECT ON authtoken_token FROM '{readonly_username}'