Open thomascube opened 2 years ago
I think this should be a plugin. So, users can enable it when needed, but it is not normally enabled.
I'm trying to setup such a plugin but it looks like an anauthorized user cannot execute a task different than login. Is that right?
@mjhost
I'm trying to setup such a plugin but it looks like an anauthorized user cannot execute a task different than login. Is that right?
You can try getting the action at "startup" to implement a healthcheck endpoint.
thanks @JE4GLE, i gave up the plugin, with php fpm I could enable the check on a different path
When running Roundcube on Kubernetes, the deployments need probes to check whether the pod running Roundcube is healthy. The preferred way to do these checks are specific HTTP endpoints returning the according status codes.
I suggest to implement a specific task/action for these health checks (e.g.
_task=healthcheck&_action=liveness
) which does basic checks like database and imap server connection and maybe also memcache and others if configured. The action should also trigger a plugin hookhealthcheck
which allows plugins to do their own checks. If the probes succeed, they shall return a HTTP status 200 OK, if not a 50x status code. The response body is not required by Kubernetes but could return some useful information for humans. Some frameworks return JSON code like this:See the difference between liveness and readiness explained here.