Skip to content

Commit e312a5e

Browse files
feat(k8s): add support for pool volume type (#2256)
Co-authored-by: Rémy Léone <rleone@scaleway.com>
1 parent 06533d0 commit e312a5e

4 files changed

Lines changed: 38 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ ARGS:
3434
[pools.{index}.upgrade-policy.max-unavailable] The maximum number of nodes that can be not ready at the same time
3535
[pools.{index}.upgrade-policy.max-surge] The maximum number of nodes to be created during the upgrade
3636
[pools.{index}.zone] The Zone in which the Pool's node will be spawn in
37+
[pools.{index}.root-volume-type] The system volume disk type (default_volume_type | l_ssd | b_ssd)
38+
[pools.{index}.root-volume-size] The system volume disk size
3739
[autoscaler-config.scale-down-disabled] Disable the cluster autoscaler
3840
[autoscaler-config.scale-down-delay-after-add] How long after scale up that scale down evaluation resumes
3941
[autoscaler-config.estimator] Type of resource estimator to be used in scale up (unknown_estimator | binpacking)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ ARGS:
3131
[upgrade-policy.max-unavailable]
3232
[upgrade-policy.max-surge]
3333
[zone] The Zone in which the Pool's node will be spawn in
34+
[root-volume-type] The system volume disk type (default_volume_type | l_ssd | b_ssd)
35+
[root-volume-size] The system volume disk size
3436
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
3537

3638
FLAGS:

docs/commands/k8s.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ scw k8s cluster create [arg=value ...]
8181
| pools.{index}.upgrade-policy.max-unavailable | | The maximum number of nodes that can be not ready at the same time |
8282
| pools.{index}.upgrade-policy.max-surge | | The maximum number of nodes to be created during the upgrade |
8383
| pools.{index}.zone | | The Zone in which the Pool's node will be spawn in |
84+
| pools.{index}.root-volume-type | One of: `default_volume_type`, `l_ssd`, `b_ssd` | The system volume disk type |
85+
| pools.{index}.root-volume-size | | The system volume disk size |
8486
| autoscaler-config.scale-down-disabled | | Disable the cluster autoscaler |
8587
| autoscaler-config.scale-down-delay-after-add | | How long after scale up that scale down evaluation resumes |
8688
| autoscaler-config.estimator | One of: `unknown_estimator`, `binpacking` | Type of resource estimator to be used in scale up |
@@ -728,6 +730,8 @@ scw k8s pool create [arg=value ...]
728730
| upgrade-policy.max-unavailable | | |
729731
| upgrade-policy.max-surge | | |
730732
| zone | | The Zone in which the Pool's node will be spawn in |
733+
| root-volume-type | One of: `default_volume_type`, `l_ssd`, `b_ssd` | The system volume disk type |
734+
| root-volume-size | | The system volume disk size |
731735
| 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 |
732736

733737

internal/namespaces/k8s/v1/k8s_cli.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,21 @@ func k8sClusterCreate() *core.Command {
398398
Deprecated: false,
399399
Positional: false,
400400
},
401+
{
402+
Name: "pools.{index}.root-volume-type",
403+
Short: `The system volume disk type`,
404+
Required: false,
405+
Deprecated: false,
406+
Positional: false,
407+
EnumValues: []string{"default_volume_type", "l_ssd", "b_ssd"},
408+
},
409+
{
410+
Name: "pools.{index}.root-volume-size",
411+
Short: `The system volume disk size`,
412+
Required: false,
413+
Deprecated: false,
414+
Positional: false,
415+
},
401416
{
402417
Name: "autoscaler-config.scale-down-disabled",
403418
Short: `Disable the cluster autoscaler`,
@@ -1299,6 +1314,21 @@ func k8sPoolCreate() *core.Command {
12991314
Deprecated: false,
13001315
Positional: false,
13011316
},
1317+
{
1318+
Name: "root-volume-type",
1319+
Short: `The system volume disk type`,
1320+
Required: false,
1321+
Deprecated: false,
1322+
Positional: false,
1323+
EnumValues: []string{"default_volume_type", "l_ssd", "b_ssd"},
1324+
},
1325+
{
1326+
Name: "root-volume-size",
1327+
Short: `The system volume disk size`,
1328+
Required: false,
1329+
Deprecated: false,
1330+
Positional: false,
1331+
},
13021332
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
13031333
},
13041334
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)