Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deploy) add initContainer to wait for DB state #168

Merged
merged 1 commit into from
Oct 18, 2018

Conversation

hbagdi
Copy link
Member

@hbagdi hbagdi commented Oct 16, 2018

Kong can startup only if the DB schema is up to date.
If Postgres is not up or the schema is not up to date, then Kong
will fail to start, resulting in Pod restarts.

This change will wait for Postgres to be up and migrations to finish
running, avoiding restarts and failures in Kubernetes.

There is currently no way to verify if DB state is at the correct
version and hence we resort to a hack of actualling starting Kong and
stopping it in the init container.

With Kong >= 0.15.0, Kong will have a CLI command to check if migrations
are up to date or not.

Kong can startup only if the DB schema is up to date.
If Postgres is not up or the schema is not up to date, then Kong
will fail to start, resulting in Pod restarts.

This change will wait for Postgres to be up and migrations to finish
running, avoiding restarts and failures in Kubernetes.

There is currently no way to verify if DB state is at the correct
version and hence we resort to a hack of actualling starting Kong and
stopping it in the init container.

With Kong >= 0.15.0, Kong will have a CLI command to check if migrations
are up to date or not.
@hbagdi hbagdi merged commit 1757511 into master Oct 18, 2018
@hbagdi hbagdi deleted the feat/wait-for-db-deploy branch October 18, 2018 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant