Kong initialization with cassandra database Kong 0.14.1

All

I have deployed kong with cassandra using the helm chart : https://github.com/helm/charts/blob/master/stable/kong/values.yaml with tweaks to replace postgre with cassandra database

Kong 0.14.1
Cassandra: 3

env:
database: cassandra
db_update_propagation: 1800

cassandra:
enabled: true
persistence:
enabled: false

Kong and Cassandra came up fine. However, I noticed it took Kong 5 crashes before coming up, and after deploying and deleting couple of times, I see that cassandra intanaces (3) are taking a while to initialize, causing Kong to crash until all three instances are initialized.

[vagrant@localhost cgbu-nrf-cne] kubectl get pods NAME READY STATUS RESTARTS AGE csr-kong-cassandra-0 1/1 Running 0 12h csr-kong-cassandra-1 1/1 Running 0 12h csr-kong-cassandra-2 1/1 Running 0 12h csr-kong-kong-85cf4859cb-lwflk 1/1 Running **_5_** 12h csr-kong-kong-migrations-77nzc 0/1 Completed **_5_** 12h [vagrant@localhost cgbu-nrf-cne]

My question: How do I keep kong from coming up until required cassandra instances are initialized?

Thanks

Chandra

Whether or not Kong should wait for a database to come up has been debated before in the past and the answer to that debate is that it should not. There could be an option for it, but it can easily be worked around and this hasn’t come up in a while, so we never added it.

My question: How do I keep kong from coming up until required cassandra instances are initialized?

There are plenty of “wait for Cassandra to start” scripts out there that are used with Kong to do just that. You can easily find them online with a little effort. Ultimately, container dependencies isn’t a problem for Kong to solve, but for a container orchestrator.