-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(k8s): add node, version, pool (#778)
- Loading branch information
1 parent
868c8df
commit 4597771
Showing
16 changed files
with
851 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
cmd/scw/testdata/test-all-usage-k8s-node-get-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This method allows to get details about a specific Kubernetes node. | ||
|
||
USAGE: | ||
scw k8s node get [arg=value ...] | ||
|
||
ARGS: | ||
node-id The ID of the requested node | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for get | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
20 changes: 20 additions & 0 deletions
20
cmd/scw/testdata/test-all-usage-k8s-node-list-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
This method allows to list all the existing nodes for a specific Kubernetes cluster. | ||
|
||
USAGE: | ||
scw k8s node list [arg=value ...] | ||
|
||
ARGS: | ||
cluster-id The cluster ID from which the nodes will be listed from | ||
[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 | rebuilding | notready | ready | deleting | deleted | warning | error | locked | rebooting | creation_error) | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for list | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
16 changes: 16 additions & 0 deletions
16
cmd/scw/testdata/test-all-usage-k8s-node-reboot-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This method allows to reboot a specific node. This node will frist be cordoned, meaning that scheduling will be disabled. Then the existing pods on the node will be drained and reschedule onto another schedulable node. Note that when there is not enough space to reschedule all the pods (in a one node cluster for instance), you may experience some disruption of your applications. | ||
|
||
USAGE: | ||
scw k8s node reboot [arg=value ...] | ||
|
||
ARGS: | ||
node-id The ID of the node to reboot | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for reboot | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
16 changes: 16 additions & 0 deletions
16
cmd/scw/testdata/test-all-usage-k8s-node-replace-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This method allows to replace a specific node. The node will be set cordoned, meaning that scheduling will be disabled. Then the existing pods on the node will be drained and reschedule onto another schedulable node. Then the node will be deleted, and a new one will be created after the deletion. Note that when there is not enough space to reschedule all the pods (in a one node cluster for instance), you may experience some disruption of your applications. | ||
|
||
USAGE: | ||
scw k8s node replace [arg=value ...] | ||
|
||
ARGS: | ||
node-id The ID of the node to replace | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for replace | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
22 changes: 22 additions & 0 deletions
22
cmd/scw/testdata/test-all-usage-k8s-node-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
A node (short for worker node) is an abstraction for a Scaleway Instance. | ||
It is part of a pool and is instantiated by Scaleway, making Kubernetes software installed and configured automatically on it. | ||
Please note that Kubernetes nodes cannot be accessed with ssh. | ||
|
||
USAGE: | ||
scw k8s node <command> | ||
|
||
AVAILABLE COMMANDS: | ||
list List all the nodes in a cluster | ||
get Get a node in a cluster | ||
replace Replace a node in a cluster | ||
reboot Reboot a node in a cluster | ||
|
||
FLAGS: | ||
-h, --help help for node | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use | ||
|
||
Use "scw k8s node [command] --help" for more information about a command. |
26 changes: 26 additions & 0 deletions
26
cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
This method allows to create a new pool in a specific Kubernetes cluster. | ||
|
||
USAGE: | ||
scw k8s pool create [arg=value ...] | ||
|
||
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 | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for create | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
16 changes: 16 additions & 0 deletions
16
cmd/scw/testdata/test-all-usage-k8s-pool-delete-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This method allows to delete a specific pool from a cluster, deleting all the nodes associated with it. | ||
|
||
USAGE: | ||
scw k8s pool delete [arg=value ...] | ||
|
||
ARGS: | ||
pool-id The ID of the pool to delete | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for delete | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
16 changes: 16 additions & 0 deletions
16
cmd/scw/testdata/test-all-usage-k8s-pool-get-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This method allows to get details about a specific pool. | ||
|
||
USAGE: | ||
scw k8s pool get [arg=value ...] | ||
|
||
ARGS: | ||
pool-id The ID of the requested pool | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for get | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
19 changes: 19 additions & 0 deletions
19
cmd/scw/testdata/test-all-usage-k8s-pool-list-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
This method allows to list all the existing pools for a specific Kubernetes cluster. | ||
|
||
USAGE: | ||
scw k8s pool list [arg=value ...] | ||
|
||
ARGS: | ||
cluster-id The ID of the cluster from which the pools will be listed from | ||
[order-by] The sort order of the returned pools (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc | status_asc | status_desc | version_asc | version_desc) | ||
[name] The name on which to filter the returned pools | ||
[status] The status on which to filter the returned pools (unknown | creating | ready | deleting | deleted | updating | scaling | warning | error | locked | upgrading) | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for list | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
22 changes: 22 additions & 0 deletions
22
cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
This method allows to update some attributes of a specific pool such as the size, the autoscaling enablement, the tags, ... | ||
|
||
USAGE: | ||
scw k8s pool update [arg=value ...] | ||
|
||
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] The new tags associated with the pool | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for update | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
17 changes: 17 additions & 0 deletions
17
cmd/scw/testdata/test-all-usage-k8s-pool-upgrade-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
This method allows to upgrade the Kubernetes version of a specific pool. Note that this will work when the targeted version is the same than the version of the cluster. | ||
|
||
USAGE: | ||
scw k8s pool upgrade [arg=value ...] | ||
|
||
ARGS: | ||
pool-id The ID of the pool to upgrade | ||
[version] The new Kubernetes version for the pool | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for upgrade | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
24 changes: 24 additions & 0 deletions
24
cmd/scw/testdata/test-all-usage-k8s-pool-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
A pool is a set of identical Nodes. A pool has a name, a size (its current number of nodes), nodes number limits (min, max) and a Scaleway instance type. | ||
Changing those limits increases/decreases the size of a pool. Thus, when autoscaling is enabled, the pool will grow or shrink inside those limits, depending on its load. | ||
A "default pool" is automatically created with every cluster. | ||
|
||
USAGE: | ||
scw k8s pool <command> | ||
|
||
AVAILABLE COMMANDS: | ||
list List all the pools in a cluster | ||
create Create a new pool in a cluster | ||
get Get a pool in a cluster | ||
upgrade Upgrade a pool in a cluster | ||
update Update a pool in a cluster | ||
delete Delete a pool in a cluster | ||
|
||
FLAGS: | ||
-h, --help help for pool | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use | ||
|
||
Use "scw k8s pool [command] --help" for more information about a command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
cmd/scw/testdata/test-all-usage-k8s-version-list-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
This method allows to list all available versions for the creation of a new Kubernetes cluster. | ||
|
||
USAGE: | ||
scw k8s version list [arg=value ...] | ||
|
||
ARGS: | ||
[region] Region to target. If none is passed will use default region from the config (fr-par) | ||
|
||
FLAGS: | ||
-h, --help help for list | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use |
21 changes: 21 additions & 0 deletions
21
cmd/scw/testdata/test-all-usage-k8s-version-usage.stderr.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
A version is a vanilla Kubernetes version like `x.y.z`. | ||
It is composed of a major version x, a minor version y and a patch version z. | ||
Scaleway's managed Kubernetes, Kapsule, will at least support the last patch version for the last three minor release. | ||
|
||
Also each version have a different set of container runtimes, CNIs, ingresses, feature gates and admission plugins available. | ||
|
||
USAGE: | ||
scw k8s version <command> | ||
|
||
AVAILABLE COMMANDS: | ||
list List all available versions | ||
|
||
FLAGS: | ||
-h, --help help for version | ||
|
||
GLOBAL FLAGS: | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human | ||
-p, --profile string The config profile to use | ||
|
||
Use "scw k8s version [command] --help" for more information about a command. |
Oops, something went wrong.