Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for health check timeout configuration #2366

Open
beyhan opened this issue Jan 9, 2023 · 1 comment
Open

Add support for health check timeout configuration #2366

beyhan opened this issue Jan 9, 2023 · 1 comment
Assignees

Comments

@beyhan
Copy link
Member

beyhan commented Jan 9, 2023

What's the user value of this feature request?
Health check configuration will be made more convenient for users not familiar with the CF APIs.

Who is the functionality for?
CF users willing to configure CF health checks via the CF CLI.

Who else is affected by the change?
This feature isn't a breaking change. It suggest to extend the current options supported by cf set-health-check.

Describe the solution you'd like
The CF V3 APIs support a timeout parameter as described in the docs. I'm suggesting to add an additional option to the cf set-health-check command which is called --timeout and can be used to configure the duration in seconds that health checks can fail before the process is restarted.

Describe alternatives you've considered
A workaround is to use the CF APIs directly to set the health check timeout. This can work like this:

cf app <my-app-name> --guid #get app guid
cf curl /v3/apps/<app-guid>/processes #list app processes information
cf curl -H "Content-Type: application/json" -X PATCH -d @health-conf.json /v3/processes/<process-from-previous-command> 

The content of health-conf.json could be something like this:

...
"health_check": {
        "type": "http",
        "data": {
          "timeout": 120,
          "invocation_timeout": null,
          "endpoint": "/health"
        }
      }
...
@gururajsh
Copy link
Member

Hi @beyhan. Thank you for opening the issue. Will discuss this with the team and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants