web: Add init-container to manage django db migration
- Oct 10, 2023
-
-
Antoine R. Dumont authored
It's on by default and deactivated for the swh-next-version cassandra pod (to avoid migrating too soon the db). The real command within the init-container has been tested on our staging pod. And it's running fine (doing the migration if needed, doing nothing after the first passing migration passed). It seems to be enough to have this init-container doing this simple migrate command as the rolling upgrade triggers the installation of the new version of a pod one at a time. So the next version pods (once the first is done and passed the migration) will start and do noop migrations. Refs. swh/infra/sysadm-environment#4780
-