Skip to content

Commit 823b4d1

Browse files
authored
feat(edge_services): add websocket option to load balancer origin (#5094)
1 parent 6fd860d commit 823b4d1

File tree

6 files changed

+40
-22
lines changed

6 files changed

+40
-22
lines changed

cmd/scw/testdata/test-all-usage-edge-services-backend-stage-create-usage.golden

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ USAGE:
66
scw edge-services backend-stage create [arg=value ...]
77

88
ARGS:
9-
[scaleway-s3.bucket-name] Name of the Bucket
10-
[scaleway-s3.bucket-region] Region of the Bucket
11-
[scaleway-s3.is-website] Defines whether the bucket website feature is enabled
12-
[scaleway-lb.lbs.{index}.id] ID of the Load Balancer
13-
[scaleway-lb.lbs.{index}.zone] Zone of the Load Balancer
14-
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
15-
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
16-
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
17-
pipeline-id Pipeline ID the Backend stage belongs to
9+
[scaleway-s3.bucket-name] Name of the Bucket
10+
[scaleway-s3.bucket-region] Region of the Bucket
11+
[scaleway-s3.is-website] Defines whether the bucket website feature is enabled
12+
[scaleway-lb.lbs.{index}.id] ID of the Load Balancer
13+
[scaleway-lb.lbs.{index}.zone] Zone of the Load Balancer
14+
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
15+
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
16+
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
17+
[scaleway-lb.lbs.{index}.has-websocket] Defines whether to forward websocket requests to the load balancer
18+
pipeline-id Pipeline ID the Backend stage belongs to
1819

1920
FLAGS:
2021
-h, --help help for create

cmd/scw/testdata/test-all-usage-edge-services-backend-stage-update-usage.golden

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ USAGE:
66
scw edge-services backend-stage update <backend-stage-id ...> [arg=value ...]
77

88
ARGS:
9-
backend-stage-id ID of the backend stage to update
10-
[scaleway-s3.bucket-name] Name of the Bucket
11-
[scaleway-s3.bucket-region] Region of the Bucket
12-
[scaleway-s3.is-website] Defines whether the bucket website feature is enabled
13-
[scaleway-lb.lbs.{index}.id] ID of the Load Balancer
14-
[scaleway-lb.lbs.{index}.zone] Zone of the Load Balancer
15-
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
16-
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
17-
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
18-
[pipeline-id] Pipeline ID the Backend stage belongs to
9+
backend-stage-id ID of the backend stage to update
10+
[scaleway-s3.bucket-name] Name of the Bucket
11+
[scaleway-s3.bucket-region] Region of the Bucket
12+
[scaleway-s3.is-website] Defines whether the bucket website feature is enabled
13+
[scaleway-lb.lbs.{index}.id] ID of the Load Balancer
14+
[scaleway-lb.lbs.{index}.zone] Zone of the Load Balancer
15+
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
16+
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
17+
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
18+
[scaleway-lb.lbs.{index}.has-websocket] Defines whether to forward websocket requests to the load balancer
19+
[pipeline-id] Pipeline ID the Backend stage belongs to
1920

2021
FLAGS:
2122
-h, --help help for update

docs/commands/edge-services.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ scw edge-services backend-stage create [arg=value ...]
8282
| scaleway-lb.lbs.{index}.frontend-id | | ID of the frontend linked to the Load Balancer |
8383
| scaleway-lb.lbs.{index}.is-ssl | | Defines whether the Load Balancer's frontend handles SSL connections |
8484
| scaleway-lb.lbs.{index}.domain-name | | Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer |
85+
| scaleway-lb.lbs.{index}.has-websocket | | Defines whether to forward websocket requests to the load balancer |
8586
| pipeline-id | Required | Pipeline ID the Backend stage belongs to |
8687

8788

@@ -171,6 +172,7 @@ scw edge-services backend-stage update <backend-stage-id ...> [arg=value ...]
171172
| scaleway-lb.lbs.{index}.frontend-id | | ID of the frontend linked to the Load Balancer |
172173
| scaleway-lb.lbs.{index}.is-ssl | | Defines whether the Load Balancer's frontend handles SSL connections |
173174
| scaleway-lb.lbs.{index}.domain-name | | Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer |
175+
| scaleway-lb.lbs.{index}.has-websocket | | Defines whether to forward websocket requests to the load balancer |
174176
| pipeline-id | | Pipeline ID the Backend stage belongs to |
175177

176178

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/mattn/go-isatty v0.0.20
2424
github.com/moby/buildkit v0.25.1
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251027091309-bd66551413a9
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251028151218-88e1f079af90
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.10.1
2929
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
462462
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
463463
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
464464
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
465-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251027091309-bd66551413a9 h1:mGfwXcngVnv7LLe36Ypjg22mNxrrnwEwPfKM5bWQyuQ=
466-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251027091309-bd66551413a9/go.mod h1:SVm1Zk6UpZtqZN6KtEQpjC+v+Lir4tyVfhQTU19q3PA=
465+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251028151218-88e1f079af90 h1:BiyhrAxCX4sUDQ0mQKs9z2Vd+rti9vekpoO9MpBNBBE=
466+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251028151218-88e1f079af90/go.mod h1:SVm1Zk6UpZtqZN6KtEQpjC+v+Lir4tyVfhQTU19q3PA=
467467
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
468468
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
469469
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/edge_services/v1beta1/edge_services_cli.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,13 @@ func edgeServicesBackendStageCreate() *core.Command {
12491249
Deprecated: false,
12501250
Positional: false,
12511251
},
1252+
{
1253+
Name: "scaleway-lb.lbs.{index}.has-websocket",
1254+
Short: `Defines whether to forward websocket requests to the load balancer`,
1255+
Required: false,
1256+
Deprecated: false,
1257+
Positional: false,
1258+
},
12521259
{
12531260
Name: "pipeline-id",
12541261
Short: `Pipeline ID the Backend stage belongs to`,
@@ -1370,6 +1377,13 @@ func edgeServicesBackendStageUpdate() *core.Command {
13701377
Deprecated: false,
13711378
Positional: false,
13721379
},
1380+
{
1381+
Name: "scaleway-lb.lbs.{index}.has-websocket",
1382+
Short: `Defines whether to forward websocket requests to the load balancer`,
1383+
Required: false,
1384+
Deprecated: false,
1385+
Positional: false,
1386+
},
13731387
{
13741388
Name: "pipeline-id",
13751389
Short: `Pipeline ID the Backend stage belongs to`,

0 commit comments

Comments
 (0)