@scaleway/sdk-k8s 2.14.0 → 2.16.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.
@@ -1,506 +0,0 @@
1
- import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
- import randomName from "@scaleway/random-name";
3
- //#region src/v1/marshalling.gen.ts
4
- const unmarshalVersion = (data) => {
5
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
6
- return {
7
- availableAdmissionPlugins: data.available_admission_plugins,
8
- availableCnis: data.available_cnis,
9
- availableContainerRuntimes: data.available_container_runtimes,
10
- availableFeatureGates: data.available_feature_gates,
11
- availableKubeletArgs: data.available_kubelet_args,
12
- deprecatedAt: unmarshalDate(data.deprecated_at),
13
- endOfLifeAt: unmarshalDate(data.end_of_life_at),
14
- label: data.label,
15
- name: data.name,
16
- region: data.region,
17
- releasedAt: unmarshalDate(data.released_at)
18
- };
19
- };
20
- const unmarshalMaintenanceWindow = (data) => {
21
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'MaintenanceWindow' failed as data isn't a dictionary.`);
22
- return {
23
- day: data.day,
24
- startHour: data.start_hour
25
- };
26
- };
27
- const unmarshalClusterAutoUpgrade = (data) => {
28
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterAutoUpgrade' failed as data isn't a dictionary.`);
29
- return {
30
- enabled: data.enabled,
31
- maintenanceWindow: data.maintenance_window ? unmarshalMaintenanceWindow(data.maintenance_window) : void 0
32
- };
33
- };
34
- const unmarshalClusterAutoscalerConfig = (data) => {
35
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterAutoscalerConfig' failed as data isn't a dictionary.`);
36
- return {
37
- balanceSimilarNodeGroups: data.balance_similar_node_groups,
38
- estimator: data.estimator,
39
- expander: data.expander,
40
- expendablePodsPriorityCutoff: data.expendable_pods_priority_cutoff,
41
- ignoreDaemonsetsUtilization: data.ignore_daemonsets_utilization,
42
- logLevel: data.log_level,
43
- maxGracefulTerminationSec: data.max_graceful_termination_sec,
44
- scaleDownDelayAfterAdd: data.scale_down_delay_after_add,
45
- scaleDownDisabled: data.scale_down_disabled,
46
- scaleDownUnneededTime: data.scale_down_unneeded_time,
47
- scaleDownUtilizationThreshold: data.scale_down_utilization_threshold,
48
- skipNodesWithLocalStorage: data.skip_nodes_with_local_storage
49
- };
50
- };
51
- const unmarshalClusterOpenIDConnectConfig = (data) => {
52
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterOpenIDConnectConfig' failed as data isn't a dictionary.`);
53
- return {
54
- clientId: data.client_id,
55
- groupsClaim: data.groups_claim,
56
- groupsPrefix: data.groups_prefix,
57
- issuerUrl: data.issuer_url,
58
- requiredClaim: data.required_claim,
59
- usernameClaim: data.username_claim,
60
- usernamePrefix: data.username_prefix
61
- };
62
- };
63
- const unmarshalCluster = (data) => {
64
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`);
65
- return {
66
- aclAvailable: data.acl_available,
67
- admissionPlugins: data.admission_plugins,
68
- apiserverCertSans: data.apiserver_cert_sans,
69
- autoUpgrade: data.auto_upgrade ? unmarshalClusterAutoUpgrade(data.auto_upgrade) : void 0,
70
- autoscalerConfig: data.autoscaler_config ? unmarshalClusterAutoscalerConfig(data.autoscaler_config) : void 0,
71
- clusterUrl: data.cluster_url,
72
- cni: data.cni,
73
- commitmentEndsAt: unmarshalDate(data.commitment_ends_at),
74
- createdAt: unmarshalDate(data.created_at),
75
- description: data.description,
76
- dnsWildcard: data.dns_wildcard,
77
- featureGates: data.feature_gates,
78
- iamNodesGroupId: data.iam_nodes_group_id,
79
- id: data.id,
80
- name: data.name,
81
- openIdConnectConfig: data.open_id_connect_config ? unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config) : void 0,
82
- organizationId: data.organization_id,
83
- podCidr: data.pod_cidr,
84
- privateNetworkId: data.private_network_id,
85
- projectId: data.project_id,
86
- region: data.region,
87
- serviceCidr: data.service_cidr,
88
- serviceDnsIp: data.service_dns_ip,
89
- status: data.status,
90
- tags: data.tags,
91
- type: data.type,
92
- updatedAt: unmarshalDate(data.updated_at),
93
- upgradeAvailable: data.upgrade_available,
94
- version: data.version
95
- };
96
- };
97
- const unmarshalNode = (data) => {
98
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Node' failed as data isn't a dictionary.`);
99
- return {
100
- clusterId: data.cluster_id,
101
- conditions: data.conditions,
102
- createdAt: unmarshalDate(data.created_at),
103
- errorMessage: data.error_message,
104
- id: data.id,
105
- name: data.name,
106
- poolId: data.pool_id,
107
- providerId: data.provider_id,
108
- publicIpV4: data.public_ip_v4,
109
- publicIpV6: data.public_ip_v6,
110
- region: data.region,
111
- status: data.status,
112
- updatedAt: unmarshalDate(data.updated_at)
113
- };
114
- };
115
- const unmarshalCoreV1Taint = (data) => {
116
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CoreV1Taint' failed as data isn't a dictionary.`);
117
- return {
118
- effect: data.effect,
119
- key: data.key,
120
- value: data.value
121
- };
122
- };
123
- const unmarshalPoolUpgradePolicy = (data) => {
124
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PoolUpgradePolicy' failed as data isn't a dictionary.`);
125
- return {
126
- maxSurge: data.max_surge,
127
- maxUnavailable: data.max_unavailable
128
- };
129
- };
130
- const unmarshalPool = (data) => {
131
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Pool' failed as data isn't a dictionary.`);
132
- return {
133
- autohealing: data.autohealing,
134
- autoscaling: data.autoscaling,
135
- clusterId: data.cluster_id,
136
- containerRuntime: data.container_runtime,
137
- createdAt: unmarshalDate(data.created_at),
138
- id: data.id,
139
- kubeletArgs: data.kubelet_args,
140
- labels: data.labels,
141
- maxSize: data.max_size,
142
- minSize: data.min_size,
143
- name: data.name,
144
- nodeType: data.node_type,
145
- placementGroupId: data.placement_group_id,
146
- privateNetworkId: data.private_network_id,
147
- publicIpDisabled: data.public_ip_disabled,
148
- region: data.region,
149
- rootVolumeSize: data.root_volume_size,
150
- rootVolumeType: data.root_volume_type,
151
- securityGroupId: data.security_group_id,
152
- size: data.size,
153
- startupTaints: unmarshalArrayOfObject(data.startup_taints, unmarshalCoreV1Taint),
154
- status: data.status,
155
- tags: data.tags,
156
- taints: unmarshalArrayOfObject(data.taints, unmarshalCoreV1Taint),
157
- updatedAt: unmarshalDate(data.updated_at),
158
- upgradePolicy: data.upgrade_policy ? unmarshalPoolUpgradePolicy(data.upgrade_policy) : void 0,
159
- version: data.version,
160
- zone: data.zone
161
- };
162
- };
163
- const unmarshalACLRule = (data) => {
164
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`);
165
- return {
166
- description: data.description,
167
- id: data.id,
168
- ip: data.ip,
169
- region: data.region,
170
- scalewayRanges: data.scaleway_ranges
171
- };
172
- };
173
- const unmarshalAddClusterACLRulesResponse = (data) => {
174
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddClusterACLRulesResponse' failed as data isn't a dictionary.`);
175
- return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
176
- };
177
- const unmarshalExternalNodeCoreV1Taint = (data) => {
178
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ExternalNodeCoreV1Taint' failed as data isn't a dictionary.`);
179
- return {
180
- effect: data.effect,
181
- key: data.key,
182
- value: data.value
183
- };
184
- };
185
- const unmarshalExternalNode = (data) => {
186
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ExternalNode' failed as data isn't a dictionary.`);
187
- return {
188
- clusterCa: data.cluster_ca,
189
- clusterUrl: data.cluster_url,
190
- cniPluginsVersion: data.cni_plugins_version,
191
- containerdVersion: data.containerd_version,
192
- externalIp: data.external_ip,
193
- iamToken: data.iam_token,
194
- id: data.id,
195
- kubeToken: data.kube_token,
196
- kubeletConfig: data.kubelet_config,
197
- name: data.name,
198
- nodeLabels: data.node_labels,
199
- nodeTaints: unmarshalArrayOfObject(data.node_taints, unmarshalExternalNodeCoreV1Taint),
200
- poolVersion: data.pool_version,
201
- runcVersion: data.runc_version
202
- };
203
- };
204
- const unmarshalExternalNodeAuth = (data) => {
205
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ExternalNodeAuth' failed as data isn't a dictionary.`);
206
- return {
207
- metadataUrl: data.metadata_url,
208
- nodeSecretKey: data.node_secret_key
209
- };
210
- };
211
- const unmarshalListClusterACLRulesResponse = (data) => {
212
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClusterACLRulesResponse' failed as data isn't a dictionary.`);
213
- return {
214
- rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule),
215
- totalCount: data.total_count
216
- };
217
- };
218
- const unmarshalClusterType = (data) => {
219
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterType' failed as data isn't a dictionary.`);
220
- return {
221
- auditLogsSupported: data.audit_logs_supported,
222
- availability: data.availability,
223
- commitmentDelay: data.commitment_delay,
224
- dedicated: data.dedicated,
225
- maxEtcdSize: data.max_etcd_size,
226
- maxNodes: data.max_nodes,
227
- memory: data.memory,
228
- name: data.name,
229
- region: data.region,
230
- resiliency: data.resiliency,
231
- sla: data.sla
232
- };
233
- };
234
- const unmarshalListClusterAvailableTypesResponse = (data) => {
235
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClusterAvailableTypesResponse' failed as data isn't a dictionary.`);
236
- return {
237
- clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
238
- totalCount: data.total_count
239
- };
240
- };
241
- const unmarshalListClusterAvailableVersionsResponse = (data) => {
242
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClusterAvailableVersionsResponse' failed as data isn't a dictionary.`);
243
- return { versions: unmarshalArrayOfObject(data.versions, unmarshalVersion) };
244
- };
245
- const unmarshalListClusterTypesResponse = (data) => {
246
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClusterTypesResponse' failed as data isn't a dictionary.`);
247
- return {
248
- clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
249
- totalCount: data.total_count
250
- };
251
- };
252
- const unmarshalListClustersResponse = (data) => {
253
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`);
254
- return {
255
- clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
256
- totalCount: data.total_count
257
- };
258
- };
259
- const unmarshalListNodesResponse = (data) => {
260
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodesResponse' failed as data isn't a dictionary.`);
261
- return {
262
- nodes: unmarshalArrayOfObject(data.nodes, unmarshalNode),
263
- totalCount: data.total_count
264
- };
265
- };
266
- const unmarshalListPoolsResponse = (data) => {
267
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPoolsResponse' failed as data isn't a dictionary.`);
268
- return {
269
- pools: unmarshalArrayOfObject(data.pools, unmarshalPool),
270
- totalCount: data.total_count
271
- };
272
- };
273
- const unmarshalListVersionsResponse = (data) => {
274
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
275
- return { versions: unmarshalArrayOfObject(data.versions, unmarshalVersion) };
276
- };
277
- const unmarshalNodeMetadataCoreV1Taint = (data) => {
278
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeMetadataCoreV1Taint' failed as data isn't a dictionary.`);
279
- return {
280
- effect: data.effect,
281
- key: data.key,
282
- value: data.value
283
- };
284
- };
285
- const unmarshalNodeMetadata = (data) => {
286
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeMetadata' failed as data isn't a dictionary.`);
287
- return {
288
- clusterCa: data.cluster_ca,
289
- clusterUrl: data.cluster_url,
290
- credentialProviderConfig: data.credential_provider_config,
291
- externalIp: data.external_ip,
292
- hasGpu: data.has_gpu,
293
- id: data.id,
294
- installerTags: data.installer_tags,
295
- kubeletConfig: data.kubelet_config,
296
- name: data.name,
297
- nodeLabels: data.node_labels,
298
- nodeTaints: unmarshalArrayOfObject(data.node_taints, unmarshalNodeMetadataCoreV1Taint),
299
- poolVersion: data.pool_version,
300
- providerId: data.provider_id,
301
- repoUri: data.repo_uri,
302
- resolvconfPath: data.resolvconf_path,
303
- templateArgs: data.template_args,
304
- updaterBinPath: data.updater_bin_path,
305
- updaterBinUrl: data.updater_bin_url,
306
- updaterBinVersion: data.updater_bin_version
307
- };
308
- };
309
- const unmarshalSetClusterACLRulesResponse = (data) => {
310
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetClusterACLRulesResponse' failed as data isn't a dictionary.`);
311
- return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
312
- };
313
- const marshalACLRuleRequest = (request, defaults) => ({
314
- description: request.description,
315
- ...resolveOneOf([{
316
- param: "ip",
317
- value: request.ip
318
- }, {
319
- param: "scaleway_ranges",
320
- value: request.scalewayRanges
321
- }])
322
- });
323
- const marshalAddClusterACLRulesRequest = (request, defaults) => ({ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt, defaults)) : void 0 });
324
- const marshalMaintenanceWindow = (request, defaults) => ({
325
- day: request.day,
326
- start_hour: request.startHour
327
- });
328
- const marshalCoreV1Taint = (request, defaults) => ({
329
- effect: request.effect,
330
- key: request.key,
331
- value: request.value
332
- });
333
- const marshalCreateClusterRequestPoolConfigUpgradePolicy = (request, defaults) => ({
334
- max_surge: request.maxSurge,
335
- max_unavailable: request.maxUnavailable
336
- });
337
- const marshalCreateClusterRequestAutoUpgrade = (request, defaults) => ({
338
- enable: request.enable,
339
- maintenance_window: request.maintenanceWindow !== void 0 ? marshalMaintenanceWindow(request.maintenanceWindow, defaults) : void 0
340
- });
341
- const marshalCreateClusterRequestAutoscalerConfig = (request, defaults) => ({
342
- balance_similar_node_groups: request.balanceSimilarNodeGroups,
343
- estimator: request.estimator,
344
- expander: request.expander,
345
- expendable_pods_priority_cutoff: request.expendablePodsPriorityCutoff,
346
- ignore_daemonsets_utilization: request.ignoreDaemonsetsUtilization,
347
- log_level: request.logLevel,
348
- max_graceful_termination_sec: request.maxGracefulTerminationSec,
349
- scale_down_delay_after_add: request.scaleDownDelayAfterAdd,
350
- scale_down_disabled: request.scaleDownDisabled,
351
- scale_down_unneeded_time: request.scaleDownUnneededTime,
352
- scale_down_utilization_threshold: request.scaleDownUtilizationThreshold,
353
- skip_nodes_with_local_storage: request.skipNodesWithLocalStorage
354
- });
355
- const marshalCreateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
356
- client_id: request.clientId,
357
- groups_claim: request.groupsClaim,
358
- groups_prefix: request.groupsPrefix,
359
- issuer_url: request.issuerUrl,
360
- required_claim: request.requiredClaim,
361
- username_claim: request.usernameClaim,
362
- username_prefix: request.usernamePrefix
363
- });
364
- const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
365
- autohealing: request.autohealing,
366
- autoscaling: request.autoscaling,
367
- container_runtime: request.containerRuntime,
368
- kubelet_args: request.kubeletArgs,
369
- labels: request.labels,
370
- max_size: request.maxSize,
371
- min_size: request.minSize,
372
- name: request.name,
373
- node_type: request.nodeType,
374
- placement_group_id: request.placementGroupId,
375
- private_network_id: request.privateNetworkId,
376
- public_ip_disabled: request.publicIpDisabled,
377
- root_volume_size: request.rootVolumeSize,
378
- root_volume_type: request.rootVolumeType,
379
- security_group_id: request.securityGroupId,
380
- size: request.size,
381
- startup_taints: request.startupTaints.map((elt) => marshalCoreV1Taint(elt, defaults)),
382
- tags: request.tags,
383
- taints: request.taints.map((elt) => marshalCoreV1Taint(elt, defaults)),
384
- upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreateClusterRequestPoolConfigUpgradePolicy(request.upgradePolicy, defaults) : void 0,
385
- zone: request.zone
386
- });
387
- const marshalCreateClusterRequest = (request, defaults) => ({
388
- admission_plugins: request.admissionPlugins,
389
- apiserver_cert_sans: request.apiserverCertSans,
390
- auto_upgrade: request.autoUpgrade !== void 0 ? marshalCreateClusterRequestAutoUpgrade(request.autoUpgrade, defaults) : void 0,
391
- autoscaler_config: request.autoscalerConfig !== void 0 ? marshalCreateClusterRequestAutoscalerConfig(request.autoscalerConfig, defaults) : void 0,
392
- cni: request.cni,
393
- description: request.description,
394
- feature_gates: request.featureGates,
395
- name: request.name || randomName("k8s"),
396
- open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalCreateClusterRequestOpenIDConnectConfig(request.openIdConnectConfig, defaults) : void 0,
397
- pod_cidr: request.podCidr,
398
- pools: request.pools !== void 0 ? request.pools.map((elt) => marshalCreateClusterRequestPoolConfig(elt, defaults)) : void 0,
399
- private_network_id: request.privateNetworkId,
400
- service_cidr: request.serviceCidr,
401
- service_dns_ip: request.serviceDnsIp,
402
- tags: request.tags,
403
- type: request.type,
404
- version: request.version,
405
- ...resolveOneOf([{
406
- default: defaults.defaultProjectId,
407
- param: "project_id",
408
- value: request.projectId
409
- }, {
410
- default: defaults.defaultOrganizationId,
411
- param: "organization_id",
412
- value: request.organizationId
413
- }])
414
- });
415
- const marshalCreatePoolRequestUpgradePolicy = (request, defaults) => ({
416
- max_surge: request.maxSurge,
417
- max_unavailable: request.maxUnavailable
418
- });
419
- const marshalCreatePoolRequest = (request, defaults) => ({
420
- autohealing: request.autohealing,
421
- autoscaling: request.autoscaling,
422
- container_runtime: request.containerRuntime,
423
- kubelet_args: request.kubeletArgs !== void 0 ? request.kubeletArgs : void 0,
424
- labels: request.labels !== void 0 ? request.labels : void 0,
425
- max_size: request.maxSize,
426
- min_size: request.minSize,
427
- name: request.name || randomName("pool"),
428
- node_type: request.nodeType,
429
- placement_group_id: request.placementGroupId,
430
- private_network_id: request.privateNetworkId,
431
- public_ip_disabled: request.publicIpDisabled,
432
- root_volume_size: request.rootVolumeSize,
433
- root_volume_type: request.rootVolumeType,
434
- security_group_id: request.securityGroupId,
435
- size: request.size,
436
- startup_taints: request.startupTaints !== void 0 ? request.startupTaints.map((elt) => marshalCoreV1Taint(elt, defaults)) : void 0,
437
- tags: request.tags,
438
- taints: request.taints !== void 0 ? request.taints.map((elt) => marshalCoreV1Taint(elt, defaults)) : void 0,
439
- upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreatePoolRequestUpgradePolicy(request.upgradePolicy, defaults) : void 0,
440
- zone: request.zone ?? defaults.defaultZone
441
- });
442
- const marshalSetClusterACLRulesRequest = (request, defaults) => ({ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt, defaults)) : void 0 });
443
- const marshalSetClusterTypeRequest = (request, defaults) => ({ type: request.type });
444
- const marshalSetPoolLabelsRequest = (request, defaults) => ({ labels: request.labels !== void 0 ? request.labels : void 0 });
445
- const marshalSetPoolStartupTaintsRequest = (request, defaults) => ({ startup_taints: request.startupTaints !== void 0 ? request.startupTaints.map((elt) => marshalCoreV1Taint(elt, defaults)) : void 0 });
446
- const marshalSetPoolTaintsRequest = (request, defaults) => ({ taints: request.taints !== void 0 ? request.taints.map((elt) => marshalCoreV1Taint(elt, defaults)) : void 0 });
447
- const marshalUpdateClusterRequestAutoUpgrade = (request, defaults) => ({
448
- enable: request.enable,
449
- maintenance_window: request.maintenanceWindow !== void 0 ? marshalMaintenanceWindow(request.maintenanceWindow, defaults) : void 0
450
- });
451
- const marshalUpdateClusterRequestAutoscalerConfig = (request, defaults) => ({
452
- balance_similar_node_groups: request.balanceSimilarNodeGroups,
453
- estimator: request.estimator,
454
- expander: request.expander,
455
- expendable_pods_priority_cutoff: request.expendablePodsPriorityCutoff,
456
- ignore_daemonsets_utilization: request.ignoreDaemonsetsUtilization,
457
- log_level: request.logLevel,
458
- max_graceful_termination_sec: request.maxGracefulTerminationSec,
459
- scale_down_delay_after_add: request.scaleDownDelayAfterAdd,
460
- scale_down_disabled: request.scaleDownDisabled,
461
- scale_down_unneeded_time: request.scaleDownUnneededTime,
462
- scale_down_utilization_threshold: request.scaleDownUtilizationThreshold,
463
- skip_nodes_with_local_storage: request.skipNodesWithLocalStorage
464
- });
465
- const marshalUpdateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
466
- client_id: request.clientId,
467
- groups_claim: request.groupsClaim,
468
- groups_prefix: request.groupsPrefix,
469
- issuer_url: request.issuerUrl,
470
- required_claim: request.requiredClaim,
471
- username_claim: request.usernameClaim,
472
- username_prefix: request.usernamePrefix
473
- });
474
- const marshalUpdateClusterRequest = (request, defaults) => ({
475
- admission_plugins: request.admissionPlugins,
476
- apiserver_cert_sans: request.apiserverCertSans,
477
- auto_upgrade: request.autoUpgrade !== void 0 ? marshalUpdateClusterRequestAutoUpgrade(request.autoUpgrade, defaults) : void 0,
478
- autoscaler_config: request.autoscalerConfig !== void 0 ? marshalUpdateClusterRequestAutoscalerConfig(request.autoscalerConfig, defaults) : void 0,
479
- description: request.description,
480
- feature_gates: request.featureGates,
481
- name: request.name,
482
- open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalUpdateClusterRequestOpenIDConnectConfig(request.openIdConnectConfig, defaults) : void 0,
483
- tags: request.tags
484
- });
485
- const marshalUpdatePoolRequestUpgradePolicy = (request, defaults) => ({
486
- max_surge: request.maxSurge,
487
- max_unavailable: request.maxUnavailable
488
- });
489
- const marshalUpdatePoolRequest = (request, defaults) => ({
490
- autohealing: request.autohealing,
491
- autoscaling: request.autoscaling,
492
- kubelet_args: request.kubeletArgs,
493
- max_size: request.maxSize,
494
- min_size: request.minSize,
495
- security_group_id: request.securityGroupId,
496
- size: request.size,
497
- tags: request.tags,
498
- upgrade_policy: request.upgradePolicy !== void 0 ? marshalUpdatePoolRequestUpgradePolicy(request.upgradePolicy, defaults) : void 0
499
- });
500
- const marshalUpgradeClusterRequest = (request, defaults) => ({
501
- upgrade_pools: request.upgradePools,
502
- version: request.version
503
- });
504
- const marshalUpgradePoolRequest = (request, defaults) => ({ version: request.version });
505
- //#endregion
506
- export { marshalAddClusterACLRulesRequest, marshalCreateClusterRequest, marshalCreatePoolRequest, marshalSetClusterACLRulesRequest, marshalSetClusterTypeRequest, marshalSetPoolLabelsRequest, marshalSetPoolStartupTaintsRequest, marshalSetPoolTaintsRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalAddClusterACLRulesResponse, unmarshalCluster, unmarshalExternalNode, unmarshalExternalNodeAuth, unmarshalListClusterACLRulesResponse, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterTypesResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalNodeMetadata, unmarshalPool, unmarshalSetClusterACLRulesResponse, unmarshalVersion };
@@ -1,149 +0,0 @@
1
- export declare const queriesMetadata: {
2
- readonly namespace: 'k8s';
3
- readonly version: 'v1';
4
- readonly folderName: 'k8Sv1';
5
- readonly services: readonly [{
6
- readonly apiClass: 'API';
7
- readonly methods: readonly [{
8
- readonly methodName: 'listClusters';
9
- readonly protoName: 'ListClusters';
10
- readonly paramsType: 'ListClustersRequest';
11
- readonly returnType: 'ListClustersResponse';
12
- readonly isList: true;
13
- readonly paginationType: 'offset';
14
- readonly pageParamKey: 'page';
15
- readonly listItemType: 'Cluster';
16
- readonly isPrivate: false;
17
- readonly description: '"';
18
- }, {
19
- readonly methodName: 'getCluster';
20
- readonly protoName: 'GetCluster';
21
- readonly paramsType: 'GetClusterRequest';
22
- readonly returnType: 'Cluster';
23
- readonly isList: false;
24
- readonly paginationType: 'none';
25
- readonly isPrivate: false;
26
- readonly description: '"';
27
- readonly hasWaiter: true;
28
- }, {
29
- readonly methodName: 'listClusterAvailableVersions';
30
- readonly protoName: 'ListClusterAvailableVersions';
31
- readonly paramsType: 'ListClusterAvailableVersionsRequest';
32
- readonly returnType: 'ListClusterAvailableVersionsResponse';
33
- readonly isList: false;
34
- readonly paginationType: 'none';
35
- readonly isPrivate: false;
36
- readonly description: '"';
37
- }, {
38
- readonly methodName: 'listClusterAvailableTypes';
39
- readonly protoName: 'ListClusterAvailableTypes';
40
- readonly paramsType: 'ListClusterAvailableTypesRequest';
41
- readonly returnType: 'ListClusterAvailableTypesResponse';
42
- readonly isList: false;
43
- readonly paginationType: 'none';
44
- readonly isPrivate: false;
45
- readonly description: '"';
46
- }, {
47
- readonly methodName: '_getClusterKubeConfig';
48
- readonly protoName: 'GetClusterKubeConfig';
49
- readonly paramsType: 'GetClusterKubeConfigRequest';
50
- readonly returnType: 'Blob';
51
- readonly isList: false;
52
- readonly paginationType: 'none';
53
- readonly isPrivate: true;
54
- readonly description: '"';
55
- }, {
56
- readonly methodName: 'listClusterACLRules';
57
- readonly protoName: 'ListClusterACLRules';
58
- readonly paramsType: 'ListClusterACLRulesRequest';
59
- readonly returnType: 'ListClusterACLRulesResponse';
60
- readonly isList: true;
61
- readonly paginationType: 'offset';
62
- readonly pageParamKey: 'page';
63
- readonly listItemType: 'ACLRule';
64
- readonly isPrivate: false;
65
- readonly description: '"';
66
- }, {
67
- readonly methodName: 'listPools';
68
- readonly protoName: 'ListPools';
69
- readonly paramsType: 'ListPoolsRequest';
70
- readonly returnType: 'ListPoolsResponse';
71
- readonly isList: true;
72
- readonly paginationType: 'offset';
73
- readonly pageParamKey: 'page';
74
- readonly listItemType: 'Pool';
75
- readonly isPrivate: false;
76
- readonly description: '"';
77
- }, {
78
- readonly methodName: 'getPool';
79
- readonly protoName: 'GetPool';
80
- readonly paramsType: 'GetPoolRequest';
81
- readonly returnType: 'Pool';
82
- readonly isList: false;
83
- readonly paginationType: 'none';
84
- readonly isPrivate: false;
85
- readonly description: '"';
86
- readonly hasWaiter: true;
87
- }, {
88
- readonly methodName: 'getNodeMetadata';
89
- readonly protoName: 'GetNodeMetadata';
90
- readonly paramsType: 'GetNodeMetadataRequest';
91
- readonly returnType: 'NodeMetadata';
92
- readonly isList: false;
93
- readonly paginationType: 'none';
94
- readonly isPrivate: false;
95
- readonly description: '"';
96
- }, {
97
- readonly methodName: 'listNodes';
98
- readonly protoName: 'ListNodes';
99
- readonly paramsType: 'ListNodesRequest';
100
- readonly returnType: 'ListNodesResponse';
101
- readonly isList: true;
102
- readonly paginationType: 'offset';
103
- readonly pageParamKey: 'page';
104
- readonly listItemType: 'Node';
105
- readonly isPrivate: false;
106
- readonly description: '"';
107
- }, {
108
- readonly methodName: 'getNode';
109
- readonly protoName: 'GetNode';
110
- readonly paramsType: 'GetNodeRequest';
111
- readonly returnType: 'Node';
112
- readonly isList: false;
113
- readonly paginationType: 'none';
114
- readonly isPrivate: false;
115
- readonly description: '"';
116
- readonly hasWaiter: true;
117
- }, {
118
- readonly methodName: 'listVersions';
119
- readonly protoName: 'ListVersions';
120
- readonly paramsType: 'ListVersionsRequest';
121
- readonly returnType: 'ListVersionsResponse';
122
- readonly isList: false;
123
- readonly paginationType: 'none';
124
- readonly isPrivate: false;
125
- readonly description: '"';
126
- }, {
127
- readonly methodName: 'getVersion';
128
- readonly protoName: 'GetVersion';
129
- readonly paramsType: 'GetVersionRequest';
130
- readonly returnType: 'Version';
131
- readonly isList: false;
132
- readonly paginationType: 'none';
133
- readonly isPrivate: false;
134
- readonly description: '"';
135
- }, {
136
- readonly methodName: 'listClusterTypes';
137
- readonly protoName: 'ListClusterTypes';
138
- readonly paramsType: 'ListClusterTypesRequest';
139
- readonly returnType: 'ListClusterTypesResponse';
140
- readonly isList: true;
141
- readonly paginationType: 'offset';
142
- readonly pageParamKey: 'page';
143
- readonly listItemType: 'ClusterType';
144
- readonly isPrivate: false;
145
- readonly description: '"';
146
- }];
147
- }];
148
- };
149
- export type QueriesMetadata = typeof queriesMetadata;