Skip to content

Commit a0e1ce7

Browse files
authored
feat(k8s): add default node type and size in create pool (#1782)
1 parent 3e8ba17 commit a0e1ce7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ EXAMPLES:
1818
ARGS:
1919
cluster-id The ID of the cluster in which the pool will be created
2020
name=<generated> The name of the pool
21-
node-type The node type is the type of Scaleway Instance wanted for the pool
21+
node-type=DEV1-M 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
24-
size The size (number of nodes) of the pool
24+
size=1 The size (number of nodes) of the pool
2525
[min-size] The minimun size of the pool
2626
[max-size] The maximum size of the pool
2727
[container-runtime] The container runtime for the nodes of the pool (unknown_runtime | docker | containerd | crio)

internal/namespaces/k8s/v1/custom_pool.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ const (
4343

4444
func poolCreateBuilder(c *core.Command) *core.Command {
4545
c.WaitFunc = waitForPoolFunc(poolActionCreate)
46+
47+
c.ArgSpecs.GetByName("size").Default = core.DefaultValueSetter("1")
48+
c.ArgSpecs.GetByName("node-type").Default = core.DefaultValueSetter("DEV1-M")
49+
4650
return c
4751
}
4852

0 commit comments

Comments
 (0)