@scaleway/sdk-k8s 2.13.0 → 2.15.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 +1 -8
- package/dist/v1/api.gen.js +1 -7
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/index.gen.js +2 -2
- package/dist/v1/marshalling.gen.d.ts +1 -2
- package/dist/v1/marshalling.gen.js +4 -28
- package/dist/v1/types.gen.d.ts +35 -33
- package/package.json +3 -3
package/dist/v1/api.gen.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
2
|
import type { WaitForOptions, ApiLocality } from '@scaleway/sdk-client';
|
|
3
|
-
import type { AddClusterACLRulesRequest, AddClusterACLRulesResponse, AuthExternalNodeRequest, Cluster, CreateClusterRequest,
|
|
3
|
+
import type { AddClusterACLRulesRequest, AddClusterACLRulesResponse, AuthExternalNodeRequest, Cluster, CreateClusterRequest, CreatePoolRequest, DeleteACLRuleRequest, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNodeAuth, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeMetadataRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterACLRulesRequest, ListClusterACLRulesResponse, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListClustersRequest, ListClustersResponse, 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
|
|
|
@@ -215,13 +215,6 @@ export declare class API extends ParentAPI {
|
|
|
215
215
|
* @returns A Promise of ExternalNodeAuth
|
|
216
216
|
*/
|
|
217
217
|
authExternalNode: (request: Readonly<AuthExternalNodeRequest>) => Promise<ExternalNodeAuth>;
|
|
218
|
-
/**
|
|
219
|
-
* Create a Kosmos node. Retrieve metadata for a Kosmos node. This method is not intended to be called by end users but rather programmatically by the kapsule-node-agent.
|
|
220
|
-
*
|
|
221
|
-
* @param request - The request {@link CreateExternalNodeRequest}
|
|
222
|
-
* @returns A Promise of ExternalNode
|
|
223
|
-
*/
|
|
224
|
-
createExternalNode: (request: Readonly<CreateExternalNodeRequest>) => Promise<ExternalNode>;
|
|
225
218
|
protected pageOfListNodes: (request: Readonly<ListNodesRequest>) => Promise<ListNodesResponse>;
|
|
226
219
|
/**
|
|
227
220
|
* List Nodes in a Cluster. List all the existing nodes for a specific Kubernetes cluster.
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CLUSTER_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
|
-
import { marshalAddClusterACLRulesRequest, marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterACLRulesRequest, marshalSetClusterTypeRequest, marshalSetPoolLabelsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolTaintsRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalAddClusterACLRulesResponse, unmarshalCluster,
|
|
2
|
+
import { marshalAddClusterACLRulesRequest, marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterACLRulesRequest, marshalSetClusterTypeRequest, marshalSetPoolLabelsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolTaintsRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalAddClusterACLRulesResponse, unmarshalCluster, unmarshalExternalNodeAuth, unmarshalListClusterACLRulesResponse, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterTypesResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalNodeMetadata, unmarshalPool, unmarshalSetClusterACLRulesResponse, unmarshalVersion } from "./marshalling.gen.js";
|
|
3
3
|
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v1/api.gen.ts
|
|
5
5
|
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
@@ -154,12 +154,6 @@ var API = class extends API$1 {
|
|
|
154
154
|
method: "POST",
|
|
155
155
|
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam("poolId", request.poolId)}/external-nodes/auth`
|
|
156
156
|
}, unmarshalExternalNodeAuth);
|
|
157
|
-
this.createExternalNode = (request) => this.client.fetch({
|
|
158
|
-
body: "{}",
|
|
159
|
-
headers: jsonContentHeaders,
|
|
160
|
-
method: "POST",
|
|
161
|
-
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam("poolId", request.poolId)}/external-nodes`
|
|
162
|
-
}, unmarshalExternalNode);
|
|
163
157
|
this.pageOfListNodes = (request) => this.client.fetch({
|
|
164
158
|
method: "GET",
|
|
165
159
|
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam("clusterId", request.clusterId)}/nodes`,
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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, CNI, Cluster, ClusterAutoUpgrade, ClusterAutoscalerConfig, ClusterOpenIDConnectConfig, ClusterStatus, ClusterType, ClusterTypeAvailability, ClusterTypeResiliency, CoreV1Taint, CoreV1TaintEffect, CreateClusterRequest, CreateClusterRequestAutoUpgrade, CreateClusterRequestAutoscalerConfig, CreateClusterRequestOpenIDConnectConfig, CreateClusterRequestPoolConfig, CreateClusterRequestPoolConfigUpgradePolicy,
|
|
4
|
+
export type { ACLRule, ACLRuleRequest, AddClusterACLRulesRequest, AddClusterACLRulesResponse, AuthExternalNodeRequest, AutoscalerEstimator, AutoscalerExpander, CNI, Cluster, ClusterAutoUpgrade, ClusterAutoscalerConfig, ClusterOpenIDConnectConfig, ClusterStatus, ClusterType, ClusterTypeAvailability, ClusterTypeResiliency, CoreV1Taint, CoreV1TaintEffect, CreateClusterRequest, CreateClusterRequestAutoUpgrade, CreateClusterRequestAutoscalerConfig, CreateClusterRequestOpenIDConnectConfig, CreateClusterRequestPoolConfig, CreateClusterRequestPoolConfigUpgradePolicy, CreatePoolRequest, CreatePoolRequestUpgradePolicy, DeleteACLRuleRequest, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNodeAuth, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeMetadataRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterACLRulesRequest, ListClusterACLRulesResponse, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListClustersRequest, ListClustersRequestOrderBy, ListClustersResponse, 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, UpdateClusterRequestAutoUpgrade, UpdateClusterRequestAutoscalerConfig, UpdateClusterRequestOpenIDConnectConfig, UpdatePoolRequest, UpdatePoolRequestUpgradePolicy, UpgradeClusterRequest, UpgradePoolRequest, Version, } from './types.gen.js';
|
|
5
5
|
export * as ValidationRules from './validation-rules.gen.js';
|
package/dist/v1/index.gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CLUSTER_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
|
-
import { marshalAddClusterACLRulesRequest, marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterACLRulesRequest, marshalSetClusterTypeRequest, marshalSetPoolLabelsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolTaintsRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalAddClusterACLRulesResponse, unmarshalCluster,
|
|
2
|
+
import { marshalAddClusterACLRulesRequest, marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterACLRulesRequest, marshalSetClusterTypeRequest, marshalSetPoolLabelsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolTaintsRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalAddClusterACLRulesResponse, unmarshalCluster, unmarshalExternalNodeAuth, unmarshalListClusterACLRulesResponse, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterTypesResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalNodeMetadata, unmarshalPool, unmarshalSetClusterACLRulesResponse, unmarshalVersion } from "./marshalling.gen.js";
|
|
3
3
|
import { API } from "./api.gen.js";
|
|
4
4
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
5
|
-
export { API, CLUSTER_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, marshalAddClusterACLRulesRequest, marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterACLRulesRequest, marshalSetClusterTypeRequest, marshalSetPoolLabelsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolTaintsRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalAddClusterACLRulesResponse, unmarshalCluster,
|
|
5
|
+
export { API, CLUSTER_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, marshalAddClusterACLRulesRequest, marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterACLRulesRequest, marshalSetClusterTypeRequest, marshalSetPoolLabelsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolTaintsRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalAddClusterACLRulesResponse, unmarshalCluster, unmarshalExternalNodeAuth, unmarshalListClusterACLRulesResponse, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterTypesResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalNodeMetadata, unmarshalPool, unmarshalSetClusterACLRulesResponse, unmarshalVersion };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { Version, Cluster, Node, Pool, AddClusterACLRulesResponse,
|
|
2
|
+
import type { Version, Cluster, Node, Pool, AddClusterACLRulesResponse, ExternalNodeAuth, ListClusterACLRulesResponse, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsResponse, ListClusterTypesResponse, ListClustersResponse, ListNodesResponse, ListPoolsResponse, ListVersionsResponse, NodeMetadata, SetClusterACLRulesResponse, AddClusterACLRulesRequest, CreateClusterRequest, CreatePoolRequest, SetClusterACLRulesRequest, SetClusterTypeRequest, SetPoolLabelsRequest, SetPoolStartupTaintsRequest, SetPoolTaintsRequest, UpdateClusterRequest, UpdatePoolRequest, UpgradeClusterRequest, UpgradePoolRequest } 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;
|
|
6
6
|
export declare const unmarshalPool: (data: unknown) => Pool;
|
|
7
7
|
export declare const unmarshalAddClusterACLRulesResponse: (data: unknown) => AddClusterACLRulesResponse;
|
|
8
|
-
export declare const unmarshalExternalNode: (data: unknown) => ExternalNode;
|
|
9
8
|
export declare const unmarshalExternalNodeAuth: (data: unknown) => ExternalNodeAuth;
|
|
10
9
|
export declare const unmarshalListClusterACLRulesResponse: (data: unknown) => ListClusterACLRulesResponse;
|
|
11
10
|
export declare const unmarshalListClusterAvailableTypesResponse: (data: unknown) => ListClusterAvailableTypesResponse;
|
|
@@ -135,6 +135,7 @@ const unmarshalPool = (data) => {
|
|
|
135
135
|
clusterId: data.cluster_id,
|
|
136
136
|
containerRuntime: data.container_runtime,
|
|
137
137
|
createdAt: unmarshalDate(data.created_at),
|
|
138
|
+
errorMessage: data.error_message,
|
|
138
139
|
id: data.id,
|
|
139
140
|
kubeletArgs: data.kubelet_args,
|
|
140
141
|
labels: data.labels,
|
|
@@ -166,6 +167,7 @@ const unmarshalACLRule = (data) => {
|
|
|
166
167
|
description: data.description,
|
|
167
168
|
id: data.id,
|
|
168
169
|
ip: data.ip,
|
|
170
|
+
region: data.region,
|
|
169
171
|
scalewayRanges: data.scaleway_ranges
|
|
170
172
|
};
|
|
171
173
|
};
|
|
@@ -173,33 +175,6 @@ const unmarshalAddClusterACLRulesResponse = (data) => {
|
|
|
173
175
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddClusterACLRulesResponse' failed as data isn't a dictionary.`);
|
|
174
176
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
|
|
175
177
|
};
|
|
176
|
-
const unmarshalExternalNodeCoreV1Taint = (data) => {
|
|
177
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ExternalNodeCoreV1Taint' failed as data isn't a dictionary.`);
|
|
178
|
-
return {
|
|
179
|
-
effect: data.effect,
|
|
180
|
-
key: data.key,
|
|
181
|
-
value: data.value
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
const unmarshalExternalNode = (data) => {
|
|
185
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ExternalNode' failed as data isn't a dictionary.`);
|
|
186
|
-
return {
|
|
187
|
-
clusterCa: data.cluster_ca,
|
|
188
|
-
clusterUrl: data.cluster_url,
|
|
189
|
-
cniPluginsVersion: data.cni_plugins_version,
|
|
190
|
-
containerdVersion: data.containerd_version,
|
|
191
|
-
externalIp: data.external_ip,
|
|
192
|
-
iamToken: data.iam_token,
|
|
193
|
-
id: data.id,
|
|
194
|
-
kubeToken: data.kube_token,
|
|
195
|
-
kubeletConfig: data.kubelet_config,
|
|
196
|
-
name: data.name,
|
|
197
|
-
nodeLabels: data.node_labels,
|
|
198
|
-
nodeTaints: unmarshalArrayOfObject(data.node_taints, unmarshalExternalNodeCoreV1Taint),
|
|
199
|
-
poolVersion: data.pool_version,
|
|
200
|
-
runcVersion: data.runc_version
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
178
|
const unmarshalExternalNodeAuth = (data) => {
|
|
204
179
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ExternalNodeAuth' failed as data isn't a dictionary.`);
|
|
205
180
|
return {
|
|
@@ -225,6 +200,7 @@ const unmarshalClusterType = (data) => {
|
|
|
225
200
|
maxNodes: data.max_nodes,
|
|
226
201
|
memory: data.memory,
|
|
227
202
|
name: data.name,
|
|
203
|
+
region: data.region,
|
|
228
204
|
resiliency: data.resiliency,
|
|
229
205
|
sla: data.sla
|
|
230
206
|
};
|
|
@@ -501,4 +477,4 @@ const marshalUpgradeClusterRequest = (request, defaults) => ({
|
|
|
501
477
|
});
|
|
502
478
|
const marshalUpgradePoolRequest = (request, defaults) => ({ version: request.version });
|
|
503
479
|
//#endregion
|
|
504
|
-
export { marshalAddClusterACLRulesRequest, marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterACLRulesRequest, marshalSetClusterTypeRequest, marshalSetPoolLabelsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolTaintsRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalAddClusterACLRulesResponse, unmarshalCluster,
|
|
480
|
+
export { marshalAddClusterACLRulesRequest, marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterACLRulesRequest, marshalSetClusterTypeRequest, marshalSetPoolLabelsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolTaintsRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalAddClusterACLRulesResponse, unmarshalCluster, unmarshalExternalNodeAuth, unmarshalListClusterACLRulesResponse, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterTypesResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalNodeMetadata, unmarshalPool, unmarshalSetClusterACLRulesResponse, unmarshalVersion };
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -43,11 +43,11 @@ export interface CoreV1Taint {
|
|
|
43
43
|
}
|
|
44
44
|
export interface CreateClusterRequestPoolConfigUpgradePolicy {
|
|
45
45
|
/**
|
|
46
|
-
* The maximum number of nodes that can be
|
|
46
|
+
* The maximum number of nodes that can be `upgrading` at the same time.
|
|
47
47
|
*/
|
|
48
48
|
maxUnavailable?: number;
|
|
49
49
|
/**
|
|
50
|
-
* The maximum number of nodes to be created during the upgrade.
|
|
50
|
+
* The maximum number of nodes to be created during the upgrade, e.g. the pool will scale up to reach `size`+`max_surge` before downscaling to `size` after node upgrades.
|
|
51
51
|
*/
|
|
52
52
|
maxSurge?: number;
|
|
53
53
|
}
|
|
@@ -142,7 +142,13 @@ export interface ClusterOpenIDConnectConfig {
|
|
|
142
142
|
requiredClaim: string[];
|
|
143
143
|
}
|
|
144
144
|
export interface PoolUpgradePolicy {
|
|
145
|
+
/**
|
|
146
|
+
* The maximum number of nodes that can be `upgrading` at the same time.
|
|
147
|
+
*/
|
|
145
148
|
maxUnavailable: number;
|
|
149
|
+
/**
|
|
150
|
+
* The maximum number of nodes to be created during the upgrade, e.g. the pool will scale up to reach `size`+`max_surge` before downscaling to `size` after node upgrades.
|
|
151
|
+
*/
|
|
146
152
|
maxSurge: number;
|
|
147
153
|
}
|
|
148
154
|
export interface ACLRuleRequest {
|
|
@@ -184,6 +190,10 @@ export interface ACLRule {
|
|
|
184
190
|
* Description of the ACL.
|
|
185
191
|
*/
|
|
186
192
|
description: string;
|
|
193
|
+
/**
|
|
194
|
+
* Region of the ACL rule.
|
|
195
|
+
*/
|
|
196
|
+
region: ScwRegion;
|
|
187
197
|
}
|
|
188
198
|
export interface CreateClusterRequestAutoUpgrade {
|
|
189
199
|
/**
|
|
@@ -321,7 +331,7 @@ export interface CreateClusterRequestPoolConfig {
|
|
|
321
331
|
*/
|
|
322
332
|
kubeletArgs: Record<string, string>;
|
|
323
333
|
/**
|
|
324
|
-
*
|
|
334
|
+
* Defines how node provisioning should behave during pool version upgrade.
|
|
325
335
|
*/
|
|
326
336
|
upgradePolicy?: CreateClusterRequestPoolConfigUpgradePolicy;
|
|
327
337
|
/**
|
|
@@ -365,14 +375,15 @@ export interface CreateClusterRequestPoolConfig {
|
|
|
365
375
|
privateNetworkId?: string;
|
|
366
376
|
}
|
|
367
377
|
export interface CreatePoolRequestUpgradePolicy {
|
|
378
|
+
/**
|
|
379
|
+
* The maximum number of nodes that can be `upgrading` at the same time.
|
|
380
|
+
*/
|
|
368
381
|
maxUnavailable?: number;
|
|
382
|
+
/**
|
|
383
|
+
* The maximum number of nodes to be created during the upgrade, e.g. the pool will scale up to reach `size`+`max_surge` before downscaling to `size` after node upgrades.
|
|
384
|
+
*/
|
|
369
385
|
maxSurge?: number;
|
|
370
386
|
}
|
|
371
|
-
export interface ExternalNodeCoreV1Taint {
|
|
372
|
-
key: string;
|
|
373
|
-
value: string;
|
|
374
|
-
effect: string;
|
|
375
|
-
}
|
|
376
387
|
export interface ClusterType {
|
|
377
388
|
/**
|
|
378
389
|
* Cluster type name.
|
|
@@ -414,6 +425,10 @@ export interface ClusterType {
|
|
|
414
425
|
* Maximum amount of data that can be stored in etcd for the offer.
|
|
415
426
|
*/
|
|
416
427
|
maxEtcdSize: number;
|
|
428
|
+
/**
|
|
429
|
+
* The region of the cluster type.
|
|
430
|
+
*/
|
|
431
|
+
region: ScwRegion;
|
|
417
432
|
}
|
|
418
433
|
export interface Version {
|
|
419
434
|
/**
|
|
@@ -703,7 +718,7 @@ export interface Pool {
|
|
|
703
718
|
*/
|
|
704
719
|
kubeletArgs: Record<string, string>;
|
|
705
720
|
/**
|
|
706
|
-
*
|
|
721
|
+
* Defines how node provisioning should behave during pool version upgrade.
|
|
707
722
|
*/
|
|
708
723
|
upgradePolicy?: PoolUpgradePolicy;
|
|
709
724
|
/**
|
|
@@ -745,6 +760,10 @@ export interface Pool {
|
|
|
745
760
|
* Private network where the nodes are attached. Should be member of the same VPC as the API Server.
|
|
746
761
|
*/
|
|
747
762
|
privateNetworkId?: string;
|
|
763
|
+
/**
|
|
764
|
+
* Details of the error, if any occurred when managing the pool.
|
|
765
|
+
*/
|
|
766
|
+
errorMessage?: string;
|
|
748
767
|
/**
|
|
749
768
|
* Cluster region of the pool.
|
|
750
769
|
*/
|
|
@@ -846,7 +865,13 @@ export interface UpdateClusterRequestOpenIDConnectConfig {
|
|
|
846
865
|
requiredClaim?: string[];
|
|
847
866
|
}
|
|
848
867
|
export interface UpdatePoolRequestUpgradePolicy {
|
|
868
|
+
/**
|
|
869
|
+
* New maximum number of nodes that can be `upgrading` at the same time.
|
|
870
|
+
*/
|
|
849
871
|
maxUnavailable?: number;
|
|
872
|
+
/**
|
|
873
|
+
* New maximum number of nodes to be created during the upgrade.
|
|
874
|
+
*/
|
|
850
875
|
maxSurge?: number;
|
|
851
876
|
}
|
|
852
877
|
export type AddClusterACLRulesRequest = {
|
|
@@ -965,13 +990,6 @@ export type CreateClusterRequest = {
|
|
|
965
990
|
*/
|
|
966
991
|
serviceDnsIp?: string;
|
|
967
992
|
};
|
|
968
|
-
export type CreateExternalNodeRequest = {
|
|
969
|
-
/**
|
|
970
|
-
* Region to target. If none is passed will use default region from the config.
|
|
971
|
-
*/
|
|
972
|
-
region?: ScwRegion;
|
|
973
|
-
poolId: string;
|
|
974
|
-
};
|
|
975
993
|
export type CreatePoolRequest = {
|
|
976
994
|
/**
|
|
977
995
|
* Region to target. If none is passed will use default region from the config.
|
|
@@ -1026,7 +1044,7 @@ export type CreatePoolRequest = {
|
|
|
1026
1044
|
*/
|
|
1027
1045
|
kubeletArgs?: Record<string, string>;
|
|
1028
1046
|
/**
|
|
1029
|
-
*
|
|
1047
|
+
* Defines how node provisioning should behave during pool version upgrade.
|
|
1030
1048
|
*/
|
|
1031
1049
|
upgradePolicy?: CreatePoolRequestUpgradePolicy;
|
|
1032
1050
|
/**
|
|
@@ -1121,22 +1139,6 @@ export type DeletePoolRequest = {
|
|
|
1121
1139
|
*/
|
|
1122
1140
|
poolId: string;
|
|
1123
1141
|
};
|
|
1124
|
-
export interface ExternalNode {
|
|
1125
|
-
id: string;
|
|
1126
|
-
name: string;
|
|
1127
|
-
clusterUrl: string;
|
|
1128
|
-
poolVersion: string;
|
|
1129
|
-
clusterCa: string;
|
|
1130
|
-
kubeToken: string;
|
|
1131
|
-
kubeletConfig: string;
|
|
1132
|
-
externalIp: string;
|
|
1133
|
-
containerdVersion: string;
|
|
1134
|
-
runcVersion: string;
|
|
1135
|
-
cniPluginsVersion: string;
|
|
1136
|
-
nodeLabels: Record<string, string>;
|
|
1137
|
-
nodeTaints: ExternalNodeCoreV1Taint[];
|
|
1138
|
-
iamToken: string;
|
|
1139
|
-
}
|
|
1140
1142
|
export interface ExternalNodeAuth {
|
|
1141
1143
|
nodeSecretKey: string;
|
|
1142
1144
|
metadataUrl: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-k8s",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "Scaleway SDK k8s",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@scaleway/sdk-std": "2.4.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
38
|
+
"@scaleway/sdk-client": "^2.4.1",
|
|
39
|
+
"@repo/configs": "^0.1.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@scaleway/sdk-client": "^2.4.1"
|