Skip to content

Commit b817544

Browse files
feat(k8s): add a default generated name for create cluster and create pool (#1779)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 9358157 commit b817544

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ EXAMPLES:
1414

1515
ARGS:
1616
[project-id] Project ID to use. If none is passed the default project ID will be used
17-
name The name of the cluster
17+
name=<generated> The name of the cluster
1818
[description] The description of the cluster
1919
[tags.{index}] The tags associated with the cluster
2020
version The Kubernetes version of the cluster

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ EXAMPLES:
1717

1818
ARGS:
1919
cluster-id The ID of the cluster in which the pool will be created
20-
name The name of the pool
20+
name=<generated> The name of the pool
2121
node-type The node type is the type of Scaleway Instance wanted for the pool
2222
[placement-group-id] The placement group ID in which all the nodes of the pool will be created
2323
[autoscaling] The enablement of the autoscaling feature for the pool

internal/namespaces/k8s/v1/k8s_cli.go

+2
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ func k8sClusterCreate() *core.Command {
237237
Required: true,
238238
Deprecated: false,
239239
Positional: false,
240+
Default: core.RandomValueGenerator("k8s"),
240241
},
241242
{
242243
Name: "description",
@@ -1190,6 +1191,7 @@ func k8sPoolCreate() *core.Command {
11901191
Required: true,
11911192
Deprecated: false,
11921193
Positional: false,
1194+
Default: core.RandomValueGenerator("pool"),
11931195
},
11941196
{
11951197
Name: "node-type",

0 commit comments

Comments
 (0)