Skip to content

Commit 3a7d2bc

Browse files
authored
docs(k8s): improve documentation (#808)
1 parent 1e23013 commit 3a7d2bc

File tree

4 files changed

+90
-62
lines changed

4 files changed

+90
-62
lines changed

scaleway-async/scaleway_async/k8s/v1/api.py

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ async def create_cluster(
244244
"""
245245
Create a new Cluster.
246246
Create a new Kubernetes cluster in a Scaleway region.
247-
:param type_: Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16).
247+
:param type_: Type of the cluster. See [list available cluster types](#list-available-cluster-types-for-a-cluster) for a list of valid types.
248248
:param description: Cluster description.
249249
:param version: Kubernetes version of the cluster.
250250
:param region: Region to target. If none is passed will use default region from the config.
@@ -407,7 +407,7 @@ async def update_cluster(
407407
:param description: New description for the cluster.
408408
:param tags: New tags associated with the cluster.
409409
:param autoscaler_config: New autoscaler config for the cluster.
410-
:param auto_upgrade: New auto upgrade configuration for the cluster. Note that all fields need to be set.
410+
:param auto_upgrade: New auto upgrade configuration for the cluster. Note that all fields needs to be set.
411411
:param feature_gates: List of feature gates to enable.
412412
:param admission_plugins: List of admission plugins to enable.
413413
:param open_id_connect_config: OpenID Connect configuration of the cluster. This configuration enables to update the OpenID Connect configuration of the Kubernetes API server.
@@ -460,7 +460,7 @@ async def delete_cluster(
460460
) -> Cluster:
461461
"""
462462
Delete a Cluster.
463-
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.
463+
Delete a specific Kubernetes cluster and all its associated pools and nodes, and possibly its associated Load Balancers or Block Volumes.
464464
:param cluster_id: ID of the cluster to delete.
465465
:param with_additional_resources: Defines whether all volumes (including retain volume type), empty Private Networks and Load Balancers with a name starting with the cluster ID will also be deleted.
466466
:param region: Region to target. If none is passed will use default region from the config.
@@ -549,7 +549,7 @@ async def set_cluster_type(
549549
) -> Cluster:
550550
"""
551551
Change the Cluster type.
552-
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).
552+
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).
553553
:param cluster_id: ID of the cluster to migrate from one type to another.
554554
:param type_: Type of the cluster. Note that some migrations are not possible (please refer to product documentation).
555555
:param region: Region to target. If none is passed will use default region from the config.
@@ -701,7 +701,7 @@ async def reset_cluster_admin_token(
701701
) -> None:
702702
"""
703703
Reset the admin token of a Cluster.
704-
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.
704+
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.
705705
:param cluster_id: Cluster ID on which the admin token will be renewed.
706706
:param region: Region to target. If none is passed will use default region from the config.
707707
@@ -735,6 +735,7 @@ async def migrate_cluster_to_sbscsi(
735735
"""
736736
Migrate a cluster to SBS CSI.
737737
Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
738+
Make sure to have the necessary Quota before running this command.
738739
:param cluster_id: Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled.
739740
:param region: Region to target. If none is passed will use default region from the config.
740741
:return: :class:`Cluster <Cluster>`
@@ -1087,17 +1088,20 @@ async def create_pool(
10871088
:param autoscaling: Defines whether the autoscaling feature is enabled for the pool.
10881089
:param size: Size (number of nodes) of the pool.
10891090
:param name: Pool name.
1090-
:param placement_group_id: Placement group ID in which all the nodes of the pool will be created.
1091+
:param placement_group_id: Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.
10911092
:param min_size: Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.
10921093
:param autohealing: Defines whether the autohealing feature is enabled for the pool.
10931094
:param 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.
10941095
:param max_size: Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.
1095-
:param 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.
1096-
:param tags: Tags associated with the pool.
1096+
:param container_runtime: Customization of the container runtime is available for each pool.
1097+
:param tags: Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags).
10971098
:param kubelet_args: Kubelet arguments to be used by this pool. Note that this feature is experimental.
10981099
:param upgrade_policy: Pool upgrade policy.
10991100
:param zone: Zone in which the pool's nodes will be spawned.
1100-
:param 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.
1101+
:param root_volume_type: * `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. This type is not available for all node types
1102+
* `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
1103+
* `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
1104+
* `b_ssd` is the legacy remote block storage which means your system is stored on a centralized and resilient cluster. Consider using `sbs-5k` or `sbs-15k` instead.
11011105
:param root_volume_size: System volume disk size.
11021106
:return: :class:`Pool <Pool>`
11031107
@@ -1231,6 +1235,7 @@ async def upgrade_pool(
12311235
"""
12321236
Upgrade a Pool in a Cluster.
12331237
Upgrade the Kubernetes version of a specific pool. Note that it only works if the targeted version matches the cluster's version.
1238+
This will drain and replace the nodes in that pool.
12341239
:param pool_id: ID of the pool to upgrade.
12351240
:param version: New Kubernetes version for the pool.
12361241
:param region: Region to target. If none is passed will use default region from the config.
@@ -1282,7 +1287,7 @@ async def update_pool(
12821287
) -> Pool:
12831288
"""
12841289
Update a Pool in a Cluster.
1285-
Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags.
1290+
Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags. To upgrade a pool, you will need to use the dedicated endpoint.
12861291
:param pool_id: ID of the pool to update.
12871292
:param region: Region to target. If none is passed will use default region from the config.
12881293
:param autoscaling: New value for the pool autoscaling enablement.
@@ -1646,7 +1651,7 @@ async def replace_node(
16461651
) -> Node:
16471652
"""
16481653
Replace a Node in a Cluster.
1649-
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.
1654+
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.
16501655
:param node_id: ID of the node to replace.
16511656
:param region: Region to target. If none is passed will use default region from the config.
16521657
:return: :class:`Node <Node>`
@@ -1682,7 +1687,7 @@ async def reboot_node(
16821687
) -> Node:
16831688
"""
16841689
Reboot a Node in a Cluster.
1685-
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.
1690+
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.
16861691
:param node_id: ID of the node to reboot.
16871692
:param region: Region to target. If none is passed will use default region from the config.
16881693
:return: :class:`Node <Node>`
@@ -1719,7 +1724,7 @@ async def delete_node(
17191724
) -> Node:
17201725
"""
17211726
Delete a Node in a Cluster.
1722-
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.
1727+
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.
17231728
:param node_id: ID of the node to replace.
17241729
:param skip_drain: Skip draining node from its workload (Note: this parameter is currently inactive).
17251730
:param replace: Add a new node after the deletion of this node.

scaleway-async/scaleway_async/k8s/v1/types.py

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class ClusterAutoscalerConfig:
243243

244244
scale_down_delay_after_add: str
245245
"""
246-
How long after scale up that scale down evaluation resumes.
246+
How long after scale up the scale down evaluation resumes.
247247
"""
248248

249249
estimator: AutoscalerEstimator
@@ -389,7 +389,7 @@ class Pool:
389389

390390
container_runtime: Runtime
391391
"""
392-
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.
392+
Customization of the container runtime is available for each pool.
393393
"""
394394

395395
autohealing: bool
@@ -399,7 +399,7 @@ class Pool:
399399

400400
tags: List[str]
401401
"""
402-
Tags associated with the pool.
402+
Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags).
403403
"""
404404

405405
kubelet_args: Dict[str, str]
@@ -414,7 +414,10 @@ class Pool:
414414

415415
root_volume_type: PoolVolumeType
416416
"""
417-
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.
417+
* `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. This type is not available for all node types
418+
* `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
419+
* `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
420+
* `b_ssd` is the legacy remote block storage which means your system is stored on a centralized and resilient cluster. Consider using `sbs-5k` or `sbs-15k` instead.
418421
"""
419422

420423
public_ip_disabled: bool
@@ -429,7 +432,7 @@ class Pool:
429432

430433
placement_group_id: Optional[str]
431434
"""
432-
Placement group ID in which all the nodes of the pool will be created.
435+
Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.
433436
"""
434437

435438
upgrade_policy: Optional[PoolUpgradePolicy]
@@ -504,7 +507,7 @@ class CreateClusterRequestAutoscalerConfig:
504507

505508
scale_down_delay_after_add: Optional[str]
506509
"""
507-
How long after scale up that scale down evaluation resumes.
510+
How long after scale up the scale down evaluation resumes.
508511
"""
509512

510513
ignore_daemonsets_utilization: Optional[bool]
@@ -600,12 +603,12 @@ class CreateClusterRequestPoolConfig:
600603

601604
container_runtime: Runtime
602605
"""
603-
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.
606+
Customization of the container runtime is available for each pool.
604607
"""
605608

606609
placement_group_id: Optional[str]
607610
"""
608-
Placement group ID in which all the nodes of the pool will be created.
611+
Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.
609612
"""
610613

611614
min_size: Optional[int]
@@ -625,7 +628,7 @@ class CreateClusterRequestPoolConfig:
625628

626629
tags: List[str]
627630
"""
628-
Tags associated with the pool.
631+
Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags).
629632
"""
630633

631634
kubelet_args: Dict[str, str]
@@ -640,7 +643,10 @@ class CreateClusterRequestPoolConfig:
640643

641644
root_volume_type: PoolVolumeType
642645
"""
643-
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.
646+
* `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. This type is not available for all node types
647+
* `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
648+
* `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
649+
* `b_ssd` is the legacy remote block storage which means your system is stored on a centralized and resilient cluster. Consider using `sbs-5k` or `sbs-15k` instead.
644650
"""
645651

646652
public_ip_disabled: bool
@@ -865,7 +871,7 @@ class Cluster:
865871

866872
auto_upgrade: Optional[ClusterAutoUpgrade]
867873
"""
868-
Auto upgrade configuration of the cluster.
874+
Auto upgrade Kubernetes version of the cluster.
869875
"""
870876

871877
admission_plugins: List[str]
@@ -1013,7 +1019,7 @@ class UpdateClusterRequestAutoscalerConfig:
10131019

10141020
scale_down_delay_after_add: Optional[str]
10151021
"""
1016-
How long after scale up that scale down evaluation resumes.
1022+
How long after scale up the scale down evaluation resumes.
10171023
"""
10181024

10191025
ignore_daemonsets_utilization: Optional[bool]
@@ -1135,7 +1141,7 @@ class AuthExternalNodeRequest:
11351141
class CreateClusterRequest:
11361142
type_: str
11371143
"""
1138-
Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16).
1144+
Type of the cluster. See [list available cluster types](#list-available-cluster-types-for-a-cluster) for a list of valid types.
11391145
"""
11401146

11411147
description: str
@@ -1257,7 +1263,7 @@ class CreatePoolRequest:
12571263

12581264
placement_group_id: Optional[str]
12591265
"""
1260-
Placement group ID in which all the nodes of the pool will be created.
1266+
Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.
12611267
"""
12621268

12631269
min_size: Optional[int]
@@ -1282,12 +1288,12 @@ class CreatePoolRequest:
12821288

12831289
container_runtime: Optional[Runtime]
12841290
"""
1285-
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.
1291+
Customization of the container runtime is available for each pool.
12861292
"""
12871293

12881294
tags: Optional[List[str]]
12891295
"""
1290-
Tags associated with the pool.
1296+
Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags).
12911297
"""
12921298

12931299
kubelet_args: Optional[Dict[str, str]]
@@ -1307,7 +1313,10 @@ class CreatePoolRequest:
13071313

13081314
root_volume_type: Optional[PoolVolumeType]
13091315
"""
1310-
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.
1316+
* `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. This type is not available for all node types
1317+
* `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
1318+
* `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
1319+
* `b_ssd` is the legacy remote block storage which means your system is stored on a centralized and resilient cluster. Consider using `sbs-5k` or `sbs-15k` instead.
13111320
"""
13121321

13131322
root_volume_size: Optional[int]
@@ -1957,7 +1966,7 @@ class UpdateClusterRequest:
19571966

19581967
auto_upgrade: Optional[UpdateClusterRequestAutoUpgrade]
19591968
"""
1960-
New auto upgrade configuration for the cluster. Note that all fields need to be set.
1969+
New auto upgrade configuration for the cluster. Note that all fields needs to be set.
19611970
"""
19621971

19631972
feature_gates: Optional[List[str]]

0 commit comments

Comments
 (0)