linagora / james-project

Mirror of Apache James Project
Apache License 2.0
72 stars 62 forks source link

[PROD] [CUSTOMER] Have several health checks in one rest calls #5244

Closed chibenwa closed 2 months ago

chibenwa commented 3 months ago

Why ?

K8S allows only a single liveness probe

But as an admin I would like to combine several healthchecks (IMAP checks, Cassandra checks) behind a liveness probe which today cannot be achieved.

How?

Be able to pass an optional query parameter to /healtchcheck specifying which checks to execute

curl 127.0.0.1:8000/healthcheck?checks=RabbitMQJmapEventBusDeadLetterQueueHealthCheck+OpenSearch%20Backend

Would execute and aggregate only those 2 checks

hungphan227 commented 2 months ago

pr https://github.com/apache/james-project/pull/2399

vttranlina commented 2 months ago

curl 127.0.0.1:8000/healthcheck?checks=RabbitMQJmapEventBusDeadLetterQueueHealthCheck+OpenSearch%20Backend

I think we can use a standard of http request when check is a array the syntax should be check=RabbitMQJmapEventBusDeadLetterQueueHealthCheck&check=OpenSearch%20Backend

chibenwa commented 2 months ago

I think we can use a standard of http request

Indeed!