-
Notifications
You must be signed in to change notification settings - Fork 223
Database initialization #102
Comments
No currently there is nothing user-specified that will run during initialization.
These Helm Charts do not use any of these scripts, as Patroni is bootstrapping ( You could use callbacks, by creating a Thinking about it a bit more, it might be best to have Patroni support the |
This commit depends on patroni/patroni#1631 being merged and released in the Docker Image, as otherwise we will run into issues when the custom init scripts fail. Addresses GitHub issue #102
Definitely helpful. Some DDL statements like role creation are hard to write idempotently. As for my particular use case, making use of Kubernetes' secrets to set user passwords during initialization provides a level of security that is impossible to accomplish using some schema migration tools—which run after initdb. But to set passwords (which can be done idempotently) first I need to create roles (which isn't idempotent, although it can be worked around: see here). |
@depeele @invernizzie I would love some initial feedback on this PR: https://github.com/timescale/timescaledb-kubernetes/pull/191/files It should be self explaining (if not, the PR needs more documentation). It cannot be merged until the Patroni issue has been released, but until then, we can at least discuss the interface. |
@feikesteenbergen great work on the repo. Any word on the resolution of this issue? Thanks |
I'm relatively new to kubernetes and helm but I don't see a way to inject initialization scripts or more generally, initialize a database/tables/indices on install.
In the postgres helm chart, there is an
initdbScriptsConfigMap
value that may be provided or, you can simply include content directly viafiles/docker-entrypoint-initdb.d/
(which will be used to create a config map).In either case, the result is that the content of the files are mounted into the postgres container (in
/docker-entrypoint-initdb.d/
) and used during database initialization.Is there a similar capability with the timescaledb-kubernetes helm chart?
The text was updated successfully, but these errors were encountered: