cloudflare / cloudflare/cloudflared
Add HealthCheck function or Restart logic for failure conditions💡
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the feature you'd like**
Need the option to have the cloudflared runtime EXIT after a certain number of failed retries.
Currently When CFD fails to reach the edge ( ie due to networking issues ) it will go into a retry loop, but will never trigger a restart of the container by exiting.
** To be clear the retries config is irrelevant here, as after retries exhaust CFD will not exit the container. And instead just restart CFD to go into a loop.
The best/easiest solution would be to have the CFD runtime exit on after completing the configured number of "retries"
**Describe alternatives you've considered**
HealthCheck option that would trigger restarts based on metrics feedback. There is not a great way off the shelf due to Distroless, and wanting to maintain the security posture of the distroless image. ( Currently we are in housing a go binary to do this healthcheck that will be important to the upstream CFD image. )
**Additional context**
How I ran into this issue:
We have CFD running as a container in the same network space as our FrontEnd container. ( You can think of this as a pod, though it is not ). When the source container ( the Front End ) restarts, the CFD container will never be able to connect to the Cloudflare Edge until the container restarts.
Contributor guide
Assessment
This issue has not been assessed yet.