Skip to content

Commit d4069f2

Browse files
authored
Merge branch 'scaleway:master' into master
2 parents 73dbb9a + b006eb9 commit d4069f2

File tree

15 files changed

+30
-111
lines changed

15 files changed

+30
-111
lines changed

cmd/scw/testdata/test-all-usage-alias-usage.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
33
This namespace allows you to manage your aliases
4-
Aliases are store in cli config file, Default path for this configuration file is based on the following priority order:
4+
Aliases are stored in cli config file, Default path for this configuration file is based on the following priority order:
55

66
- $SCW_CLI_CONFIG_PATH
7-
- $XDG_CONFIG_HOME/scw/cli.yaml
8-
- $HOME/.config/scw/cli.yaml
9-
- $USERPROFILE/.config/scw/cli.yaml
7+
- $XDG_CONFIG_HOME/scw/config.yaml
8+
- $HOME/.config/scw/config.yaml
9+
- $USERPROFILE/.config/scw/config.yaml
1010

1111
You can use multiple aliases in one command
1212
aliases in your commands are evaluated and you get completion

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

Lines changed: 0 additions & 1 deletion
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

cmd/scw/testdata/test-all-usage-secret-secret-create-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ ARGS:
1919
[ephemeral-policy.time-to-live] Time frame, from one second and up to one year, during which the secret's versions are valid.
2020
[ephemeral-policy.expires-once-accessed] Returns `true` if the version expires after a single user access.
2121
[ephemeral-policy.action] Action to perform when the version of a secret expires (unknown_action | delete | disable)
22-
[protected] Returns `true` if secret protection is enabled on a given secret
23-
[key-id] The Scaleway's Key Manager key ID
22+
[protected] Returns `true` if secret protection is applied to a given secret
23+
[key-id] ID of the Scaleway Key Manager key
2424
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2525

2626
FLAGS:

core/bootstrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func Bootstrap(config *BootstrapConfig) (exitCode int, result interface{}, err e
209209
ctx = InjectMeta(ctx, meta)
210210

211211
// Load CLI config
212-
cliCfg, err := cliConfig.LoadConfig(ExtractCliConfigPath(ctx))
212+
cliCfg, err := cliConfig.LoadConfig(ExtractConfigPath(ctx))
213213
if err != nil {
214214
printErr := printer.Print(err, nil)
215215
if printErr != nil {

core/context.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,9 @@ func ExtractHTTPClient(ctx context.Context) *http.Client {
176176
func ExtractConfigPath(ctx context.Context) string {
177177
meta := extractMeta(ctx)
178178
if meta.ConfigPathFlag != "" {
179-
return extractMeta(ctx).ConfigPathFlag
179+
return meta.ConfigPathFlag
180180
}
181181
// This is only useful for test when we override home environment variable
182-
if home := meta.OverrideEnv["HOME"]; home != "" {
183-
return path.Join(home, ".config", "scw", "config.yaml")
184-
}
185-
186-
return scw.GetConfigPath()
187-
}
188-
189-
func ExtractCliConfigPath(ctx context.Context) string {
190-
meta := extractMeta(ctx)
191-
// This is only useful for test when we override home environment variable
192182
if home := meta.OverrideEnv["HOME"]; home != "" {
193183
return path.Join(home, ".config", "scw", cliConfig.DefaultConfigFileName)
194184
}

docs/commands/alias.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!-- DO NOT EDIT: this file is automatically generated using scw-doc-gen -->
22
# Documentation for `scw alias`
33
This namespace allows you to manage your aliases
4-
Aliases are store in cli config file, Default path for this configuration file is based on the following priority order:
4+
Aliases are stored in cli config file, Default path for this configuration file is based on the following priority order:
55

66
- $SCW_CLI_CONFIG_PATH
7-
- $XDG_CONFIG_HOME/scw/cli.yaml
8-
- $HOME/.config/scw/cli.yaml
9-
- $USERPROFILE/.config/scw/cli.yaml
7+
- $XDG_CONFIG_HOME/scw/config.yaml
8+
- $HOME/.config/scw/config.yaml
9+
- $USERPROFILE/.config/scw/config.yaml
1010

1111
You can use multiple aliases in one command
1212
aliases in your commands are evaluated and you get completion

docs/commands/k8s.md

Lines changed: 0 additions & 32 deletions
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.

docs/commands/secret.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ scw secret secret create [arg=value ...]
7373
| ephemeral-policy.time-to-live | | Time frame, from one second and up to one year, during which the secret's versions are valid. |
7474
| ephemeral-policy.expires-once-accessed | | Returns `true` if the version expires after a single user access. |
7575
| ephemeral-policy.action | One of: `unknown_action`, `delete`, `disable` | Action to perform when the version of a secret expires |
76-
| protected | | Returns `true` if secret protection is enabled on a given secret |
77-
| key-id | | The Scaleway's Key Manager key ID |
76+
| protected | | Returns `true` if secret protection is applied to a given secret |
77+
| key-id | | ID of the Scaleway Key Manager key |
7878
| 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 |
7979

8080

go.mod

Lines changed: 1 addition & 1 deletion
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.20250415141343-ed7d8fa2ef23
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

Lines changed: 2 additions & 2 deletions
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.20250415141343-ed7d8fa2ef23 h1:ahwe042nQ9ZfsUnoMIAvzctygyQAAu7sdVXswFP2KT8=
466-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250415141343-ed7d8fa2ef23/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=

0 commit comments

Comments
 (0)