Skip to content

Commit

Permalink
feat(lb): improve doc and add private-network (#2703)
Browse files Browse the repository at this point in the history
Co-authored-by: Jules Castéran <jcasteran@scaleway.com>
  • Loading branch information
scaleway-bot and Codelax committed Jan 3, 2023
1 parent 37a9841 commit 8806d83
Show file tree
Hide file tree
Showing 51 changed files with 631 additions and 243 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ ARGS:
[port]
[secret-environment-variables.{index}.key]
[secret-environment-variables.{index}.value]
[http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

DEPRECATED ARGS:
[http-option] Configure how HTTP and HTTPS requests are handled

FLAGS:
-h, --help help for create

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ ARGS:
[port]
[secret-environment-variables.{index}.key]
[secret-environment-variables.{index}.value]
[http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

DEPRECATED ARGS:
[http-option] Configure how HTTP and HTTPS requests are handled

FLAGS:
-h, --help help for update

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ARGS:
[baremetal-server-id.{index}] UIID of the baremetal server.
[baremetal-server-tag.{index}] Tag of the baremetal server.
server-ip.{index} Set all IPs to add on your backend
[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)
[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)

FLAGS:
-h, --help help for add-servers
Expand Down
73 changes: 38 additions & 35 deletions cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,44 @@ USAGE:
scw lb backend create [arg=value ...]

ARGS:
name=<generated> Resource name
forward-protocol Backend protocol. TCP or HTTP (tcp | http)
forward-port User sessions will be forwarded to this port of backend servers
forward-port-algorithm=roundrobin Load balancing algorithm (roundrobin | leastconn | first)
sticky-sessions=none Enables cookie-based session persistence (none | cookie | table)
[sticky-sessions-cookie-name] Cookie name for for sticky sessions
[health-check.mysql-config.user]
[health-check.check-max-retries]
[health-check.pgsql-config.user]
[health-check.http-config.uri]
[health-check.http-config.method]
[health-check.http-config.code]
[health-check.https-config.uri]
[health-check.https-config.method]
[health-check.https-config.code]
[health-check.port]
[health-check.check-timeout]
[health-check.check-delay]
[health-check.check-send-proxy] It defines whether the healthcheck should be done considering the proxy protocol
lb-id Load balancer ID
[instance-server-id.{index}] UIID of the instance server.
[instance-server-tag.{index}] Tag of the instance server.
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
[baremetal-server-id.{index}] UIID of the baremetal server.
[baremetal-server-tag.{index}] Tag of the baremetal server.
server-ip.{index} Backend server IP addresses list (IPv4 or IPv6)
[timeout-server] Maximum server connection inactivity time
[timeout-connect] Maximum initical server connection establishment time
[timeout-tunnel] Maximum tunnel inactivity time
[on-marked-down-action] Modify what occurs when a backend server is marked down (on_marked_down_action_none | shutdown_sessions)
[proxy-protocol] PROXY protocol, forward client's address (must be supported by backend servers software) (proxy_protocol_unknown | proxy_protocol_none | proxy_protocol_v1 | proxy_protocol_v2 | proxy_protocol_v2_ssl | proxy_protocol_v2_ssl_cn)
[failover-host] Scaleway S3 bucket website to be served in case all backend servers are down
[ssl-bridging] Enable SSL between load balancer and backend servers
[ignore-ssl-server-verify] Set to true to ignore server certificate verification
[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)
name=<generated> Resource name
forward-protocol Backend protocol. TCP or HTTP (tcp | http)
forward-port User sessions will be forwarded to this port of backend servers
forward-port-algorithm=roundrobin Load balancing algorithm (roundrobin | leastconn | first)
sticky-sessions=none Enables cookie-based session persistence (none | cookie | table)
[sticky-sessions-cookie-name] Cookie name for sticky sessions
[health-check.mysql-config.user]
[health-check.check-max-retries] Number of consecutive unsuccessful health checks, after which the server will be considered dead
[health-check.pgsql-config.user]
[health-check.http-config.uri] HTTP uri used with the request
[health-check.http-config.method] HTTP method used with the request
[health-check.http-config.code] HTTP response code so the Healthcheck is considered successfull
[health-check.http-config.host-header] HTTP host header used with the request
[health-check.https-config.uri] HTTP uri used with the request
[health-check.https-config.method] HTTP method used with the request
[health-check.https-config.code] HTTP response code so the Healthcheck is considered successfull
[health-check.https-config.host-header] HTTP host header used with the request
[health-check.https-config.sni] Specifies the SNI to use to do health checks over SSL
[health-check.port] TCP port to use for the backend server health check
[health-check.check-timeout] Maximum time a backend server has to reply to the health check
[health-check.check-delay] Time between two consecutive health checks
[health-check.check-send-proxy] It defines whether the health check should be done considering the proxy protocol
lb-id Load balancer ID
[instance-server-id.{index}] UIID of the instance server.
[instance-server-tag.{index}] Tag of the instance server.
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
[baremetal-server-id.{index}] UIID of the baremetal server.
[baremetal-server-tag.{index}] Tag of the baremetal server.
server-ip.{index} Backend server IP addresses list (IPv4 or IPv6)
[timeout-server] Maximum server connection inactivity time (allowed time the server has to process the request)
[timeout-connect] Maximum initial server connection establishment time
[timeout-tunnel] Maximum tunnel inactivity time after Websocket is established (take precedence over client and server timeout)
[on-marked-down-action] Modify what occurs when a backend server is marked down (on_marked_down_action_none | shutdown_sessions)
[proxy-protocol] PROXY protocol, forward client's address (must be supported by backend servers software) (proxy_protocol_unknown | proxy_protocol_none | proxy_protocol_v1 | proxy_protocol_v2 | proxy_protocol_v2_ssl | proxy_protocol_v2_ssl_cn)
[failover-host] Scaleway S3 bucket website to be served in case all backend servers are down
[ssl-bridging] Enable SSL between load balancer and backend servers
[ignore-ssl-server-verify] Set to true to ignore server certificate verification
[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)

DEPRECATED ARGS:
[send-proxy-v2] Deprecated in favor of proxy_protocol field !
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
backend-id ID of the backend to delete
[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)
[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)

FLAGS:
-h, --help help for delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
backend-id Backend ID
[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)
[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)

FLAGS:
-h, --help help for get
Expand Down
4 changes: 2 additions & 2 deletions cmd/scw/testdata/test-all-usage-lb-backend-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ USAGE:
ARGS:
lb-id Load balancer ID
[name] Use this to search by name
[order-by] Choose order of response (created_at_asc | created_at_desc | name_asc | name_desc)
[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)
[order-by] Response order (created_at_asc | created_at_desc | name_asc | name_desc)
[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)

FLAGS:
-h, --help help for list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ARGS:
[baremetal-server-id.{index}] UIID of the baremetal server.
[baremetal-server-tag.{index}] Tag of the baremetal server.
server-ip.{index} Set all IPs to remove of your backend
[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)
[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)

FLAGS:
-h, --help help for remove-servers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ARGS:
[baremetal-server-id.{index}] UIID of the baremetal server.
[baremetal-server-tag.{index}] Tag of the baremetal server.
server-ip.{index} Set all IPs to add on your backend and remove all other
[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)
[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)

FLAGS:
-h, --help help for set-servers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,24 @@ USAGE:
scw lb backend update-healthcheck [arg=value ...]

ARGS:
port Specify the port used to health check
check-delay Time between two consecutive health checks
check-timeout Additional check timeout, after the connection has been already established
check-max-retries Number of consecutive unsuccessful health checks, after wich the server will be considered dead
backend-id Backend ID
[mysql-config.user]
[pgsql-config.user]
[http-config.uri]
[http-config.method]
[http-config.code]
[https-config.uri]
[https-config.method]
[https-config.code]
[check-send-proxy] It defines whether the healthcheck should be done considering the proxy protocol
[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)
port Specify the port used to health check
check-delay Time between two consecutive health checks
check-timeout Maximum time a backend server has to reply to the health check
check-max-retries Number of consecutive unsuccessful health checks, after which the server will be considered dead
backend-id Backend ID
[mysql-config.user]
[pgsql-config.user]
[http-config.uri] HTTP uri used with the request
[http-config.method] HTTP method used with the request
[http-config.code] HTTP response code so the Healthcheck is considered successfull
[http-config.host-header] HTTP host header used with the request
[https-config.uri] HTTP uri used with the request
[https-config.method] HTTP method used with the request
[https-config.code] HTTP response code so the Healthcheck is considered successfull
[https-config.host-header] HTTP host header used with the request
[https-config.sni] Specifies the SNI to use to do health checks over SSL
[check-send-proxy] It defines whether the health check should be done considering the proxy protocol
[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)

FLAGS:
-h, --help help for update-healthcheck
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ ARGS:
forward-port User sessions will be forwarded to this port of backend servers
forward-port-algorithm Load balancing algorithm (roundrobin | leastconn | first)
sticky-sessions Enable cookie-based session persistence (none | cookie | table)
[sticky-sessions-cookie-name] Cookie name for for sticky sessions
[timeout-server] Maximum server connection inactivity time
[sticky-sessions-cookie-name] Cookie name for sticky sessions
[timeout-server] Maximum server connection inactivity time (allowed time the server has to process the request)
[timeout-connect] Maximum initial server connection establishment time
[timeout-tunnel] Maximum tunnel inactivity time
[timeout-tunnel] Maximum tunnel inactivity time after Websocket is established (take precedence over client and server timeout)
[on-marked-down-action] Modify what occurs when a backend server is marked down (on_marked_down_action_none | shutdown_sessions)
[proxy-protocol] PROXY protocol, forward client's address (must be supported by backend servers software) (proxy_protocol_unknown | proxy_protocol_none | proxy_protocol_v1 | proxy_protocol_v2 | proxy_protocol_v2_ssl | proxy_protocol_v2_ssl_cn)
[failover-host] Scaleway S3 bucket website to be served in case all backend servers are down
[ssl-bridging] Enable SSL between load balancer and backend servers
[ignore-ssl-server-verify] Set to true to ignore server certificate verification
[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)
[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)

DEPRECATED ARGS:
[send-proxy-v2] Deprecated in favor of proxy_protocol field!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARGS:
[letsencrypt-common-name] Main domain name of certificate (make sure this domain exists and resolves to your load balancer HA IP)
[letsencrypt-alternative-name.{index}] Alternative domain names (make sure all domain names exists and resolves to your load balancer HA IP)
[custom-certificate-chain] The full PEM-formatted include an entire certificate chain including public key, private key, and optionally certificate authorities.
[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)
[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)

FLAGS:
-h, --help help for create
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
certificate-id Certificate ID
[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)
[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)

FLAGS:
-h, --help help for delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
certificate-id Certificate ID
[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)
[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)

FLAGS:
-h, --help help for get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ USAGE:

ARGS:
lb-id Load balancer ID
[order-by] You can order the response by created_at asc/desc or name asc/desc (created_at_asc | created_at_desc | name_asc | name_desc)
[order-by] Response order (created_at_asc | created_at_desc | name_asc | name_desc)
[name] Use this to search by name
[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)
[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)

FLAGS:
-h, --help help for list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ USAGE:
ARGS:
certificate-id Certificate ID
name Certificate name
[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)
[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)

FLAGS:
-h, --help help for update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ ARGS:
backend-id Backend ID
[timeout-client] Set the maximum inactivity time on the client side
[certificate-ids.{index}] List of certificate IDs to bind on the frontend
[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)
[enable-http3] Activate HTTP 3 protocol (beta)
[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)

DEPRECATED ARGS:
[certificate-id] Certificate ID, deprecated in favor of certificate_ids array !
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
frontend-id Frontend ID to delete
[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)
[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)

FLAGS:
-h, --help help for delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
frontend-id Frontend ID
[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)
[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)

FLAGS:
-h, --help help for get
Expand Down

0 comments on commit 8806d83

Please sign in to comment.