Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update generated apis #1697

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions packages/clients/src/api/k8s/v1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
*/
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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}
Expand All @@ -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
Expand All @@ -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
Expand Down
117 changes: 73 additions & 44 deletions packages/clients/src/api/k8s/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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. */
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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. */
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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. */
Expand Down Expand Up @@ -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
Expand Down
Loading