k0sproject / k0s

k0s - The Zero Friction Kubernetes
https://docs.k0sproject.io
Other
3.54k stars 356 forks source link

Use a ten second timeout for join requests #4607

Closed twz123 closed 3 months ago

twz123 commented 3 months ago

Description

This prevents k0s from hanging on idle network connections, such as random glitches, badly behaving load balancers, and so on.

Add a context to the JoinClient methods and call them with a context that times out after 10 seconds when joining a controller. This has the side effect that joining will also be interruptible by SIGTERM and Ctrl+C.

Fixes #4557.

Type of change

How Has This Been Tested?

Checklist: