Wait for the postgres pod to enter the ready state before continuing #861
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We added an initContainer for the postgres pod to help with an upgrade bug. Unfortunately the initContainer makes the postgres pod take longer to initialize. As a result, is some scenarios, it is possible that the postgres pod will not be up by the time the web and task containers come online.
The symptoms of this bug are that the containers appear to be running, but requests in the browser to the UI return 404's. This is because the launch_awx.sh entrypoint script which copies over the static files for nginx fails before it gets to that step because it cannot reach the database. Unfortunately, it does not recover and the user must manually scale their deployment to 0, and back up to 1 to resolve the issue.
This patch waits until the postgres pod is in the "ready" state before proceeding and applying the deployment config (which starts the containers).