cloudflare / argo-tunnel-examples

216 stars 79 forks source link

livenessProbe shuts down tunnel to early #18

Closed henrikperssonvermiculus closed 2 years ago

henrikperssonvermiculus commented 2 years ago

Hi, using the manifest with the following settings

    livenessProbe:
      httpGet:
        # Cloudflared has a /ready endpoint which returns 200 if and only if
        # it has an active connection to the edge.
        path: /ready
        port: 2000
      failureThreshold: 1
      initialDelaySeconds: 10
      periodSeconds: 10

My tunnel shuts down to early, most likely because this: Liveness probe failed: Get "http://10.244.4.35:2000/ready": dial tcp 10.244.4.35:2000: connect: connection

When I removed livenessProbe tunnel seems to be okay. Are there any updated livenessProbe settings to use?

I am using tunnel version 2022.2.1

nmldiegues commented 2 years ago

Liveness probes are recommended so that, should any drastic problem happen and the tunnel has no connections alive, the pod is restarted.

We have similar configuration in some of our production tunnels. The difference is that we are not so aggressive with the probe. We have a higher failure threshold and a higher initial delay (1min)

henrikperssonvermiculus commented 2 years ago

Are you able to share your configuration?

I really want to use Liveness probes but tried some changes in the configuration but I did not work out well.

nmldiegues commented 2 years ago

Sure. E.g.:

        livenessProbe:
          httpGet:
            path: /ready
            port: 2000
          initialDelaySeconds: 30
          periodSeconds: 30