Skip to content

Commit 690c50a

Browse files
authored
feat(edge_services): add serverless container backend (#5192)
1 parent ca5b327 commit 690c50a

File tree

6 files changed

+56
-24
lines changed

6 files changed

+56
-24
lines changed

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ 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-
[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
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
19+
[scaleway-serverless-container.region]
20+
[scaleway-serverless-container.container-id]
1921

2022
FLAGS:
2123
-h, --help help for create

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ 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-
[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
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
20+
[scaleway-serverless-container.region]
21+
[scaleway-serverless-container.container-id]
2022

2123
FLAGS:
2224
-h, --help help for update

docs/commands/edge-services.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ scw edge-services backend-stage create [arg=value ...]
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 |
8585
| scaleway-lb.lbs.{index}.has-websocket | | Defines whether to forward websocket requests to the load balancer |
8686
| pipeline-id | Required | Pipeline ID the Backend stage belongs to |
87+
| scaleway-serverless-container.region | | |
88+
| scaleway-serverless-container.container-id | | |
8789

8890

8991

@@ -174,6 +176,8 @@ scw edge-services backend-stage update <backend-stage-id ...> [arg=value ...]
174176
| 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 |
175177
| scaleway-lb.lbs.{index}.has-websocket | | Defines whether to forward websocket requests to the load balancer |
176178
| pipeline-id | | Pipeline ID the Backend stage belongs to |
179+
| scaleway-serverless-container.region | | |
180+
| scaleway-serverless-container.container-id | | |
177181

178182

179183

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.26.2
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251127153135-87311553a421
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251127155323-7d5ea125dcd7
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
@@ -464,8 +464,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
464464
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
465465
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
466466
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
467-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251127153135-87311553a421 h1:dh86GHLzpn8fTzjQ5TlKoN9OZBgSw0H4LX61v/2LnRw=
468-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251127153135-87311553a421/go.mod h1:h/elW4JdNo225GP5FZHJ/RPyCNz79lxaeub3PyGzE9o=
467+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251127155323-7d5ea125dcd7 h1:ytLZVvlGeh0Naqh0XIg7H+Q+3Umbu+3K0jjiuwmQTPw=
468+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251127155323-7d5ea125dcd7/go.mod h1:h/elW4JdNo225GP5FZHJ/RPyCNz79lxaeub3PyGzE9o=
469469
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
470470
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
471471
github.com/secure-systems-lab/go-securesystemslib v0.9.1 h1:nZZaNz4DiERIQguNy0cL5qTdn9lR8XKHf4RUyG1Sx3g=

internal/namespaces/edge_services/v1beta1/edge_services_cli.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,18 @@ func edgeServicesBackendStageCreate() *core.Command {
12631263
Deprecated: false,
12641264
Positional: false,
12651265
},
1266+
{
1267+
Name: "scaleway-serverless-container.region",
1268+
Required: false,
1269+
Deprecated: false,
1270+
Positional: false,
1271+
},
1272+
{
1273+
Name: "scaleway-serverless-container.container-id",
1274+
Required: false,
1275+
Deprecated: false,
1276+
Positional: false,
1277+
},
12661278
},
12671279
Run: func(ctx context.Context, args any) (i any, e error) {
12681280
request := args.(*edge_services.CreateBackendStageRequest)
@@ -1391,6 +1403,18 @@ func edgeServicesBackendStageUpdate() *core.Command {
13911403
Deprecated: false,
13921404
Positional: false,
13931405
},
1406+
{
1407+
Name: "scaleway-serverless-container.region",
1408+
Required: false,
1409+
Deprecated: false,
1410+
Positional: false,
1411+
},
1412+
{
1413+
Name: "scaleway-serverless-container.container-id",
1414+
Required: false,
1415+
Deprecated: false,
1416+
Positional: false,
1417+
},
13941418
},
13951419
Run: func(ctx context.Context, args any) (i any, e error) {
13961420
request := args.(*edge_services.UpdateBackendStageRequest)

0 commit comments

Comments
 (0)