Skip to content

Commit fa9a24b

Browse files
yfodilremyleone
andauthored
feat(lb): add servers to backend via tags (#2683)
Co-authored-by: Rémy Léone <rleone@scaleway.com>
1 parent bb49d6c commit fa9a24b

16 files changed

+14552
-16
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ USAGE:
88
ARGS:
99
backend-id Backend ID
1010
[instance-server-id.{index}] UIID of the instance server.
11+
[instance-server-tag.{index}] Tag of the instance server.
1112
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
1213
[baremetal-server-id.{index}] UIID of the baremetal server.
14+
[baremetal-server-tag.{index}] Tag of the baremetal server.
1315
server-ip.{index} Set all IPs to add on your backend
1416
[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)
1517

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ ARGS:
2727
[health-check.check-send-proxy] It defines whether the healthcheck should be done considering the proxy protocol
2828
lb-id Load balancer ID
2929
[instance-server-id.{index}] UIID of the instance server.
30+
[instance-server-tag.{index}] Tag of the instance server.
3031
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
3132
[baremetal-server-id.{index}] UIID of the baremetal server.
33+
[baremetal-server-tag.{index}] Tag of the baremetal server.
3234
server-ip.{index} Backend server IP addresses list (IPv4 or IPv6)
3335
[timeout-server] Maximum server connection inactivity time
3436
[timeout-connect] Maximum initical server connection establishment time

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ USAGE:
88
ARGS:
99
backend-id Backend ID
1010
[instance-server-id.{index}] UIID of the instance server.
11+
[instance-server-tag.{index}] Tag of the instance server.
1112
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
1213
[baremetal-server-id.{index}] UIID of the baremetal server.
14+
[baremetal-server-tag.{index}] Tag of the baremetal server.
1315
server-ip.{index} Set all IPs to remove of your backend
1416
[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)
1517

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ USAGE:
88
ARGS:
99
backend-id Backend ID
1010
[instance-server-id.{index}] UIID of the instance server.
11+
[instance-server-tag.{index}] Tag of the instance server.
1112
[use-instance-server-public-ip] Use public IP address of the instance instead of the private one
1213
[baremetal-server-id.{index}] UIID of the baremetal server.
14+
[baremetal-server-tag.{index}] Tag of the baremetal server.
1315
server-ip.{index} Set all IPs to add on your backend and remove all other
1416
[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)
1517

docs/commands/lb.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ scw lb backend add-servers <backend-id ...> [arg=value ...]
223223
|------|---|-------------|
224224
| backend-id | Required | Backend ID |
225225
| instance-server-id.{index} | | UIID of the instance server. |
226+
| instance-server-tag.{index} | | Tag of the instance server. |
226227
| use-instance-server-public-ip | | Use public IP address of the instance instead of the private one |
227228
| baremetal-server-id.{index} | | UIID of the baremetal server. |
229+
| baremetal-server-tag.{index} | | Tag of the baremetal server. |
228230
| server-ip.{index} | Required | Set all IPs to add on your backend |
229231
| 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 |
230232

@@ -266,8 +268,10 @@ scw lb backend create [arg=value ...]
266268
| health-check.check-send-proxy | | It defines whether the healthcheck should be done considering the proxy protocol |
267269
| lb-id | Required | Load balancer ID |
268270
| instance-server-id.{index} | | UIID of the instance server. |
271+
| instance-server-tag.{index} | | Tag of the instance server. |
269272
| use-instance-server-public-ip | | Use public IP address of the instance instead of the private one |
270273
| baremetal-server-id.{index} | | UIID of the baremetal server. |
274+
| baremetal-server-tag.{index} | | Tag of the baremetal server. |
271275
| server-ip.{index} | Required | Backend server IP addresses list (IPv4 or IPv6) |
272276
| ~~send-proxy-v2~~ | Deprecated | Deprecated in favor of proxy_protocol field ! |
273277
| timeout-server | | Maximum server connection inactivity time |
@@ -361,8 +365,10 @@ scw lb backend remove-servers <backend-id ...> [arg=value ...]
361365
|------|---|-------------|
362366
| backend-id | Required | Backend ID |
363367
| instance-server-id.{index} | | UIID of the instance server. |
368+
| instance-server-tag.{index} | | Tag of the instance server. |
364369
| use-instance-server-public-ip | | Use public IP address of the instance instead of the private one |
365370
| baremetal-server-id.{index} | | UIID of the baremetal server. |
371+
| baremetal-server-tag.{index} | | Tag of the baremetal server. |
366372
| server-ip.{index} | Required | Set all IPs to remove of your backend |
367373
| 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 |
368374

@@ -385,8 +391,10 @@ scw lb backend set-servers <backend-id ...> [arg=value ...]
385391
|------|---|-------------|
386392
| backend-id | Required | Backend ID |
387393
| instance-server-id.{index} | | UIID of the instance server. |
394+
| instance-server-tag.{index} | | Tag of the instance server. |
388395
| use-instance-server-public-ip | | Use public IP address of the instance instead of the private one |
389396
| baremetal-server-id.{index} | | UIID of the baremetal server. |
397+
| baremetal-server-tag.{index} | | Tag of the baremetal server. |
390398
| server-ip.{index} | Required | Set all IPs to add on your backend and remove all other |
391399
| 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 |
392400

0 commit comments

Comments
 (0)