Skip to content

Commit 6a15d20

Browse files
authored
feat(k8s): add private network fields (#2903)
1 parent 232e404 commit 6a15d20

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ ARGS:
5959
[open-id-connect-config.groups-prefix] Prefix prepended to group claims
6060
[open-id-connect-config.required-claim.{index}] Multiple key=value pairs that describes a required claim in the ID token
6161
[apiserver-cert-sans.{index}] Additional Subject Alternative Names for the Kubernetes API server certificate
62+
[private-network-id] Private network ID for internal cluster communication (cannot be changed later)
6263
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
6364
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
6465

docs/commands/k8s.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ scw k8s cluster create [arg=value ...]
107107
| open-id-connect-config.groups-prefix | | Prefix prepended to group claims |
108108
| open-id-connect-config.required-claim.{index} | | Multiple key=value pairs that describes a required claim in the ID token |
109109
| apiserver-cert-sans.{index} | | Additional Subject Alternative Names for the Kubernetes API server certificate |
110+
| private-network-id | | Private network ID for internal cluster communication (cannot be changed later) |
110111
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
111112
| 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 |
112113

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
github.com/moby/buildkit v0.11.4
2222
github.com/opencontainers/go-digest v1.0.0
2323
github.com/pkg/errors v0.9.1
24-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15
24+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230322094918-cd420ebc2d11
2525
github.com/spf13/cobra v1.6.1
2626
github.com/spf13/pflag v1.0.5
2727
github.com/stretchr/testify v1.8.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
192192
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
193193
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
194194
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
195-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 h1:Y7xOFbD+3jaPw+VN7lkakNJ/pa+ZSQVFp1ONtJaBxns=
196-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
195+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230322094918-cd420ebc2d11 h1:tZBnGI0NIyTUV9+UYQrTFw1gqIcY/TcUBCfLrC/IvKY=
196+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230322094918-cd420ebc2d11/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
197197
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
198198
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
199199
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=

internal/namespaces/k8s/v1/k8s_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,13 @@ func k8sClusterCreate() *core.Command {
576576
Deprecated: false,
577577
Positional: false,
578578
},
579+
{
580+
Name: "private-network-id",
581+
Short: `Private network ID for internal cluster communication (cannot be changed later)`,
582+
Required: false,
583+
Deprecated: false,
584+
Positional: false,
585+
},
579586
core.OrganizationIDArgSpec(),
580587
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
581588
},

0 commit comments

Comments
 (0)