cloudflared
cloudflared copied to clipboard
Add cloudflared tunnel ready command
This would make it possible to have a Docker image without wget and curl, and still make docker healthchecking in docker possible
closes #1126
@jlaffaye I there anything I can do to fast-track the PR somehow ?
@felipelima-circle
Am I to understand that the /healthcheck
"just" returns the string "ok"?
It makes no checking that the tunnels are actually healthy?
If that is a correct assumption, I would much rather use /ready
It at least checks that ready connections are above 0
I've renamed the sub command to cloudflared tunnel ready
to avoid confusion about what this command actually does.
@firecow That makes sense. 👍🏻
A merge of master into your branch may be in order because I was getting an error about "UDP Buffer Sizes" that forced me to merge in master. Which resolved it. But past that this seems to work fine on a quick test.
I stood up a separate service at port 8081 to make a cloudflare tunnel with. Then wrote a docker healthcheck into a docker-compose.yml. Which had my local IP there:
healthcheck:
test: tunnel --metrics 192.168.0.15:8081 ready || exit 1
Which worked great. The timeout was a little high at 30 seconds but it's fine.
A merge of master into your branch may be in order because I was getting an error about "UDP Buffer Sizes" that forced me to merge in master. Which resolved it. But past that this seems to work fine on a quick test.
I stood up a separate service at port 8081 to make a cloudflare tunnel with. Then wrote a docker healthcheck into a docker-compose.yml. Which had my local IP there:
healthcheck: test: tunnel --metrics 192.168.0.15:8081 ready || exit 1
Which worked great. The timeout was a little high at 30 seconds but it's fine.
Master has been merged.
I'm really waiting for this, as in AWS ECS I can also not get the workaround https://github.com/cloudflare/cloudflared/issues/1126 working at all. If something breaks our tunnels are currently just hanging. not ideal.
@DevinCarr or @jcsf One of you guys, wanna give this PR some :heart: ?