Skip to content

Commit 86ff11f

Browse files
committed
feat: update generated APIs
1 parent 6ec08ac commit 86ff11f

File tree

7 files changed

+127
-59
lines changed

7 files changed

+127
-59
lines changed

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

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,48 @@ USAGE:
66
scw lb backend create [arg=value ...]
77

88
ARGS:
9-
name=<generated> Name for the backend
10-
forward-protocol Protocol to be used by the backend when forwarding traffic to backend servers (tcp | http)
11-
forward-port Port to be used by the backend when forwarding traffic to backend servers
12-
forward-port-algorithm=roundrobin Load balancing algorithm to be used when determining which backend server to forward new traffic to (roundrobin | leastconn | first)
13-
sticky-sessions=none 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)
14-
[sticky-sessions-cookie-name] Cookie name for cookie-based sticky sessions
15-
[health-check.mysql-config.user]
16-
[health-check.check-max-retries] Number of consecutive unsuccessful health checks after which the server will be considered dead
17-
[health-check.pgsql-config.user]
18-
[health-check.http-config.uri] HTTP URI used for the health check
19-
[health-check.http-config.method] HTTP method used for the health check
20-
[health-check.http-config.code] HTTP response code expected for a successful health check
21-
[health-check.http-config.host-header] HTTP host header used for the health check
22-
[health-check.https-config.uri] HTTP URI used for the health check
23-
[health-check.https-config.method] HTTP method used for the health check
24-
[health-check.https-config.code] HTTP response code expected for a successful health check
25-
[health-check.https-config.host-header] HTTP host header used for the health check
26-
[health-check.https-config.sni] SNI used for SSL health checks
27-
[health-check.port] Port to use for the backend server health check
28-
[health-check.check-timeout] Maximum time a backend server has to reply to the health check
29-
[health-check.check-delay] Time to wait between two consecutive health checks
30-
[health-check.check-send-proxy] Defines whether proxy protocol should be activated for the health check
31-
lb-id Load Balancer ID
32-
[instance-server-id.{index}] UIID of the instance server.
33-
[instance-server-tag.{index}] Tag of the instance server.
34-
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
35-
[baremetal-server-id.{index}] UIID of the baremetal server.
36-
[baremetal-server-tag.{index}] Tag of the baremetal server.
37-
server-ip.{index} List of backend server IP addresses (IPv4 or IPv6) the backend should forward traffic to
38-
[timeout-server] Maximum allowed time for a backend server to process a request
39-
[timeout-connect] Maximum allowed time for establishing a connection to a backend server
40-
[timeout-tunnel] Maximum allowed tunnel inactivity time after Websocket is established (takes precedence over client and server timeout)
41-
[on-marked-down-action] Action to take when a backend server is marked as down (on_marked_down_action_none | shutdown_sessions)
42-
[proxy-protocol] PROXY protocol to use between the Load Balancer and backend servers. Allows the backend servers to be informed of the client's real IP address. 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)
43-
[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. Do not include the scheme (eg https://)
44-
[ssl-bridging] Defines whether to enable SSL between the Load Balancer and backend servers
45-
[ignore-ssl-server-verify] Defines whether the server certificate verification should be ignored
46-
[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)
9+
name=<generated> Name for the backend
10+
forward-protocol Protocol to be used by the backend when forwarding traffic to backend servers (tcp | http)
11+
forward-port Port to be used by the backend when forwarding traffic to backend servers
12+
forward-port-algorithm=roundrobin Load balancing algorithm to be used when determining which backend server to forward new traffic to (roundrobin | leastconn | first)
13+
sticky-sessions=none 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)
14+
[sticky-sessions-cookie-name] Cookie name for cookie-based sticky sessions
15+
[health-check.mysql-config.user]
16+
[health-check.check-max-retries] Number of consecutive unsuccessful health checks after which the server will be considered dead
17+
[health-check.pgsql-config.user]
18+
[health-check.http-config.uri] HTTP URI used for the health check
19+
[health-check.http-config.method] HTTP method used for the health check
20+
[health-check.http-config.code] HTTP response code expected for a successful health check
21+
[health-check.http-config.host-header] HTTP host header used for the health check
22+
[health-check.https-config.uri] HTTP URI used for the health check
23+
[health-check.https-config.method] HTTP method used for the health check
24+
[health-check.https-config.code] HTTP response code expected for a successful health check
25+
[health-check.https-config.host-header] HTTP host header used for the health check
26+
[health-check.https-config.sni] SNI used for SSL health checks
27+
[health-check.port] Port to use for the backend server health check
28+
[health-check.check-timeout] Maximum time a backend server has to reply to the health check
29+
[health-check.check-delay] Time to wait between two consecutive health checks
30+
[health-check.check-send-proxy] Defines whether proxy protocol should be activated for the health check
31+
[health-check.transient-check-delay.seconds]
32+
[health-check.transient-check-delay.nanos]
33+
lb-id Load Balancer ID
34+
[instance-server-id.{index}] UIID of the instance server.
35+
[instance-server-tag.{index}] Tag of the instance server.
36+
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
37+
[baremetal-server-id.{index}] UIID of the baremetal server.
38+
[baremetal-server-tag.{index}] Tag of the baremetal server.
39+
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)
43+
[on-marked-down-action] Action to take when a backend server is marked as down (on_marked_down_action_none | shutdown_sessions)
44+
[proxy-protocol] PROXY protocol to use between the Load Balancer and backend servers. Allows the backend servers to be informed of the client's real IP address. 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)
45+
[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. Do not include the scheme (eg https://)
46+
[ssl-bridging] Defines whether to enable SSL between the Load Balancer and backend servers
47+
[ignore-ssl-server-verify] Defines whether the server certificate verification should be ignored
48+
[redispatch-attempt-count] Whether to use another backend server on each attempt
49+
[max-retries] Number of retries when a backend server connection failed
50+
[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)
4751

4852
DEPRECATED ARGS:
4953
[send-proxy-v2] Deprecated in favor of proxy_protocol field

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

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@ USAGE:
66
scw lb backend update-healthcheck [arg=value ...]
77

88
ARGS:
9-
port Port to use for the backend server health check
10-
check-delay Time to wait between two consecutive health checks
11-
check-timeout Maximum time a backend server has to reply to the health check
12-
check-max-retries Number of consecutive unsuccessful health checks, after which the server will be considered dead
13-
backend-id Backend ID
14-
[mysql-config.user]
15-
[pgsql-config.user]
16-
[http-config.uri] HTTP URI used for the health check
17-
[http-config.method] HTTP method used for the health check
18-
[http-config.code] HTTP response code expected for a successful health check
19-
[http-config.host-header] HTTP host header used for the health check
20-
[https-config.uri] HTTP URI used for the health check
21-
[https-config.method] HTTP method used for the health check
22-
[https-config.code] HTTP response code expected for a successful health check
23-
[https-config.host-header] HTTP host header used for the health check
24-
[https-config.sni] SNI used for SSL health checks
25-
[check-send-proxy] Defines whether proxy protocol should be activated for the health check
26-
[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)
9+
port Port to use for the backend server health check
10+
check-delay Time to wait between two consecutive health checks
11+
check-timeout Maximum time a backend server has to reply to the health check
12+
check-max-retries Number of consecutive unsuccessful health checks, after which the server will be considered dead
13+
backend-id Backend ID
14+
[mysql-config.user]
15+
[pgsql-config.user]
16+
[http-config.uri] HTTP URI used for the health check
17+
[http-config.method] HTTP method used for the health check
18+
[http-config.code] HTTP response code expected for a successful health check
19+
[http-config.host-header] HTTP host header used for the health check
20+
[https-config.uri] HTTP URI used for the health check
21+
[https-config.method] HTTP method used for the health check
22+
[https-config.code] HTTP response code expected for a successful health check
23+
[https-config.host-header] HTTP host header used for the health check
24+
[https-config.sni] SNI used for SSL health checks
25+
[check-send-proxy] Defines whether proxy protocol should be activated for the health check
26+
[transient-check-delay.seconds]
27+
[transient-check-delay.nanos]
28+
[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)
2729

2830
FLAGS:
2931
-h, --help help for update-healthcheck

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ ARGS:
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. Do not include the scheme (eg https://)
2222
[ssl-bridging] Defines whether to enable SSL bridging between the Load Balancer and backend servers
2323
[ignore-ssl-server-verify] Defines whether the server certificate verification should be ignored
24+
[redispatch-attempt-count] Whether to use another backend server on each retries
25+
[max-retries] Number of retries when a backend server connection failed
2426
[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)
2527

2628
DEPRECATED ARGS:

docs/commands/lb.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ scw lb backend create [arg=value ...]
300300
| health-check.check-timeout | | Maximum time a backend server has to reply to the health check |
301301
| health-check.check-delay | | Time to wait between two consecutive health checks |
302302
| health-check.check-send-proxy | | Defines whether proxy protocol should be activated for the health check |
303+
| health-check.transient-check-delay.seconds | | |
304+
| health-check.transient-check-delay.nanos | | |
303305
| lb-id | Required | Load Balancer ID |
304306
| instance-server-id.{index} | | UIID of the instance server. |
305307
| instance-server-tag.{index} | | Tag of the instance server. |
@@ -316,6 +318,8 @@ scw lb backend create [arg=value ...]
316318
| 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. Do not include the scheme (eg https://) |
317319
| ssl-bridging | | Defines whether to enable SSL between the Load Balancer and backend servers |
318320
| ignore-ssl-server-verify | | Defines whether the server certificate verification should be ignored |
321+
| redispatch-attempt-count | | Whether to use another backend server on each attempt |
322+
| max-retries | | Number of retries when a backend server connection failed |
319323
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |
320324

321325

@@ -485,6 +489,8 @@ scw lb backend update <backend-id ...> [arg=value ...]
485489
| 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. Do not include the scheme (eg https://) |
486490
| ssl-bridging | | Defines whether to enable SSL bridging between the Load Balancer and backend servers |
487491
| ignore-ssl-server-verify | | Defines whether the server certificate verification should be ignored |
492+
| redispatch-attempt-count | | Whether to use another backend server on each retries |
493+
| max-retries | | Number of retries when a backend server connection failed |
488494
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |
489495

490496

@@ -521,6 +527,8 @@ scw lb backend update-healthcheck [arg=value ...]
521527
| https-config.host-header | | HTTP host header used for the health check |
522528
| https-config.sni | | SNI used for SSL health checks |
523529
| check-send-proxy | | Defines whether proxy protocol should be activated for the health check |
530+
| transient-check-delay.seconds | | |
531+
| transient-check-delay.nanos | | |
524532
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |
525533

526534

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ require (
2222
github.com/moby/buildkit v0.11.5
2323
github.com/opencontainers/go-digest v1.0.0
2424
github.com/pkg/errors v0.9.1
25-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230323101524-c017498bf616
25+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230324173156-e992c027fa5f
2626
github.com/spf13/cobra v1.6.1
2727
github.com/spf13/pflag v1.0.5
2828
github.com/stretchr/testify v1.8.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
275275
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
276276
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
277277
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
278-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230323101524-c017498bf616 h1:7zcfy2f51uoLQyFzguQXa5rxDzyy8md6eWTuwFn3sis=
279-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230323101524-c017498bf616/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
278+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230324173156-e992c027fa5f h1:6vmpdv+UjeGowsTXZTxS+1ksmxmqGUUlsI6Nf+g1+Ak=
279+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230324173156-e992c027fa5f/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
280280
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
281281
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
282282
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=

0 commit comments

Comments
 (0)