tabular-io / iceberg-rest-image

Simple project to expose a catalog over REST using a Java catalog backend
Apache License 2.0
100 stars 40 forks source link

Health check for Kubernetes #38

Open aodj opened 1 year ago

aodj commented 1 year ago

Is there any possibility of having a health check for use in Kubernetes? We've seen that when using iceberg-rest with PostgreSQL if the connection to the database server drops, the iceberg-rest server needs rebooting. This could be easily handled automatically from Kubernetes by having a health check but I don't know how much effort it would be to add in health checks for each catalog (where necessary)

danielcweeks commented 4 months ago

I think what you probably want to do is just create a table and point the healthcheck at the load endpoint.

Typically this would be something like default.dual and then just have k9s load the table via the REST endpoint. That would touch the database and ensure liveness.

Alternatively, you could use the list namespaces, since that doesn't require the existence of a table.