Skip to content

Commit

Permalink
feat: update generated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot committed Dec 26, 2024
1 parent 0781019 commit 4877803
Show file tree
Hide file tree
Showing 27 changed files with 276 additions and 240 deletions.
20 changes: 10 additions & 10 deletions cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@ USAGE:
scw k8s cluster create [arg=value ...]

EXAMPLES:
Create a Kubernetes cluster named foo with cilium as CNI, in version 1.27.0 and with a pool named default composed of 3 DEV1-M
scw k8s cluster create name=foo version=1.27.0 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default
Create a Kubernetes cluster named foo with cilium as CNI, in version 1.31.2 and with a pool named default composed of 3 DEV1-M
scw k8s cluster create name=foo version=1.31.2 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default

Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.27.0 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)
scw k8s cluster create name=bar version=1.27.0 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default
Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.31.2 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)
scw k8s cluster create name=bar version=1.31.2 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[type] Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16)
[type] Type of the cluster. See [list available cluster types](#list-available-cluster-types-for-a-cluster) for a list of valid types
name=<generated> Cluster name
[description] Cluster description
[tags.{index}] Tags associated with the cluster
version=latest Kubernetes version of the cluster
cni=cilium Container Network Interface (CNI) plugin running in the cluster (unknown_cni | cilium | calico | weave | flannel | kilo | none)
[pools.{index}.name] Name of the pool
[pools.{index}.node-type] Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). 'external' is a special node type used to provision instances from other cloud providers in a Kosmos Cluster
[pools.{index}.placement-group-id] Placement group ID in which all the nodes of the pool will be created
[pools.{index}.placement-group-id] Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.
[pools.{index}.autoscaling] Defines whether the autoscaling feature is enabled for the pool
[pools.{index}.size] Size (number of nodes) of the pool
[pools.{index}.min-size] Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool
[pools.{index}.max-size] Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool
[pools.{index}.container-runtime] Customization of the container runtime is available for each pool. Note that `docker` has been deprecated since version 1.20 and will be removed by version 1.24 (unknown_runtime | docker | containerd | crio)
[pools.{index}.container-runtime] Customization of the container runtime is available for each pool (unknown_runtime | docker | containerd | crio)
[pools.{index}.autohealing] Defines whether the autohealing feature is enabled for the pool
[pools.{index}.tags.{index}] Tags associated with the pool
[pools.{index}.tags.{index}] Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags)
[pools.{index}.kubelet-args.{key}] Kubelet arguments to be used by this pool. Note that this feature is experimental
[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] Zone in which the pool's nodes will be spawned
[pools.{index}.root-volume-type] Defines the system volume disk type. Two different types of volume (`volume_type`) are provided: `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. `b_ssd` is a remote block storage which means your system is stored on a centralized and resilient cluster (default_volume_type | l_ssd | b_ssd | sbs_5k | sbs_15k)
[pools.{index}.root-volume-type] Defines the system volume disk type. Several types of volume (`volume_type`) are provided: (default_volume_type | l_ssd | b_ssd | sbs_5k | sbs_15k)
[pools.{index}.root-volume-size] System volume disk size
[pools.{index}.public-ip-disabled] Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway
[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.scale-down-delay-after-add] How long after scale up the scale down evaluation resumes
[autoscaler-config.estimator] Type of resource estimator to be used in scale up (unknown_estimator | binpacking)
[autoscaler-config.expander] Type of node group expander to be used in scale up (unknown_expander | random | most_pods | least_waste | priority | price)
[autoscaler-config.ignore-daemonsets-utilization] Ignore DaemonSet pods when calculating resource utilization for scaling down
Expand Down
10 changes: 5 additions & 5 deletions cmd/scw/testdata/test-all-usage-k8s-cluster-delete-usage.golden
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a specific Kubernetes cluster and all its associated pools and nodes. Note that this method will not delete any Load Balancer or Block Volume that are associated with the cluster.
Delete a specific Kubernetes cluster and all its associated pools and nodes, and possibly its associated Load Balancers or Block Volumes.

USAGE:
scw k8s cluster delete <cluster-id ...> [arg=value ...]

EXAMPLES:
Delete a cluster
scw k8s cluster delete 11111111-1111-1111-111111111111
Delete a cluster without deleting its Block volumes and Load Balancers
scw k8s cluster delete 11111111-1111-1111-1111-111111111111

Delete a cluster with its Block volumes and Load Balancers
scw k8s cluster delete 11111111-1111-1111-111111111111 with-additional-resources=true
Delete a cluster with its Block volumes and Load Balancers (best effort)
scw k8s cluster delete 11111111-1111-1111-1111-111111111111 with-additional-resources=true

ARGS:
cluster-id ID of the cluster to delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

EXAMPLES:
Get a cluster information
scw k8s cluster get 11111111-1111-1111-111111111111
scw k8s cluster get 11111111-1111-1111-1111-111111111111

ARGS:
cluster-id ID of the requested cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

EXAMPLES:
List all cluster types that a cluster can upgrade to
scw k8s cluster list-available-types 11111111-1111-1111-111111111111
scw k8s cluster list-available-types 11111111-1111-1111-1111-111111111111

ARGS:
cluster-id Cluster ID for which the available Kubernetes types will be listed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

EXAMPLES:
List all versions that a cluster can upgrade to
scw k8s cluster list-available-versions 11111111-1111-1111-111111111111
scw k8s cluster list-available-versions 11111111-1111-1111-1111-111111111111

ARGS:
cluster-id Cluster ID for which the available Kubernetes versions will be listed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
Make sure to have the necessary Quota before running this command.

USAGE:
scw k8s cluster migrate-to-sbs-csi <cluster-id ...> [arg=value ...]

EXAMPLES:
Migrate a cluster to SBS CSI
scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-111111111111
scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-1111-111111111111

ARGS:
cluster-id Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download kubeconfig again to keep interacting with the cluster.
Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download the kubeconfig again to keep interacting with the cluster.

USAGE:
scw k8s cluster reset-admin-token <cluster-id ...> [arg=value ...]

EXAMPLES:
Reset the admin token for a cluster
scw k8s cluster reset-admin-token 11111111-1111-1111-111111111111
scw k8s cluster reset-admin-token 11111111-1111-1111-1111-111111111111

ARGS:
cluster-id Cluster ID on which the admin token will be renewed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the `type` field, [list available cluster types](#path-clusters-list-available-cluster-types-for-a-cluster).
Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the `type` field, [list available cluster types](#list-available-cluster-types-for-a-cluster).

USAGE:
scw k8s cluster set-type <cluster-id ...> [arg=value ...]

EXAMPLES:
Convert a kapsule cluster to a kapsule-dedicated-16 cluster
scw k8s cluster set-type 11111111-1111-1111-111111111111 type=kapsule-dedicated-16
scw k8s cluster set-type 11111111-1111-1111-1111-111111111111 type=kapsule-dedicated-16

ARGS:
cluster-id ID of the cluster to migrate from one type to another
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ USAGE:
scw k8s cluster update <cluster-id ...> [arg=value ...]

EXAMPLES:
Add TTLAfterFinished and ServiceNodeExclusion as feature gates on a cluster
scw k8s cluster update 11111111-1111-1111-111111111111 feature-gates.0=TTLAfterFinished feature-gates.1=ServiceNodeExclusion
Add InPlacePodVerticalScaling and SidecarContainers as feature gates on a cluster
scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates.0=InPlacePodVerticalScaling feature-gates.1=SidecarContainers

Remove all custom feature gates on a cluster
scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates=none

ARGS:
cluster-id ID of the cluster to update
[name] New external name for the cluster
[description] New description for the cluster
[tags.{index}] New tags associated with the cluster
[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.scale-down-delay-after-add] How long after scale up the scale down evaluation resumes
[autoscaler-config.estimator] Type of resource estimator to be used in scale up (unknown_estimator | binpacking)
[autoscaler-config.expander] Type of node group expander to be used in scale up (unknown_expander | random | most_pods | least_waste | priority | price)
[autoscaler-config.ignore-daemonsets-utilization] Ignore DaemonSet pods when calculating resource utilization for scaling down
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ USAGE:
scw k8s cluster upgrade <cluster-id ...> [arg=value ...]

EXAMPLES:
Upgrade a cluster version 1.27.0 of Kubernetes (pools *are not* included)
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0
Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are not* included)
scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2

Upgrade a cluster to version 1.27.0 of Kubernetes (pools *are* included)
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0 upgrade-pools=true
Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are* included)
scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2 upgrade-pools=true

ARGS:
cluster-id ID of the cluster to upgrade
Expand Down
8 changes: 4 additions & 4 deletions cmd/scw/testdata/test-all-usage-k8s-node-delete-usage.golden
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a specific Node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected.
Delete a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur.

USAGE:
scw k8s node delete <node-id ...> [arg=value ...]

EXAMPLES:
Delete a node
scw k8s node delete 11111111-1111-1111-111111111111
scw k8s node delete 11111111-1111-1111-1111-111111111111

Delete a node without evicting workloads
scw k8s node delete 11111111-1111-1111-111111111111 skip-drain=true
scw k8s node delete 11111111-1111-1111-1111-111111111111 skip-drain=true

Replace a node by a new one
scw k8s node delete 11111111-1111-1111-111111111111 replace=true
scw k8s node delete 11111111-1111-1111-1111-111111111111 replace=true

ARGS:
node-id ID of the node to replace
Expand Down
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-k8s-node-get-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

EXAMPLES:
Get a node
scw k8s node get 11111111-1111-1111-111111111111
scw k8s node get 11111111-1111-1111-1111-111111111111

ARGS:
node-id ID of the requested node
Expand Down
8 changes: 4 additions & 4 deletions cmd/scw/testdata/test-all-usage-k8s-node-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ USAGE:

EXAMPLES:
List all the nodes in the cluster
scw k8s node list cluster-id=11111111-1111-1111-111111111111
scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111

List all the nodes in the cluster's 2222222222222-2222-222222222222 pool
scw k8s node list cluster-id=11111111-1111-1111-111111111111 pool-id=2222222222222-2222-222222222222
List all the nodes in the cluster's 22222222-2222-2222-2222-222222222222 pool
scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 pool-id=22222222-2222-2222-2222-222222222222

List all cluster nodes that are ready
scw k8s node list cluster-id=11111111-1111-1111-111111111111 status=ready
scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 status=ready

ARGS:
cluster-id Cluster ID from which the nodes will be listed from
Expand Down
4 changes: 2 additions & 2 deletions cmd/scw/testdata/test-all-usage-k8s-node-reboot-usage.golden
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Reboot a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected.
Reboot a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur.

USAGE:
scw k8s node reboot <node-id ...> [arg=value ...]

EXAMPLES:
Reboot a node
scw k8s node reboot 11111111-1111-1111-111111111111
scw k8s node reboot 11111111-1111-1111-1111-111111111111

ARGS:
node-id ID of the node to reboot
Expand Down
4 changes: 2 additions & 2 deletions cmd/scw/testdata/test-all-usage-k8s-node-replace-usage.golden
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Replace a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected.
Replace a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur.

USAGE:
scw k8s node replace <node-id ...> [arg=value ...]

EXAMPLES:
Replace a node
scw k8s node replace 11111111-1111-1111-111111111111
scw k8s node replace 11111111-1111-1111-1111-111111111111

ARGS:
node-id ID of the node to replace
Expand Down
Loading

0 comments on commit 4877803

Please sign in to comment.