mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: replace ssh maxTimeout with keep-alive mechanism (#8062)
* Bump up coder/ssh * feat: Set default agent timeout to ~72h * Address PR comments * Fix
This commit is contained in:
+4
-3
@@ -323,10 +323,11 @@ func (r *RootCmd) workspaceAgent() *clibase.Cmd {
|
||||
Value: clibase.BoolOf(&noReap),
|
||||
},
|
||||
{
|
||||
Flag: "ssh-max-timeout",
|
||||
Default: "0",
|
||||
Flag: "ssh-max-timeout",
|
||||
// tcpip.KeepaliveIdleOption = 72h + 1min (forwardTCPSockOpts() in tailnet/conn.go)
|
||||
Default: "72h",
|
||||
Env: "CODER_AGENT_SSH_MAX_TIMEOUT",
|
||||
Description: "Specify the max timeout for a SSH connection.",
|
||||
Description: "Specify the max timeout for a SSH connection, it is advisable to set it to a minimum of 60s, but no more than 72h.",
|
||||
Value: clibase.DurationOf(&sshMaxTimeout),
|
||||
},
|
||||
{
|
||||
|
||||
+3
-2
@@ -30,8 +30,9 @@ Starts the Coder workspace agent.
|
||||
--prometheus-address string, $CODER_AGENT_PROMETHEUS_ADDRESS (default: 127.0.0.1:2112)
|
||||
The bind address to serve Prometheus metrics.
|
||||
|
||||
--ssh-max-timeout duration, $CODER_AGENT_SSH_MAX_TIMEOUT (default: 0)
|
||||
Specify the max timeout for a SSH connection.
|
||||
--ssh-max-timeout duration, $CODER_AGENT_SSH_MAX_TIMEOUT (default: 72h)
|
||||
Specify the max timeout for a SSH connection, it is advisable to set
|
||||
it to a minimum of 60s, but no more than 72h.
|
||||
|
||||
--tailnet-listen-port int, $CODER_AGENT_TAILNET_LISTEN_PORT (default: 0)
|
||||
Specify a static port for Tailscale to use for listening.
|
||||
|
||||
Reference in New Issue
Block a user