Skip to content

Commit 53a116f

Browse files
committed
remove utility command group + doc review
1 parent aa03023 commit 53a116f

4 files changed

Lines changed: 11 additions & 14 deletions

File tree

cmd/scw/testdata/test-all-usage-k8s-pool-add-external-node-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Add an external node to a Kosmos pool.
3+
Add an external node to a Kosmos Pool.
44
This will connect via SSH to the node, download the multicloud configuration script and run it with sudo privileges.
55
Keep in mind that your external node needs to have wget in order to download the script.
66

@@ -9,7 +9,7 @@ USAGE:
99

1010
ARGS:
1111
node-ip IP address of the external node
12-
pool-id ID of the pool the node should be added to
12+
pool-id ID of the Pool the node should be added to
1313
[username=root] Username used for the SSH connection
1414
[region=fr-par] Region to target. If none is passed will use default region from the config
1515

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ USAGE:
77
scw k8s pool <command>
88

99
AVAILABLE COMMANDS:
10+
add-external-node Add an external node to a Kosmos Pool
1011
create Create a new Pool in a Cluster
1112
delete Delete a Pool in a Cluster
1213
get Get a Pool in a Cluster
1314
list List Pools in a Cluster
1415
update Update a Pool in a Cluster
1516
upgrade Upgrade a Pool in a Cluster
1617

17-
UTILITY COMMANDS:
18-
add-external-node Add an external node to a Kosmos pool
19-
2018
WORKFLOW COMMANDS:
2119
wait Wait for a pool to reach a stable state
2220

docs/commands/k8s.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This API allows you to manage Kubernetes Kapsule and Kosmos clusters.
3434
- [Replace a Node in a Cluster](#replace-a-node-in-a-cluster)
3535
- [Wait for a node to reach a stable state](#wait-for-a-node-to-reach-a-stable-state)
3636
- [Kapsule pool management commands](#kapsule-pool-management-commands)
37-
- [Add an external node to a Kosmos pool](#add-an-external-node-to-a-kosmos-pool)
37+
- [Add an external node to a Kosmos Pool](#add-an-external-node-to-a-kosmos-pool)
3838
- [Create a new Pool in a Cluster](#create-a-new-pool-in-a-cluster)
3939
- [Delete a Pool in a Cluster](#delete-a-pool-in-a-cluster)
4040
- [Get a Pool in a Cluster](#get-a-pool-in-a-cluster)
@@ -962,9 +962,9 @@ A pool is a set of identical nodes
962962
A pool has a name, a size (its desired number of nodes), node number limits (min, max), and a Scaleway Instance type. Changing those limits increases/decreases the size of a pool. As a result and depending on its load, the pool will grow or shrink within those limits when autoscaling is enabled.
963963

964964

965-
### Add an external node to a Kosmos pool
965+
### Add an external node to a Kosmos Pool
966966

967-
Add an external node to a Kosmos pool.
967+
Add an external node to a Kosmos Pool.
968968
This will connect via SSH to the node, download the multicloud configuration script and run it with sudo privileges.
969969
Keep in mind that your external node needs to have wget in order to download the script.
970970

@@ -980,7 +980,7 @@ scw k8s pool add-external-node [arg=value ...]
980980
| Name | | Description |
981981
|------|---|-------------|
982982
| node-ip | Required | IP address of the external node |
983-
| pool-id | Required | ID of the pool the node should be added to |
983+
| pool-id | Required | ID of the Pool the node should be added to |
984984
| username | Default: `root` | Username used for the SSH connection |
985985
| region | Default: `fr-par` | Region to target. If none is passed will use default region from the config |
986986

internal/namespaces/k8s/v1/custom_pool.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,13 @@ type k8sPoolAddExternalNodeRequest struct {
150150

151151
func k8sPoolAddExternalNodeCommand() *core.Command {
152152
return &core.Command{
153-
Short: `Add an external node to a Kosmos pool`,
154-
Long: `Add an external node to a Kosmos pool.
153+
Short: `Add an external node to a Kosmos Pool`,
154+
Long: `Add an external node to a Kosmos Pool.
155155
This will connect via SSH to the node, download the multicloud configuration script and run it with sudo privileges.
156156
Keep in mind that your external node needs to have wget in order to download the script.`,
157157
Namespace: "k8s",
158158
Resource: "pool",
159159
Verb: "add-external-node",
160-
Groups: []string{"utility"},
161160
ArgsType: reflect.TypeOf(k8sPoolAddExternalNodeRequest{}),
162161
ArgSpecs: core.ArgSpecs{
163162
{
@@ -167,7 +166,7 @@ Keep in mind that your external node needs to have wget in order to download the
167166
},
168167
{
169168
Name: "pool-id",
170-
Short: `ID of the pool the node should be added to`,
169+
Short: `ID of the Pool the node should be added to`,
171170
Required: true,
172171
},
173172
{
@@ -209,7 +208,7 @@ Keep in mind that your external node needs to have wget in order to download the
209208
client := core.ExtractClient(ctx)
210209
secretKey, _ := client.GetSecretKey()
211210
execScriptArgs := []string{
212-
"",
211+
"", // Adding a space to prevent the command from being logged in history as it shows the secret key
213212
"SCW_SECRET_KEY=" + secretKey,
214213
"./init_kosmos_node.sh",
215214
}

0 commit comments

Comments
 (0)