Skip to content

Commit 7a35753

Browse files
authored
feat(lb): add servers to backend via id (#2679)
1 parent ce50296 commit 7a35753

16 files changed

+16011
-9
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ USAGE:
66
scw lb backend add-servers <backend-id ...> [arg=value ...]
77

88
ARGS:
9-
backend-id Backend ID
10-
server-ip.{index} Set all IPs to add on your backend
11-
[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)
9+
backend-id Backend ID
10+
[instance-server-id.{index}] UIID of the instance server.
11+
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
12+
[baremetal-server-id.{index}] UIID of the baremetal server.
13+
server-ip.{index} Set all IPs to add on your backend
14+
[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)
1215

1316
FLAGS:
1417
-h, --help help for add-servers

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ ARGS:
2626
[health-check.check-delay]
2727
[health-check.check-send-proxy] It defines whether the healthcheck should be done considering the proxy protocol
2828
lb-id Load balancer ID
29+
[instance-server-id.{index}] UIID of the instance server.
30+
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
31+
[baremetal-server-id.{index}] UIID of the baremetal server.
2932
server-ip.{index} Backend server IP addresses list (IPv4 or IPv6)
3033
[timeout-server] Maximum server connection inactivity time
3134
[timeout-connect] Maximum initical server connection establishment time

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ USAGE:
66
scw lb backend remove-servers <backend-id ...> [arg=value ...]
77

88
ARGS:
9-
backend-id Backend ID
10-
server-ip.{index} Set all IPs to remove of your backend
11-
[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)
9+
backend-id Backend ID
10+
[instance-server-id.{index}] UIID of the instance server.
11+
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
12+
[baremetal-server-id.{index}] UIID of the baremetal server.
13+
server-ip.{index} Set all IPs to remove of your backend
14+
[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)
1215

1316
FLAGS:
1417
-h, --help help for remove-servers

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ USAGE:
66
scw lb backend set-servers <backend-id ...> [arg=value ...]
77

88
ARGS:
9-
backend-id Backend ID
10-
server-ip.{index} Set all IPs to add on your backend and remove all other
11-
[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)
9+
backend-id Backend ID
10+
[instance-server-id.{index}] UIID of the instance server.
11+
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
12+
[baremetal-server-id.{index}] UIID of the baremetal server.
13+
server-ip.{index} Set all IPs to add on your backend and remove all other
14+
[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)
1215

1316
FLAGS:
1417
-h, --help help for set-servers

docs/commands/lb.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ scw lb backend add-servers <backend-id ...> [arg=value ...]
222222
| Name | | Description |
223223
|------|---|-------------|
224224
| backend-id | Required | Backend ID |
225+
| instance-server-id.{index} | | UIID of the instance server. |
226+
| use-instance-server-public-ip | | Use public IP address of the instance instead of the private one |
227+
| baremetal-server-id.{index} | | UIID of the baremetal server. |
225228
| server-ip.{index} | Required | Set all IPs to add on your backend |
226229
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1` | Zone to target. If none is passed will use default zone from the config |
227230

@@ -262,6 +265,9 @@ scw lb backend create [arg=value ...]
262265
| health-check.check-delay | | |
263266
| health-check.check-send-proxy | | It defines whether the healthcheck should be done considering the proxy protocol |
264267
| lb-id | Required | Load balancer ID |
268+
| instance-server-id.{index} | | UIID of the instance server. |
269+
| use-instance-server-public-ip | | Use public IP address of the instance instead of the private one |
270+
| baremetal-server-id.{index} | | UIID of the baremetal server. |
265271
| server-ip.{index} | Required | Backend server IP addresses list (IPv4 or IPv6) |
266272
| ~~send-proxy-v2~~ | Deprecated | Deprecated in favor of proxy_protocol field ! |
267273
| timeout-server | | Maximum server connection inactivity time |
@@ -354,6 +360,9 @@ scw lb backend remove-servers <backend-id ...> [arg=value ...]
354360
| Name | | Description |
355361
|------|---|-------------|
356362
| backend-id | Required | Backend ID |
363+
| instance-server-id.{index} | | UIID of the instance server. |
364+
| use-instance-server-public-ip | | Use public IP address of the instance instead of the private one |
365+
| baremetal-server-id.{index} | | UIID of the baremetal server. |
357366
| server-ip.{index} | Required | Set all IPs to remove of your backend |
358367
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1` | Zone to target. If none is passed will use default zone from the config |
359368

@@ -375,6 +384,9 @@ scw lb backend set-servers <backend-id ...> [arg=value ...]
375384
| Name | | Description |
376385
|------|---|-------------|
377386
| backend-id | Required | Backend ID |
387+
| instance-server-id.{index} | | UIID of the instance server. |
388+
| use-instance-server-public-ip | | Use public IP address of the instance instead of the private one |
389+
| baremetal-server-id.{index} | | UIID of the baremetal server. |
378390
| server-ip.{index} | Required | Set all IPs to add on your backend and remove all other |
379391
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1` | Zone to target. If none is passed will use default zone from the config |
380392

0 commit comments

Comments
 (0)