cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

Add cloudflared tunnel ready command

Open firecow opened this issue 1 year ago • 12 comments

This would make it possible to have a Docker image without wget and curl, and still make docker healthchecking in docker possible

closes #1126

firecow avatar Dec 28 '23 18:12 firecow

@jlaffaye I there anything I can do to fast-track the PR somehow ?

firecow avatar Apr 11 '24 16:04 firecow

@felipelima-circle

image

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

image

I've renamed the sub command to cloudflared tunnel ready to avoid confusion about what this command actually does.

firecow avatar Apr 23 '24 06:04 firecow

@firecow That makes sense. 👍🏻

felipelima-circle avatar Apr 23 '24 11:04 felipelima-circle

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.

CodaBool avatar May 19 '24 23:05 CodaBool

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.

firecow avatar May 21 '24 07:05 firecow

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.

kamaradski avatar Jun 20 '24 20:06 kamaradski

@DevinCarr or @jcsf One of you guys, wanna give this PR some :heart: ?

firecow avatar Jun 21 '24 05:06 firecow