I'm trying to implement database migrations (schema change) using a `mid` hook lifecycle in a DeploymentConfig.
The app uses a templated config file, generated by an initContainer and then injected by means of an emptyDir volume into the applicative container
The same image should be used to perform the migrations, but the hook spec does not allow to reproduce the same system (aka, generate config file then inject it)
(The app is Django, so the migration is just a matter of `manage.py migrate`)
I tried to use the `volumes` part of the hook spec, which, as far as I understand, should copy my volumes from my previously running pod to my hook pod, but if fails with an error message like this in the deployer pod logs
container_linux.go:247: starting container process caused
"process_linux.go:364: container init caused \"rootfs_linux.go:54:
caused \\\"not a directory\\\"\""
I guess the error is related to the fact that my mount use a subPath in the applicative container, but that does not really help me.
1) know why the hook does not allow a full PodSpec (or starting a Job, for example) ?
2) know a better way to do what I'm trying to accomplish (scale to 0 a deployment, launch an arbitrary Pod/Job, deploy the new version) ?
Thanks in advance for any response.