Skip to content

Commit 8f770fb

Browse files
feat(serverless): add support for http option (#2740)
Co-authored-by: Rémy Léone <[email protected]>
1 parent d6e1eaa commit 8f770fb

File tree

10 files changed

+15
-11
lines changed

10 files changed

+15
-11
lines changed

cmd/scw/testdata/test-all-usage-container-container-create-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ARGS:
2222
[port]
2323
[secret-environment-variables.{index}.key]
2424
[secret-environment-variables.{index}.value]
25-
[http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
25+
[http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
2626
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2727

2828
FLAGS:

cmd/scw/testdata/test-all-usage-container-container-update-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ARGS:
2222
[port]
2323
[secret-environment-variables.{index}.key]
2424
[secret-environment-variables.{index}.value]
25-
[http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
25+
[http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
2626
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2727

2828
FLAGS:

cmd/scw/testdata/test-all-usage-function-function-create-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ARGS:
2020
[description]
2121
[secret-environment-variables.{index}.key]
2222
[secret-environment-variables.{index}.value]
23-
[http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
23+
[http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
2424
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2525

2626
FLAGS:

cmd/scw/testdata/test-all-usage-function-function-update-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ARGS:
2020
[description]
2121
[secret-environment-variables.{index}.key]
2222
[secret-environment-variables.{index}.value]
23-
[http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
23+
[http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
2424
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2525

2626
FLAGS:

docs/commands/container.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ scw container container create [arg=value ...]
6969
| port | | |
7070
| secret-environment-variables.{index}.key | | |
7171
| secret-environment-variables.{index}.value | | |
72-
| http-option | One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
72+
| http-option | Default: `enabled`<br />One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
7373
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
7474

7575

@@ -189,7 +189,7 @@ scw container container update <container-id ...> [arg=value ...]
189189
| port | | |
190190
| secret-environment-variables.{index}.key | | |
191191
| secret-environment-variables.{index}.value | | |
192-
| http-option | One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
192+
| http-option | Default: `enabled`<br />One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
193193
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
194194

195195

docs/commands/function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ scw function function create [arg=value ...]
273273
| description | | |
274274
| secret-environment-variables.{index}.key | | |
275275
| secret-environment-variables.{index}.value | | |
276-
| http-option | One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
276+
| http-option | Default: `enabled`<br />One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
277277
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
278278

279279

@@ -432,7 +432,7 @@ scw function function update <function-id ...> [arg=value ...]
432432
| description | | |
433433
| secret-environment-variables.{index}.key | | |
434434
| secret-environment-variables.{index}.value | | |
435-
| http-option | One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
435+
| http-option | Default: `enabled`<br />One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
436436
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
437437

438438

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
1919
github.com/mattn/go-colorable v0.1.13
2020
github.com/mattn/go-isatty v0.0.17
21-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12.0.20230123141227-ef0129e3d08c
21+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12.0.20230126092013-7a7770757f26
2222
github.com/spf13/cobra v1.6.1
2323
github.com/spf13/pflag v1.0.5
2424
github.com/stretchr/testify v1.8.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw
7070
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7171
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7272
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
73-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12.0.20230123141227-ef0129e3d08c h1:rnddD1alQRa4CY8zc27gW8CH/kGIFjrJY+3JbjQWNBc=
74-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12.0.20230123141227-ef0129e3d08c/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
73+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12.0.20230126092013-7a7770757f26 h1:7Vq3vUEXCXgV1JJh3bEM42K0aA0ucqpxE/zyIBZV7+0=
74+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12.0.20230126092013-7a7770757f26/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
7575
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
7676
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
7777
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=

internal/namespaces/container/v1beta1/container_cli.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ func containerContainerCreate() *core.Command {
534534
Required: false,
535535
Deprecated: false,
536536
Positional: false,
537+
Default: core.DefaultValueSetter("enabled"),
537538
EnumValues: []string{"unknown_http_option", "enabled", "redirected"},
538539
},
539540
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
@@ -663,6 +664,7 @@ func containerContainerUpdate() *core.Command {
663664
Required: false,
664665
Deprecated: false,
665666
Positional: false,
667+
Default: core.DefaultValueSetter("enabled"),
666668
EnumValues: []string{"unknown_http_option", "enabled", "redirected"},
667669
},
668670
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),

internal/namespaces/function/v1beta1/function_cli.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ func functionFunctionCreate() *core.Command {
581581
Required: false,
582582
Deprecated: false,
583583
Positional: false,
584+
Default: core.DefaultValueSetter("enabled"),
584585
EnumValues: []string{"unknown_http_option", "enabled", "redirected"},
585586
},
586587
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
@@ -698,6 +699,7 @@ func functionFunctionUpdate() *core.Command {
698699
Required: false,
699700
Deprecated: false,
700701
Positional: false,
702+
Default: core.DefaultValueSetter("enabled"),
701703
EnumValues: []string{"unknown_http_option", "enabled", "redirected"},
702704
},
703705
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),

0 commit comments

Comments
 (0)