Skip to content

Commit b4babe8

Browse files
chore(k8s): remove sbs-csi migration route (scaleway#2531)
Co-authored-by: Mia-Cross <[email protected]>
1 parent c26c02e commit b4babe8

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

api/k8s/v1/k8s_sdk.go

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,15 +1953,6 @@ type ListVersionsResponse struct {
19531953
Versions []*Version `json:"versions"`
19541954
}
19551955

1956-
// MigrateClusterToSBSCSIRequest: migrate cluster to sbscsi request.
1957-
type MigrateClusterToSBSCSIRequest struct {
1958-
// Region: region to target. If none is passed will use default region from the config.
1959-
Region scw.Region `json:"-"`
1960-
1961-
// ClusterID: cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled.
1962-
ClusterID string `json:"-"`
1963-
}
1964-
19651956
// NodeMetadata: node metadata.
19661957
type NodeMetadata struct {
19671958
ID string `json:"id"`
@@ -2554,43 +2545,6 @@ func (s *API) ResetClusterAdminToken(req *ResetClusterAdminTokenRequest, opts ..
25542545
return nil
25552546
}
25562547

2557-
// MigrateClusterToSBSCSI: Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
2558-
// Make sure to have the necessary Quota before running this command.
2559-
func (s *API) MigrateClusterToSBSCSI(req *MigrateClusterToSBSCSIRequest, opts ...scw.RequestOption) (*Cluster, error) {
2560-
var err error
2561-
2562-
if req.Region == "" {
2563-
defaultRegion, _ := s.client.GetDefaultRegion()
2564-
req.Region = defaultRegion
2565-
}
2566-
2567-
if fmt.Sprint(req.Region) == "" {
2568-
return nil, errors.New("field Region cannot be empty in request")
2569-
}
2570-
2571-
if fmt.Sprint(req.ClusterID) == "" {
2572-
return nil, errors.New("field ClusterID cannot be empty in request")
2573-
}
2574-
2575-
scwReq := &scw.ScalewayRequest{
2576-
Method: "POST",
2577-
Path: "/k8s/v1/regions/" + fmt.Sprint(req.Region) + "/clusters/" + fmt.Sprint(req.ClusterID) + "/migrate-to-sbs-csi",
2578-
}
2579-
2580-
err = scwReq.SetBody(req)
2581-
if err != nil {
2582-
return nil, err
2583-
}
2584-
2585-
var resp Cluster
2586-
2587-
err = s.client.Do(scwReq, &resp, opts...)
2588-
if err != nil {
2589-
return nil, err
2590-
}
2591-
return &resp, nil
2592-
}
2593-
25942548
// ListClusterACLRules: List ACLs for a specific cluster.
25952549
func (s *API) ListClusterACLRules(req *ListClusterACLRulesRequest, opts ...scw.RequestOption) (*ListClusterACLRulesResponse, error) {
25962550
var err error

0 commit comments

Comments
 (0)