Skip to content

Commit 0036c0f

Browse files
feat(lb): add ignore ssl server verify (#2597)
Co-authored-by: Jules Castéran <[email protected]>
1 parent c234b28 commit 0036c0f

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed

cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ARGS:
3434
[proxy-protocol] PROXY protocol, forward client's address (must be supported by backend servers software) (proxy_protocol_unknown | proxy_protocol_none | proxy_protocol_v1 | proxy_protocol_v2 | proxy_protocol_v2_ssl | proxy_protocol_v2_ssl_cn)
3535
[failover-host] Scaleway S3 bucket website to be served in case all backend servers are down
3636
[ssl-bridging] Enable SSL between load balancer and backend servers
37+
[ignore-ssl-server-verify] Set to true to ignore server certificate verification
3738
[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 | nl-ams-2 | pl-waw-1)
3839

3940
DEPRECATED ARGS:

cmd/scw/testdata/test-all-usage-lb-backend-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ARGS:
2020
[proxy-protocol] PROXY protocol, forward client's address (must be supported by backend servers software) (proxy_protocol_unknown | proxy_protocol_none | proxy_protocol_v1 | proxy_protocol_v2 | proxy_protocol_v2_ssl | proxy_protocol_v2_ssl_cn)
2121
[failover-host] Scaleway S3 bucket website to be served in case all backend servers are down
2222
[ssl-bridging] Enable SSL between load balancer and backend servers
23+
[ignore-ssl-server-verify] Set to true to ignore server certificate verification
2324
[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 | nl-ams-2 | pl-waw-1)
2425

2526
DEPRECATED ARGS:

docs/commands/lb.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ scw lb backend create [arg=value ...]
271271
| proxy-protocol | One of: `proxy_protocol_unknown`, `proxy_protocol_none`, `proxy_protocol_v1`, `proxy_protocol_v2`, `proxy_protocol_v2_ssl`, `proxy_protocol_v2_ssl_cn` | PROXY protocol, forward client's address (must be supported by backend servers software) |
272272
| failover-host | | Scaleway S3 bucket website to be served in case all backend servers are down |
273273
| ssl-bridging | | Enable SSL between load balancer and backend servers |
274+
| ignore-ssl-server-verify | | Set to true to ignore server certificate verification |
274275
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1` | Zone to target. If none is passed will use default zone from the config |
275276

276277

@@ -409,6 +410,7 @@ scw lb backend update <backend-id ...> [arg=value ...]
409410
| proxy-protocol | One of: `proxy_protocol_unknown`, `proxy_protocol_none`, `proxy_protocol_v1`, `proxy_protocol_v2`, `proxy_protocol_v2_ssl`, `proxy_protocol_v2_ssl_cn` | PROXY protocol, forward client's address (must be supported by backend servers software) |
410411
| failover-host | | Scaleway S3 bucket website to be served in case all backend servers are down |
411412
| ssl-bridging | | Enable SSL between load balancer and backend servers |
413+
| ignore-ssl-server-verify | | Set to true to ignore server certificate verification |
412414
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1` | Zone to target. If none is passed will use default zone from the config |
413415

414416

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.16
21-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221116110708-d8b40a3d9214
21+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221117163236-af2cd7649327
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
@@ -71,8 +71,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw
7171
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7272
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7373
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
74-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221116110708-d8b40a3d9214 h1:DeXpMvrpqNSpDU5yQkMSJTvKs0AODRQpSJz6Hk47oHk=
75-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221116110708-d8b40a3d9214/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
74+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221117163236-af2cd7649327 h1:qC5FcsIXIOXoow932RDOV4pvjEKP9KvAbvrtl/ZXZ10=
75+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10.0.20221117163236-af2cd7649327/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
7676
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
7777
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
7878
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=

internal/namespaces/lb/v1/lb_cli.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,13 @@ func lbBackendCreate() *core.Command {
870870
Deprecated: false,
871871
Positional: false,
872872
},
873+
{
874+
Name: "ignore-ssl-server-verify",
875+
Short: `Set to true to ignore server certificate verification`,
876+
Required: false,
877+
Deprecated: false,
878+
Positional: false,
879+
},
873880
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZonePlWaw1),
874881
},
875882
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
@@ -1033,6 +1040,13 @@ func lbBackendUpdate() *core.Command {
10331040
Deprecated: false,
10341041
Positional: false,
10351042
},
1043+
{
1044+
Name: "ignore-ssl-server-verify",
1045+
Short: `Set to true to ignore server certificate verification`,
1046+
Required: false,
1047+
Deprecated: false,
1048+
Positional: false,
1049+
},
10361050
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZonePlWaw1),
10371051
},
10381052
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)