Investigate using Jobs to configure database
A kubernetes Job could be used to run the init-db.sh script (which is currently duplicated for the vs-renderer and vs-registrar Chart).
The benefits would be:
- simplicity: only the setup-job would need to run the script, no need for every Pod to check whether the DB was set up
-
reduced duplicity: the init-db script could be migrated to a single place.- solved by symlink - re-running: in helm-releases via flux, this script could be automatically re-run to sync the database with the configuration.
The post-install
hook seems like a good place to do this. (also consider post-upgrade
)