Skip to content

Commit

Permalink
feat(vpcgw): add support for SMTP (#2265)
Browse files Browse the repository at this point in the history
Co-authored-by: Rémy Léone <rleone@scaleway.com>
  • Loading branch information
scaleway-bot and remyleone committed Apr 14, 2022
1 parent 7f5cd97 commit 926e5eb
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ARGS:
[type=VPC-GW-S] Gateway type
[upstream-dns-servers.{index}] Override the gateway's default recursive DNS servers, if DNS features are enabled
[ip-id] Attach an existing IP to the gateway
[enable-smtp] Allow SMTP traffic to pass through the gateway
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | pl-waw-1)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ARGS:
[upstream-dns-servers.{index}] Override the gateway's default recursive DNS servers, if DNS features are enabled
[enable-bastion] Enable SSH bastion on the gateway
[bastion-port] Port of the SSH bastion
[enable-smtp] Allow SMTP traffic to pass through the gateway
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | pl-waw-1)

FLAGS:
Expand Down
2 changes: 2 additions & 0 deletions docs/commands/vpc-gw.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ scw vpc-gw gateway create [arg=value ...]
| type | Default: `VPC-GW-S` | Gateway type |
| upstream-dns-servers.{index} | | Override the gateway's default recursive DNS servers, if DNS features are enabled |
| ip-id | | Attach an existing IP to the gateway |
| enable-smtp | | Allow SMTP traffic to pass through the gateway |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `pl-waw-1` | Zone to target. If none is passed will use default zone from the config |


Expand Down Expand Up @@ -444,6 +445,7 @@ scw vpc-gw gateway update <gateway-id ...> [arg=value ...]
| upstream-dns-servers.{index} | | Override the gateway's default recursive DNS servers, if DNS features are enabled |
| enable-bastion | | Enable SSH bastion on the gateway |
| bastion-port | | Port of the SSH bastion |
| enable-smtp | | Allow SMTP traffic to pass through the gateway |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `pl-waw-1` | Zone to target. If none is passed will use default zone from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
github.com/mattn/go-colorable v0.1.12
github.com/mattn/go-isatty v0.0.14
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220413124200-87ec17340712
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220414122539-592cf1cf6e45
github.com/spf13/cobra v1.4.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220413124200-87ec17340712 h1:MOkU+rQ1ZIIqYAjCUwd1qaOapaECgic6kZjuT+iK2/Y=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220413124200-87ec17340712/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220414122539-592cf1cf6e45 h1:5e+Ch1im2kahJ7tuyQsufZyISoFaDVkbMRBTkg8Ap2Q=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220414122539-592cf1cf6e45/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
Expand Down
14 changes: 14 additions & 0 deletions internal/namespaces/vpcgw/v1/vpcgw_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,13 @@ func vpcGwGatewayCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "enable-smtp",
Short: `Allow SMTP traffic to pass through the gateway`,
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZonePlWaw1),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down Expand Up @@ -404,6 +411,13 @@ func vpcGwGatewayUpdate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "enable-smtp",
Short: `Allow SMTP traffic to pass through the gateway`,
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZonePlWaw1),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down

0 comments on commit 926e5eb

Please sign in to comment.