diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-usage.golden index 69cb5e0cd5..d1e4772c9f 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-usage.golden @@ -13,7 +13,6 @@ AVAILABLE COMMANDS: list List Clusters list-available-types List available cluster types for a cluster list-available-versions List available versions for a Cluster - migrate-to-routed-ips Migrate a cluster to Routed IPs migrate-to-sbs-csi Migrate a cluster to SBS CSI reset-admin-token Reset the admin token of a Cluster set-type Change the Cluster type diff --git a/docs/commands/k8s.md b/docs/commands/k8s.md index 2efe66c4ae..d96e12a7da 100644 --- a/docs/commands/k8s.md +++ b/docs/commands/k8s.md @@ -10,7 +10,6 @@ This API allows you to manage Kubernetes Kapsule and Kosmos clusters. - [List Clusters](#list-clusters) - [List available cluster types for a cluster](#list-available-cluster-types-for-a-cluster) - [List available versions for a Cluster](#list-available-versions-for-a-cluster) - - [Migrate a cluster to Routed IPs](#migrate-a-cluster-to-routed-ips) - [Migrate a cluster to SBS CSI](#migrate-a-cluster-to-sbs-csi) - [Reset the admin token of a Cluster](#reset-the-admin-token-of-a-cluster) - [Change the Cluster type](#change-the-cluster-type) @@ -318,36 +317,6 @@ scw k8s cluster list-available-versions 11111111-1111-1111-111111111111 -### Migrate a cluster to Routed IPs - -Migrate the nodes of an existing cluster to Routed IPs and enable Routed IPs for all future nodes. - -**Usage:** - -``` -scw k8s cluster migrate-to-routed-ips [arg=value ...] -``` - - -**Args:** - -| Name | | Description | -|------|---|-------------| -| cluster-id | Required | Cluster ID for which the routed ip will be enabled for the nodes | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | - - -**Examples:** - - -Migrate a cluster to Routed IPs -``` -scw k8s cluster migrate-to-routed-ips 11111111-1111-1111-111111111111 -``` - - - - ### Migrate a cluster to SBS CSI Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS. diff --git a/internal/namespaces/k8s/v1/k8s_cli.go b/internal/namespaces/k8s/v1/k8s_cli.go index 91047663f7..a5a395f777 100644 --- a/internal/namespaces/k8s/v1/k8s_cli.go +++ b/internal/namespaces/k8s/v1/k8s_cli.go @@ -36,7 +36,6 @@ func GetGeneratedCommands() *core.Commands { k8sClusterListAvailableVersions(), k8sClusterListAvailableTypes(), k8sClusterResetAdminToken(), - k8sClusterMigrateToRoutedIPs(), k8sClusterMigrateToSbsCsi(), k8sPoolList(), k8sPoolCreate(), @@ -1161,42 +1160,6 @@ func k8sClusterResetAdminToken() *core.Command { } } -func k8sClusterMigrateToRoutedIPs() *core.Command { - return &core.Command{ - Short: `Migrate a cluster to Routed IPs`, - Long: `Migrate the nodes of an existing cluster to Routed IPs and enable Routed IPs for all future nodes.`, - Namespace: "k8s", - Resource: "cluster", - Verb: "migrate-to-routed-ips", - // Deprecated: false, - ArgsType: reflect.TypeOf(k8s.MigrateClusterToRoutedIPsRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "cluster-id", - Short: `Cluster ID for which the routed ip will be enabled for the nodes`, - Required: true, - Deprecated: false, - Positional: true, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*k8s.MigrateClusterToRoutedIPsRequest) - - client := core.ExtractClient(ctx) - api := k8s.NewAPI(client) - return api.MigrateClusterToRoutedIPs(request) - - }, - Examples: []*core.Example{ - { - Short: "Migrate a cluster to Routed IPs", - Raw: `scw k8s cluster migrate-to-routed-ips 11111111-1111-1111-111111111111`, - }, - }, - } -} - func k8sClusterMigrateToSbsCsi() *core.Command { return &core.Command{ Short: `Migrate a cluster to SBS CSI`,