From 506a671a8a1c327f1c1ae6bfbb657841082b2f9c Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Fri, 27 Dec 2024 21:35:16 +0100 Subject: [PATCH] feat: update generated apis (#1697) Co-authored-by: philibeaux --- packages/clients/src/api/k8s/v1/api.gen.ts | 42 +++---- packages/clients/src/api/k8s/v1/types.gen.ts | 117 ++++++++++++------- 2 files changed, 95 insertions(+), 64 deletions(-) diff --git a/packages/clients/src/api/k8s/v1/api.gen.ts b/packages/clients/src/api/k8s/v1/api.gen.ts index edc5752f0..143f14d1f 100644 --- a/packages/clients/src/api/k8s/v1/api.gen.ts +++ b/packages/clients/src/api/k8s/v1/api.gen.ts @@ -218,8 +218,8 @@ export class API extends ParentAPI { /** * Delete a Cluster. 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. + * associated pools and nodes, and possibly its associated Load Balancers or + * Block Volumes. * * @param request - The request {@link DeleteClusterRequest} * @returns A Promise of Cluster @@ -260,8 +260,7 @@ export class API extends ParentAPI { /** * Change the Cluster type. 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). + * available cluster types](#list-available-cluster-types-for-a-cluster). * * @param request - The request {@link SetClusterTypeRequest} * @returns A Promise of Cluster @@ -332,7 +331,7 @@ export class API extends ParentAPI { * Reset the admin token of a 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 kubeconfig again to keep interacting with the cluster. + * download the kubeconfig again to keep interacting with the cluster. * * @param request - The request {@link ResetClusterAdminTokenRequest} */ @@ -347,7 +346,8 @@ export class API extends ParentAPI { /** * Migrate a cluster to SBS CSI. Enable the latest CSI compatible with * Scaleway Block Storage (SBS) and migrate all existing - * PersistentVolumes/VolumeSnapshotContents to SBS. + * PersistentVolumes/VolumeSnapshotContents to SBS. Make sure to have the + * necessary Quota before running this command. * * @param request - The request {@link MigrateClusterToSBSCSIRequest} * @returns A Promise of Cluster @@ -526,7 +526,7 @@ export class API extends ParentAPI { /** * Upgrade a Pool in a Cluster. Upgrade the Kubernetes version of a specific * pool. Note that it only works if the targeted version matches the cluster's - * version. + * version. This will drain and replace the nodes in that pool. * * @param request - The request {@link UpgradePoolRequest} * @returns A Promise of Pool @@ -546,7 +546,8 @@ export class API extends ParentAPI { /** * Update a Pool in a Cluster. Update the attributes of a specific pool, such - * as its desired size, autoscaling settings, and tags. + * as its desired size, autoscaling settings, and tags. To upgrade a pool, you + * will need to use the dedicated endpoint. * * @param request - The request {@link UpdatePoolRequest} * @returns A Promise of Pool @@ -701,11 +702,10 @@ export class API extends ParentAPI { /** * Replace a Node in a Cluster. 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. + * 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. * * @deprecated * @param request - The request {@link ReplaceNodeRequest} @@ -724,10 +724,10 @@ export class API extends ParentAPI { /** * Reboot a Node in a Cluster. 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. + * 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. * * @param request - The request {@link RebootNodeRequest} * @returns A Promise of Node @@ -744,9 +744,11 @@ export class API extends ParentAPI { ) /** - * Delete a Node in a Cluster. 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 Node in a Cluster. 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. * * @param request - The request {@link DeleteNodeRequest} * @returns A Promise of Node diff --git a/packages/clients/src/api/k8s/v1/types.gen.ts b/packages/clients/src/api/k8s/v1/types.gen.ts index 45d71d270..63017b5a6 100644 --- a/packages/clients/src/api/k8s/v1/types.gen.ts +++ b/packages/clients/src/api/k8s/v1/types.gen.ts @@ -50,7 +50,17 @@ export type ListClustersRequestOrderBy = | 'version_asc' | 'version_desc' -export type ListNodesRequestOrderBy = 'created_at_asc' | 'created_at_desc' +export type ListNodesRequestOrderBy = + | 'created_at_asc' + | 'created_at_desc' + | 'updated_at_asc' + | 'updated_at_desc' + | 'name_asc' + | 'name_desc' + | 'status_asc' + | 'status_desc' + | 'version_asc' + | 'version_desc' export type ListPoolsRequestOrderBy = | 'created_at_asc' @@ -136,7 +146,7 @@ export interface ClusterAutoUpgrade { export interface ClusterAutoscalerConfig { /** Disable the cluster autoscaler. */ scaleDownDisabled: boolean - /** How long after scale up that scale down evaluation resumes. */ + /** How long after scale up the scale down evaluation resumes. */ scaleDownDelayAfterAdd: string /** Type of resource estimator to be used in scale up. */ estimator: AutoscalerEstimator @@ -248,17 +258,19 @@ export interface Pool { * when autoscaling is enabled on the pool. */ maxSize: number - /** - * 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. - */ + /** Customization of the container runtime is available for each pool. */ containerRuntime: Runtime /** Defines whether the autohealing feature is enabled for the pool. */ autohealing: boolean - /** Tags associated with the pool. */ + /** + * Tags associated with the pool, see [managing + * tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags). + */ tags: string[] - /** Placement group ID in which all the nodes of the pool will be created. */ + /** + * Placement group ID in which all the nodes of the pool will be created, + * placement groups are limited to 20 instances. + */ placementGroupId?: string /** * Kubelet arguments to be used by this pool. Note that this feature is @@ -270,11 +282,15 @@ export interface Pool { /** Zone in which the pool's nodes will be spawned. */ zone: Zone /** - * 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. + * - `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 + * `sbs-5k` is a remote block storage which means your system is stored on a + * centralized and resilient cluster with 5k IOPS limits `sbs-15k` is a + * faster remote block storage which means your system is stored on a + * centralized and resilient cluster with 15k IOPS limits `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. */ rootVolumeType: PoolVolumeType /** System volume disk size. */ @@ -335,7 +351,7 @@ export interface CreateClusterRequestAutoUpgrade { export interface CreateClusterRequestAutoscalerConfig { /** Disable the cluster autoscaler. */ scaleDownDisabled?: boolean - /** How long after scale up that scale down evaluation resumes. */ + /** How long after scale up the scale down evaluation resumes. */ scaleDownDelayAfterAdd?: string /** Type of resource estimator to be used in scale up. */ estimator: AutoscalerEstimator @@ -421,7 +437,10 @@ export interface CreateClusterRequestPoolConfig { * cloud providers in a Kosmos Cluster. */ nodeType: string - /** Placement group ID in which all the nodes of the pool will be created. */ + /** + * Placement group ID in which all the nodes of the pool will be created, + * placement groups are limited to 20 instances. + */ placementGroupId?: string /** Defines whether the autoscaling feature is enabled for the pool. */ autoscaling: boolean @@ -437,15 +456,14 @@ export interface CreateClusterRequestPoolConfig { * when autoscaling is enabled on the pool. */ maxSize?: number - /** - * 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. - */ + /** Customization of the container runtime is available for each pool. */ containerRuntime: Runtime /** Defines whether the autohealing feature is enabled for the pool. */ autohealing: boolean - /** Tags associated with the pool. */ + /** + * Tags associated with the pool, see [managing + * tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags). + */ tags: string[] /** * Kubelet arguments to be used by this pool. Note that this feature is @@ -457,11 +475,15 @@ export interface CreateClusterRequestPoolConfig { /** Zone in which the pool's nodes will be spawned. */ zone: Zone /** - * 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. + * - `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 + * `sbs-5k` is a remote block storage which means your system is stored on a + * centralized and resilient cluster with 5k IOPS limits `sbs-15k` is a + * faster remote block storage which means your system is stored on a + * centralized and resilient cluster with 15k IOPS limits `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. */ rootVolumeType: PoolVolumeType /** System volume disk size. */ @@ -563,7 +585,7 @@ export interface Cluster { updatedAt?: Date /** Autoscaler config for the cluster. */ autoscalerConfig?: ClusterAutoscalerConfig - /** Auto upgrade configuration of the cluster. */ + /** Auto upgrade Kubernetes version of the cluster. */ autoUpgrade?: ClusterAutoUpgrade /** Defines whether a new Kubernetes version is available. */ upgradeAvailable: boolean @@ -646,7 +668,7 @@ export interface UpdateClusterRequestAutoUpgrade { export interface UpdateClusterRequestAutoscalerConfig { /** Disable the cluster autoscaler. */ scaleDownDisabled?: boolean - /** How long after scale up that scale down evaluation resumes. */ + /** How long after scale up the scale down evaluation resumes. */ scaleDownDelayAfterAdd?: string /** Type of resource estimator to be used in scale up. */ estimator: AutoscalerEstimator @@ -775,8 +797,9 @@ export type CreateClusterRequest = { */ projectId?: string /** - * Type of the cluster (possible values are kapsule, multicloud, - * kapsule-dedicated-8, kapsule-dedicated-16). + * Type of the cluster. See [list available cluster + * types](#list-available-cluster-types-for-a-cluster) for a list of valid + * types. */ type: string /** Cluster name. */ @@ -851,7 +874,10 @@ export type CreatePoolRequest = { * cloud providers in a Kosmos Cluster. */ nodeType: string - /** Placement group ID in which all the nodes of the pool will be created. */ + /** + * Placement group ID in which all the nodes of the pool will be created, + * placement groups are limited to 20 instances. + */ placementGroupId?: string /** Defines whether the autoscaling feature is enabled for the pool. */ autoscaling: boolean @@ -867,15 +893,14 @@ export type CreatePoolRequest = { * when autoscaling is enabled on the pool. */ maxSize?: number - /** - * 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. - */ + /** Customization of the container runtime is available for each pool. */ containerRuntime?: Runtime /** Defines whether the autohealing feature is enabled for the pool. */ autohealing: boolean - /** Tags associated with the pool. */ + /** + * Tags associated with the pool, see [managing + * tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags). + */ tags?: string[] /** * Kubelet arguments to be used by this pool. Note that this feature is @@ -887,11 +912,15 @@ export type CreatePoolRequest = { /** Zone in which the pool's nodes will be spawned. */ zone?: Zone /** - * 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. + * - `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 + * `sbs-5k` is a remote block storage which means your system is stored on a + * centralized and resilient cluster with 5k IOPS limits `sbs-15k` is a + * faster remote block storage which means your system is stored on a + * centralized and resilient cluster with 15k IOPS limits `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. */ rootVolumeType?: PoolVolumeType /** System volume disk size. */ @@ -1331,7 +1360,7 @@ export type UpdateClusterRequest = { /** New autoscaler config for the cluster. */ autoscalerConfig?: UpdateClusterRequestAutoscalerConfig /** - * New auto upgrade configuration for the cluster. Note that all fields need + * New auto upgrade configuration for the cluster. Note that all fields needs * to be set. */ autoUpgrade?: UpdateClusterRequestAutoUpgrade