Skip to content

Commit b006eb9

Browse files
authored
chore(k8s): remove migrate-to-sbs-csi from cli (#4685)
1 parent d200474 commit b006eb9

File tree

5 files changed

+3
-78
lines changed

5 files changed

+3
-78
lines changed

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

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ AVAILABLE COMMANDS:
1313
list List Clusters
1414
list-available-types List available cluster types for a cluster
1515
list-available-versions List available versions for a Cluster
16-
migrate-to-sbs-csi Migrate a cluster to SBS CSI
1716
reset-admin-token Reset the admin token of a Cluster
1817
set-type Change the Cluster type
1918
update Update a Cluster

docs/commands/k8s.md

-32
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ This API allows you to manage Kubernetes Kapsule and Kosmos clusters.
1414
- [List Clusters](#list-clusters)
1515
- [List available cluster types for a cluster](#list-available-cluster-types-for-a-cluster)
1616
- [List available versions for a Cluster](#list-available-versions-for-a-cluster)
17-
- [Migrate a cluster to SBS CSI](#migrate-a-cluster-to-sbs-csi)
1817
- [Reset the admin token of a Cluster](#reset-the-admin-token-of-a-cluster)
1918
- [Change the Cluster type](#change-the-cluster-type)
2019
- [Update a Cluster](#update-a-cluster)
@@ -399,37 +398,6 @@ scw k8s cluster list-available-versions 11111111-1111-1111-1111-111111111111
399398

400399

401400

402-
### Migrate a cluster to SBS CSI
403-
404-
Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
405-
Make sure to have the necessary Quota before running this command.
406-
407-
**Usage:**
408-
409-
```
410-
scw k8s cluster migrate-to-sbs-csi <cluster-id ...> [arg=value ...]
411-
```
412-
413-
414-
**Args:**
415-
416-
| Name | | Description |
417-
|------|---|-------------|
418-
| cluster-id | Required | Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled |
419-
| 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 |
420-
421-
422-
**Examples:**
423-
424-
425-
Migrate a cluster to SBS CSI
426-
```
427-
scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-1111-111111111111
428-
```
429-
430-
431-
432-
433401
### Reset the admin token of a Cluster
434402

435403
Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download the kubeconfig again to keep interacting with the cluster.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/mattn/go-isatty v0.0.20
2424
github.com/moby/buildkit v0.13.2
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250417091007-4d879045bf57
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250422095315-6f998f4655ec
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.9.1
2929
github.com/spf13/pflag v1.0.6

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
462462
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
463463
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
464464
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
465-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250417091007-4d879045bf57 h1:4whrhv1ujBRUmqKPPg/qe6LoweqTNYx7TLdgPUaQzM4=
466-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250417091007-4d879045bf57/go.mod h1:w4o02EHpO0CBGy2nehzWRaFQKd62G9HIf+Q07PDaUcE=
465+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250422095315-6f998f4655ec h1:XLNQFZzigDYXgdRHPxuV3w5VnKvnsCVbl8HBpvDYu40=
466+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250422095315-6f998f4655ec/go.mod h1:w4o02EHpO0CBGy2nehzWRaFQKd62G9HIf+Q07PDaUcE=
467467
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
468468
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
469469
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/k8s/v1/k8s_cli.go

-42
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ func GetGeneratedCommands() *core.Commands {
3636
k8sClusterListAvailableVersions(),
3737
k8sClusterListAvailableTypes(),
3838
k8sClusterResetAdminToken(),
39-
k8sClusterMigrateToSbsCsi(),
4039
k8sACLList(),
4140
k8sACLAdd(),
4241
k8sACLSet(),
@@ -1309,47 +1308,6 @@ func k8sClusterResetAdminToken() *core.Command {
13091308
}
13101309
}
13111310

1312-
func k8sClusterMigrateToSbsCsi() *core.Command {
1313-
return &core.Command{
1314-
Short: `Migrate a cluster to SBS CSI`,
1315-
Long: `Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
1316-
Make sure to have the necessary Quota before running this command.`,
1317-
Namespace: "k8s",
1318-
Resource: "cluster",
1319-
Verb: "migrate-to-sbs-csi",
1320-
// Deprecated: false,
1321-
ArgsType: reflect.TypeOf(k8s.MigrateClusterToSBSCSIRequest{}),
1322-
ArgSpecs: core.ArgSpecs{
1323-
{
1324-
Name: "cluster-id",
1325-
Short: `Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled`,
1326-
Required: true,
1327-
Deprecated: false,
1328-
Positional: true,
1329-
},
1330-
core.RegionArgSpec(
1331-
scw.RegionFrPar,
1332-
scw.RegionNlAms,
1333-
scw.RegionPlWaw,
1334-
),
1335-
},
1336-
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
1337-
request := args.(*k8s.MigrateClusterToSBSCSIRequest)
1338-
1339-
client := core.ExtractClient(ctx)
1340-
api := k8s.NewAPI(client)
1341-
1342-
return api.MigrateClusterToSBSCSI(request)
1343-
},
1344-
Examples: []*core.Example{
1345-
{
1346-
Short: "Migrate a cluster to SBS CSI",
1347-
Raw: `scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-1111-111111111111`,
1348-
},
1349-
},
1350-
}
1351-
}
1352-
13531311
func k8sACLList() *core.Command {
13541312
return &core.Command{
13551313
Short: `List ACLs`,

0 commit comments

Comments
 (0)