Optimize currently exposes a readiness endpoint at /api/readyz, which returns a status code based on whether Optimize is ready. The current definition of ready means that Optimize can connect to ES and an Engine. However, with Optimize in the Cloud it is now valid for Optimize to have no cloud connection. We should investigate updating this definition.
Hints:
- Our k8s descriptors use these endpoints too and actually do depend on the engine being connected (possibly), so make sure we don't break jobs by doing this
- Maybe we can keep the same definition if there are engines configured?
- Otherwise, our definition of ready would simply be when Elasticsearch can be reached