Skip to content

Commit 2ba6883

Browse files
feat(lb): add support for assign flexible ip (#3163)
Co-authored-by: Rémy Léone <rleone@scaleway.com>
1 parent 077fb06 commit 2ba6883

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARGS:
1010
name=<generated> Name for the Load Balancer
1111
[description] Description for the Load Balancer
1212
[ip-id] ID of an existing flexible IP address to attach to the Load Balancer
13+
[assign-flexible-ip] Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
1314
[tags.{index}] List of tags for the Load Balancer
1415
[type=LB-S] Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types (LB-S | LB-GP-M | LB-GP-L)
1516
[ssl-compatibility-level] Determines the minimal SSL version which needs to be supported on the client side, in an SSL/TLS offloading context. Intermediate is suitable for general-purpose servers with a variety of clients, recommended for almost all systems. Modern is suitable for services with clients that support TLS 1.3 and do not need backward compatibility. Old is compatible with a small number of very old clients and should be used only as a last resort (ssl_compatibility_level_unknown | ssl_compatibility_level_intermediate | ssl_compatibility_level_modern | ssl_compatibility_level_old)

docs/commands/lb.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,7 @@ scw lb lb create [arg=value ...]
900900
| name | Required<br />Default: `<generated>` | Name for the Load Balancer |
901901
| description | | Description for the Load Balancer |
902902
| ip-id | | ID of an existing flexible IP address to attach to the Load Balancer |
903+
| assign-flexible-ip | | Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). |
903904
| tags.{index} | | List of tags for the Load Balancer |
904905
| type | Default: `LB-S`<br />One of: `LB-S`, `LB-GP-M`, `LB-GP-L` | Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types |
905906
| ssl-compatibility-level | One of: `ssl_compatibility_level_unknown`, `ssl_compatibility_level_intermediate`, `ssl_compatibility_level_modern`, `ssl_compatibility_level_old` | Determines the minimal SSL version which needs to be supported on the client side, in an SSL/TLS offloading context. Intermediate is suitable for general-purpose servers with a variety of clients, recommended for almost all systems. Modern is suitable for services with clients that support TLS 1.3 and do not need backward compatibility. Old is compatible with a small number of very old clients and should be used only as a last resort |

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.11.6
2525
github.com/opencontainers/go-digest v1.0.0
2626
github.com/pkg/errors v0.9.1
27-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230526161530-cf508019231d
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230601085652-73d98e0bd94d
2828
github.com/spf13/cobra v1.7.0
2929
github.com/spf13/pflag v1.0.5
3030
github.com/stretchr/testify v1.8.4

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
499499
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
500500
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
501501
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
502-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230526161530-cf508019231d h1:qeI25+qrQ5MQaMFS2RgmAeAwUSWZSeYy5eYHnmW8vpk=
503-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230526161530-cf508019231d/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
502+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230601085652-73d98e0bd94d h1:T90r5KjFup0Gtbn/WnvmwWEjiq8sKwMdMZcW/rYA2wk=
503+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230601085652-73d98e0bd94d/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
504504
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
505505
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
506506
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=

internal/namespaces/lb/v1/lb_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,13 @@ func lbLBCreate() *core.Command {
278278
Deprecated: false,
279279
Positional: false,
280280
},
281+
{
282+
Name: "assign-flexible-ip",
283+
Short: `Defines whether to automatically assign a flexible public IP to lb. Default value is ` + "`" + `false` + "`" + ` (do not assign).`,
284+
Required: false,
285+
Deprecated: false,
286+
Positional: false,
287+
},
281288
{
282289
Name: "tags.{index}",
283290
Short: `List of tags for the Load Balancer`,

0 commit comments

Comments
 (0)