Skip to content

Commit c8037cc

Browse files
authored
docs(k8s): improve documentation (scaleway#2377)
1 parent b79a141 commit c8037cc

File tree

1 file changed

+36
-25
lines changed

1 file changed

+36
-25
lines changed

api/k8s/v1/k8s_sdk.go

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ type ClusterAutoscalerConfig struct {
747747
// ScaleDownDisabled: disable the cluster autoscaler.
748748
ScaleDownDisabled bool `json:"scale_down_disabled"`
749749

750-
// ScaleDownDelayAfterAdd: how long after scale up that scale down evaluation resumes.
750+
// ScaleDownDelayAfterAdd: how long after scale up the scale down evaluation resumes.
751751
ScaleDownDelayAfterAdd string `json:"scale_down_delay_after_add"`
752752

753753
// Estimator: type of resource estimator to be used in scale up.
@@ -840,17 +840,17 @@ type Pool struct {
840840
// MaxSize: defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.
841841
MaxSize uint32 `json:"max_size"`
842842

843-
// ContainerRuntime: 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.
843+
// ContainerRuntime: customization of the container runtime is available for each pool.
844844
// Default value: unknown_runtime
845845
ContainerRuntime Runtime `json:"container_runtime"`
846846

847847
// Autohealing: defines whether the autohealing feature is enabled for the pool.
848848
Autohealing bool `json:"autohealing"`
849849

850-
// Tags: tags associated with the pool.
850+
// Tags: tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags).
851851
Tags []string `json:"tags"`
852852

853-
// PlacementGroupID: placement group ID in which all the nodes of the pool will be created.
853+
// PlacementGroupID: placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.
854854
PlacementGroupID *string `json:"placement_group_id"`
855855

856856
// KubeletArgs: kubelet arguments to be used by this pool. Note that this feature is experimental.
@@ -862,7 +862,10 @@ type Pool struct {
862862
// Zone: zone in which the pool's nodes will be spawned.
863863
Zone scw.Zone `json:"zone"`
864864

865-
// RootVolumeType: 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.
865+
// RootVolumeType: * `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
866+
// * `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
867+
// * `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
868+
// * `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.
866869
// Default value: default_volume_type
867870
RootVolumeType PoolVolumeType `json:"root_volume_type"`
868871

@@ -921,7 +924,7 @@ type CreateClusterRequestAutoscalerConfig struct {
921924
// ScaleDownDisabled: disable the cluster autoscaler.
922925
ScaleDownDisabled *bool `json:"scale_down_disabled"`
923926

924-
// ScaleDownDelayAfterAdd: how long after scale up that scale down evaluation resumes.
927+
// ScaleDownDelayAfterAdd: how long after scale up the scale down evaluation resumes.
925928
ScaleDownDelayAfterAdd *string `json:"scale_down_delay_after_add"`
926929

927930
// Estimator: type of resource estimator to be used in scale up.
@@ -983,7 +986,7 @@ type CreateClusterRequestPoolConfig struct {
983986
// NodeType: 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.
984987
NodeType string `json:"node_type"`
985988

986-
// PlacementGroupID: placement group ID in which all the nodes of the pool will be created.
989+
// PlacementGroupID: placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.
987990
PlacementGroupID *string `json:"placement_group_id"`
988991

989992
// Autoscaling: defines whether the autoscaling feature is enabled for the pool.
@@ -998,14 +1001,14 @@ type CreateClusterRequestPoolConfig struct {
9981001
// MaxSize: defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.
9991002
MaxSize *uint32 `json:"max_size"`
10001003

1001-
// ContainerRuntime: 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.
1004+
// ContainerRuntime: customization of the container runtime is available for each pool.
10021005
// Default value: unknown_runtime
10031006
ContainerRuntime Runtime `json:"container_runtime"`
10041007

10051008
// Autohealing: defines whether the autohealing feature is enabled for the pool.
10061009
Autohealing bool `json:"autohealing"`
10071010

1008-
// Tags: tags associated with the pool.
1011+
// Tags: tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags).
10091012
Tags []string `json:"tags"`
10101013

10111014
// KubeletArgs: kubelet arguments to be used by this pool. Note that this feature is experimental.
@@ -1017,7 +1020,10 @@ type CreateClusterRequestPoolConfig struct {
10171020
// Zone: zone in which the pool's nodes will be spawned.
10181021
Zone scw.Zone `json:"zone"`
10191022

1020-
// RootVolumeType: 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.
1023+
// RootVolumeType: * `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
1024+
// * `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
1025+
// * `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
1026+
// * `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.
10211027
// Default value: default_volume_type
10221028
RootVolumeType PoolVolumeType `json:"root_volume_type"`
10231029

@@ -1158,7 +1164,7 @@ type Cluster struct {
11581164
// AutoscalerConfig: autoscaler config for the cluster.
11591165
AutoscalerConfig *ClusterAutoscalerConfig `json:"autoscaler_config"`
11601166

1161-
// AutoUpgrade: auto upgrade configuration of the cluster.
1167+
// AutoUpgrade: auto upgrade Kubernetes version of the cluster.
11621168
AutoUpgrade *ClusterAutoUpgrade `json:"auto_upgrade"`
11631169

11641170
// UpgradeAvailable: defines whether a new Kubernetes version is available.
@@ -1255,7 +1261,7 @@ type UpdateClusterRequestAutoscalerConfig struct {
12551261
// ScaleDownDisabled: disable the cluster autoscaler.
12561262
ScaleDownDisabled *bool `json:"scale_down_disabled"`
12571263

1258-
// ScaleDownDelayAfterAdd: how long after scale up that scale down evaluation resumes.
1264+
// ScaleDownDelayAfterAdd: how long after scale up the scale down evaluation resumes.
12591265
ScaleDownDelayAfterAdd *string `json:"scale_down_delay_after_add"`
12601266

12611267
// Estimator: type of resource estimator to be used in scale up.
@@ -1356,7 +1362,7 @@ type CreateClusterRequest struct {
13561362
// Precisely one of ProjectID, OrganizationID must be set.
13571363
ProjectID *string `json:"project_id,omitempty"`
13581364

1359-
// Type: type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16).
1365+
// Type: type of the cluster. See [list available cluster types](#list-available-cluster-types-for-a-cluster) for a list of valid types.
13601366
Type string `json:"type"`
13611367

13621368
// Name: cluster name.
@@ -1422,7 +1428,7 @@ type CreatePoolRequest struct {
14221428
// NodeType: 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.
14231429
NodeType string `json:"node_type"`
14241430

1425-
// PlacementGroupID: placement group ID in which all the nodes of the pool will be created.
1431+
// PlacementGroupID: placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.
14261432
PlacementGroupID *string `json:"placement_group_id,omitempty"`
14271433

14281434
// Autoscaling: defines whether the autoscaling feature is enabled for the pool.
@@ -1437,14 +1443,14 @@ type CreatePoolRequest struct {
14371443
// MaxSize: defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.
14381444
MaxSize *uint32 `json:"max_size,omitempty"`
14391445

1440-
// ContainerRuntime: 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.
1446+
// ContainerRuntime: customization of the container runtime is available for each pool.
14411447
// Default value: unknown_runtime
14421448
ContainerRuntime Runtime `json:"container_runtime"`
14431449

14441450
// Autohealing: defines whether the autohealing feature is enabled for the pool.
14451451
Autohealing bool `json:"autohealing"`
14461452

1447-
// Tags: tags associated with the pool.
1453+
// Tags: tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags).
14481454
Tags []string `json:"tags"`
14491455

14501456
// KubeletArgs: kubelet arguments to be used by this pool. Note that this feature is experimental.
@@ -1456,7 +1462,10 @@ type CreatePoolRequest struct {
14561462
// Zone: zone in which the pool's nodes will be spawned.
14571463
Zone scw.Zone `json:"zone"`
14581464

1459-
// RootVolumeType: 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.
1465+
// RootVolumeType: * `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
1466+
// * `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
1467+
// * `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
1468+
// * `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.
14601469
// Default value: default_volume_type
14611470
RootVolumeType PoolVolumeType `json:"root_volume_type"`
14621471

@@ -2036,7 +2045,7 @@ type UpdateClusterRequest struct {
20362045
// AutoscalerConfig: new autoscaler config for the cluster.
20372046
AutoscalerConfig *UpdateClusterRequestAutoscalerConfig `json:"autoscaler_config,omitempty"`
20382047

2039-
// AutoUpgrade: new auto upgrade configuration for the cluster. Note that all fields need to be set.
2048+
// AutoUpgrade: new auto upgrade configuration for the cluster. Note that all fields needs to be set.
20402049
AutoUpgrade *UpdateClusterRequestAutoUpgrade `json:"auto_upgrade,omitempty"`
20412050

20422051
// FeatureGates: list of feature gates to enable.
@@ -2284,7 +2293,7 @@ func (s *API) UpdateCluster(req *UpdateClusterRequest, opts ...scw.RequestOption
22842293
return &resp, nil
22852294
}
22862295

2287-
// DeleteCluster: 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.
2296+
// DeleteCluster: Delete a specific Kubernetes cluster and all its associated pools and nodes, and possibly its associated Load Balancers or Block Volumes.
22882297
func (s *API) DeleteCluster(req *DeleteClusterRequest, opts ...scw.RequestOption) (*Cluster, error) {
22892298
var err error
22902299

@@ -2355,7 +2364,7 @@ func (s *API) UpgradeCluster(req *UpgradeClusterRequest, opts ...scw.RequestOpti
23552364
return &resp, nil
23562365
}
23572366

2358-
// SetClusterType: 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).
2367+
// SetClusterType: 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).
23592368
func (s *API) SetClusterType(req *SetClusterTypeRequest, opts ...scw.RequestOption) (*Cluster, error) {
23602369
var err error
23612370

@@ -2489,7 +2498,7 @@ func (s *API) getClusterKubeConfig(req *GetClusterKubeConfigRequest, opts ...scw
24892498
return &resp, nil
24902499
}
24912500

2492-
// ResetClusterAdminToken: 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.
2501+
// ResetClusterAdminToken: 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.
24932502
func (s *API) ResetClusterAdminToken(req *ResetClusterAdminTokenRequest, opts ...scw.RequestOption) error {
24942503
var err error
24952504

@@ -2524,6 +2533,7 @@ func (s *API) ResetClusterAdminToken(req *ResetClusterAdminTokenRequest, opts ..
25242533
}
25252534

25262535
// MigrateClusterToSBSCSI: Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
2536+
// Make sure to have the necessary Quota before running this command.
25272537
func (s *API) MigrateClusterToSBSCSI(req *MigrateClusterToSBSCSIRequest, opts ...scw.RequestOption) (*Cluster, error) {
25282538
var err error
25292539

@@ -2822,6 +2832,7 @@ func (s *API) GetPool(req *GetPoolRequest, opts ...scw.RequestOption) (*Pool, er
28222832
}
28232833

28242834
// UpgradePool: Upgrade the Kubernetes version of a specific pool. Note that it only works if the targeted version matches the cluster's version.
2835+
// This will drain and replace the nodes in that pool.
28252836
func (s *API) UpgradePool(req *UpgradePoolRequest, opts ...scw.RequestOption) (*Pool, error) {
28262837
var err error
28272838

@@ -2857,7 +2868,7 @@ func (s *API) UpgradePool(req *UpgradePoolRequest, opts ...scw.RequestOption) (*
28572868
return &resp, nil
28582869
}
28592870

2860-
// UpdatePool: Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags.
2871+
// UpdatePool: 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.
28612872
func (s *API) UpdatePool(req *UpdatePoolRequest, opts ...scw.RequestOption) (*Pool, error) {
28622873
var err error
28632874

@@ -3099,7 +3110,7 @@ func (s *API) GetNode(req *GetNodeRequest, opts ...scw.RequestOption) (*Node, er
30993110
return &resp, nil
31003111
}
31013112

3102-
// Deprecated: ReplaceNode: 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.
3113+
// Deprecated: ReplaceNode: 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.
31033114
func (s *API) ReplaceNode(req *ReplaceNodeRequest, opts ...scw.RequestOption) (*Node, error) {
31043115
var err error
31053116

@@ -3135,7 +3146,7 @@ func (s *API) ReplaceNode(req *ReplaceNodeRequest, opts ...scw.RequestOption) (*
31353146
return &resp, nil
31363147
}
31373148

3138-
// RebootNode: 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.
3149+
// RebootNode: 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.
31393150
func (s *API) RebootNode(req *RebootNodeRequest, opts ...scw.RequestOption) (*Node, error) {
31403151
var err error
31413152

@@ -3171,7 +3182,7 @@ func (s *API) RebootNode(req *RebootNodeRequest, opts ...scw.RequestOption) (*No
31713182
return &resp, nil
31723183
}
31733184

3174-
// DeleteNode: 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.
3185+
// DeleteNode: 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.
31753186
func (s *API) DeleteNode(req *DeleteNodeRequest, opts ...scw.RequestOption) (*Node, error) {
31763187
var err error
31773188

0 commit comments

Comments
 (0)