diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-list-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-list-usage.golden index 01ede5330f..0bca77c84d 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-list-usage.golden @@ -16,13 +16,14 @@ EXAMPLES: scw k8s cluster list region=fr-par name=cluster1 ARGS: - [project-id] Project ID on which to filter the returned clusters - [order-by] Sort order of returned clusters (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc | status_asc | status_desc | version_asc | version_desc) - [name] Name to filter on, only clusters containing this substring in their name will be returned - [status] Status to filter on, only clusters with this status will be returned (unknown | creating | ready | deleting | deleted | updating | locked | pool_required) - [type] Type to filter on, only clusters with this type will be returned - [organization-id] Organization ID on which to filter the returned clusters - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all) + [project-id] Project ID on which to filter the returned clusters + [order-by] Sort order of returned clusters (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc | status_asc | status_desc | version_asc | version_desc) + [name] Name to filter on, only clusters containing this substring in their name will be returned + [status] Status to filter on, only clusters with this status will be returned (unknown | creating | ready | deleting | deleted | updating | locked | pool_required) + [type] Type to filter on, only clusters with this type will be returned + [private-network-id] Private Network ID to filter on, only clusters within this Private Network will be returned + [organization-id] Organization ID on which to filter the returned clusters + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all) FLAGS: -h, --help help for list diff --git a/docs/commands/k8s.md b/docs/commands/k8s.md index 90f74dfab7..b30360f56f 100644 --- a/docs/commands/k8s.md +++ b/docs/commands/k8s.md @@ -218,6 +218,7 @@ scw k8s cluster list [arg=value ...] | name | | Name to filter on, only clusters containing this substring in their name will be returned | | status | One of: `unknown`, `creating`, `ready`, `deleting`, `deleted`, `updating`, `locked`, `pool_required` | Status to filter on, only clusters with this status will be returned | | type | | Type to filter on, only clusters with this type will be returned | +| private-network-id | | Private Network ID to filter on, only clusters within this Private Network will be returned | | organization-id | | Organization ID on which to filter the returned clusters | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config | diff --git a/go.mod b/go.mod index 9bb268489e..4735e0260f 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/moby/buildkit v0.11.6 github.com/opencontainers/go-digest v1.0.0 github.com/pkg/errors v0.9.1 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230920081818-d2f8a2eef94c + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230920140527-e5585b17ed21 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 77294ca265..7bc308869b 100644 --- a/go.sum +++ b/go.sum @@ -491,8 +491,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230920081818-d2f8a2eef94c h1:ycZnnSiUFyH4YBkkpw81AHrqtDMRn+sf+1qkFSoSUUQ= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230920081818-d2f8a2eef94c/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230920140527-e5585b17ed21 h1:WLj1yXnD9n/vPUIS7/ycRQy49eDrIPyD7R2CeqNVc3M= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230920140527-e5585b17ed21/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= diff --git a/internal/namespaces/k8s/v1/k8s_cli.go b/internal/namespaces/k8s/v1/k8s_cli.go index f6e0053d62..f726be1f6c 100644 --- a/internal/namespaces/k8s/v1/k8s_cli.go +++ b/internal/namespaces/k8s/v1/k8s_cli.go @@ -162,6 +162,13 @@ func k8sClusterList() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "private-network-id", + Short: `Private Network ID to filter on, only clusters within this Private Network will be returned`, + Required: false, + Deprecated: false, + Positional: false, + }, { Name: "organization-id", Short: `Organization ID on which to filter the returned clusters`,