@scaleway/sdk-k8s 1.8.0 → 2.2.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,644 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const randomName = require("@scaleway/random-name");
4
- const sdkClient = require("@scaleway/sdk-client");
5
- const unmarshalPoolUpgradePolicy = (data) => {
6
- if (!sdkClient.isJSONObject(data)) {
7
- throw new TypeError(
8
- `Unmarshalling the type 'PoolUpgradePolicy' failed as data isn't a dictionary.`
9
- );
10
- }
11
- return {
12
- maxSurge: data.max_surge,
13
- maxUnavailable: data.max_unavailable
14
- };
15
- };
16
- const unmarshalPool = (data) => {
17
- if (!sdkClient.isJSONObject(data)) {
18
- throw new TypeError(
19
- `Unmarshalling the type 'Pool' failed as data isn't a dictionary.`
20
- );
21
- }
22
- return {
23
- autohealing: data.autohealing,
24
- autoscaling: data.autoscaling,
25
- clusterId: data.cluster_id,
26
- containerRuntime: data.container_runtime,
27
- createdAt: sdkClient.unmarshalDate(data.created_at),
28
- id: data.id,
29
- kubeletArgs: data.kubelet_args,
30
- maxSize: data.max_size,
31
- minSize: data.min_size,
32
- name: data.name,
33
- newImagesEnabled: data.new_images_enabled,
34
- nodeType: data.node_type,
35
- placementGroupId: data.placement_group_id,
36
- publicIpDisabled: data.public_ip_disabled,
37
- region: data.region,
38
- rootVolumeSize: data.root_volume_size,
39
- rootVolumeType: data.root_volume_type,
40
- securityGroupId: data.security_group_id,
41
- size: data.size,
42
- status: data.status,
43
- tags: data.tags,
44
- updatedAt: sdkClient.unmarshalDate(data.updated_at),
45
- upgradePolicy: data.upgrade_policy ? unmarshalPoolUpgradePolicy(data.upgrade_policy) : void 0,
46
- version: data.version,
47
- zone: data.zone
48
- };
49
- };
50
- const unmarshalVersion = (data) => {
51
- if (!sdkClient.isJSONObject(data)) {
52
- throw new TypeError(
53
- `Unmarshalling the type 'Version' failed as data isn't a dictionary.`
54
- );
55
- }
56
- return {
57
- availableAdmissionPlugins: data.available_admission_plugins,
58
- availableCnis: data.available_cnis,
59
- availableContainerRuntimes: data.available_container_runtimes,
60
- availableFeatureGates: data.available_feature_gates,
61
- availableKubeletArgs: data.available_kubelet_args,
62
- deprecatedAt: sdkClient.unmarshalDate(data.deprecated_at),
63
- endOfLifeAt: sdkClient.unmarshalDate(data.end_of_life_at),
64
- label: data.label,
65
- name: data.name,
66
- region: data.region,
67
- releasedAt: sdkClient.unmarshalDate(data.released_at)
68
- };
69
- };
70
- const unmarshalMaintenanceWindow = (data) => {
71
- if (!sdkClient.isJSONObject(data)) {
72
- throw new TypeError(
73
- `Unmarshalling the type 'MaintenanceWindow' failed as data isn't a dictionary.`
74
- );
75
- }
76
- return {
77
- day: data.day,
78
- startHour: data.start_hour
79
- };
80
- };
81
- const unmarshalClusterAutoUpgrade = (data) => {
82
- if (!sdkClient.isJSONObject(data)) {
83
- throw new TypeError(
84
- `Unmarshalling the type 'ClusterAutoUpgrade' failed as data isn't a dictionary.`
85
- );
86
- }
87
- return {
88
- enabled: data.enabled,
89
- maintenanceWindow: data.maintenance_window ? unmarshalMaintenanceWindow(data.maintenance_window) : void 0
90
- };
91
- };
92
- const unmarshalClusterAutoscalerConfig = (data) => {
93
- if (!sdkClient.isJSONObject(data)) {
94
- throw new TypeError(
95
- `Unmarshalling the type 'ClusterAutoscalerConfig' failed as data isn't a dictionary.`
96
- );
97
- }
98
- return {
99
- balanceSimilarNodeGroups: data.balance_similar_node_groups,
100
- estimator: data.estimator,
101
- expander: data.expander,
102
- expendablePodsPriorityCutoff: data.expendable_pods_priority_cutoff,
103
- ignoreDaemonsetsUtilization: data.ignore_daemonsets_utilization,
104
- maxGracefulTerminationSec: data.max_graceful_termination_sec,
105
- scaleDownDelayAfterAdd: data.scale_down_delay_after_add,
106
- scaleDownDisabled: data.scale_down_disabled,
107
- scaleDownUnneededTime: data.scale_down_unneeded_time,
108
- scaleDownUtilizationThreshold: data.scale_down_utilization_threshold
109
- };
110
- };
111
- const unmarshalClusterOpenIDConnectConfig = (data) => {
112
- if (!sdkClient.isJSONObject(data)) {
113
- throw new TypeError(
114
- `Unmarshalling the type 'ClusterOpenIDConnectConfig' failed as data isn't a dictionary.`
115
- );
116
- }
117
- return {
118
- clientId: data.client_id,
119
- groupsClaim: data.groups_claim,
120
- groupsPrefix: data.groups_prefix,
121
- issuerUrl: data.issuer_url,
122
- requiredClaim: data.required_claim,
123
- usernameClaim: data.username_claim,
124
- usernamePrefix: data.username_prefix
125
- };
126
- };
127
- const unmarshalCluster = (data) => {
128
- if (!sdkClient.isJSONObject(data)) {
129
- throw new TypeError(
130
- `Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`
131
- );
132
- }
133
- return {
134
- aclAvailable: data.acl_available,
135
- admissionPlugins: data.admission_plugins,
136
- apiserverCertSans: data.apiserver_cert_sans,
137
- autoUpgrade: data.auto_upgrade ? unmarshalClusterAutoUpgrade(data.auto_upgrade) : void 0,
138
- autoscalerConfig: data.autoscaler_config ? unmarshalClusterAutoscalerConfig(data.autoscaler_config) : void 0,
139
- clusterUrl: data.cluster_url,
140
- cni: data.cni,
141
- commitmentEndsAt: sdkClient.unmarshalDate(data.commitment_ends_at),
142
- createdAt: sdkClient.unmarshalDate(data.created_at),
143
- description: data.description,
144
- dnsWildcard: data.dns_wildcard,
145
- featureGates: data.feature_gates,
146
- iamNodesGroupId: data.iam_nodes_group_id,
147
- id: data.id,
148
- name: data.name,
149
- newImagesEnabled: data.new_images_enabled,
150
- openIdConnectConfig: data.open_id_connect_config ? unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config) : void 0,
151
- organizationId: data.organization_id,
152
- podCidr: data.pod_cidr,
153
- privateNetworkId: data.private_network_id,
154
- projectId: data.project_id,
155
- region: data.region,
156
- serviceCidr: data.service_cidr,
157
- serviceDnsIp: data.service_dns_ip,
158
- status: data.status,
159
- tags: data.tags,
160
- type: data.type,
161
- updatedAt: sdkClient.unmarshalDate(data.updated_at),
162
- upgradeAvailable: data.upgrade_available,
163
- version: data.version
164
- };
165
- };
166
- const unmarshalNode = (data) => {
167
- if (!sdkClient.isJSONObject(data)) {
168
- throw new TypeError(
169
- `Unmarshalling the type 'Node' failed as data isn't a dictionary.`
170
- );
171
- }
172
- return {
173
- clusterId: data.cluster_id,
174
- conditions: data.conditions ? data.conditions : void 0,
175
- createdAt: sdkClient.unmarshalDate(data.created_at),
176
- errorMessage: data.error_message,
177
- id: data.id,
178
- name: data.name,
179
- poolId: data.pool_id,
180
- providerId: data.provider_id,
181
- publicIpV4: data.public_ip_v4,
182
- publicIpV6: data.public_ip_v6,
183
- region: data.region,
184
- status: data.status,
185
- updatedAt: sdkClient.unmarshalDate(data.updated_at)
186
- };
187
- };
188
- const unmarshalACLRule = (data) => {
189
- if (!sdkClient.isJSONObject(data)) {
190
- throw new TypeError(
191
- `Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`
192
- );
193
- }
194
- return {
195
- description: data.description,
196
- id: data.id,
197
- ip: data.ip,
198
- scalewayRanges: data.scaleway_ranges
199
- };
200
- };
201
- const unmarshalAddClusterACLRulesResponse = (data) => {
202
- if (!sdkClient.isJSONObject(data)) {
203
- throw new TypeError(
204
- `Unmarshalling the type 'AddClusterACLRulesResponse' failed as data isn't a dictionary.`
205
- );
206
- }
207
- return {
208
- rules: sdkClient.unmarshalArrayOfObject(data.rules, unmarshalACLRule)
209
- };
210
- };
211
- const unmarshalExternalNodeCoreV1Taint = (data) => {
212
- if (!sdkClient.isJSONObject(data)) {
213
- throw new TypeError(
214
- `Unmarshalling the type 'ExternalNodeCoreV1Taint' failed as data isn't a dictionary.`
215
- );
216
- }
217
- return {
218
- effect: data.effect,
219
- key: data.key,
220
- value: data.value
221
- };
222
- };
223
- const unmarshalExternalNode = (data) => {
224
- if (!sdkClient.isJSONObject(data)) {
225
- throw new TypeError(
226
- `Unmarshalling the type 'ExternalNode' failed as data isn't a dictionary.`
227
- );
228
- }
229
- return {
230
- clusterCa: data.cluster_ca,
231
- clusterUrl: data.cluster_url,
232
- cniPluginsVersion: data.cni_plugins_version,
233
- containerdVersion: data.containerd_version,
234
- externalIp: data.external_ip,
235
- iamToken: data.iam_token,
236
- id: data.id,
237
- kubeToken: data.kube_token,
238
- kubeletConfig: data.kubelet_config,
239
- name: data.name,
240
- nodeLabels: data.node_labels,
241
- nodeTaints: sdkClient.unmarshalArrayOfObject(
242
- data.node_taints,
243
- unmarshalExternalNodeCoreV1Taint
244
- ),
245
- poolVersion: data.pool_version,
246
- runcVersion: data.runc_version
247
- };
248
- };
249
- const unmarshalExternalNodeAuth = (data) => {
250
- if (!sdkClient.isJSONObject(data)) {
251
- throw new TypeError(
252
- `Unmarshalling the type 'ExternalNodeAuth' failed as data isn't a dictionary.`
253
- );
254
- }
255
- return {
256
- metadataUrl: data.metadata_url,
257
- nodeSecretKey: data.node_secret_key
258
- };
259
- };
260
- const unmarshalListClusterACLRulesResponse = (data) => {
261
- if (!sdkClient.isJSONObject(data)) {
262
- throw new TypeError(
263
- `Unmarshalling the type 'ListClusterACLRulesResponse' failed as data isn't a dictionary.`
264
- );
265
- }
266
- return {
267
- rules: sdkClient.unmarshalArrayOfObject(data.rules, unmarshalACLRule),
268
- totalCount: data.total_count
269
- };
270
- };
271
- const unmarshalClusterType = (data) => {
272
- if (!sdkClient.isJSONObject(data)) {
273
- throw new TypeError(
274
- `Unmarshalling the type 'ClusterType' failed as data isn't a dictionary.`
275
- );
276
- }
277
- return {
278
- auditLogsSupported: data.audit_logs_supported,
279
- availability: data.availability,
280
- commitmentDelay: data.commitment_delay,
281
- dedicated: data.dedicated,
282
- maxEtcdSize: data.max_etcd_size,
283
- maxNodes: data.max_nodes,
284
- memory: data.memory,
285
- name: data.name,
286
- resiliency: data.resiliency,
287
- sla: data.sla
288
- };
289
- };
290
- const unmarshalListClusterAvailableTypesResponse = (data) => {
291
- if (!sdkClient.isJSONObject(data)) {
292
- throw new TypeError(
293
- `Unmarshalling the type 'ListClusterAvailableTypesResponse' failed as data isn't a dictionary.`
294
- );
295
- }
296
- return {
297
- clusterTypes: sdkClient.unmarshalArrayOfObject(
298
- data.cluster_types,
299
- unmarshalClusterType
300
- ),
301
- totalCount: data.total_count
302
- };
303
- };
304
- const unmarshalListClusterAvailableVersionsResponse = (data) => {
305
- if (!sdkClient.isJSONObject(data)) {
306
- throw new TypeError(
307
- `Unmarshalling the type 'ListClusterAvailableVersionsResponse' failed as data isn't a dictionary.`
308
- );
309
- }
310
- return {
311
- versions: sdkClient.unmarshalArrayOfObject(data.versions, unmarshalVersion)
312
- };
313
- };
314
- const unmarshalListClusterTypesResponse = (data) => {
315
- if (!sdkClient.isJSONObject(data)) {
316
- throw new TypeError(
317
- `Unmarshalling the type 'ListClusterTypesResponse' failed as data isn't a dictionary.`
318
- );
319
- }
320
- return {
321
- clusterTypes: sdkClient.unmarshalArrayOfObject(
322
- data.cluster_types,
323
- unmarshalClusterType
324
- ),
325
- totalCount: data.total_count
326
- };
327
- };
328
- const unmarshalListClustersResponse = (data) => {
329
- if (!sdkClient.isJSONObject(data)) {
330
- throw new TypeError(
331
- `Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`
332
- );
333
- }
334
- return {
335
- clusters: sdkClient.unmarshalArrayOfObject(data.clusters, unmarshalCluster),
336
- totalCount: data.total_count
337
- };
338
- };
339
- const unmarshalListNodesResponse = (data) => {
340
- if (!sdkClient.isJSONObject(data)) {
341
- throw new TypeError(
342
- `Unmarshalling the type 'ListNodesResponse' failed as data isn't a dictionary.`
343
- );
344
- }
345
- return {
346
- nodes: sdkClient.unmarshalArrayOfObject(data.nodes, unmarshalNode),
347
- totalCount: data.total_count
348
- };
349
- };
350
- const unmarshalListPoolsResponse = (data) => {
351
- if (!sdkClient.isJSONObject(data)) {
352
- throw new TypeError(
353
- `Unmarshalling the type 'ListPoolsResponse' failed as data isn't a dictionary.`
354
- );
355
- }
356
- return {
357
- pools: sdkClient.unmarshalArrayOfObject(data.pools, unmarshalPool),
358
- totalCount: data.total_count
359
- };
360
- };
361
- const unmarshalListVersionsResponse = (data) => {
362
- if (!sdkClient.isJSONObject(data)) {
363
- throw new TypeError(
364
- `Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`
365
- );
366
- }
367
- return {
368
- versions: sdkClient.unmarshalArrayOfObject(data.versions, unmarshalVersion)
369
- };
370
- };
371
- const unmarshalNodeMetadataCoreV1Taint = (data) => {
372
- if (!sdkClient.isJSONObject(data)) {
373
- throw new TypeError(
374
- `Unmarshalling the type 'NodeMetadataCoreV1Taint' failed as data isn't a dictionary.`
375
- );
376
- }
377
- return {
378
- effect: data.effect,
379
- key: data.key,
380
- value: data.value
381
- };
382
- };
383
- const unmarshalNodeMetadata = (data) => {
384
- if (!sdkClient.isJSONObject(data)) {
385
- throw new TypeError(
386
- `Unmarshalling the type 'NodeMetadata' failed as data isn't a dictionary.`
387
- );
388
- }
389
- return {
390
- clusterCa: data.cluster_ca,
391
- clusterUrl: data.cluster_url,
392
- credentialProviderConfig: data.credential_provider_config,
393
- externalIp: data.external_ip,
394
- hasGpu: data.has_gpu,
395
- id: data.id,
396
- installerTags: data.installer_tags,
397
- kubeletConfig: data.kubelet_config,
398
- name: data.name,
399
- nodeLabels: data.node_labels,
400
- nodeTaints: sdkClient.unmarshalArrayOfObject(
401
- data.node_taints,
402
- unmarshalNodeMetadataCoreV1Taint
403
- ),
404
- poolVersion: data.pool_version,
405
- providerId: data.provider_id,
406
- repoUri: data.repo_uri,
407
- resolvconfPath: data.resolvconf_path,
408
- templateArgs: data.template_args,
409
- updaterBinPath: data.updater_bin_path,
410
- updaterBinUrl: data.updater_bin_url,
411
- updaterBinVersion: data.updater_bin_version
412
- };
413
- };
414
- const unmarshalSetClusterACLRulesResponse = (data) => {
415
- if (!sdkClient.isJSONObject(data)) {
416
- throw new TypeError(
417
- `Unmarshalling the type 'SetClusterACLRulesResponse' failed as data isn't a dictionary.`
418
- );
419
- }
420
- return {
421
- rules: sdkClient.unmarshalArrayOfObject(data.rules, unmarshalACLRule)
422
- };
423
- };
424
- const marshalACLRuleRequest = (request, defaults) => ({
425
- description: request.description,
426
- ...sdkClient.resolveOneOf([
427
- { param: "ip", value: request.ip },
428
- { param: "scaleway_ranges", value: request.scalewayRanges }
429
- ])
430
- });
431
- const marshalAddClusterACLRulesRequest = (request, defaults) => ({
432
- acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt)) : void 0
433
- });
434
- const marshalMaintenanceWindow = (request, defaults) => ({
435
- day: request.day,
436
- start_hour: request.startHour
437
- });
438
- const marshalCreateClusterRequestPoolConfigUpgradePolicy = (request, defaults) => ({
439
- max_surge: request.maxSurge,
440
- max_unavailable: request.maxUnavailable
441
- });
442
- const marshalCreateClusterRequestAutoUpgrade = (request, defaults) => ({
443
- enable: request.enable,
444
- maintenance_window: request.maintenanceWindow !== void 0 ? marshalMaintenanceWindow(request.maintenanceWindow) : void 0
445
- });
446
- const marshalCreateClusterRequestAutoscalerConfig = (request, defaults) => ({
447
- balance_similar_node_groups: request.balanceSimilarNodeGroups,
448
- estimator: request.estimator,
449
- expander: request.expander,
450
- expendable_pods_priority_cutoff: request.expendablePodsPriorityCutoff,
451
- ignore_daemonsets_utilization: request.ignoreDaemonsetsUtilization,
452
- max_graceful_termination_sec: request.maxGracefulTerminationSec,
453
- scale_down_delay_after_add: request.scaleDownDelayAfterAdd,
454
- scale_down_disabled: request.scaleDownDisabled,
455
- scale_down_unneeded_time: request.scaleDownUnneededTime,
456
- scale_down_utilization_threshold: request.scaleDownUtilizationThreshold
457
- });
458
- const marshalCreateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
459
- client_id: request.clientId,
460
- groups_claim: request.groupsClaim,
461
- groups_prefix: request.groupsPrefix,
462
- issuer_url: request.issuerUrl,
463
- required_claim: request.requiredClaim,
464
- username_claim: request.usernameClaim,
465
- username_prefix: request.usernamePrefix
466
- });
467
- const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
468
- autohealing: request.autohealing,
469
- autoscaling: request.autoscaling,
470
- container_runtime: request.containerRuntime,
471
- kubelet_args: request.kubeletArgs,
472
- max_size: request.maxSize,
473
- min_size: request.minSize,
474
- name: request.name,
475
- node_type: request.nodeType,
476
- placement_group_id: request.placementGroupId,
477
- public_ip_disabled: request.publicIpDisabled,
478
- root_volume_size: request.rootVolumeSize,
479
- root_volume_type: request.rootVolumeType,
480
- security_group_id: request.securityGroupId,
481
- size: request.size,
482
- tags: request.tags,
483
- upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreateClusterRequestPoolConfigUpgradePolicy(
484
- request.upgradePolicy
485
- ) : void 0,
486
- zone: request.zone
487
- });
488
- const marshalCreateClusterRequest = (request, defaults) => ({
489
- admission_plugins: request.admissionPlugins,
490
- apiserver_cert_sans: request.apiserverCertSans,
491
- auto_upgrade: request.autoUpgrade !== void 0 ? marshalCreateClusterRequestAutoUpgrade(request.autoUpgrade) : void 0,
492
- autoscaler_config: request.autoscalerConfig !== void 0 ? marshalCreateClusterRequestAutoscalerConfig(
493
- request.autoscalerConfig
494
- ) : void 0,
495
- cni: request.cni,
496
- description: request.description,
497
- feature_gates: request.featureGates,
498
- name: request.name || randomName("k8s"),
499
- open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalCreateClusterRequestOpenIDConnectConfig(
500
- request.openIdConnectConfig
501
- ) : void 0,
502
- pod_cidr: request.podCidr,
503
- pools: request.pools !== void 0 ? request.pools.map(
504
- (elt) => marshalCreateClusterRequestPoolConfig(elt)
505
- ) : void 0,
506
- private_network_id: request.privateNetworkId,
507
- service_cidr: request.serviceCidr,
508
- service_dns_ip: request.serviceDnsIp,
509
- tags: request.tags,
510
- type: request.type,
511
- version: request.version,
512
- ...sdkClient.resolveOneOf([
513
- {
514
- default: defaults.defaultProjectId,
515
- param: "project_id",
516
- value: request.projectId
517
- },
518
- {
519
- default: defaults.defaultOrganizationId,
520
- param: "organization_id",
521
- value: request.organizationId
522
- }
523
- ])
524
- });
525
- const marshalCreatePoolRequestUpgradePolicy = (request, defaults) => ({
526
- max_surge: request.maxSurge,
527
- max_unavailable: request.maxUnavailable
528
- });
529
- const marshalCreatePoolRequest = (request, defaults) => ({
530
- autohealing: request.autohealing,
531
- autoscaling: request.autoscaling,
532
- container_runtime: request.containerRuntime,
533
- kubelet_args: request.kubeletArgs !== void 0 ? request.kubeletArgs : void 0,
534
- max_size: request.maxSize,
535
- min_size: request.minSize,
536
- name: request.name || randomName("pool"),
537
- node_type: request.nodeType,
538
- placement_group_id: request.placementGroupId,
539
- public_ip_disabled: request.publicIpDisabled,
540
- root_volume_size: request.rootVolumeSize,
541
- root_volume_type: request.rootVolumeType,
542
- security_group_id: request.securityGroupId,
543
- size: request.size,
544
- tags: request.tags,
545
- upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreatePoolRequestUpgradePolicy(request.upgradePolicy) : void 0,
546
- zone: request.zone ?? defaults.defaultZone
547
- });
548
- const marshalMigratePoolsToNewImagesRequest = (request, defaults) => ({
549
- pool_ids: request.poolIds
550
- });
551
- const marshalSetClusterACLRulesRequest = (request, defaults) => ({
552
- acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt)) : void 0
553
- });
554
- const marshalSetClusterTypeRequest = (request, defaults) => ({
555
- type: request.type
556
- });
557
- const marshalUpdateClusterRequestAutoUpgrade = (request, defaults) => ({
558
- enable: request.enable,
559
- maintenance_window: request.maintenanceWindow !== void 0 ? marshalMaintenanceWindow(request.maintenanceWindow) : void 0
560
- });
561
- const marshalUpdateClusterRequestAutoscalerConfig = (request, defaults) => ({
562
- balance_similar_node_groups: request.balanceSimilarNodeGroups,
563
- estimator: request.estimator,
564
- expander: request.expander,
565
- expendable_pods_priority_cutoff: request.expendablePodsPriorityCutoff,
566
- ignore_daemonsets_utilization: request.ignoreDaemonsetsUtilization,
567
- max_graceful_termination_sec: request.maxGracefulTerminationSec,
568
- scale_down_delay_after_add: request.scaleDownDelayAfterAdd,
569
- scale_down_disabled: request.scaleDownDisabled,
570
- scale_down_unneeded_time: request.scaleDownUnneededTime,
571
- scale_down_utilization_threshold: request.scaleDownUtilizationThreshold
572
- });
573
- const marshalUpdateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
574
- client_id: request.clientId,
575
- groups_claim: request.groupsClaim,
576
- groups_prefix: request.groupsPrefix,
577
- issuer_url: request.issuerUrl,
578
- required_claim: request.requiredClaim,
579
- username_claim: request.usernameClaim,
580
- username_prefix: request.usernamePrefix
581
- });
582
- const marshalUpdateClusterRequest = (request, defaults) => ({
583
- admission_plugins: request.admissionPlugins,
584
- apiserver_cert_sans: request.apiserverCertSans,
585
- auto_upgrade: request.autoUpgrade !== void 0 ? marshalUpdateClusterRequestAutoUpgrade(request.autoUpgrade) : void 0,
586
- autoscaler_config: request.autoscalerConfig !== void 0 ? marshalUpdateClusterRequestAutoscalerConfig(
587
- request.autoscalerConfig
588
- ) : void 0,
589
- description: request.description,
590
- feature_gates: request.featureGates,
591
- name: request.name,
592
- open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalUpdateClusterRequestOpenIDConnectConfig(
593
- request.openIdConnectConfig
594
- ) : void 0,
595
- tags: request.tags
596
- });
597
- const marshalUpdatePoolRequestUpgradePolicy = (request, defaults) => ({
598
- max_surge: request.maxSurge,
599
- max_unavailable: request.maxUnavailable
600
- });
601
- const marshalUpdatePoolRequest = (request, defaults) => ({
602
- autohealing: request.autohealing,
603
- autoscaling: request.autoscaling,
604
- kubelet_args: request.kubeletArgs,
605
- max_size: request.maxSize,
606
- min_size: request.minSize,
607
- size: request.size,
608
- tags: request.tags,
609
- upgrade_policy: request.upgradePolicy !== void 0 ? marshalUpdatePoolRequestUpgradePolicy(request.upgradePolicy) : void 0
610
- });
611
- const marshalUpgradeClusterRequest = (request, defaults) => ({
612
- upgrade_pools: request.upgradePools,
613
- version: request.version
614
- });
615
- const marshalUpgradePoolRequest = (request, defaults) => ({
616
- version: request.version
617
- });
618
- exports.marshalAddClusterACLRulesRequest = marshalAddClusterACLRulesRequest;
619
- exports.marshalCreateClusterRequest = marshalCreateClusterRequest;
620
- exports.marshalCreatePoolRequest = marshalCreatePoolRequest;
621
- exports.marshalMigratePoolsToNewImagesRequest = marshalMigratePoolsToNewImagesRequest;
622
- exports.marshalSetClusterACLRulesRequest = marshalSetClusterACLRulesRequest;
623
- exports.marshalSetClusterTypeRequest = marshalSetClusterTypeRequest;
624
- exports.marshalUpdateClusterRequest = marshalUpdateClusterRequest;
625
- exports.marshalUpdatePoolRequest = marshalUpdatePoolRequest;
626
- exports.marshalUpgradeClusterRequest = marshalUpgradeClusterRequest;
627
- exports.marshalUpgradePoolRequest = marshalUpgradePoolRequest;
628
- exports.unmarshalAddClusterACLRulesResponse = unmarshalAddClusterACLRulesResponse;
629
- exports.unmarshalCluster = unmarshalCluster;
630
- exports.unmarshalExternalNode = unmarshalExternalNode;
631
- exports.unmarshalExternalNodeAuth = unmarshalExternalNodeAuth;
632
- exports.unmarshalListClusterACLRulesResponse = unmarshalListClusterACLRulesResponse;
633
- exports.unmarshalListClusterAvailableTypesResponse = unmarshalListClusterAvailableTypesResponse;
634
- exports.unmarshalListClusterAvailableVersionsResponse = unmarshalListClusterAvailableVersionsResponse;
635
- exports.unmarshalListClusterTypesResponse = unmarshalListClusterTypesResponse;
636
- exports.unmarshalListClustersResponse = unmarshalListClustersResponse;
637
- exports.unmarshalListNodesResponse = unmarshalListNodesResponse;
638
- exports.unmarshalListPoolsResponse = unmarshalListPoolsResponse;
639
- exports.unmarshalListVersionsResponse = unmarshalListVersionsResponse;
640
- exports.unmarshalNode = unmarshalNode;
641
- exports.unmarshalNodeMetadata = unmarshalNodeMetadata;
642
- exports.unmarshalPool = unmarshalPool;
643
- exports.unmarshalSetClusterACLRulesResponse = unmarshalSetClusterACLRulesResponse;
644
- exports.unmarshalVersion = unmarshalVersion;