tsuru icon indicating copy to clipboard operation
tsuru copied to clipboard

Support multiple healthchecks for Tsuru app

Open nettoclaudio opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. Tsuru only supports a single healthcheck configuration for the whole app. For apps with multiple processes only the "web" process can configure healthcheck - as you can see on k8s and docker provisioners.

Describe the solution you'd like In order to avoid breaking changes in the Tsuru config file for apps (aka tsuru.yaml), the safest approach would be to create a new array property to hold the multiple health check configs. Each array item must provide the probe configs along the process name (which is required).

healthchecks:
- process: web
  path: /healthz
...
- process: worker
  command: ["/path/to/my/script.sh", "--healthcheck"]

But I also like the idea of supporting both solutions in the existing healthcheck property. So according to the type of healthcheck property, Tsuru does a thing or something else. When an array is presented, multiple probe configs are supported, otherwise, the legacy behavior is kept.

Describe alternatives you've considered N/A

Additional context N/A

nettoclaudio avatar Oct 07 '22 14:10 nettoclaudio