@scaleway/sdk-k8s 2.2.0 → 2.3.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.js +52 -49
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/marshalling.gen.js +36 -18
- package/dist/v1/types.gen.d.ts +9 -9
- package/package.json +1 -1
package/dist/v1/api.gen.js
CHANGED
|
@@ -10,11 +10,7 @@ class API extends API$1 {
|
|
|
10
10
|
* type ∈ {'zone','region','global','unspecified'}
|
|
11
11
|
*/
|
|
12
12
|
static LOCALITY = toApiLocality({
|
|
13
|
-
regions: [
|
|
14
|
-
"fr-par",
|
|
15
|
-
"nl-ams",
|
|
16
|
-
"pl-waw"
|
|
17
|
-
]
|
|
13
|
+
regions: ["fr-par", "nl-ams", "pl-waw"]
|
|
18
14
|
});
|
|
19
15
|
pageOfListClusters = (request = {}) => this.client.fetch(
|
|
20
16
|
{
|
|
@@ -25,7 +21,10 @@ class API extends API$1 {
|
|
|
25
21
|
["order_by", request.orderBy],
|
|
26
22
|
["organization_id", request.organizationId],
|
|
27
23
|
["page", request.page],
|
|
28
|
-
[
|
|
24
|
+
[
|
|
25
|
+
"page_size",
|
|
26
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
27
|
+
],
|
|
29
28
|
["private_network_id", request.privateNetworkId],
|
|
30
29
|
["project_id", request.projectId],
|
|
31
30
|
["status", request.status],
|
|
@@ -79,7 +78,9 @@ class API extends API$1 {
|
|
|
79
78
|
* @returns A Promise of Cluster
|
|
80
79
|
*/
|
|
81
80
|
waitForCluster = (request, options) => waitForResource(
|
|
82
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
81
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
82
|
+
!CLUSTER_TRANSIENT_STATUSES.includes(res.status)
|
|
83
|
+
)),
|
|
83
84
|
this.getCluster,
|
|
84
85
|
request,
|
|
85
86
|
options
|
|
@@ -111,9 +112,10 @@ class API extends API$1 {
|
|
|
111
112
|
{
|
|
112
113
|
method: "DELETE",
|
|
113
114
|
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}`,
|
|
114
|
-
urlParams: urlParams(
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
urlParams: urlParams([
|
|
116
|
+
"with_additional_resources",
|
|
117
|
+
request.withAdditionalResources
|
|
118
|
+
])
|
|
117
119
|
},
|
|
118
120
|
unmarshalCluster
|
|
119
121
|
);
|
|
@@ -177,37 +179,33 @@ class API extends API$1 {
|
|
|
177
179
|
},
|
|
178
180
|
unmarshalListClusterAvailableTypesResponse
|
|
179
181
|
);
|
|
180
|
-
_getClusterKubeConfig = (request) => this.client.fetch(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
["redacted", request.redacted]
|
|
187
|
-
),
|
|
188
|
-
responseType: "blob"
|
|
189
|
-
}
|
|
190
|
-
);
|
|
182
|
+
_getClusterKubeConfig = (request) => this.client.fetch({
|
|
183
|
+
method: "GET",
|
|
184
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/kubeconfig`,
|
|
185
|
+
urlParams: urlParams(["dl", 1], ["redacted", request.redacted]),
|
|
186
|
+
responseType: "blob"
|
|
187
|
+
});
|
|
191
188
|
/**
|
|
192
189
|
* 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.
|
|
193
190
|
*
|
|
194
191
|
* @param request - The request {@link ResetClusterAdminTokenRequest}
|
|
195
192
|
*/
|
|
196
|
-
resetClusterAdminToken = (request) => this.client.fetch(
|
|
197
|
-
{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
);
|
|
193
|
+
resetClusterAdminToken = (request) => this.client.fetch({
|
|
194
|
+
body: "{}",
|
|
195
|
+
headers: jsonContentHeaders,
|
|
196
|
+
method: "POST",
|
|
197
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/reset-admin-token`
|
|
198
|
+
});
|
|
204
199
|
pageOfListClusterACLRules = (request) => this.client.fetch(
|
|
205
200
|
{
|
|
206
201
|
method: "GET",
|
|
207
202
|
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/acls`,
|
|
208
203
|
urlParams: urlParams(
|
|
209
204
|
["page", request.page],
|
|
210
|
-
[
|
|
205
|
+
[
|
|
206
|
+
"page_size",
|
|
207
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
208
|
+
]
|
|
211
209
|
)
|
|
212
210
|
},
|
|
213
211
|
unmarshalListClusterACLRulesResponse
|
|
@@ -258,12 +256,10 @@ class API extends API$1 {
|
|
|
258
256
|
*
|
|
259
257
|
* @param request - The request {@link DeleteACLRuleRequest}
|
|
260
258
|
*/
|
|
261
|
-
deleteACLRule = (request) => this.client.fetch(
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
);
|
|
259
|
+
deleteACLRule = (request) => this.client.fetch({
|
|
260
|
+
method: "DELETE",
|
|
261
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
262
|
+
});
|
|
267
263
|
pageOfListPools = (request) => this.client.fetch(
|
|
268
264
|
{
|
|
269
265
|
method: "GET",
|
|
@@ -272,7 +268,10 @@ class API extends API$1 {
|
|
|
272
268
|
["name", request.name],
|
|
273
269
|
["order_by", request.orderBy],
|
|
274
270
|
["page", request.page],
|
|
275
|
-
[
|
|
271
|
+
[
|
|
272
|
+
"page_size",
|
|
273
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
274
|
+
],
|
|
276
275
|
["status", request.status]
|
|
277
276
|
)
|
|
278
277
|
},
|
|
@@ -381,16 +380,14 @@ class API extends API$1 {
|
|
|
381
380
|
*
|
|
382
381
|
* @param request - The request {@link MigratePoolsToNewImagesRequest}
|
|
383
382
|
*/
|
|
384
|
-
migratePoolsToNewImages = (request) => this.client.fetch(
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
);
|
|
383
|
+
migratePoolsToNewImages = (request) => this.client.fetch({
|
|
384
|
+
body: JSON.stringify(
|
|
385
|
+
marshalMigratePoolsToNewImagesRequest(request, this.client.settings)
|
|
386
|
+
),
|
|
387
|
+
headers: jsonContentHeaders,
|
|
388
|
+
method: "POST",
|
|
389
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/migrate-pools-to-new-images`
|
|
390
|
+
});
|
|
394
391
|
/**
|
|
395
392
|
* 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.
|
|
396
393
|
*
|
|
@@ -442,7 +439,10 @@ class API extends API$1 {
|
|
|
442
439
|
["name", request.name],
|
|
443
440
|
["order_by", request.orderBy],
|
|
444
441
|
["page", request.page],
|
|
445
|
-
[
|
|
442
|
+
[
|
|
443
|
+
"page_size",
|
|
444
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
445
|
+
],
|
|
446
446
|
["pool_id", request.poolId],
|
|
447
447
|
["status", request.status]
|
|
448
448
|
)
|
|
@@ -562,7 +562,10 @@ class API extends API$1 {
|
|
|
562
562
|
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/cluster-types`,
|
|
563
563
|
urlParams: urlParams(
|
|
564
564
|
["page", request.page],
|
|
565
|
-
[
|
|
565
|
+
[
|
|
566
|
+
"page_size",
|
|
567
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
568
|
+
]
|
|
566
569
|
)
|
|
567
570
|
},
|
|
568
571
|
unmarshalListClusterTypesResponse
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
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, MigratePoolsToNewImagesRequest, Node, NodeMetadata, NodeMetadataCoreV1Taint, NodeStatus, Pool, PoolStatus, PoolUpgradePolicy, PoolVolumeType, RebootNodeRequest, ReplaceNodeRequest, ResetClusterAdminTokenRequest, Runtime, SetClusterACLRulesRequest, SetClusterACLRulesResponse, SetClusterTypeRequest, UpdateClusterRequest, UpdateClusterRequestAutoscalerConfig, UpdateClusterRequestAutoUpgrade, UpdateClusterRequestOpenIDConnectConfig, UpdatePoolRequest, UpdatePoolRequestUpgradePolicy, UpgradeClusterRequest, UpgradePoolRequest, Version, } from './types.gen.js';
|
|
@@ -236,7 +236,10 @@ const unmarshalExternalNode = (data) => {
|
|
|
236
236
|
kubeletConfig: data.kubelet_config,
|
|
237
237
|
name: data.name,
|
|
238
238
|
nodeLabels: data.node_labels,
|
|
239
|
-
nodeTaints: unmarshalArrayOfObject(
|
|
239
|
+
nodeTaints: unmarshalArrayOfObject(
|
|
240
|
+
data.node_taints,
|
|
241
|
+
unmarshalExternalNodeCoreV1Taint
|
|
242
|
+
),
|
|
240
243
|
poolVersion: data.pool_version,
|
|
241
244
|
runcVersion: data.runc_version
|
|
242
245
|
};
|
|
@@ -289,7 +292,10 @@ const unmarshalListClusterAvailableTypesResponse = (data) => {
|
|
|
289
292
|
);
|
|
290
293
|
}
|
|
291
294
|
return {
|
|
292
|
-
clusterTypes: unmarshalArrayOfObject(
|
|
295
|
+
clusterTypes: unmarshalArrayOfObject(
|
|
296
|
+
data.cluster_types,
|
|
297
|
+
unmarshalClusterType
|
|
298
|
+
),
|
|
293
299
|
totalCount: data.total_count
|
|
294
300
|
};
|
|
295
301
|
};
|
|
@@ -310,7 +316,10 @@ const unmarshalListClusterTypesResponse = (data) => {
|
|
|
310
316
|
);
|
|
311
317
|
}
|
|
312
318
|
return {
|
|
313
|
-
clusterTypes: unmarshalArrayOfObject(
|
|
319
|
+
clusterTypes: unmarshalArrayOfObject(
|
|
320
|
+
data.cluster_types,
|
|
321
|
+
unmarshalClusterType
|
|
322
|
+
),
|
|
314
323
|
totalCount: data.total_count
|
|
315
324
|
};
|
|
316
325
|
};
|
|
@@ -386,7 +395,10 @@ const unmarshalNodeMetadata = (data) => {
|
|
|
386
395
|
kubeletConfig: data.kubelet_config,
|
|
387
396
|
name: data.name,
|
|
388
397
|
nodeLabels: data.node_labels,
|
|
389
|
-
nodeTaints: unmarshalArrayOfObject(
|
|
398
|
+
nodeTaints: unmarshalArrayOfObject(
|
|
399
|
+
data.node_taints,
|
|
400
|
+
unmarshalNodeMetadataCoreV1Taint
|
|
401
|
+
),
|
|
390
402
|
poolVersion: data.pool_version,
|
|
391
403
|
providerId: data.provider_id,
|
|
392
404
|
repoUri: data.repo_uri,
|
|
@@ -410,14 +422,8 @@ const unmarshalSetClusterACLRulesResponse = (data) => {
|
|
|
410
422
|
const marshalACLRuleRequest = (request, defaults) => ({
|
|
411
423
|
description: request.description,
|
|
412
424
|
...resolveOneOf([
|
|
413
|
-
{
|
|
414
|
-
|
|
415
|
-
value: request.ip
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
param: "scaleway_ranges",
|
|
419
|
-
value: request.scalewayRanges
|
|
420
|
-
}
|
|
425
|
+
{ param: "ip", value: request.ip },
|
|
426
|
+
{ param: "scaleway_ranges", value: request.scalewayRanges }
|
|
421
427
|
])
|
|
422
428
|
});
|
|
423
429
|
const marshalAddClusterACLRulesRequest = (request, defaults) => ({
|
|
@@ -472,21 +478,29 @@ const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
|
|
|
472
478
|
security_group_id: request.securityGroupId,
|
|
473
479
|
size: request.size,
|
|
474
480
|
tags: request.tags,
|
|
475
|
-
upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreateClusterRequestPoolConfigUpgradePolicy(
|
|
481
|
+
upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreateClusterRequestPoolConfigUpgradePolicy(
|
|
482
|
+
request.upgradePolicy
|
|
483
|
+
) : void 0,
|
|
476
484
|
zone: request.zone
|
|
477
485
|
});
|
|
478
486
|
const marshalCreateClusterRequest = (request, defaults) => ({
|
|
479
487
|
admission_plugins: request.admissionPlugins,
|
|
480
488
|
apiserver_cert_sans: request.apiserverCertSans,
|
|
481
489
|
auto_upgrade: request.autoUpgrade !== void 0 ? marshalCreateClusterRequestAutoUpgrade(request.autoUpgrade) : void 0,
|
|
482
|
-
autoscaler_config: request.autoscalerConfig !== void 0 ? marshalCreateClusterRequestAutoscalerConfig(
|
|
490
|
+
autoscaler_config: request.autoscalerConfig !== void 0 ? marshalCreateClusterRequestAutoscalerConfig(
|
|
491
|
+
request.autoscalerConfig
|
|
492
|
+
) : void 0,
|
|
483
493
|
cni: request.cni,
|
|
484
494
|
description: request.description,
|
|
485
495
|
feature_gates: request.featureGates,
|
|
486
496
|
name: request.name || randomName("k8s"),
|
|
487
|
-
open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalCreateClusterRequestOpenIDConnectConfig(
|
|
497
|
+
open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalCreateClusterRequestOpenIDConnectConfig(
|
|
498
|
+
request.openIdConnectConfig
|
|
499
|
+
) : void 0,
|
|
488
500
|
pod_cidr: request.podCidr,
|
|
489
|
-
pools: request.pools !== void 0 ? request.pools.map(
|
|
501
|
+
pools: request.pools !== void 0 ? request.pools.map(
|
|
502
|
+
(elt) => marshalCreateClusterRequestPoolConfig(elt)
|
|
503
|
+
) : void 0,
|
|
490
504
|
private_network_id: request.privateNetworkId,
|
|
491
505
|
service_cidr: request.serviceCidr,
|
|
492
506
|
service_dns_ip: request.serviceDnsIp,
|
|
@@ -567,11 +581,15 @@ const marshalUpdateClusterRequest = (request, defaults) => ({
|
|
|
567
581
|
admission_plugins: request.admissionPlugins,
|
|
568
582
|
apiserver_cert_sans: request.apiserverCertSans,
|
|
569
583
|
auto_upgrade: request.autoUpgrade !== void 0 ? marshalUpdateClusterRequestAutoUpgrade(request.autoUpgrade) : void 0,
|
|
570
|
-
autoscaler_config: request.autoscalerConfig !== void 0 ? marshalUpdateClusterRequestAutoscalerConfig(
|
|
584
|
+
autoscaler_config: request.autoscalerConfig !== void 0 ? marshalUpdateClusterRequestAutoscalerConfig(
|
|
585
|
+
request.autoscalerConfig
|
|
586
|
+
) : void 0,
|
|
571
587
|
description: request.description,
|
|
572
588
|
feature_gates: request.featureGates,
|
|
573
589
|
name: request.name,
|
|
574
|
-
open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalUpdateClusterRequestOpenIDConnectConfig(
|
|
590
|
+
open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalUpdateClusterRequestOpenIDConnectConfig(
|
|
591
|
+
request.openIdConnectConfig
|
|
592
|
+
) : void 0,
|
|
575
593
|
tags: request.tags
|
|
576
594
|
});
|
|
577
595
|
const marshalUpdatePoolRequestUpgradePolicy = (request, defaults) => ({
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -296,9 +296,9 @@ export interface CreateClusterRequestPoolConfig {
|
|
|
296
296
|
zone: ScwZone;
|
|
297
297
|
/**
|
|
298
298
|
* * `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
|
-
|
|
299
|
+
* `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
|
|
300
|
+
* `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
|
|
301
|
+
* `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.
|
|
302
302
|
*/
|
|
303
303
|
rootVolumeType: PoolVolumeType;
|
|
304
304
|
/**
|
|
@@ -666,9 +666,9 @@ export interface Pool {
|
|
|
666
666
|
zone: ScwZone;
|
|
667
667
|
/**
|
|
668
668
|
* * `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
|
-
|
|
669
|
+
* `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
|
|
670
|
+
* `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
|
|
671
|
+
* `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.
|
|
672
672
|
*/
|
|
673
673
|
rootVolumeType: PoolVolumeType;
|
|
674
674
|
/**
|
|
@@ -969,9 +969,9 @@ export type CreatePoolRequest = {
|
|
|
969
969
|
zone?: ScwZone;
|
|
970
970
|
/**
|
|
971
971
|
* * `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
|
-
|
|
972
|
+
* `sbs-5k` is a remote block storage which means your system is stored on a centralized and resilient cluster with 5k IOPS limits
|
|
973
|
+
* `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits
|
|
974
|
+
* `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.
|
|
975
975
|
*/
|
|
976
976
|
rootVolumeType?: PoolVolumeType;
|
|
977
977
|
/**
|