Rails based pods should wait for the desired db schema version to be available
Currently our rails based pods (unicorn/sidekiq) wait for the database connection to be available in their initContainer before starting up.
Currently we have an issue where they start up before all their expected migrations are complete, and they cache old/incorrect information on the db models, causing errors in the UI.
We are creating an operator as part of https://gitlab.com/charts/gitlab/issues/238 to resolve this problem and additionally follow steps to reduce down time during upgrade.
But as a first iteration while the operator is still in progress, we should take advantage of the fact that our dependencies initContainers are running the full rails image, and have them ensure that their expected schema version is present before exiting successfully.
This behaviour would be an improvement on the current deployment, but introduce a higher probability of the system being unavailable during an upgrade. (vs using the operator). Once the operator work is ready, we can rely more on it for this behaviour, but for now we should work on adding this.