Skip to content

Commit fe2a6cb

Browse files
docs(lb): add default values (#3050)
Co-authored-by: Rémy Léone <rleone@scaleway.com>
1 parent 1aa1097 commit fe2a6cb

File tree

6 files changed

+30
-20
lines changed

6 files changed

+30
-20
lines changed

cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ ARGS:
1414
[sticky-sessions-cookie-name] Cookie name for cookie-based sticky sessions
1515
lb-id Load Balancer ID
1616
[health-check.port] Port to use for the backend server health check
17-
[health-check.check-delay] Time to wait between two consecutive health checks
18-
[health-check.check-timeout] Maximum time a backend server has to reply to the health check
17+
[health-check.check-delay=3s] Time to wait between two consecutive health checks
18+
[health-check.check-timeout=1s] Maximum time a backend server has to reply to the health check
1919
[health-check.check-max-retries] Number of consecutive unsuccessful health checks after which the server will be considered dead
2020
[health-check.mysql-config.user] MySQL user to use for the health check
2121
[health-check.pgsql-config.user] PostgreSQL user to use for the health check
@@ -37,9 +37,9 @@ ARGS:
3737
[baremetal-server-id.{index}] UIID of the baremetal server.
3838
[baremetal-server-tag.{index}] Tag of the baremetal server.
3939
server-ip.{index} List of backend server IP addresses (IPv4 or IPv6) the backend should forward traffic to
40-
[timeout-server] Maximum allowed time for a backend server to process a request
41-
[timeout-connect] Maximum allowed time for establishing a connection to a backend server
42-
[timeout-tunnel] Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout)
40+
[timeout-server=5m] Maximum allowed time for a backend server to process a request
41+
[timeout-connect=5s] Maximum allowed time for establishing a connection to a backend server
42+
[timeout-tunnel=15m] Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout)
4343
[on-marked-down-action] Action to take when a backend server is marked as down (on_marked_down_action_none | shutdown_sessions)
4444
[proxy-protocol] Protocol to use between the Load Balancer and backend servers. Allows the backend servers to be informed of the client's real IP address. The PROXY protocol must be supported by the backend servers' software (proxy_protocol_unknown | proxy_protocol_none | proxy_protocol_v1 | proxy_protocol_v2 | proxy_protocol_v2_ssl | proxy_protocol_v2_ssl_cn)
4545
[failover-host] Scaleway S3 bucket website to be served as failover if all backend servers are down, e.g. failover-website.s3-website.fr-par.scw.cloud

cmd/scw/testdata/test-all-usage-lb-backend-update-usage.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ ARGS:
1313
forward-port-algorithm Load balancing algorithm to be used when determining which backend server to forward new traffic to (roundrobin | leastconn | first)
1414
sticky-sessions Defines whether to activate sticky sessions (binding a particular session to a particular backend server) and the method to use if so. None disables sticky sessions. Cookie-based uses an HTTP cookie to stick a session to a backend server. Table-based uses the source (client) IP address to stick a session to a backend server (none | cookie | table)
1515
[sticky-sessions-cookie-name] Cookie name for cookie-based sticky sessions
16-
[timeout-server] Maximum allowed time for a backend server to process a request
17-
[timeout-connect] Maximum allowed time for establishing a connection to a backend server
18-
[timeout-tunnel] Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout)
16+
[timeout-server=5m] Maximum allowed time for a backend server to process a request
17+
[timeout-connect=5s] Maximum allowed time for establishing a connection to a backend server
18+
[timeout-tunnel=15m] Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout)
1919
[on-marked-down-action] Action to take when a backend server is marked as down (on_marked_down_action_none | shutdown_sessions)
2020
[proxy-protocol] Protocol to use between the Load Balancer and backend servers. Allows the backend servers to be informed of the client's real IP address. The PROXY protocol must be supported by the backend servers' software (proxy_protocol_unknown | proxy_protocol_none | proxy_protocol_v1 | proxy_protocol_v2 | proxy_protocol_v2_ssl | proxy_protocol_v2_ssl_cn)
2121
[failover-host] Scaleway S3 bucket website to be served as failover if all backend servers are down, e.g. failover-website.s3-website.fr-par.scw.cloud

cmd/scw/testdata/test-all-usage-lb-frontend-create-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ARGS:
1010
inbound-port Port the frontend should listen on
1111
lb-id Load Balancer ID (ID of the Load Balancer to attach the frontend to)
1212
backend-id Backend ID (ID of the backend the frontend should pass traffic to)
13-
[timeout-client] Maximum allowed inactivity time on the client side
13+
[timeout-client=5m] Maximum allowed inactivity time on the client side
1414
[certificate-ids.{index}] List of SSL/TLS certificate IDs to bind to the frontend
1515
[enable-http3] Defines whether to enable HTTP/3 protocol on the frontend
1616
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)

cmd/scw/testdata/test-all-usage-lb-frontend-update-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ARGS:
1010
name Frontend name
1111
inbound-port Port the frontend should listen on
1212
backend-id Backend ID (ID of the backend the frontend should pass traffic to)
13-
[timeout-client] Maximum allowed inactivity time on the client side
13+
[timeout-client=5m] Maximum allowed inactivity time on the client side
1414
[certificate-ids.{index}] List of SSL/TLS certificate IDs to bind to the frontend
1515
[enable-http3] Defines whether to enable HTTP/3 protocol on the frontend
1616
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)

docs/commands/lb.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ scw lb backend create [arg=value ...]
286286
| sticky-sessions-cookie-name | | Cookie name for cookie-based sticky sessions |
287287
| lb-id | Required | Load Balancer ID |
288288
| health-check.port | | Port to use for the backend server health check |
289-
| health-check.check-delay | | Time to wait between two consecutive health checks |
290-
| health-check.check-timeout | | Maximum time a backend server has to reply to the health check |
289+
| health-check.check-delay | Default: `3s` | Time to wait between two consecutive health checks |
290+
| health-check.check-timeout | Default: `1s` | Maximum time a backend server has to reply to the health check |
291291
| health-check.check-max-retries | | Number of consecutive unsuccessful health checks after which the server will be considered dead |
292292
| health-check.mysql-config.user | | MySQL user to use for the health check |
293293
| health-check.pgsql-config.user | | PostgreSQL user to use for the health check |
@@ -310,9 +310,9 @@ scw lb backend create [arg=value ...]
310310
| baremetal-server-tag.{index} | | Tag of the baremetal server. |
311311
| server-ip.{index} | Required | List of backend server IP addresses (IPv4 or IPv6) the backend should forward traffic to |
312312
| ~~send-proxy-v2~~ | Deprecated | Deprecated in favor of proxy_protocol field |
313-
| timeout-server | | Maximum allowed time for a backend server to process a request |
314-
| timeout-connect | | Maximum allowed time for establishing a connection to a backend server |
315-
| timeout-tunnel | | Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout) |
313+
| timeout-server | Default: `5m` | Maximum allowed time for a backend server to process a request |
314+
| timeout-connect | Default: `5s` | Maximum allowed time for establishing a connection to a backend server |
315+
| timeout-tunnel | Default: `15m` | Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout) |
316316
| on-marked-down-action | One of: `on_marked_down_action_none`, `shutdown_sessions` | Action to take when a backend server is marked as down |
317317
| proxy-protocol | One of: `proxy_protocol_unknown`, `proxy_protocol_none`, `proxy_protocol_v1`, `proxy_protocol_v2`, `proxy_protocol_v2_ssl`, `proxy_protocol_v2_ssl_cn` | Protocol to use between the Load Balancer and backend servers. Allows the backend servers to be informed of the client's real IP address. The PROXY protocol must be supported by the backend servers' software |
318318
| failover-host | | Scaleway S3 bucket website to be served as failover if all backend servers are down, e.g. failover-website.s3-website.fr-par.scw.cloud |
@@ -481,9 +481,9 @@ scw lb backend update <backend-id ...> [arg=value ...]
481481
| sticky-sessions | Required<br />One of: `none`, `cookie`, `table` | Defines whether to activate sticky sessions (binding a particular session to a particular backend server) and the method to use if so. None disables sticky sessions. Cookie-based uses an HTTP cookie to stick a session to a backend server. Table-based uses the source (client) IP address to stick a session to a backend server |
482482
| sticky-sessions-cookie-name | | Cookie name for cookie-based sticky sessions |
483483
| ~~send-proxy-v2~~ | Deprecated | Deprecated in favor of proxy_protocol field |
484-
| timeout-server | | Maximum allowed time for a backend server to process a request |
485-
| timeout-connect | | Maximum allowed time for establishing a connection to a backend server |
486-
| timeout-tunnel | | Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout) |
484+
| timeout-server | Default: `5m` | Maximum allowed time for a backend server to process a request |
485+
| timeout-connect | Default: `5s` | Maximum allowed time for establishing a connection to a backend server |
486+
| timeout-tunnel | Default: `15m` | Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout) |
487487
| on-marked-down-action | One of: `on_marked_down_action_none`, `shutdown_sessions` | Action to take when a backend server is marked as down |
488488
| proxy-protocol | One of: `proxy_protocol_unknown`, `proxy_protocol_none`, `proxy_protocol_v1`, `proxy_protocol_v2`, `proxy_protocol_v2_ssl`, `proxy_protocol_v2_ssl_cn` | Protocol to use between the Load Balancer and backend servers. Allows the backend servers to be informed of the client's real IP address. The PROXY protocol must be supported by the backend servers' software |
489489
| failover-host | | Scaleway S3 bucket website to be served as failover if all backend servers are down, e.g. failover-website.s3-website.fr-par.scw.cloud |
@@ -669,7 +669,7 @@ scw lb frontend create [arg=value ...]
669669
| inbound-port | Required | Port the frontend should listen on |
670670
| lb-id | Required | Load Balancer ID (ID of the Load Balancer to attach the frontend to) |
671671
| backend-id | Required | Backend ID (ID of the backend the frontend should pass traffic to) |
672-
| timeout-client | | Maximum allowed inactivity time on the client side |
672+
| timeout-client | Default: `5m` | Maximum allowed inactivity time on the client side |
673673
| ~~certificate-id~~ | Deprecated | Certificate ID, deprecated in favor of certificate_ids array |
674674
| certificate-ids.{index} | | List of SSL/TLS certificate IDs to bind to the frontend |
675675
| enable-http3 | | Defines whether to enable HTTP/3 protocol on the frontend |
@@ -758,7 +758,7 @@ scw lb frontend update <frontend-id ...> [arg=value ...]
758758
| name | Required | Frontend name |
759759
| inbound-port | Required | Port the frontend should listen on |
760760
| backend-id | Required | Backend ID (ID of the backend the frontend should pass traffic to) |
761-
| timeout-client | | Maximum allowed inactivity time on the client side |
761+
| timeout-client | Default: `5m` | Maximum allowed inactivity time on the client side |
762762
| ~~certificate-id~~ | Deprecated | Certificate ID, deprecated in favor of certificate_ids array |
763763
| certificate-ids.{index} | | List of SSL/TLS certificate IDs to bind to the frontend |
764764
| enable-http3 | | Defines whether to enable HTTP/3 protocol on the frontend |

internal/namespaces/lb/v1/lb_cli.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,13 +803,15 @@ func lbBackendCreate() *core.Command {
803803
Required: false,
804804
Deprecated: false,
805805
Positional: false,
806+
Default: core.DefaultValueSetter("3s"),
806807
},
807808
{
808809
Name: "health-check.check-timeout",
809810
Short: `Maximum time a backend server has to reply to the health check`,
810811
Required: false,
811812
Deprecated: false,
812813
Positional: false,
814+
Default: core.DefaultValueSetter("1s"),
813815
},
814816
{
815817
Name: "health-check.check-max-retries",
@@ -934,20 +936,23 @@ func lbBackendCreate() *core.Command {
934936
Required: false,
935937
Deprecated: false,
936938
Positional: false,
939+
Default: core.DefaultValueSetter("5m"),
937940
},
938941
{
939942
Name: "timeout-connect",
940943
Short: `Maximum allowed time for establishing a connection to a backend server`,
941944
Required: false,
942945
Deprecated: false,
943946
Positional: false,
947+
Default: core.DefaultValueSetter("5s"),
944948
},
945949
{
946950
Name: "timeout-tunnel",
947951
Short: `Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout)`,
948952
Required: false,
949953
Deprecated: false,
950954
Positional: false,
955+
Default: core.DefaultValueSetter("15m"),
951956
},
952957
{
953958
Name: "on-marked-down-action",
@@ -1118,20 +1123,23 @@ func lbBackendUpdate() *core.Command {
11181123
Required: false,
11191124
Deprecated: false,
11201125
Positional: false,
1126+
Default: core.DefaultValueSetter("5m"),
11211127
},
11221128
{
11231129
Name: "timeout-connect",
11241130
Short: `Maximum allowed time for establishing a connection to a backend server`,
11251131
Required: false,
11261132
Deprecated: false,
11271133
Positional: false,
1134+
Default: core.DefaultValueSetter("5s"),
11281135
},
11291136
{
11301137
Name: "timeout-tunnel",
11311138
Short: `Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout)`,
11321139
Required: false,
11331140
Deprecated: false,
11341141
Positional: false,
1142+
Default: core.DefaultValueSetter("15m"),
11351143
},
11361144
{
11371145
Name: "on-marked-down-action",
@@ -1597,6 +1605,7 @@ func lbFrontendCreate() *core.Command {
15971605
Required: false,
15981606
Deprecated: false,
15991607
Positional: false,
1608+
Default: core.DefaultValueSetter("5m"),
16001609
},
16011610
{
16021611
Name: "certificate-id",
@@ -1706,6 +1715,7 @@ func lbFrontendUpdate() *core.Command {
17061715
Required: false,
17071716
Deprecated: false,
17081717
Positional: false,
1718+
Default: core.DefaultValueSetter("5m"),
17091719
},
17101720
{
17111721
Name: "certificate-id",

0 commit comments

Comments
 (0)