Skip to content

Commit

Permalink
feat(k8s): add support for pool volume type (#2256)
Browse files Browse the repository at this point in the history
Co-authored-by: Rémy Léone <rleone@scaleway.com>
  • Loading branch information
scaleway-bot and remyleone committed Apr 12, 2022
1 parent 06533d0 commit e312a5e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ARGS:
[pools.{index}.upgrade-policy.max-unavailable] The maximum number of nodes that can be not ready at the same time
[pools.{index}.upgrade-policy.max-surge] The maximum number of nodes to be created during the upgrade
[pools.{index}.zone] The Zone in which the Pool's node will be spawn in
[pools.{index}.root-volume-type] The system volume disk type (default_volume_type | l_ssd | b_ssd)
[pools.{index}.root-volume-size] The system volume disk size
[autoscaler-config.scale-down-disabled] Disable the cluster autoscaler
[autoscaler-config.scale-down-delay-after-add] How long after scale up that scale down evaluation resumes
[autoscaler-config.estimator] Type of resource estimator to be used in scale up (unknown_estimator | binpacking)
Expand Down
2 changes: 2 additions & 0 deletions cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ ARGS:
[upgrade-policy.max-unavailable]
[upgrade-policy.max-surge]
[zone] The Zone in which the Pool's node will be spawn in
[root-volume-type] The system volume disk type (default_volume_type | l_ssd | b_ssd)
[root-volume-size] The system volume disk size
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
Expand Down
4 changes: 4 additions & 0 deletions docs/commands/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ scw k8s cluster create [arg=value ...]
| pools.{index}.upgrade-policy.max-unavailable | | The maximum number of nodes that can be not ready at the same time |
| pools.{index}.upgrade-policy.max-surge | | The maximum number of nodes to be created during the upgrade |
| pools.{index}.zone | | The Zone in which the Pool's node will be spawn in |
| pools.{index}.root-volume-type | One of: `default_volume_type`, `l_ssd`, `b_ssd` | The system volume disk type |
| pools.{index}.root-volume-size | | The system volume disk size |
| autoscaler-config.scale-down-disabled | | Disable the cluster autoscaler |
| autoscaler-config.scale-down-delay-after-add | | How long after scale up that scale down evaluation resumes |
| autoscaler-config.estimator | One of: `unknown_estimator`, `binpacking` | Type of resource estimator to be used in scale up |
Expand Down Expand Up @@ -728,6 +730,8 @@ scw k8s pool create [arg=value ...]
| upgrade-policy.max-unavailable | | |
| upgrade-policy.max-surge | | |
| zone | | The Zone in which the Pool's node will be spawn in |
| root-volume-type | One of: `default_volume_type`, `l_ssd`, `b_ssd` | The system volume disk type |
| root-volume-size | | The system volume disk size |
| 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 |


Expand Down
30 changes: 30 additions & 0 deletions internal/namespaces/k8s/v1/k8s_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,21 @@ func k8sClusterCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "pools.{index}.root-volume-type",
Short: `The system volume disk type`,
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"default_volume_type", "l_ssd", "b_ssd"},
},
{
Name: "pools.{index}.root-volume-size",
Short: `The system volume disk size`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "autoscaler-config.scale-down-disabled",
Short: `Disable the cluster autoscaler`,
Expand Down Expand Up @@ -1299,6 +1314,21 @@ func k8sPoolCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "root-volume-type",
Short: `The system volume disk type`,
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"default_volume_type", "l_ssd", "b_ssd"},
},
{
Name: "root-volume-size",
Short: `The system volume disk size`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down

0 comments on commit e312a5e

Please sign in to comment.