Hi,
one ambiguity arose on automigrate option while trying to put hydra helm chart to life into some production grade k8s (meaning more than 1 pod replicas) . According to hydra docs (the part where releases specifically instruct running migrate on db initialize or upgrade). I assume migrate is not idempotent operation and as such I see not safe to put into initContainer.
Or am I wrong and operation is safe to run on every redeploy(i.e. at hydra upgrades) and all replicas in k8s cluster? Seems initContainer logs suggest this - observed at hands on test - i.e. redeploy to same hydra version gives information on 0 changes to be performed in db and initContainer exits successfully:
The following migration is planned:
| DRIVER | MODULE | ID | # | QUERY |
|--------|--------|----|—|----------------------|
|--------|--------|----|—|----------------------|
Successfully applied 0 SQL migrations!
Or it is expected to toggle option enabled manually only at explicit systemOps intention as release instructs?
Or even more conservative - doing migrate only from some ‘outside k8s’ hydra instance and also not ‘live’?
If this last is true, what about using helm hooks (pre-install, pre-upgrade) and run migrate as a job?
Thanks in advance and kind regards