From 197f2cba0b6fbdf796f9f053bbc95d521ae44976 Mon Sep 17 00:00:00 2001 From: jessebot Date: Mon, 22 Jul 2024 11:35:29 +0200 Subject: [PATCH] comment out the default initdb script Signed-off-by: jessebot --- charts/matrix-sliding-sync/README.md | 5 ++--- charts/matrix-sliding-sync/values.yaml | 23 ++++++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/charts/matrix-sliding-sync/README.md b/charts/matrix-sliding-sync/README.md index 9239a93..e3f9a45 100644 --- a/charts/matrix-sliding-sync/README.md +++ b/charts/matrix-sliding-sync/README.md @@ -68,9 +68,8 @@ A Helm chart for deploying matrix sliding sync on Kubernetes | postgresql.global.postgresql.auth.secretKeys.databaseUsername | string | `"username"` | key in existingSecret with username for matrix-sliding-sync to connect to db | | postgresql.global.postgresql.auth.secretKeys.userPasswordKey | string | `"password"` | key in existingSecret with password for matrix-sliding-sync to connect to db | | postgresql.global.postgresql.auth.username | string | `"syncv3"` | username of matrix-sliding-sync postgres user | -| postgresql.primary.initdb | object | `{"scripts":{"matrix_sliding_sync.sql":"CREATE DATABASE matrix ENCODING 'UTF8' LOCALE 'C' TEMPLATE template0 OWNER syncv3;\nGRANT ALL PRIVILEGES ON DATABASE matrix-sliding-sync TO syncv3;\nGRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO syncv3;\n"}}` | If using an external Postgres server, make sure to configure the database ref: https://github.com/matrix-org/synapse/blob/master/docs/postgres.md | -| postgresql.primary.initdb.scripts | object | `{"matrix_sliding_sync.sql":"CREATE DATABASE matrix ENCODING 'UTF8' LOCALE 'C' TEMPLATE template0 OWNER syncv3;\nGRANT ALL PRIVILEGES ON DATABASE matrix-sliding-sync TO syncv3;\nGRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO syncv3;\n"}` | Map of initdb scripts. Specify dictionary of scripts to be run at first boot | -| postgresql.primary.initdb.scripts."matrix_sliding_sync.sql" | string | `"CREATE DATABASE matrix ENCODING 'UTF8' LOCALE 'C' TEMPLATE template0 OWNER syncv3;\nGRANT ALL PRIVILEGES ON DATABASE matrix-sliding-sync TO syncv3;\nGRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO syncv3;\n"` | note, if you change postgresql.global.postgresql.auth.username, or postgresql.global.postgresql.auth.secretKeys.userPasswordKey, please also change it in the 3 lines of this script | +| postgresql.primary.initdb | object | `{"scripts":{}}` | If using an external Postgres server, make sure to configure the database ref: https://github.com/matrix-org/synapse/blob/master/docs/postgres.md | +| postgresql.primary.initdb.scripts | object | `{}` | Map of initdb scripts. Specify dictionary of scripts to be run at first boot. If you're reading this in the README of the chart repo, please check out the values.yaml for info. | | postgresql.primary.podSecurityContext.enabled | bool | `true` | | | postgresql.primary.podSecurityContext.fsGroup | int | `1000` | | | postgresql.primary.podSecurityContext.runAsUser | int | `1000` | | diff --git a/charts/matrix-sliding-sync/values.yaml b/charts/matrix-sliding-sync/values.yaml index 5d94f77..86e6035 100644 --- a/charts/matrix-sliding-sync/values.yaml +++ b/charts/matrix-sliding-sync/values.yaml @@ -184,15 +184,20 @@ postgresql: # -- If using an external Postgres server, make sure to configure the database # ref: https://github.com/matrix-org/synapse/blob/master/docs/postgres.md initdb: - # -- Map of initdb scripts. Specify dictionary of scripts to be run at first boot - scripts: - # -- note, if you change postgresql.global.postgresql.auth.username, - # or postgresql.global.postgresql.auth.secretKeys.userPasswordKey, - # please also change it in the 3 lines of this script - matrix_sliding_sync.sql: | - CREATE DATABASE matrix ENCODING 'UTF8' LOCALE 'C' TEMPLATE template0 OWNER syncv3; - GRANT ALL PRIVILEGES ON DATABASE matrix-sliding-sync TO syncv3; - GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO syncv3; + # -- Map of initdb scripts. Specify dictionary of scripts to be run at first boot. + # If you're reading this in the README of the chart repo, please check out + # the values.yaml for info. + scripts: {} + # -- uncomment to provide a database setup schedule. Alternatively, you + # can also provide postgresql.primary.initdb.scriptsConfigMap or + # postgresql.primary.initdb.scriptsSecret Note: if you change + # postgresql.global.postgresql.auth.username, or + # postgresql.global.postgresql.auth.secretKeys.userPasswordKey, please + # also change it in the 3 lines of this script, if you're using this option. + # matrix_sliding_sync.sql: | + # CREATE DATABASE matrix ENCODING 'UTF8' LOCALE 'C' TEMPLATE template0 OWNER syncv3; + # GRANT ALL PRIVILEGES ON DATABASE matrix-sliding-sync TO syncv3; + # GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO syncv3; podSecurityContext: enabled: true