Skip to content

Commit 4bb697c

Browse files
scaleway-botjremy42estellesoulard
authored
feat(edge_services): add routing documentation (#5399)
Co-authored-by: Jonathan R. <jremy@scaleway.com> Co-authored-by: esoulard <esoulard@scaleway.com>
1 parent acc6495 commit 4bb697c

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +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]
14+
[route-rules.{index}.waf-stage-id] ID of the WAF stage that requests matching the rule should be forwarded to
1515
[after-position] Add rules after the given position
1616
[before-position] Add rules before the given position
1717

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +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]
14+
[route-rules.{index}.waf-stage-id] ID of the WAF stage that requests matching the rule should be forwarded to
1515

1616
FLAGS:
1717
-h, --help help for set

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ USAGE:
66
scw edge-services route-stage create [arg=value ...]
77

88
ARGS:
9-
pipeline-id Pipeline ID the route stage belongs to
10-
[waf-stage-id] ID of the WAF stage HTTP requests should be forwarded to when no rules are matched
9+
pipeline-id Pipeline ID the route stage belongs to
10+
[waf-stage-id] ID of the WAF stage HTTP requests should be forwarded to when no rules are matched
11+
[backend-stage-id]
1112

1213
FLAGS:
1314
-h, --help help for create

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ USAGE:
66
scw edge-services route-stage update <route-stage-id ...> [arg=value ...]
77

88
ARGS:
9-
route-stage-id ID of the route stage to update
10-
[waf-stage-id] ID of the WAF stage HTTP requests should be forwarded to when no rules are matched
9+
route-stage-id ID of the route stage to update
10+
[waf-stage-id] ID of the WAF stage HTTP requests should be forwarded to when no rules are matched
11+
[backend-stage-id]
1112

1213
FLAGS:
1314
-h, --help help for update

docs/commands/edge-services.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +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 | | |
646+
| route-rules.{index}.waf-stage-id | | ID of the WAF stage that requests matching the rule should be forwarded to |
647647
| after-position | | Add rules after the given position |
648648
| before-position | | Add rules before the given position |
649649

@@ -712,7 +712,7 @@ scw edge-services route-rules set <route-stage-id ...> [arg=value ...]
712712
| 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 |
713713
| route-rules.{index}.rule-http-match.path-filter.value | | Value to be matched for the HTTP URL path |
714714
| 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 | | |
715+
| route-rules.{index}.waf-stage-id | | ID of the WAF stage that requests matching the rule should be forwarded to |
716716

717717

718718

@@ -738,6 +738,7 @@ scw edge-services route-stage create [arg=value ...]
738738
|------|---|-------------|
739739
| pipeline-id | Required | Pipeline ID the route stage belongs to |
740740
| waf-stage-id | | ID of the WAF stage HTTP requests should be forwarded to when no rules are matched |
741+
| backend-stage-id | | |
741742

742743

743744

@@ -816,6 +817,7 @@ scw edge-services route-stage update <route-stage-id ...> [arg=value ...]
816817
|------|---|-------------|
817818
| route-stage-id | Required | ID of the route stage to update |
818819
| waf-stage-id | | ID of the WAF stage HTTP requests should be forwarded to when no rules are matched |
820+
| backend-stage-id | | |
819821

820822

821823

internal/namespaces/edge_services/v1beta1/edge_services_cli.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,6 +1819,12 @@ func edgeServicesRouteStageCreate() *core.Command {
18191819
Deprecated: false,
18201820
Positional: false,
18211821
},
1822+
{
1823+
Name: "backend-stage-id",
1824+
Required: false,
1825+
Deprecated: false,
1826+
Positional: false,
1827+
},
18221828
},
18231829
Run: func(ctx context.Context, args any) (i any, e error) {
18241830
request := args.(*edge_services.CreateRouteStageRequest)
@@ -1884,6 +1890,12 @@ func edgeServicesRouteStageUpdate() *core.Command {
18841890
Deprecated: false,
18851891
Positional: false,
18861892
},
1893+
{
1894+
Name: "backend-stage-id",
1895+
Required: false,
1896+
Deprecated: false,
1897+
Positional: false,
1898+
},
18871899
},
18881900
Run: func(ctx context.Context, args any) (i any, e error) {
18891901
request := args.(*edge_services.UpdateRouteStageRequest)
@@ -2022,6 +2034,7 @@ func edgeServicesRouteRulesSet() *core.Command {
20222034
},
20232035
{
20242036
Name: "route-rules.{index}.waf-stage-id",
2037+
Short: `ID of the WAF stage that requests matching the rule should be forwarded to`,
20252038
Required: false,
20262039
Deprecated: false,
20272040
Positional: false,
@@ -2099,6 +2112,7 @@ func edgeServicesRouteRulesAdd() *core.Command {
20992112
},
21002113
{
21012114
Name: "route-rules.{index}.waf-stage-id",
2115+
Short: `ID of the WAF stage that requests matching the rule should be forwarded to`,
21022116
Required: false,
21032117
Deprecated: false,
21042118
Positional: false,

0 commit comments

Comments
 (0)