sparse-intern-71089
03/26/2020, 3:37 PMgorgeous-egg-16927
03/26/2020, 3:40 PMdependsOn
is the answer for now, but you also might want to consider using an initContainer
for tasks like DB migration instead of a Job
brave-ambulance-98491
03/26/2020, 3:43 PMinitContainer
is not a great option. This also would require running the database migrations every time a pod restarted, which I wouldn't like very much. 🙂brave-ambulance-98491
03/26/2020, 3:43 PMgorgeous-egg-16927
03/26/2020, 3:44 PMgorgeous-egg-16927
03/26/2020, 3:45 PMinitContainer
route, you could make the migration script idempotent and add it to all relevant Deployments. So the script would run each time, but would be a no-op if the version already matched (or similar)gorgeous-egg-16927
03/26/2020, 3:46 PMbrave-ambulance-98491
03/26/2020, 3:47 PMbrave-ambulance-98491
03/26/2020, 3:47 PMResource
means I can run it on its own, if we have a tricky deploy.better-rainbow-14549
03/27/2020, 10:46 AM