Skip to content

Commit b0cf29b

Browse files
authored
feat(edge_services): add multi-waf pipeline support (#5382)
1 parent 6b4ee58 commit b0cf29b

File tree

6 files changed

+19
-3
lines changed

6 files changed

+19
-3
lines changed

cmd/scw/testdata/test-all-usage-edge-services-route-rules-add-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ARGS:
1111
[route-rules.{index}.rule-http-match.path-filter.path-filter-type] Type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the `regex` type (unknown_path_filter | regex)
1212
[route-rules.{index}.rule-http-match.path-filter.value] Value to be matched for the HTTP URL path
1313
[route-rules.{index}.backend-stage-id] ID of the backend stage that requests matching the rule should be forwarded to
14+
[route-rules.{index}.waf-stage-id]
1415
[after-position] Add rules after the given position
1516
[before-position] Add rules before the given position
1617

cmd/scw/testdata/test-all-usage-edge-services-route-rules-set-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ARGS:
1111
[route-rules.{index}.rule-http-match.path-filter.path-filter-type] Type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the `regex` type (unknown_path_filter | regex)
1212
[route-rules.{index}.rule-http-match.path-filter.value] Value to be matched for the HTTP URL path
1313
[route-rules.{index}.backend-stage-id] ID of the backend stage that requests matching the rule should be forwarded to
14+
[route-rules.{index}.waf-stage-id]
1415

1516
FLAGS:
1617
-h, --help help for set

docs/commands/edge-services.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ scw edge-services route-rules add <route-stage-id ...> [arg=value ...]
643643
| route-rules.{index}.rule-http-match.path-filter.path-filter-type | One of: `unknown_path_filter`, `regex` | Type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the `regex` type |
644644
| route-rules.{index}.rule-http-match.path-filter.value | | Value to be matched for the HTTP URL path |
645645
| route-rules.{index}.backend-stage-id | | ID of the backend stage that requests matching the rule should be forwarded to |
646+
| route-rules.{index}.waf-stage-id | | |
646647
| after-position | | Add rules after the given position |
647648
| before-position | | Add rules before the given position |
648649

@@ -711,6 +712,7 @@ scw edge-services route-rules set <route-stage-id ...> [arg=value ...]
711712
| route-rules.{index}.rule-http-match.path-filter.path-filter-type | One of: `unknown_path_filter`, `regex` | Type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the `regex` type |
712713
| route-rules.{index}.rule-http-match.path-filter.value | | Value to be matched for the HTTP URL path |
713714
| route-rules.{index}.backend-stage-id | | ID of the backend stage that requests matching the rule should be forwarded to |
715+
| route-rules.{index}.waf-stage-id | | |
714716

715717

716718

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/moby/buildkit v0.28.0
2525
github.com/moby/go-archive v0.2.0
2626
github.com/opencontainers/go-digest v1.0.0
27-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260304184440-b3f5e72aea5e
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260305131804-040897b1dc59
2828
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2929
github.com/spf13/cobra v1.10.2
3030
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
476476
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
477477
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
478478
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
479-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260304184440-b3f5e72aea5e h1:K2g3Hro99UX5Ji/m5ziNYJs9UsaSbhgrN96LRkWJpug=
480-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260304184440-b3f5e72aea5e/go.mod h1:EG4RjSWH4YiEB6bPmLxzkDm7GsEqLcXNTCwigMNapxQ=
479+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260305131804-040897b1dc59 h1:LihhZcC1EBGMXecl4wjuozsII2pKtsxPHkO8P5VXyA4=
480+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260305131804-040897b1dc59/go.mod h1:EG4RjSWH4YiEB6bPmLxzkDm7GsEqLcXNTCwigMNapxQ=
481481
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
482482
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
483483
github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14=

internal/namespaces/edge_services/v1beta1/edge_services_cli.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,6 +2020,12 @@ func edgeServicesRouteRulesSet() *core.Command {
20202020
Deprecated: false,
20212021
Positional: false,
20222022
},
2023+
{
2024+
Name: "route-rules.{index}.waf-stage-id",
2025+
Required: false,
2026+
Deprecated: false,
2027+
Positional: false,
2028+
},
20232029
},
20242030
Run: func(ctx context.Context, args any) (i any, e error) {
20252031
request := args.(*edge_services.SetRouteRulesRequest)
@@ -2091,6 +2097,12 @@ func edgeServicesRouteRulesAdd() *core.Command {
20912097
Deprecated: false,
20922098
Positional: false,
20932099
},
2100+
{
2101+
Name: "route-rules.{index}.waf-stage-id",
2102+
Required: false,
2103+
Deprecated: false,
2104+
Positional: false,
2105+
},
20942106
{
20952107
Name: "after-position",
20962108
Short: `Add rules after the given position`,

0 commit comments

Comments
 (0)