@scaleway/sdk-k8s 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v1/api.gen.d.ts +19 -4
- package/dist/v1/api.gen.js +88 -55
- package/dist/v1/index.gen.d.ts +2 -2
- package/dist/v1/marshalling.gen.d.ts +4 -2
- package/dist/v1/marshalling.gen.js +58 -43
- package/dist/v1/types.gen.d.ts +105 -27
- package/dist/v1/validation-rules.gen.d.ts +10 -0
- package/dist/v1/validation-rules.gen.js +11 -0
- package/package.json +2 -2
package/dist/v1/api.gen.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
2
2
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
3
|
-
import type { AddClusterACLRulesRequest, AddClusterACLRulesResponse, AuthExternalNodeRequest, Cluster, CreateClusterRequest, CreateExternalNodeRequest, CreatePoolRequest, DeleteACLRuleRequest, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNode, ExternalNodeAuth, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeMetadataRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterACLRulesRequest, ListClusterACLRulesResponse, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClustersRequest, ListClustersResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListNodesRequest, ListNodesResponse, ListPoolsRequest, ListPoolsResponse, ListVersionsRequest, ListVersionsResponse,
|
|
3
|
+
import type { AddClusterACLRulesRequest, AddClusterACLRulesResponse, AuthExternalNodeRequest, Cluster, CreateClusterRequest, CreateExternalNodeRequest, CreatePoolRequest, DeleteACLRuleRequest, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNode, ExternalNodeAuth, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeMetadataRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterACLRulesRequest, ListClusterACLRulesResponse, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClustersRequest, ListClustersResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListNodesRequest, ListNodesResponse, ListPoolsRequest, ListPoolsResponse, ListVersionsRequest, ListVersionsResponse, Node, NodeMetadata, Pool, RebootNodeRequest, ReplaceNodeRequest, ResetClusterAdminTokenRequest, SetClusterACLRulesRequest, SetClusterACLRulesResponse, SetClusterTypeRequest, SetPoolLabelsRequest, SetPoolStartupTaintsRequest, SetPoolTaintsRequest, UpdateClusterRequest, UpdatePoolRequest, UpgradeClusterRequest, UpgradePoolRequest, Version } from './types.gen.js';
|
|
4
4
|
/**
|
|
5
5
|
* Kubernetes API.
|
|
6
6
|
|
|
@@ -181,11 +181,26 @@ export declare class API extends ParentAPI {
|
|
|
181
181
|
*/
|
|
182
182
|
deletePool: (request: Readonly<DeletePoolRequest>) => Promise<Pool>;
|
|
183
183
|
/**
|
|
184
|
-
*
|
|
184
|
+
* Set a list of taints for a specific pool. Apply a list of taints to all nodes of the pool which will be periodically reconciled by scaleway.
|
|
185
185
|
*
|
|
186
|
-
* @param request - The request {@link
|
|
186
|
+
* @param request - The request {@link SetPoolTaintsRequest}
|
|
187
|
+
* @returns A Promise of Pool
|
|
188
|
+
*/
|
|
189
|
+
setPoolTaints: (request: Readonly<SetPoolTaintsRequest>) => Promise<Pool>;
|
|
190
|
+
/**
|
|
191
|
+
* Set a list of startup taints for a specific pool. Apply a list of taints to new nodes of the pool which would not be reconciled by scaleway.
|
|
192
|
+
*
|
|
193
|
+
* @param request - The request {@link SetPoolStartupTaintsRequest}
|
|
194
|
+
* @returns A Promise of Pool
|
|
195
|
+
*/
|
|
196
|
+
setPoolStartupTaints: (request: Readonly<SetPoolStartupTaintsRequest>) => Promise<Pool>;
|
|
197
|
+
/**
|
|
198
|
+
* Set a list of labels for a specific pool. Apply a list of taints to all nodes of the pool (only apply to labels which was set through scaleway api).
|
|
199
|
+
*
|
|
200
|
+
* @param request - The request {@link SetPoolLabelsRequest}
|
|
201
|
+
* @returns A Promise of Pool
|
|
187
202
|
*/
|
|
188
|
-
|
|
203
|
+
setPoolLabels: (request: Readonly<SetPoolLabelsRequest>) => Promise<Pool>;
|
|
189
204
|
/**
|
|
190
205
|
* Fetch node metadata. Rerieve metadata to instantiate a Kapsule/Kosmos node. This method is not intended to be called by end users but rather programmatically by the node-installer.
|
|
191
206
|
*
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as API$1, toApiLocality, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
|
|
2
2
|
import { CLUSTER_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, marshalSetClusterTypeRequest, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterACLRulesResponse, marshalAddClusterACLRulesRequest, unmarshalAddClusterACLRulesResponse, marshalSetClusterACLRulesRequest, unmarshalSetClusterACLRulesResponse, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest,
|
|
3
|
+
import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, marshalSetClusterTypeRequest, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterACLRulesResponse, marshalAddClusterACLRulesRequest, unmarshalAddClusterACLRulesResponse, marshalSetClusterACLRulesRequest, unmarshalSetClusterACLRulesResponse, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest, marshalSetPoolTaintsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolLabelsRequest, unmarshalNodeMetadata, unmarshalExternalNodeAuth, unmarshalExternalNode, unmarshalListNodesResponse, unmarshalNode, unmarshalListVersionsResponse, unmarshalVersion, unmarshalListClusterTypesResponse } from "./marshalling.gen.js";
|
|
4
4
|
const jsonContentHeaders = {
|
|
5
5
|
"Content-Type": "application/json; charset=utf-8"
|
|
6
6
|
};
|
|
@@ -10,7 +10,11 @@ class API extends API$1 {
|
|
|
10
10
|
* type ∈ {'zone','region','global','unspecified'}
|
|
11
11
|
*/
|
|
12
12
|
static LOCALITY = toApiLocality({
|
|
13
|
-
regions: [
|
|
13
|
+
regions: [
|
|
14
|
+
"fr-par",
|
|
15
|
+
"nl-ams",
|
|
16
|
+
"pl-waw"
|
|
17
|
+
]
|
|
14
18
|
});
|
|
15
19
|
pageOfListClusters = (request = {}) => this.client.fetch(
|
|
16
20
|
{
|
|
@@ -21,10 +25,7 @@ class API extends API$1 {
|
|
|
21
25
|
["order_by", request.orderBy],
|
|
22
26
|
["organization_id", request.organizationId],
|
|
23
27
|
["page", request.page],
|
|
24
|
-
[
|
|
25
|
-
"page_size",
|
|
26
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
27
|
-
],
|
|
28
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
28
29
|
["private_network_id", request.privateNetworkId],
|
|
29
30
|
["project_id", request.projectId],
|
|
30
31
|
["status", request.status],
|
|
@@ -78,9 +79,7 @@ class API extends API$1 {
|
|
|
78
79
|
* @returns A Promise of Cluster
|
|
79
80
|
*/
|
|
80
81
|
waitForCluster = (request, options) => waitForResource(
|
|
81
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
82
|
-
!CLUSTER_TRANSIENT_STATUSES.includes(res.status)
|
|
83
|
-
)),
|
|
82
|
+
options?.stop ?? ((res) => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))),
|
|
84
83
|
this.getCluster,
|
|
85
84
|
request,
|
|
86
85
|
options
|
|
@@ -112,10 +111,9 @@ class API extends API$1 {
|
|
|
112
111
|
{
|
|
113
112
|
method: "DELETE",
|
|
114
113
|
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}`,
|
|
115
|
-
urlParams: urlParams(
|
|
116
|
-
"with_additional_resources",
|
|
117
|
-
|
|
118
|
-
])
|
|
114
|
+
urlParams: urlParams(
|
|
115
|
+
["with_additional_resources", request.withAdditionalResources]
|
|
116
|
+
)
|
|
119
117
|
},
|
|
120
118
|
unmarshalCluster
|
|
121
119
|
);
|
|
@@ -179,33 +177,37 @@ class API extends API$1 {
|
|
|
179
177
|
},
|
|
180
178
|
unmarshalListClusterAvailableTypesResponse
|
|
181
179
|
);
|
|
182
|
-
_getClusterKubeConfig = (request) => this.client.fetch(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
180
|
+
_getClusterKubeConfig = (request) => this.client.fetch(
|
|
181
|
+
{
|
|
182
|
+
method: "GET",
|
|
183
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/kubeconfig`,
|
|
184
|
+
urlParams: urlParams(
|
|
185
|
+
["dl", 1],
|
|
186
|
+
["redacted", request.redacted]
|
|
187
|
+
),
|
|
188
|
+
responseType: "blob"
|
|
189
|
+
}
|
|
190
|
+
);
|
|
188
191
|
/**
|
|
189
192
|
* 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 the kubeconfig again to keep interacting with the cluster.
|
|
190
193
|
*
|
|
191
194
|
* @param request - The request {@link ResetClusterAdminTokenRequest}
|
|
192
195
|
*/
|
|
193
|
-
resetClusterAdminToken = (request) => this.client.fetch(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
resetClusterAdminToken = (request) => this.client.fetch(
|
|
197
|
+
{
|
|
198
|
+
body: "{}",
|
|
199
|
+
headers: jsonContentHeaders,
|
|
200
|
+
method: "POST",
|
|
201
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/reset-admin-token`
|
|
202
|
+
}
|
|
203
|
+
);
|
|
199
204
|
pageOfListClusterACLRules = (request) => this.client.fetch(
|
|
200
205
|
{
|
|
201
206
|
method: "GET",
|
|
202
207
|
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/acls`,
|
|
203
208
|
urlParams: urlParams(
|
|
204
209
|
["page", request.page],
|
|
205
|
-
[
|
|
206
|
-
"page_size",
|
|
207
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
208
|
-
]
|
|
210
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
209
211
|
)
|
|
210
212
|
},
|
|
211
213
|
unmarshalListClusterACLRulesResponse
|
|
@@ -256,10 +258,12 @@ class API extends API$1 {
|
|
|
256
258
|
*
|
|
257
259
|
* @param request - The request {@link DeleteACLRuleRequest}
|
|
258
260
|
*/
|
|
259
|
-
deleteACLRule = (request) => this.client.fetch(
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
deleteACLRule = (request) => this.client.fetch(
|
|
262
|
+
{
|
|
263
|
+
method: "DELETE",
|
|
264
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
265
|
+
}
|
|
266
|
+
);
|
|
263
267
|
pageOfListPools = (request) => this.client.fetch(
|
|
264
268
|
{
|
|
265
269
|
method: "GET",
|
|
@@ -268,10 +272,7 @@ class API extends API$1 {
|
|
|
268
272
|
["name", request.name],
|
|
269
273
|
["order_by", request.orderBy],
|
|
270
274
|
["page", request.page],
|
|
271
|
-
[
|
|
272
|
-
"page_size",
|
|
273
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
274
|
-
],
|
|
275
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
275
276
|
["status", request.status]
|
|
276
277
|
)
|
|
277
278
|
},
|
|
@@ -376,18 +377,56 @@ class API extends API$1 {
|
|
|
376
377
|
unmarshalPool
|
|
377
378
|
);
|
|
378
379
|
/**
|
|
379
|
-
*
|
|
380
|
+
* Set a list of taints for a specific pool. Apply a list of taints to all nodes of the pool which will be periodically reconciled by scaleway.
|
|
380
381
|
*
|
|
381
|
-
* @param request - The request {@link
|
|
382
|
+
* @param request - The request {@link SetPoolTaintsRequest}
|
|
383
|
+
* @returns A Promise of Pool
|
|
382
384
|
*/
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
385
|
+
setPoolTaints = (request) => this.client.fetch(
|
|
386
|
+
{
|
|
387
|
+
body: JSON.stringify(
|
|
388
|
+
marshalSetPoolTaintsRequest(request, this.client.settings)
|
|
389
|
+
),
|
|
390
|
+
headers: jsonContentHeaders,
|
|
391
|
+
method: "PUT",
|
|
392
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam("poolId", request.poolId)}/set-taints`
|
|
393
|
+
},
|
|
394
|
+
unmarshalPool
|
|
395
|
+
);
|
|
396
|
+
/**
|
|
397
|
+
* Set a list of startup taints for a specific pool. Apply a list of taints to new nodes of the pool which would not be reconciled by scaleway.
|
|
398
|
+
*
|
|
399
|
+
* @param request - The request {@link SetPoolStartupTaintsRequest}
|
|
400
|
+
* @returns A Promise of Pool
|
|
401
|
+
*/
|
|
402
|
+
setPoolStartupTaints = (request) => this.client.fetch(
|
|
403
|
+
{
|
|
404
|
+
body: JSON.stringify(
|
|
405
|
+
marshalSetPoolStartupTaintsRequest(request, this.client.settings)
|
|
406
|
+
),
|
|
407
|
+
headers: jsonContentHeaders,
|
|
408
|
+
method: "PUT",
|
|
409
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam("poolId", request.poolId)}/set-startup-taints`
|
|
410
|
+
},
|
|
411
|
+
unmarshalPool
|
|
412
|
+
);
|
|
413
|
+
/**
|
|
414
|
+
* Set a list of labels for a specific pool. Apply a list of taints to all nodes of the pool (only apply to labels which was set through scaleway api).
|
|
415
|
+
*
|
|
416
|
+
* @param request - The request {@link SetPoolLabelsRequest}
|
|
417
|
+
* @returns A Promise of Pool
|
|
418
|
+
*/
|
|
419
|
+
setPoolLabels = (request) => this.client.fetch(
|
|
420
|
+
{
|
|
421
|
+
body: JSON.stringify(
|
|
422
|
+
marshalSetPoolLabelsRequest(request, this.client.settings)
|
|
423
|
+
),
|
|
424
|
+
headers: jsonContentHeaders,
|
|
425
|
+
method: "PUT",
|
|
426
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam("poolId", request.poolId)}/set-labels`
|
|
427
|
+
},
|
|
428
|
+
unmarshalPool
|
|
429
|
+
);
|
|
391
430
|
/**
|
|
392
431
|
* Fetch node metadata. Rerieve metadata to instantiate a Kapsule/Kosmos node. This method is not intended to be called by end users but rather programmatically by the node-installer.
|
|
393
432
|
*
|
|
@@ -439,10 +478,7 @@ class API extends API$1 {
|
|
|
439
478
|
["name", request.name],
|
|
440
479
|
["order_by", request.orderBy],
|
|
441
480
|
["page", request.page],
|
|
442
|
-
[
|
|
443
|
-
"page_size",
|
|
444
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
445
|
-
],
|
|
481
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
446
482
|
["pool_id", request.poolId],
|
|
447
483
|
["status", request.status]
|
|
448
484
|
)
|
|
@@ -562,10 +598,7 @@ class API extends API$1 {
|
|
|
562
598
|
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/cluster-types`,
|
|
563
599
|
urlParams: urlParams(
|
|
564
600
|
["page", request.page],
|
|
565
|
-
[
|
|
566
|
-
"page_size",
|
|
567
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
568
|
-
]
|
|
601
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
569
602
|
)
|
|
570
603
|
},
|
|
571
604
|
unmarshalListClusterTypesResponse
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { API } from './api.gen.js';
|
|
1
|
+
export { API, } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
|
-
export type { ACLRule, ACLRuleRequest, AddClusterACLRulesRequest, AddClusterACLRulesResponse, AuthExternalNodeRequest, AutoscalerEstimator, AutoscalerExpander, Cluster, ClusterAutoscalerConfig, ClusterAutoUpgrade, ClusterOpenIDConnectConfig, ClusterStatus, ClusterType, ClusterTypeAvailability, ClusterTypeResiliency, CNI, CreateClusterRequest, CreateClusterRequestAutoscalerConfig, CreateClusterRequestAutoUpgrade, CreateClusterRequestOpenIDConnectConfig, CreateClusterRequestPoolConfig, CreateClusterRequestPoolConfigUpgradePolicy, CreateExternalNodeRequest, CreatePoolRequest, CreatePoolRequestUpgradePolicy, DeleteACLRuleRequest, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNode, ExternalNodeAuth, ExternalNodeCoreV1Taint, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeMetadataRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterACLRulesRequest, ListClusterACLRulesResponse, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClustersRequest, ListClustersRequestOrderBy, ListClustersResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListNodesRequest, ListNodesRequestOrderBy, ListNodesResponse, ListPoolsRequest, ListPoolsRequestOrderBy, ListPoolsResponse, ListVersionsRequest, ListVersionsResponse, MaintenanceWindow, MaintenanceWindowDayOfTheWeek,
|
|
4
|
+
export type { ACLRule, ACLRuleRequest, AddClusterACLRulesRequest, AddClusterACLRulesResponse, AuthExternalNodeRequest, AutoscalerEstimator, AutoscalerExpander, Cluster, ClusterAutoscalerConfig, ClusterAutoUpgrade, ClusterOpenIDConnectConfig, ClusterStatus, ClusterType, ClusterTypeAvailability, ClusterTypeResiliency, CNI, CoreV1Taint, CoreV1TaintEffect, CreateClusterRequest, CreateClusterRequestAutoscalerConfig, CreateClusterRequestAutoUpgrade, CreateClusterRequestOpenIDConnectConfig, CreateClusterRequestPoolConfig, CreateClusterRequestPoolConfigUpgradePolicy, CreateExternalNodeRequest, CreatePoolRequest, CreatePoolRequestUpgradePolicy, DeleteACLRuleRequest, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNode, ExternalNodeAuth, ExternalNodeCoreV1Taint, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeMetadataRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterACLRulesRequest, ListClusterACLRulesResponse, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClustersRequest, ListClustersRequestOrderBy, ListClustersResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListNodesRequest, ListNodesRequestOrderBy, ListNodesResponse, ListPoolsRequest, ListPoolsRequestOrderBy, ListPoolsResponse, ListVersionsRequest, ListVersionsResponse, MaintenanceWindow, MaintenanceWindowDayOfTheWeek, Node, NodeMetadata, NodeMetadataCoreV1Taint, NodeStatus, Pool, PoolStatus, PoolUpgradePolicy, PoolVolumeType, RebootNodeRequest, ReplaceNodeRequest, ResetClusterAdminTokenRequest, Runtime, SetClusterACLRulesRequest, SetClusterACLRulesResponse, SetClusterTypeRequest, SetPoolLabelsRequest, SetPoolStartupTaintsRequest, SetPoolTaintsRequest, UpdateClusterRequest, UpdateClusterRequestAutoscalerConfig, UpdateClusterRequestAutoUpgrade, UpdateClusterRequestOpenIDConnectConfig, UpdatePoolRequest, UpdatePoolRequestUpgradePolicy, UpgradeClusterRequest, UpgradePoolRequest, Version, } from './types.gen.js';
|
|
5
5
|
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { AddClusterACLRulesRequest, AddClusterACLRulesResponse, Cluster, CreateClusterRequest, CreatePoolRequest, ExternalNode, ExternalNodeAuth, ListClusterACLRulesResponse, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsResponse, ListClustersResponse, ListClusterTypesResponse, ListNodesResponse, ListPoolsResponse, ListVersionsResponse,
|
|
2
|
+
import type { AddClusterACLRulesRequest, AddClusterACLRulesResponse, Cluster, CreateClusterRequest, CreatePoolRequest, ExternalNode, ExternalNodeAuth, ListClusterACLRulesResponse, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsResponse, ListClustersResponse, ListClusterTypesResponse, ListNodesResponse, ListPoolsResponse, ListVersionsResponse, Node, NodeMetadata, Pool, SetClusterACLRulesRequest, SetClusterACLRulesResponse, SetClusterTypeRequest, SetPoolLabelsRequest, SetPoolStartupTaintsRequest, SetPoolTaintsRequest, UpdateClusterRequest, UpdatePoolRequest, UpgradeClusterRequest, UpgradePoolRequest, Version } from './types.gen.js';
|
|
3
3
|
export declare const unmarshalVersion: (data: unknown) => Version;
|
|
4
4
|
export declare const unmarshalCluster: (data: unknown) => Cluster;
|
|
5
5
|
export declare const unmarshalNode: (data: unknown) => Node;
|
|
@@ -20,9 +20,11 @@ export declare const unmarshalSetClusterACLRulesResponse: (data: unknown) => Set
|
|
|
20
20
|
export declare const marshalAddClusterACLRulesRequest: (request: AddClusterACLRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
21
21
|
export declare const marshalCreateClusterRequest: (request: CreateClusterRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
22
22
|
export declare const marshalCreatePoolRequest: (request: CreatePoolRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
23
|
-
export declare const marshalMigratePoolsToNewImagesRequest: (request: MigratePoolsToNewImagesRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
24
23
|
export declare const marshalSetClusterACLRulesRequest: (request: SetClusterACLRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
25
24
|
export declare const marshalSetClusterTypeRequest: (request: SetClusterTypeRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
25
|
+
export declare const marshalSetPoolLabelsRequest: (request: SetPoolLabelsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
26
|
+
export declare const marshalSetPoolStartupTaintsRequest: (request: SetPoolStartupTaintsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
27
|
+
export declare const marshalSetPoolTaintsRequest: (request: SetPoolTaintsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
26
28
|
export declare const marshalUpdateClusterRequest: (request: UpdateClusterRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
27
29
|
export declare const marshalUpdatePoolRequest: (request: UpdatePoolRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
28
30
|
export declare const marshalUpgradeClusterRequest: (request: UpgradeClusterRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -99,7 +99,6 @@ const unmarshalCluster = (data) => {
|
|
|
99
99
|
iamNodesGroupId: data.iam_nodes_group_id,
|
|
100
100
|
id: data.id,
|
|
101
101
|
name: data.name,
|
|
102
|
-
newImagesEnabled: data.new_images_enabled,
|
|
103
102
|
openIdConnectConfig: data.open_id_connect_config ? unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config) : void 0,
|
|
104
103
|
organizationId: data.organization_id,
|
|
105
104
|
podCidr: data.pod_cidr,
|
|
@@ -124,7 +123,7 @@ const unmarshalNode = (data) => {
|
|
|
124
123
|
}
|
|
125
124
|
return {
|
|
126
125
|
clusterId: data.cluster_id,
|
|
127
|
-
conditions: data.conditions
|
|
126
|
+
conditions: data.conditions,
|
|
128
127
|
createdAt: unmarshalDate(data.created_at),
|
|
129
128
|
errorMessage: data.error_message,
|
|
130
129
|
id: data.id,
|
|
@@ -138,6 +137,18 @@ const unmarshalNode = (data) => {
|
|
|
138
137
|
updatedAt: unmarshalDate(data.updated_at)
|
|
139
138
|
};
|
|
140
139
|
};
|
|
140
|
+
const unmarshalCoreV1Taint = (data) => {
|
|
141
|
+
if (!isJSONObject(data)) {
|
|
142
|
+
throw new TypeError(
|
|
143
|
+
`Unmarshalling the type 'CoreV1Taint' failed as data isn't a dictionary.`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
effect: data.effect,
|
|
148
|
+
key: data.key,
|
|
149
|
+
value: data.value
|
|
150
|
+
};
|
|
151
|
+
};
|
|
141
152
|
const unmarshalPoolUpgradePolicy = (data) => {
|
|
142
153
|
if (!isJSONObject(data)) {
|
|
143
154
|
throw new TypeError(
|
|
@@ -163,10 +174,10 @@ const unmarshalPool = (data) => {
|
|
|
163
174
|
createdAt: unmarshalDate(data.created_at),
|
|
164
175
|
id: data.id,
|
|
165
176
|
kubeletArgs: data.kubelet_args,
|
|
177
|
+
labels: data.labels,
|
|
166
178
|
maxSize: data.max_size,
|
|
167
179
|
minSize: data.min_size,
|
|
168
180
|
name: data.name,
|
|
169
|
-
newImagesEnabled: data.new_images_enabled,
|
|
170
181
|
nodeType: data.node_type,
|
|
171
182
|
placementGroupId: data.placement_group_id,
|
|
172
183
|
publicIpDisabled: data.public_ip_disabled,
|
|
@@ -175,8 +186,10 @@ const unmarshalPool = (data) => {
|
|
|
175
186
|
rootVolumeType: data.root_volume_type,
|
|
176
187
|
securityGroupId: data.security_group_id,
|
|
177
188
|
size: data.size,
|
|
189
|
+
startupTaints: unmarshalArrayOfObject(data.startup_taints, unmarshalCoreV1Taint),
|
|
178
190
|
status: data.status,
|
|
179
191
|
tags: data.tags,
|
|
192
|
+
taints: unmarshalArrayOfObject(data.taints, unmarshalCoreV1Taint),
|
|
180
193
|
updatedAt: unmarshalDate(data.updated_at),
|
|
181
194
|
upgradePolicy: data.upgrade_policy ? unmarshalPoolUpgradePolicy(data.upgrade_policy) : void 0,
|
|
182
195
|
version: data.version,
|
|
@@ -236,10 +249,7 @@ const unmarshalExternalNode = (data) => {
|
|
|
236
249
|
kubeletConfig: data.kubelet_config,
|
|
237
250
|
name: data.name,
|
|
238
251
|
nodeLabels: data.node_labels,
|
|
239
|
-
nodeTaints: unmarshalArrayOfObject(
|
|
240
|
-
data.node_taints,
|
|
241
|
-
unmarshalExternalNodeCoreV1Taint
|
|
242
|
-
),
|
|
252
|
+
nodeTaints: unmarshalArrayOfObject(data.node_taints, unmarshalExternalNodeCoreV1Taint),
|
|
243
253
|
poolVersion: data.pool_version,
|
|
244
254
|
runcVersion: data.runc_version
|
|
245
255
|
};
|
|
@@ -292,10 +302,7 @@ const unmarshalListClusterAvailableTypesResponse = (data) => {
|
|
|
292
302
|
);
|
|
293
303
|
}
|
|
294
304
|
return {
|
|
295
|
-
clusterTypes: unmarshalArrayOfObject(
|
|
296
|
-
data.cluster_types,
|
|
297
|
-
unmarshalClusterType
|
|
298
|
-
),
|
|
305
|
+
clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
|
|
299
306
|
totalCount: data.total_count
|
|
300
307
|
};
|
|
301
308
|
};
|
|
@@ -316,10 +323,7 @@ const unmarshalListClusterTypesResponse = (data) => {
|
|
|
316
323
|
);
|
|
317
324
|
}
|
|
318
325
|
return {
|
|
319
|
-
clusterTypes: unmarshalArrayOfObject(
|
|
320
|
-
data.cluster_types,
|
|
321
|
-
unmarshalClusterType
|
|
322
|
-
),
|
|
326
|
+
clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
|
|
323
327
|
totalCount: data.total_count
|
|
324
328
|
};
|
|
325
329
|
};
|
|
@@ -395,10 +399,7 @@ const unmarshalNodeMetadata = (data) => {
|
|
|
395
399
|
kubeletConfig: data.kubelet_config,
|
|
396
400
|
name: data.name,
|
|
397
401
|
nodeLabels: data.node_labels,
|
|
398
|
-
nodeTaints: unmarshalArrayOfObject(
|
|
399
|
-
data.node_taints,
|
|
400
|
-
unmarshalNodeMetadataCoreV1Taint
|
|
401
|
-
),
|
|
402
|
+
nodeTaints: unmarshalArrayOfObject(data.node_taints, unmarshalNodeMetadataCoreV1Taint),
|
|
402
403
|
poolVersion: data.pool_version,
|
|
403
404
|
providerId: data.provider_id,
|
|
404
405
|
repoUri: data.repo_uri,
|
|
@@ -422,8 +423,14 @@ const unmarshalSetClusterACLRulesResponse = (data) => {
|
|
|
422
423
|
const marshalACLRuleRequest = (request, defaults) => ({
|
|
423
424
|
description: request.description,
|
|
424
425
|
...resolveOneOf([
|
|
425
|
-
{
|
|
426
|
-
|
|
426
|
+
{
|
|
427
|
+
param: "ip",
|
|
428
|
+
value: request.ip
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
param: "scaleway_ranges",
|
|
432
|
+
value: request.scalewayRanges
|
|
433
|
+
}
|
|
427
434
|
])
|
|
428
435
|
});
|
|
429
436
|
const marshalAddClusterACLRulesRequest = (request, defaults) => ({
|
|
@@ -433,6 +440,11 @@ const marshalMaintenanceWindow = (request, defaults) => ({
|
|
|
433
440
|
day: request.day,
|
|
434
441
|
start_hour: request.startHour
|
|
435
442
|
});
|
|
443
|
+
const marshalCoreV1Taint = (request, defaults) => ({
|
|
444
|
+
effect: request.effect,
|
|
445
|
+
key: request.key,
|
|
446
|
+
value: request.value
|
|
447
|
+
});
|
|
436
448
|
const marshalCreateClusterRequestPoolConfigUpgradePolicy = (request, defaults) => ({
|
|
437
449
|
max_surge: request.maxSurge,
|
|
438
450
|
max_unavailable: request.maxUnavailable
|
|
@@ -467,6 +479,7 @@ const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
|
|
|
467
479
|
autoscaling: request.autoscaling,
|
|
468
480
|
container_runtime: request.containerRuntime,
|
|
469
481
|
kubelet_args: request.kubeletArgs,
|
|
482
|
+
labels: request.labels,
|
|
470
483
|
max_size: request.maxSize,
|
|
471
484
|
min_size: request.minSize,
|
|
472
485
|
name: request.name,
|
|
@@ -477,30 +490,24 @@ const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
|
|
|
477
490
|
root_volume_type: request.rootVolumeType,
|
|
478
491
|
security_group_id: request.securityGroupId,
|
|
479
492
|
size: request.size,
|
|
493
|
+
startup_taints: request.startupTaints.map((elt) => marshalCoreV1Taint(elt)),
|
|
480
494
|
tags: request.tags,
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
) : void 0,
|
|
495
|
+
taints: request.taints.map((elt) => marshalCoreV1Taint(elt)),
|
|
496
|
+
upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreateClusterRequestPoolConfigUpgradePolicy(request.upgradePolicy) : void 0,
|
|
484
497
|
zone: request.zone
|
|
485
498
|
});
|
|
486
499
|
const marshalCreateClusterRequest = (request, defaults) => ({
|
|
487
500
|
admission_plugins: request.admissionPlugins,
|
|
488
501
|
apiserver_cert_sans: request.apiserverCertSans,
|
|
489
502
|
auto_upgrade: request.autoUpgrade !== void 0 ? marshalCreateClusterRequestAutoUpgrade(request.autoUpgrade) : void 0,
|
|
490
|
-
autoscaler_config: request.autoscalerConfig !== void 0 ? marshalCreateClusterRequestAutoscalerConfig(
|
|
491
|
-
request.autoscalerConfig
|
|
492
|
-
) : void 0,
|
|
503
|
+
autoscaler_config: request.autoscalerConfig !== void 0 ? marshalCreateClusterRequestAutoscalerConfig(request.autoscalerConfig) : void 0,
|
|
493
504
|
cni: request.cni,
|
|
494
505
|
description: request.description,
|
|
495
506
|
feature_gates: request.featureGates,
|
|
496
507
|
name: request.name || randomName("k8s"),
|
|
497
|
-
open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalCreateClusterRequestOpenIDConnectConfig(
|
|
498
|
-
request.openIdConnectConfig
|
|
499
|
-
) : void 0,
|
|
508
|
+
open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalCreateClusterRequestOpenIDConnectConfig(request.openIdConnectConfig) : void 0,
|
|
500
509
|
pod_cidr: request.podCidr,
|
|
501
|
-
pools: request.pools !== void 0 ? request.pools.map(
|
|
502
|
-
(elt) => marshalCreateClusterRequestPoolConfig(elt)
|
|
503
|
-
) : void 0,
|
|
510
|
+
pools: request.pools !== void 0 ? request.pools.map((elt) => marshalCreateClusterRequestPoolConfig(elt)) : void 0,
|
|
504
511
|
private_network_id: request.privateNetworkId,
|
|
505
512
|
service_cidr: request.serviceCidr,
|
|
506
513
|
service_dns_ip: request.serviceDnsIp,
|
|
@@ -529,6 +536,7 @@ const marshalCreatePoolRequest = (request, defaults) => ({
|
|
|
529
536
|
autoscaling: request.autoscaling,
|
|
530
537
|
container_runtime: request.containerRuntime,
|
|
531
538
|
kubelet_args: request.kubeletArgs !== void 0 ? request.kubeletArgs : void 0,
|
|
539
|
+
labels: request.labels !== void 0 ? request.labels : void 0,
|
|
532
540
|
max_size: request.maxSize,
|
|
533
541
|
min_size: request.minSize,
|
|
534
542
|
name: request.name || randomName("pool"),
|
|
@@ -539,19 +547,27 @@ const marshalCreatePoolRequest = (request, defaults) => ({
|
|
|
539
547
|
root_volume_type: request.rootVolumeType,
|
|
540
548
|
security_group_id: request.securityGroupId,
|
|
541
549
|
size: request.size,
|
|
550
|
+
startup_taints: request.startupTaints !== void 0 ? request.startupTaints.map((elt) => marshalCoreV1Taint(elt)) : void 0,
|
|
542
551
|
tags: request.tags,
|
|
552
|
+
taints: request.taints !== void 0 ? request.taints.map((elt) => marshalCoreV1Taint(elt)) : void 0,
|
|
543
553
|
upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreatePoolRequestUpgradePolicy(request.upgradePolicy) : void 0,
|
|
544
554
|
zone: request.zone ?? defaults.defaultZone
|
|
545
555
|
});
|
|
546
|
-
const marshalMigratePoolsToNewImagesRequest = (request, defaults) => ({
|
|
547
|
-
pool_ids: request.poolIds
|
|
548
|
-
});
|
|
549
556
|
const marshalSetClusterACLRulesRequest = (request, defaults) => ({
|
|
550
557
|
acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt)) : void 0
|
|
551
558
|
});
|
|
552
559
|
const marshalSetClusterTypeRequest = (request, defaults) => ({
|
|
553
560
|
type: request.type
|
|
554
561
|
});
|
|
562
|
+
const marshalSetPoolLabelsRequest = (request, defaults) => ({
|
|
563
|
+
labels: request.labels !== void 0 ? request.labels : void 0
|
|
564
|
+
});
|
|
565
|
+
const marshalSetPoolStartupTaintsRequest = (request, defaults) => ({
|
|
566
|
+
startup_taints: request.startupTaints !== void 0 ? request.startupTaints.map((elt) => marshalCoreV1Taint(elt)) : void 0
|
|
567
|
+
});
|
|
568
|
+
const marshalSetPoolTaintsRequest = (request, defaults) => ({
|
|
569
|
+
taints: request.taints !== void 0 ? request.taints.map((elt) => marshalCoreV1Taint(elt)) : void 0
|
|
570
|
+
});
|
|
555
571
|
const marshalUpdateClusterRequestAutoUpgrade = (request, defaults) => ({
|
|
556
572
|
enable: request.enable,
|
|
557
573
|
maintenance_window: request.maintenanceWindow !== void 0 ? marshalMaintenanceWindow(request.maintenanceWindow) : void 0
|
|
@@ -581,15 +597,11 @@ const marshalUpdateClusterRequest = (request, defaults) => ({
|
|
|
581
597
|
admission_plugins: request.admissionPlugins,
|
|
582
598
|
apiserver_cert_sans: request.apiserverCertSans,
|
|
583
599
|
auto_upgrade: request.autoUpgrade !== void 0 ? marshalUpdateClusterRequestAutoUpgrade(request.autoUpgrade) : void 0,
|
|
584
|
-
autoscaler_config: request.autoscalerConfig !== void 0 ? marshalUpdateClusterRequestAutoscalerConfig(
|
|
585
|
-
request.autoscalerConfig
|
|
586
|
-
) : void 0,
|
|
600
|
+
autoscaler_config: request.autoscalerConfig !== void 0 ? marshalUpdateClusterRequestAutoscalerConfig(request.autoscalerConfig) : void 0,
|
|
587
601
|
description: request.description,
|
|
588
602
|
feature_gates: request.featureGates,
|
|
589
603
|
name: request.name,
|
|
590
|
-
open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalUpdateClusterRequestOpenIDConnectConfig(
|
|
591
|
-
request.openIdConnectConfig
|
|
592
|
-
) : void 0,
|
|
604
|
+
open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalUpdateClusterRequestOpenIDConnectConfig(request.openIdConnectConfig) : void 0,
|
|
593
605
|
tags: request.tags
|
|
594
606
|
});
|
|
595
607
|
const marshalUpdatePoolRequestUpgradePolicy = (request, defaults) => ({
|
|
@@ -602,6 +614,7 @@ const marshalUpdatePoolRequest = (request, defaults) => ({
|
|
|
602
614
|
kubelet_args: request.kubeletArgs,
|
|
603
615
|
max_size: request.maxSize,
|
|
604
616
|
min_size: request.minSize,
|
|
617
|
+
security_group_id: request.securityGroupId,
|
|
605
618
|
size: request.size,
|
|
606
619
|
tags: request.tags,
|
|
607
620
|
upgrade_policy: request.upgradePolicy !== void 0 ? marshalUpdatePoolRequestUpgradePolicy(request.upgradePolicy) : void 0
|
|
@@ -617,9 +630,11 @@ export {
|
|
|
617
630
|
marshalAddClusterACLRulesRequest,
|
|
618
631
|
marshalCreateClusterRequest,
|
|
619
632
|
marshalCreatePoolRequest,
|
|
620
|
-
marshalMigratePoolsToNewImagesRequest,
|
|
621
633
|
marshalSetClusterACLRulesRequest,
|
|
622
634
|
marshalSetClusterTypeRequest,
|
|
635
|
+
marshalSetPoolLabelsRequest,
|
|
636
|
+
marshalSetPoolStartupTaintsRequest,
|
|
637
|
+
marshalSetPoolTaintsRequest,
|
|
623
638
|
marshalUpdateClusterRequest,
|
|
624
639
|
marshalUpdatePoolRequest,
|
|
625
640
|
marshalUpgradeClusterRequest,
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type CNI = 'unknown_cni' | 'cilium' | 'calico' | 'weave' | 'flannel' | 'k
|
|
|
5
5
|
export type ClusterStatus = 'unknown' | 'creating' | 'ready' | 'deleting' | 'deleted' | 'updating' | 'locked' | 'pool_required';
|
|
6
6
|
export type ClusterTypeAvailability = 'available' | 'scarce' | 'shortage';
|
|
7
7
|
export type ClusterTypeResiliency = 'unknown_resiliency' | 'standard' | 'high_availability';
|
|
8
|
+
export type CoreV1TaintEffect = 'NoSchedule' | 'PreferNoSchedule' | 'NoExecute';
|
|
8
9
|
export type ListClustersRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc' | 'status_asc' | 'status_desc' | 'version_asc' | 'version_desc';
|
|
9
10
|
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';
|
|
10
11
|
export type ListPoolsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc' | 'status_asc' | 'status_desc' | 'version_asc' | 'version_desc';
|
|
@@ -23,6 +24,23 @@ export interface MaintenanceWindow {
|
|
|
23
24
|
*/
|
|
24
25
|
day: MaintenanceWindowDayOfTheWeek;
|
|
25
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/.
|
|
29
|
+
*/
|
|
30
|
+
export interface CoreV1Taint {
|
|
31
|
+
/**
|
|
32
|
+
* The taint key to be applied to a node.
|
|
33
|
+
*/
|
|
34
|
+
key: string;
|
|
35
|
+
/**
|
|
36
|
+
* The taint value corresponding to the taint key.
|
|
37
|
+
*/
|
|
38
|
+
value: string;
|
|
39
|
+
/**
|
|
40
|
+
* Effect defines the effects of Taint.
|
|
41
|
+
*/
|
|
42
|
+
effect: CoreV1TaintEffect;
|
|
43
|
+
}
|
|
26
44
|
export interface CreateClusterRequestPoolConfigUpgradePolicy {
|
|
27
45
|
/**
|
|
28
46
|
* The maximum number of nodes that can be not ready at the same time.
|
|
@@ -296,9 +314,9 @@ export interface CreateClusterRequestPoolConfig {
|
|
|
296
314
|
zone: ScwZone;
|
|
297
315
|
/**
|
|
298
316
|
* * `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
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
317
|
+
* `sbs_5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
|
|
318
|
+
* `sbs_15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
|
|
319
|
+
* `b_ssd` is the legacy remote block storage which means your system is stored on a centralized and resilient cluster. Not available for new pools, use `sbs_5k` or `sbs_15k` instead.
|
|
302
320
|
*/
|
|
303
321
|
rootVolumeType: PoolVolumeType;
|
|
304
322
|
/**
|
|
@@ -313,6 +331,18 @@ export interface CreateClusterRequestPoolConfig {
|
|
|
313
331
|
* Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone.
|
|
314
332
|
*/
|
|
315
333
|
securityGroupId?: string;
|
|
334
|
+
/**
|
|
335
|
+
* Kubernetes labels applied and reconciled on the nodes.
|
|
336
|
+
*/
|
|
337
|
+
labels: Record<string, string>;
|
|
338
|
+
/**
|
|
339
|
+
* Kubernetes taints applied and reconciled on the nodes.
|
|
340
|
+
*/
|
|
341
|
+
taints: CoreV1Taint[];
|
|
342
|
+
/**
|
|
343
|
+
* Kubernetes taints applied at node creation but not reconciled afterwards.
|
|
344
|
+
*/
|
|
345
|
+
startupTaints: CoreV1Taint[];
|
|
316
346
|
}
|
|
317
347
|
export interface CreatePoolRequestUpgradePolicy {
|
|
318
348
|
maxUnavailable?: number;
|
|
@@ -511,15 +541,11 @@ export interface Cluster {
|
|
|
511
541
|
/**
|
|
512
542
|
* @deprecated Defines whether ACL is available on the cluster.
|
|
513
543
|
*/
|
|
514
|
-
aclAvailable
|
|
544
|
+
aclAvailable: boolean;
|
|
515
545
|
/**
|
|
516
546
|
* IAM group that nodes are members of (this field might be empty during early stage of cluster creation).
|
|
517
547
|
*/
|
|
518
548
|
iamNodesGroupId: string;
|
|
519
|
-
/**
|
|
520
|
-
* @deprecated Defines whether all pools are migrated to new images.
|
|
521
|
-
*/
|
|
522
|
-
newImagesEnabled?: boolean;
|
|
523
549
|
/**
|
|
524
550
|
* Subnet used for the Pod CIDR.
|
|
525
551
|
*/
|
|
@@ -569,7 +595,7 @@ export interface Node {
|
|
|
569
595
|
/**
|
|
570
596
|
* @deprecated Conditions of the node. These conditions contain the Node Problem Detector conditions, as well as some in house conditions.
|
|
571
597
|
*/
|
|
572
|
-
conditions
|
|
598
|
+
conditions: Record<string, string>;
|
|
573
599
|
/**
|
|
574
600
|
* Status of the node.
|
|
575
601
|
*/
|
|
@@ -666,9 +692,9 @@ export interface Pool {
|
|
|
666
692
|
zone: ScwZone;
|
|
667
693
|
/**
|
|
668
694
|
* * `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
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
695
|
+
* `sbs_5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
|
|
696
|
+
* `sbs_15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
|
|
697
|
+
* `b_ssd` is the legacy remote block storage which means your system is stored on a centralized and resilient cluster. Not available for new pools, use `sbs_5k` or `sbs_15k` instead.
|
|
672
698
|
*/
|
|
673
699
|
rootVolumeType: PoolVolumeType;
|
|
674
700
|
/**
|
|
@@ -679,14 +705,22 @@ export interface Pool {
|
|
|
679
705
|
* 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.
|
|
680
706
|
*/
|
|
681
707
|
publicIpDisabled: boolean;
|
|
682
|
-
/**
|
|
683
|
-
* @deprecated Defines whether the pool is migrated to new images.
|
|
684
|
-
*/
|
|
685
|
-
newImagesEnabled?: boolean;
|
|
686
708
|
/**
|
|
687
709
|
* Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone.
|
|
688
710
|
*/
|
|
689
711
|
securityGroupId: string;
|
|
712
|
+
/**
|
|
713
|
+
* Kubernetes labels applied and reconciled on the nodes.
|
|
714
|
+
*/
|
|
715
|
+
labels: Record<string, string>;
|
|
716
|
+
/**
|
|
717
|
+
* Kubernetes taints applied and reconciled on the nodes.
|
|
718
|
+
*/
|
|
719
|
+
taints: CoreV1Taint[];
|
|
720
|
+
/**
|
|
721
|
+
* Kubernetes taints applied at node creation but not reconciled afterwards.
|
|
722
|
+
*/
|
|
723
|
+
startupTaints: CoreV1Taint[];
|
|
690
724
|
/**
|
|
691
725
|
* Cluster region of the pool.
|
|
692
726
|
*/
|
|
@@ -969,9 +1003,9 @@ export type CreatePoolRequest = {
|
|
|
969
1003
|
zone?: ScwZone;
|
|
970
1004
|
/**
|
|
971
1005
|
* * `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
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1006
|
+
* `sbs_5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
|
|
1007
|
+
* `sbs_15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
|
|
1008
|
+
* `b_ssd` is the legacy remote block storage which means your system is stored on a centralized and resilient cluster. Not available for new pools, use `sbs_5k` or `sbs_15k` instead.
|
|
975
1009
|
*/
|
|
976
1010
|
rootVolumeType?: PoolVolumeType;
|
|
977
1011
|
/**
|
|
@@ -986,6 +1020,18 @@ export type CreatePoolRequest = {
|
|
|
986
1020
|
* Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone.
|
|
987
1021
|
*/
|
|
988
1022
|
securityGroupId?: string;
|
|
1023
|
+
/**
|
|
1024
|
+
* Kubernetes labels applied and reconciled on the nodes.
|
|
1025
|
+
*/
|
|
1026
|
+
labels?: Record<string, string>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Kubernetes taints applied and reconciled on the nodes.
|
|
1029
|
+
*/
|
|
1030
|
+
taints?: CoreV1Taint[];
|
|
1031
|
+
/**
|
|
1032
|
+
* Kubernetes taints applied at node creation but not reconciled afterwards.
|
|
1033
|
+
*/
|
|
1034
|
+
startupTaints?: CoreV1Taint[];
|
|
989
1035
|
};
|
|
990
1036
|
export type DeleteACLRuleRequest = {
|
|
991
1037
|
/**
|
|
@@ -1355,14 +1401,6 @@ export interface ListVersionsResponse {
|
|
|
1355
1401
|
*/
|
|
1356
1402
|
versions: Version[];
|
|
1357
1403
|
}
|
|
1358
|
-
export type MigratePoolsToNewImagesRequest = {
|
|
1359
|
-
/**
|
|
1360
|
-
* Region to target. If none is passed will use default region from the config.
|
|
1361
|
-
*/
|
|
1362
|
-
region?: ScwRegion;
|
|
1363
|
-
clusterId: string;
|
|
1364
|
-
poolIds?: string[];
|
|
1365
|
-
};
|
|
1366
1404
|
export interface NodeMetadata {
|
|
1367
1405
|
id: string;
|
|
1368
1406
|
name: string;
|
|
@@ -1448,6 +1486,42 @@ export type SetClusterTypeRequest = {
|
|
|
1448
1486
|
*/
|
|
1449
1487
|
type: string;
|
|
1450
1488
|
};
|
|
1489
|
+
export type SetPoolLabelsRequest = {
|
|
1490
|
+
/**
|
|
1491
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1492
|
+
*/
|
|
1493
|
+
region?: ScwRegion;
|
|
1494
|
+
poolId: string;
|
|
1495
|
+
labels?: Record<string, string>;
|
|
1496
|
+
};
|
|
1497
|
+
export type SetPoolStartupTaintsRequest = {
|
|
1498
|
+
/**
|
|
1499
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1500
|
+
*/
|
|
1501
|
+
region?: ScwRegion;
|
|
1502
|
+
/**
|
|
1503
|
+
* ID of the pool to update.
|
|
1504
|
+
*/
|
|
1505
|
+
poolId: string;
|
|
1506
|
+
/**
|
|
1507
|
+
* List of startup taints to set.
|
|
1508
|
+
*/
|
|
1509
|
+
startupTaints?: CoreV1Taint[];
|
|
1510
|
+
};
|
|
1511
|
+
export type SetPoolTaintsRequest = {
|
|
1512
|
+
/**
|
|
1513
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1514
|
+
*/
|
|
1515
|
+
region?: ScwRegion;
|
|
1516
|
+
/**
|
|
1517
|
+
* ID of the pool to update.
|
|
1518
|
+
*/
|
|
1519
|
+
poolId: string;
|
|
1520
|
+
/**
|
|
1521
|
+
* List of taints to set.
|
|
1522
|
+
*/
|
|
1523
|
+
taints?: CoreV1Taint[];
|
|
1524
|
+
};
|
|
1451
1525
|
export type UpdateClusterRequest = {
|
|
1452
1526
|
/**
|
|
1453
1527
|
* Region to target. If none is passed will use default region from the config.
|
|
@@ -1535,6 +1609,10 @@ export type UpdatePoolRequest = {
|
|
|
1535
1609
|
* New upgrade policy for the pool.
|
|
1536
1610
|
*/
|
|
1537
1611
|
upgradePolicy?: UpdatePoolRequestUpgradePolicy;
|
|
1612
|
+
/**
|
|
1613
|
+
* Security group ID in which all the nodes of the pool will be moved.
|
|
1614
|
+
*/
|
|
1615
|
+
securityGroupId?: string;
|
|
1538
1616
|
};
|
|
1539
1617
|
export type UpgradeClusterRequest = {
|
|
1540
1618
|
/**
|
|
@@ -3,6 +3,16 @@ export declare const ACLRuleRequest: {
|
|
|
3
3
|
maxLength: number;
|
|
4
4
|
};
|
|
5
5
|
};
|
|
6
|
+
export declare const CoreV1Taint: {
|
|
7
|
+
key: {
|
|
8
|
+
maxLength: number;
|
|
9
|
+
minLength: number;
|
|
10
|
+
pattern: RegExp;
|
|
11
|
+
};
|
|
12
|
+
value: {
|
|
13
|
+
maxLength: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
6
16
|
export declare const CreateClusterRequest: {
|
|
7
17
|
description: {
|
|
8
18
|
maxLength: number;
|
|
@@ -3,6 +3,16 @@ const ACLRuleRequest = {
|
|
|
3
3
|
maxLength: 2e3
|
|
4
4
|
}
|
|
5
5
|
};
|
|
6
|
+
const CoreV1Taint = {
|
|
7
|
+
key: {
|
|
8
|
+
maxLength: 316,
|
|
9
|
+
minLength: 1,
|
|
10
|
+
pattern: /^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$/
|
|
11
|
+
},
|
|
12
|
+
value: {
|
|
13
|
+
maxLength: 63
|
|
14
|
+
}
|
|
15
|
+
};
|
|
6
16
|
const CreateClusterRequest = {
|
|
7
17
|
description: {
|
|
8
18
|
maxLength: 4096
|
|
@@ -153,6 +163,7 @@ const UpgradeClusterRequest = {
|
|
|
153
163
|
};
|
|
154
164
|
export {
|
|
155
165
|
ACLRuleRequest,
|
|
166
|
+
CoreV1Taint,
|
|
156
167
|
CreateClusterRequest,
|
|
157
168
|
CreateClusterRequestAutoscalerConfig,
|
|
158
169
|
CreateClusterRequestOpenIDConnectConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-k8s",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Scaleway SDK k8s",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@scaleway/random-name": "5.1.2",
|
|
30
|
-
"@scaleway/sdk-std": "2.1.
|
|
30
|
+
"@scaleway/sdk-std": "2.1.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@scaleway/sdk-client": "^2.1.0"
|