Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ ARGS:
[pools.{index}.autohealing] The enablement of the autohealing feature for the pool
[pools.{index}.tags.{index}] The tags associated with the pool
[pools.{index}.kubelet-args.{key}]
[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
[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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ARGS:
[pool-id] The pool ID on which to filter the returned nodes
[order-by] The sort order of the returned nodes (created_at_asc | created_at_desc)
[name] The name on which to filter the returned nodes
[status] The status on which to filter the returned nodes (unknown | creating | not_ready | ready | deleting | deleted | locked | rebooting | creation_error)
[status] The status on which to filter the returned nodes (unknown | creating | not_ready | ready | deleting | deleted | locked | rebooting | creation_error | upgrading)
[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
28 changes: 15 additions & 13 deletions cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@ EXAMPLES:
scw k8s pool create 11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group

ARGS:
cluster-id The ID of the cluster in which the pool will be created
name The name of the pool
node-type The node type is the type of Scaleway Instance wanted for the pool
[placement-group-id] The placement group ID in which all the nodes of the pool will be created
[autoscaling] The enablement of the autoscaling feature for the pool
size The size (number of nodes) of the pool
[min-size] The minimun size of the pool
[max-size] The maximum size of the pool
[container-runtime] The container runtime for the nodes of the pool (unknown_runtime | docker | containerd | crio)
[autohealing] The enablement of the autohealing feature for the pool
[tags.{index}] The tags associated with the pool
[kubelet-args.{key}]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
cluster-id The ID of the cluster in which the pool will be created
name The name of the pool
node-type The node type is the type of Scaleway Instance wanted for the pool
[placement-group-id] The placement group ID in which all the nodes of the pool will be created
[autoscaling] The enablement of the autoscaling feature for the pool
size The size (number of nodes) of the pool
[min-size] The minimun size of the pool
[max-size] The maximum size of the pool
[container-runtime] The container runtime for the nodes of the pool (unknown_runtime | docker | containerd | crio)
[autohealing] The enablement of the autohealing feature for the pool
[tags.{index}] The tags associated with the pool
[kubelet-args.{key}]
[upgrade-policy.max-unavailable]
[upgrade-policy.max-surge]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
-h, --help help for create
Expand Down
20 changes: 11 additions & 9 deletions cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ EXAMPLES:
scw k8s pool update 11111111-1111-1111-111111111111 tags.0=my tags.1=new tags.2=pool

ARGS:
pool-id The ID of the pool to update
[autoscaling] The new value for the enablement of autoscaling for the pool
[size] The new size for the pool
[min-size] The new minimun size for the pool
[max-size] The new maximum size for the pool
[autohealing] The new value for the enablement of autohealing for the pool
[tags.{index}] The new tags associated with the pool
[kubelet-args.value.{key}]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
pool-id The ID of the pool to update
[autoscaling] The new value for the enablement of autoscaling for the pool
[size] The new size for the pool
[min-size] The new minimun size for the pool
[max-size] The new maximum size for the pool
[autohealing] The new value for the enablement of autohealing for the pool
[tags.{index}] The new tags associated with the pool
[kubelet-args.value.{key}]
[upgrade-policy.max-unavailable]
[upgrade-policy.max-surge]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
-h, --help help for update
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/mattn/go-colorable v0.1.7
github.com/mattn/go-isatty v0.0.12
github.com/pkg/errors v0.9.1 // indirect
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210121150854-477be02b8e21
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f
github.com/sergi/go-diff v1.1.0 // indirect
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210121150854-477be02b8e21 h1:wocARfcjkGYbI4vAVtX3kmAlvgt+Wymdd2dE4zcykwI=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210121150854-477be02b8e21/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f h1:WSnaD0/cvbKJgSTYbjAPf4RJXVvNNDAwVm+W8wEmnGE=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
Expand Down
40 changes: 39 additions & 1 deletion internal/namespaces/k8s/v1/k8s_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,20 @@ func k8sClusterCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "pools.{index}.upgrade-policy.max-unavailable",
Short: `The maximum number of nodes that can be not ready at the same time`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "pools.{index}.upgrade-policy.max-surge",
Short: `The maximum number of nodes to be created during the upgrade`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "autoscaler-config.scale-down-disabled",
Short: `Disable the cluster autoscaler`,
Expand Down Expand Up @@ -1222,6 +1236,18 @@ func k8sPoolCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "upgrade-policy.max-unavailable",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "upgrade-policy.max-surge",
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 Expand Up @@ -1393,6 +1419,18 @@ func k8sPoolUpdate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "upgrade-policy.max-unavailable",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "upgrade-policy.max-surge",
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 Expand Up @@ -1501,7 +1539,7 @@ func k8sNodeList() *core.Command {
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown", "creating", "not_ready", "ready", "deleting", "deleted", "locked", "rebooting", "creation_error"},
EnumValues: []string{"unknown", "creating", "not_ready", "ready", "deleting", "deleted", "locked", "rebooting", "creation_error", "upgrading"},
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Expand Down