-
Notifications
You must be signed in to change notification settings - Fork 867
/
classes.rb
7662 lines (6425 loc) · 340 KB
/
classes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ContainerV1
# AcceleratorConfig represents a Hardware Accelerator request.
class AcceleratorConfig
include Google::Apis::Core::Hashable
# The number of the accelerator cards exposed to an instance.
# Corresponds to the JSON property `acceleratorCount`
# @return [Fixnum]
attr_accessor :accelerator_count
# The accelerator type resource name. List of supported accelerators [here](
# https://cloud.google.com/compute/docs/gpus)
# Corresponds to the JSON property `acceleratorType`
# @return [String]
attr_accessor :accelerator_type
# GPUDriverInstallationConfig specifies the version of GPU driver to be auto
# installed.
# Corresponds to the JSON property `gpuDriverInstallationConfig`
# @return [Google::Apis::ContainerV1::GpuDriverInstallationConfig]
attr_accessor :gpu_driver_installation_config
# Size of partitions to create on the GPU. Valid values are described in the
# NVIDIA [mig user guide](https://docs.nvidia.com/datacenter/tesla/mig-user-
# guide/#partitioning).
# Corresponds to the JSON property `gpuPartitionSize`
# @return [String]
attr_accessor :gpu_partition_size
# GPUSharingConfig represents the GPU sharing configuration for Hardware
# Accelerators.
# Corresponds to the JSON property `gpuSharingConfig`
# @return [Google::Apis::ContainerV1::GpuSharingConfig]
attr_accessor :gpu_sharing_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@accelerator_count = args[:accelerator_count] if args.key?(:accelerator_count)
@accelerator_type = args[:accelerator_type] if args.key?(:accelerator_type)
@gpu_driver_installation_config = args[:gpu_driver_installation_config] if args.key?(:gpu_driver_installation_config)
@gpu_partition_size = args[:gpu_partition_size] if args.key?(:gpu_partition_size)
@gpu_sharing_config = args[:gpu_sharing_config] if args.key?(:gpu_sharing_config)
end
end
# AdditionalNodeNetworkConfig is the configuration for additional node networks
# within the NodeNetworkConfig message
class AdditionalNodeNetworkConfig
include Google::Apis::Core::Hashable
# Name of the VPC where the additional interface belongs
# Corresponds to the JSON property `network`
# @return [String]
attr_accessor :network
# Name of the subnetwork where the additional interface belongs
# Corresponds to the JSON property `subnetwork`
# @return [String]
attr_accessor :subnetwork
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@network = args[:network] if args.key?(:network)
@subnetwork = args[:subnetwork] if args.key?(:subnetwork)
end
end
# AdditionalPodNetworkConfig is the configuration for additional pod networks
# within the NodeNetworkConfig message
class AdditionalPodNetworkConfig
include Google::Apis::Core::Hashable
# Constraints applied to pods.
# Corresponds to the JSON property `maxPodsPerNode`
# @return [Google::Apis::ContainerV1::MaxPodsConstraint]
attr_accessor :max_pods_per_node
# The name of the secondary range on the subnet which provides IP address for
# this pod range
# Corresponds to the JSON property `secondaryPodRange`
# @return [String]
attr_accessor :secondary_pod_range
# Name of the subnetwork where the additional pod network belongs
# Corresponds to the JSON property `subnetwork`
# @return [String]
attr_accessor :subnetwork
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@max_pods_per_node = args[:max_pods_per_node] if args.key?(:max_pods_per_node)
@secondary_pod_range = args[:secondary_pod_range] if args.key?(:secondary_pod_range)
@subnetwork = args[:subnetwork] if args.key?(:subnetwork)
end
end
# AdditionalPodRangesConfig is the configuration for additional pod secondary
# ranges supporting the ClusterUpdate message.
class AdditionalPodRangesConfig
include Google::Apis::Core::Hashable
# Output only. [Output only] Information for additional pod range.
# Corresponds to the JSON property `podRangeInfo`
# @return [Array<Google::Apis::ContainerV1::RangeInfo>]
attr_accessor :pod_range_info
# Name for pod secondary ipv4 range which has the actual range defined ahead.
# Corresponds to the JSON property `podRangeNames`
# @return [Array<String>]
attr_accessor :pod_range_names
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@pod_range_info = args[:pod_range_info] if args.key?(:pod_range_info)
@pod_range_names = args[:pod_range_names] if args.key?(:pod_range_names)
end
end
# Configuration for the addons that can be automatically spun up in the cluster,
# enabling additional functionality.
class AddonsConfig
include Google::Apis::Core::Hashable
# Configuration options for the Cloud Run feature.
# Corresponds to the JSON property `cloudRunConfig`
# @return [Google::Apis::ContainerV1::CloudRunConfig]
attr_accessor :cloud_run_config
# Configuration options for the Config Connector add-on.
# Corresponds to the JSON property `configConnectorConfig`
# @return [Google::Apis::ContainerV1::ConfigConnectorConfig]
attr_accessor :config_connector_config
# Configuration for NodeLocal DNSCache
# Corresponds to the JSON property `dnsCacheConfig`
# @return [Google::Apis::ContainerV1::DnsCacheConfig]
attr_accessor :dns_cache_config
# Configuration for the Compute Engine PD CSI driver.
# Corresponds to the JSON property `gcePersistentDiskCsiDriverConfig`
# @return [Google::Apis::ContainerV1::GcePersistentDiskCsiDriverConfig]
attr_accessor :gce_persistent_disk_csi_driver_config
# Configuration for the GCP Filestore CSI driver.
# Corresponds to the JSON property `gcpFilestoreCsiDriverConfig`
# @return [Google::Apis::ContainerV1::GcpFilestoreCsiDriverConfig]
attr_accessor :gcp_filestore_csi_driver_config
# Configuration for the Cloud Storage Fuse CSI driver.
# Corresponds to the JSON property `gcsFuseCsiDriverConfig`
# @return [Google::Apis::ContainerV1::GcsFuseCsiDriverConfig]
attr_accessor :gcs_fuse_csi_driver_config
# Configuration for the Backup for GKE Agent.
# Corresponds to the JSON property `gkeBackupAgentConfig`
# @return [Google::Apis::ContainerV1::GkeBackupAgentConfig]
attr_accessor :gke_backup_agent_config
# Configuration options for the horizontal pod autoscaling feature, which
# increases or decreases the number of replica pods a replication controller has
# based on the resource usage of the existing pods.
# Corresponds to the JSON property `horizontalPodAutoscaling`
# @return [Google::Apis::ContainerV1::HorizontalPodAutoscaling]
attr_accessor :horizontal_pod_autoscaling
# Configuration options for the HTTP (L7) load balancing controller addon, which
# makes it easy to set up HTTP load balancers for services in a cluster.
# Corresponds to the JSON property `httpLoadBalancing`
# @return [Google::Apis::ContainerV1::HttpLoadBalancing]
attr_accessor :http_load_balancing
# Configuration for the Kubernetes Dashboard.
# Corresponds to the JSON property `kubernetesDashboard`
# @return [Google::Apis::ContainerV1::KubernetesDashboard]
attr_accessor :kubernetes_dashboard
# Configuration for NetworkPolicy. This only tracks whether the addon is enabled
# or not on the Master, it does not track whether network policy is enabled for
# the nodes.
# Corresponds to the JSON property `networkPolicyConfig`
# @return [Google::Apis::ContainerV1::NetworkPolicyConfig]
attr_accessor :network_policy_config
# Configuration for the Stateful HA add-on.
# Corresponds to the JSON property `statefulHaConfig`
# @return [Google::Apis::ContainerV1::StatefulHaConfig]
attr_accessor :stateful_ha_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cloud_run_config = args[:cloud_run_config] if args.key?(:cloud_run_config)
@config_connector_config = args[:config_connector_config] if args.key?(:config_connector_config)
@dns_cache_config = args[:dns_cache_config] if args.key?(:dns_cache_config)
@gce_persistent_disk_csi_driver_config = args[:gce_persistent_disk_csi_driver_config] if args.key?(:gce_persistent_disk_csi_driver_config)
@gcp_filestore_csi_driver_config = args[:gcp_filestore_csi_driver_config] if args.key?(:gcp_filestore_csi_driver_config)
@gcs_fuse_csi_driver_config = args[:gcs_fuse_csi_driver_config] if args.key?(:gcs_fuse_csi_driver_config)
@gke_backup_agent_config = args[:gke_backup_agent_config] if args.key?(:gke_backup_agent_config)
@horizontal_pod_autoscaling = args[:horizontal_pod_autoscaling] if args.key?(:horizontal_pod_autoscaling)
@http_load_balancing = args[:http_load_balancing] if args.key?(:http_load_balancing)
@kubernetes_dashboard = args[:kubernetes_dashboard] if args.key?(:kubernetes_dashboard)
@network_policy_config = args[:network_policy_config] if args.key?(:network_policy_config)
@stateful_ha_config = args[:stateful_ha_config] if args.key?(:stateful_ha_config)
end
end
# AdvancedDatapathObservabilityConfig specifies configuration of observability
# features of advanced datapath.
class AdvancedDatapathObservabilityConfig
include Google::Apis::Core::Hashable
# Expose flow metrics on nodes
# Corresponds to the JSON property `enableMetrics`
# @return [Boolean]
attr_accessor :enable_metrics
alias_method :enable_metrics?, :enable_metrics
# Enable Relay component
# Corresponds to the JSON property `enableRelay`
# @return [Boolean]
attr_accessor :enable_relay
alias_method :enable_relay?, :enable_relay
# Method used to make Relay available
# Corresponds to the JSON property `relayMode`
# @return [String]
attr_accessor :relay_mode
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enable_metrics = args[:enable_metrics] if args.key?(:enable_metrics)
@enable_relay = args[:enable_relay] if args.key?(:enable_relay)
@relay_mode = args[:relay_mode] if args.key?(:relay_mode)
end
end
# Specifies options for controlling advanced machine features.
class AdvancedMachineFeatures
include Google::Apis::Core::Hashable
# Whether or not to enable nested virtualization (defaults to false).
# Corresponds to the JSON property `enableNestedVirtualization`
# @return [Boolean]
attr_accessor :enable_nested_virtualization
alias_method :enable_nested_virtualization?, :enable_nested_virtualization
# The number of threads per physical core. To disable simultaneous
# multithreading (SMT) set this to 1. If unset, the maximum number of threads
# supported per core by the underlying processor is assumed.
# Corresponds to the JSON property `threadsPerCore`
# @return [Fixnum]
attr_accessor :threads_per_core
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enable_nested_virtualization = args[:enable_nested_virtualization] if args.key?(:enable_nested_virtualization)
@threads_per_core = args[:threads_per_core] if args.key?(:threads_per_core)
end
end
# Configuration for returning group information from authenticators.
class AuthenticatorGroupsConfig
include Google::Apis::Core::Hashable
# Whether this cluster should return group membership lookups during
# authentication using a group of security groups.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
# The name of the security group-of-groups to be used. Only relevant if enabled =
# true.
# Corresponds to the JSON property `securityGroup`
# @return [String]
attr_accessor :security_group
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
@security_group = args[:security_group] if args.key?(:security_group)
end
end
# AutoUpgradeOptions defines the set of options for the user to control how the
# Auto Upgrades will proceed.
class AutoUpgradeOptions
include Google::Apis::Core::Hashable
# [Output only] This field is set when upgrades are about to commence with the
# approximate start time for the upgrades, in [RFC3339](https://www.ietf.org/rfc/
# rfc3339.txt) text format.
# Corresponds to the JSON property `autoUpgradeStartTime`
# @return [String]
attr_accessor :auto_upgrade_start_time
# [Output only] This field is set when upgrades are about to commence with the
# description of the upgrade.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@auto_upgrade_start_time = args[:auto_upgrade_start_time] if args.key?(:auto_upgrade_start_time)
@description = args[:description] if args.key?(:description)
end
end
# Autopilot is the configuration for Autopilot settings on the cluster.
class Autopilot
include Google::Apis::Core::Hashable
# Enable Autopilot
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
# WorkloadPolicyConfig is the configuration of workload policy for autopilot
# clusters.
# Corresponds to the JSON property `workloadPolicyConfig`
# @return [Google::Apis::ContainerV1::WorkloadPolicyConfig]
attr_accessor :workload_policy_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
@workload_policy_config = args[:workload_policy_config] if args.key?(:workload_policy_config)
end
end
# AutopilotCompatibilityIssue contains information about a specific
# compatibility issue with Autopilot mode.
class AutopilotCompatibilityIssue
include Google::Apis::Core::Hashable
# The constraint type of the issue.
# Corresponds to the JSON property `constraintType`
# @return [String]
attr_accessor :constraint_type
# The description of the issue.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# A URL to a public documnetation, which addresses resolving this issue.
# Corresponds to the JSON property `documentationUrl`
# @return [String]
attr_accessor :documentation_url
# The incompatibility type of this issue.
# Corresponds to the JSON property `incompatibilityType`
# @return [String]
attr_accessor :incompatibility_type
# The last time when this issue was observed.
# Corresponds to the JSON property `lastObservation`
# @return [String]
attr_accessor :last_observation
# The name of the resources which are subject to this issue.
# Corresponds to the JSON property `subjects`
# @return [Array<String>]
attr_accessor :subjects
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@constraint_type = args[:constraint_type] if args.key?(:constraint_type)
@description = args[:description] if args.key?(:description)
@documentation_url = args[:documentation_url] if args.key?(:documentation_url)
@incompatibility_type = args[:incompatibility_type] if args.key?(:incompatibility_type)
@last_observation = args[:last_observation] if args.key?(:last_observation)
@subjects = args[:subjects] if args.key?(:subjects)
end
end
# AutoprovisioningNodePoolDefaults contains defaults for a node pool created by
# NAP.
class AutoprovisioningNodePoolDefaults
include Google::Apis::Core::Hashable
# The Customer Managed Encryption Key used to encrypt the boot disk attached to
# each node in the node pool. This should be of the form projects/[
# KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]
# . For more information about protecting resources with Cloud KMS Keys please
# see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption
# Corresponds to the JSON property `bootDiskKmsKey`
# @return [String]
attr_accessor :boot_disk_kms_key
# Size of the disk attached to each node, specified in GB. The smallest allowed
# disk size is 10GB. If unspecified, the default disk size is 100GB.
# Corresponds to the JSON property `diskSizeGb`
# @return [Fixnum]
attr_accessor :disk_size_gb
# Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or 'pd-
# balanced') If unspecified, the default disk type is 'pd-standard'
# Corresponds to the JSON property `diskType`
# @return [String]
attr_accessor :disk_type
# The image type to use for NAP created node. Please see https://cloud.google.
# com/kubernetes-engine/docs/concepts/node-images for available image types.
# Corresponds to the JSON property `imageType`
# @return [String]
attr_accessor :image_type
# Enable or disable Kubelet read only port.
# Corresponds to the JSON property `insecureKubeletReadonlyPortEnabled`
# @return [Boolean]
attr_accessor :insecure_kubelet_readonly_port_enabled
alias_method :insecure_kubelet_readonly_port_enabled?, :insecure_kubelet_readonly_port_enabled
# NodeManagement defines the set of node management services turned on for the
# node pool.
# Corresponds to the JSON property `management`
# @return [Google::Apis::ContainerV1::NodeManagement]
attr_accessor :management
# Deprecated. Minimum CPU platform to be used for NAP created node pools. The
# instance may be scheduled on the specified or newer CPU platform. Applicable
# values are the friendly names of CPU platforms, such as minCpuPlatform: Intel
# Haswell or minCpuPlatform: Intel Sandy Bridge. For more information, read [how
# to specify min CPU platform](https://cloud.google.com/compute/docs/instances/
# specify-min-cpu-platform). This field is deprecated, min_cpu_platform should
# be specified using `cloud.google.com/requested-min-cpu-platform` label
# selector on the pod. To unset the min cpu platform field pass "automatic" as
# field value.
# Corresponds to the JSON property `minCpuPlatform`
# @return [String]
attr_accessor :min_cpu_platform
# Scopes that are used by NAP when creating node pools.
# Corresponds to the JSON property `oauthScopes`
# @return [Array<String>]
attr_accessor :oauth_scopes
# The Google Cloud Platform Service Account to be used by the node VMs.
# Corresponds to the JSON property `serviceAccount`
# @return [String]
attr_accessor :service_account
# A set of Shielded Instance options.
# Corresponds to the JSON property `shieldedInstanceConfig`
# @return [Google::Apis::ContainerV1::ShieldedInstanceConfig]
attr_accessor :shielded_instance_config
# These upgrade settings control the level of parallelism and the level of
# disruption caused by an upgrade. maxUnavailable controls the number of nodes
# that can be simultaneously unavailable. maxSurge controls the number of
# additional nodes that can be added to the node pool temporarily for the time
# of the upgrade to increase the number of available nodes. (maxUnavailable +
# maxSurge) determines the level of parallelism (how many nodes are being
# upgraded at the same time). Note: upgrades inevitably introduce some
# disruption since workloads need to be moved from old nodes to new, upgraded
# ones. Even if maxUnavailable=0, this holds true. (Disruption stays within the
# limits of PodDisruptionBudget, if it is configured.) Consider a hypothetical
# node pool with 5 nodes having maxSurge=2, maxUnavailable=1. This means the
# upgrade process upgrades 3 nodes simultaneously. It creates 2 additional (
# upgraded) nodes, then it brings down 3 old (not yet upgraded) nodes at the
# same time. This ensures that there are always at least 4 nodes available.
# These upgrade settings configure the upgrade strategy for the node pool. Use
# strategy to switch between the strategies applied to the node pool. If the
# strategy is ROLLING, use max_surge and max_unavailable to control the level of
# parallelism and the level of disruption caused by upgrade. 1. maxSurge
# controls the number of additional nodes that can be added to the node pool
# temporarily for the time of the upgrade to increase the number of available
# nodes. 2. maxUnavailable controls the number of nodes that can be
# simultaneously unavailable. 3. (maxUnavailable + maxSurge) determines the
# level of parallelism (how many nodes are being upgraded at the same time). If
# the strategy is BLUE_GREEN, use blue_green_settings to configure the blue-
# green upgrade related settings. 1. standard_rollout_policy is the default
# policy. The policy is used to control the way blue pool gets drained. The
# draining is executed in the batch mode. The batch size could be specified as
# either percentage of the node pool size or the number of nodes.
# batch_soak_duration is the soak time after each batch gets drained. 2.
# node_pool_soak_duration is the soak time after all blue nodes are drained.
# After this period, the blue pool nodes will be deleted.
# Corresponds to the JSON property `upgradeSettings`
# @return [Google::Apis::ContainerV1::UpgradeSettings]
attr_accessor :upgrade_settings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@boot_disk_kms_key = args[:boot_disk_kms_key] if args.key?(:boot_disk_kms_key)
@disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
@disk_type = args[:disk_type] if args.key?(:disk_type)
@image_type = args[:image_type] if args.key?(:image_type)
@insecure_kubelet_readonly_port_enabled = args[:insecure_kubelet_readonly_port_enabled] if args.key?(:insecure_kubelet_readonly_port_enabled)
@management = args[:management] if args.key?(:management)
@min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform)
@oauth_scopes = args[:oauth_scopes] if args.key?(:oauth_scopes)
@service_account = args[:service_account] if args.key?(:service_account)
@shielded_instance_config = args[:shielded_instance_config] if args.key?(:shielded_instance_config)
@upgrade_settings = args[:upgrade_settings] if args.key?(:upgrade_settings)
end
end
# Best effort provisioning.
class BestEffortProvisioning
include Google::Apis::Core::Hashable
# When this is enabled, cluster/node pool creations will ignore non-fatal errors
# like stockout to best provision as many nodes as possible right now and
# eventually bring up all target number of nodes
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
# Minimum number of nodes to be provisioned to be considered as succeeded, and
# the rest of nodes will be provisioned gradually and eventually when stockout
# issue has been resolved.
# Corresponds to the JSON property `minProvisionNodes`
# @return [Fixnum]
attr_accessor :min_provision_nodes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
@min_provision_nodes = args[:min_provision_nodes] if args.key?(:min_provision_nodes)
end
end
# Parameters for using BigQuery as the destination of resource usage export.
class BigQueryDestination
include Google::Apis::Core::Hashable
# The ID of a BigQuery Dataset.
# Corresponds to the JSON property `datasetId`
# @return [String]
attr_accessor :dataset_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@dataset_id = args[:dataset_id] if args.key?(:dataset_id)
end
end
# Configuration for Binary Authorization.
class BinaryAuthorization
include Google::Apis::Core::Hashable
# This field is deprecated. Leave this unset and instead configure
# BinaryAuthorization using evaluation_mode. If evaluation_mode is set to
# anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
# Mode of operation for binauthz policy evaluation. If unspecified, defaults to
# DISABLED.
# Corresponds to the JSON property `evaluationMode`
# @return [String]
attr_accessor :evaluation_mode
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
@evaluation_mode = args[:evaluation_mode] if args.key?(:evaluation_mode)
end
end
# Information relevant to blue-green upgrade.
class BlueGreenInfo
include Google::Apis::Core::Hashable
# The resource URLs of the [managed instance groups] (/compute/docs/instance-
# groups/creating-groups-of-managed-instances) associated with blue pool.
# Corresponds to the JSON property `blueInstanceGroupUrls`
# @return [Array<String>]
attr_accessor :blue_instance_group_urls
# Time to start deleting blue pool to complete blue-green upgrade, in [RFC3339](
# https://www.ietf.org/rfc/rfc3339.txt) text format.
# Corresponds to the JSON property `bluePoolDeletionStartTime`
# @return [String]
attr_accessor :blue_pool_deletion_start_time
# The resource URLs of the [managed instance groups] (/compute/docs/instance-
# groups/creating-groups-of-managed-instances) associated with green pool.
# Corresponds to the JSON property `greenInstanceGroupUrls`
# @return [Array<String>]
attr_accessor :green_instance_group_urls
# Version of green pool.
# Corresponds to the JSON property `greenPoolVersion`
# @return [String]
attr_accessor :green_pool_version
# Current blue-green upgrade phase.
# Corresponds to the JSON property `phase`
# @return [String]
attr_accessor :phase
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@blue_instance_group_urls = args[:blue_instance_group_urls] if args.key?(:blue_instance_group_urls)
@blue_pool_deletion_start_time = args[:blue_pool_deletion_start_time] if args.key?(:blue_pool_deletion_start_time)
@green_instance_group_urls = args[:green_instance_group_urls] if args.key?(:green_instance_group_urls)
@green_pool_version = args[:green_pool_version] if args.key?(:green_pool_version)
@phase = args[:phase] if args.key?(:phase)
end
end
# Settings for blue-green upgrade.
class BlueGreenSettings
include Google::Apis::Core::Hashable
# Time needed after draining entire blue pool. After this period, blue pool will
# be cleaned up.
# Corresponds to the JSON property `nodePoolSoakDuration`
# @return [String]
attr_accessor :node_pool_soak_duration
# Standard rollout policy is the default policy for blue-green.
# Corresponds to the JSON property `standardRolloutPolicy`
# @return [Google::Apis::ContainerV1::StandardRolloutPolicy]
attr_accessor :standard_rollout_policy
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@node_pool_soak_duration = args[:node_pool_soak_duration] if args.key?(:node_pool_soak_duration)
@standard_rollout_policy = args[:standard_rollout_policy] if args.key?(:standard_rollout_policy)
end
end
# CancelOperationRequest cancels a single operation.
class CancelOperationRequest
include Google::Apis::Core::Hashable
# The name (project, location, operation id) of the operation to cancel.
# Specified in the format `projects/*/locations/*/operations/*`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Deprecated. The server-assigned `name` of the operation. This field has been
# deprecated and replaced by the name field.
# Corresponds to the JSON property `operationId`
# @return [String]
attr_accessor :operation_id
# Deprecated. The Google Developers Console [project ID or project number](https:
# //cloud.google.com/resource-manager/docs/creating-managing-projects). This
# field has been deprecated and replaced by the name field.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.
# com/compute/docs/zones#available) in which the operation resides. This field
# has been deprecated and replaced by the name field.
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@operation_id = args[:operation_id] if args.key?(:operation_id)
@project_id = args[:project_id] if args.key?(:project_id)
@zone = args[:zone] if args.key?(:zone)
end
end
# CertificateAuthorityDomainConfig configures one or more fully qualified domain
# names (FQDN) to a specific certificate.
class CertificateAuthorityDomainConfig
include Google::Apis::Core::Hashable
# List of fully qualified domain names (FQDN). Specifying port is supported.
# Wilcards are NOT supported. Examples: - my.customdomain.com - 10.0.1.2:5000
# Corresponds to the JSON property `fqdns`
# @return [Array<String>]
attr_accessor :fqdns
# GCPSecretManagerCertificateConfig configures a secret from [Google Secret
# Manager](https://cloud.google.com/secret-manager).
# Corresponds to the JSON property `gcpSecretManagerCertificateConfig`
# @return [Google::Apis::ContainerV1::GcpSecretManagerCertificateConfig]
attr_accessor :gcp_secret_manager_certificate_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@fqdns = args[:fqdns] if args.key?(:fqdns)
@gcp_secret_manager_certificate_config = args[:gcp_secret_manager_certificate_config] if args.key?(:gcp_secret_manager_certificate_config)
end
end
# CheckAutopilotCompatibilityResponse has a list of compatibility issues.
class CheckAutopilotCompatibilityResponse
include Google::Apis::Core::Hashable
# The list of issues for the given operation.
# Corresponds to the JSON property `issues`
# @return [Array<Google::Apis::ContainerV1::AutopilotCompatibilityIssue>]
attr_accessor :issues
# The summary of the autopilot compatibility response.
# Corresponds to the JSON property `summary`
# @return [String]
attr_accessor :summary
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@issues = args[:issues] if args.key?(:issues)
@summary = args[:summary] if args.key?(:summary)
end
end
# CidrBlock contains an optional name and one CIDR block.
class CidrBlock
include Google::Apis::Core::Hashable
# cidr_block must be specified in CIDR notation.
# Corresponds to the JSON property `cidrBlock`
# @return [String]
attr_accessor :cidr_block
# display_name is an optional field for users to identify CIDR blocks.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cidr_block = args[:cidr_block] if args.key?(:cidr_block)
@display_name = args[:display_name] if args.key?(:display_name)
end
end
# Configuration for client certificates on the cluster.
class ClientCertificateConfig
include Google::Apis::Core::Hashable
# Issue a client certificate.
# Corresponds to the JSON property `issueClientCertificate`
# @return [Boolean]
attr_accessor :issue_client_certificate
alias_method :issue_client_certificate?, :issue_client_certificate
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@issue_client_certificate = args[:issue_client_certificate] if args.key?(:issue_client_certificate)
end
end
# Configuration options for the Cloud Run feature.
class CloudRunConfig
include Google::Apis::Core::Hashable
# Whether Cloud Run addon is enabled for this cluster.
# Corresponds to the JSON property `disabled`
# @return [Boolean]
attr_accessor :disabled
alias_method :disabled?, :disabled
# Which load balancer type is installed for Cloud Run.
# Corresponds to the JSON property `loadBalancerType`
# @return [String]
attr_accessor :load_balancer_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@disabled = args[:disabled] if args.key?(:disabled)
@load_balancer_type = args[:load_balancer_type] if args.key?(:load_balancer_type)
end
end
# A Google Kubernetes Engine cluster.
class Cluster
include Google::Apis::Core::Hashable
# Configuration for the addons that can be automatically spun up in the cluster,
# enabling additional functionality.
# Corresponds to the JSON property `addonsConfig`
# @return [Google::Apis::ContainerV1::AddonsConfig]
attr_accessor :addons_config
# Configuration for returning group information from authenticators.
# Corresponds to the JSON property `authenticatorGroupsConfig`
# @return [Google::Apis::ContainerV1::AuthenticatorGroupsConfig]
attr_accessor :authenticator_groups_config
# Autopilot is the configuration for Autopilot settings on the cluster.
# Corresponds to the JSON property `autopilot`
# @return [Google::Apis::ContainerV1::Autopilot]
attr_accessor :autopilot
# ClusterAutoscaling contains global, per-cluster information required by
# Cluster Autoscaler to automatically adjust the size of the cluster and create/
# delete node pools based on the current needs.
# Corresponds to the JSON property `autoscaling`
# @return [Google::Apis::ContainerV1::ClusterAutoscaling]
attr_accessor :autoscaling
# Configuration for Binary Authorization.
# Corresponds to the JSON property `binaryAuthorization`
# @return [Google::Apis::ContainerV1::BinaryAuthorization]
attr_accessor :binary_authorization
# The IP address range of the container pods in this cluster, in [CIDR](http://
# en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.
# 0/14`). Leave blank to have one automatically chosen or specify a `/14` block
# in `10.0.0.0/8`.
# Corresponds to the JSON property `clusterIpv4Cidr`
# @return [String]
attr_accessor :cluster_ipv4_cidr
# Which conditions caused the current cluster state.
# Corresponds to the JSON property `conditions`
# @return [Array<Google::Apis::ContainerV1::StatusCondition>]
attr_accessor :conditions
# ConfidentialNodes is configuration for the confidential nodes feature, which
# makes nodes run on confidential VMs.
# Corresponds to the JSON property `confidentialNodes`
# @return [Google::Apis::ContainerV1::ConfidentialNodes]
attr_accessor :confidential_nodes
# Configuration for fine-grained cost management feature.
# Corresponds to the JSON property `costManagementConfig`
# @return [Google::Apis::ContainerV1::CostManagementConfig]
attr_accessor :cost_management_config
# [Output only] The time the cluster was created, in [RFC3339](https://www.ietf.
# org/rfc/rfc3339.txt) text format.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# [Output only] The current software version of the master endpoint.
# Corresponds to the JSON property `currentMasterVersion`
# @return [String]
attr_accessor :current_master_version
# [Output only] The number of nodes currently in the cluster. Deprecated. Call
# Kubernetes API directly to retrieve node information.
# Corresponds to the JSON property `currentNodeCount`
# @return [Fixnum]
attr_accessor :current_node_count
# [Output only] Deprecated, use [NodePools.version](https://cloud.google.com/
# kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools)
# instead. The current version of the node software components. If they are
# currently at multiple versions because they're in the process of being
# upgraded, this reflects the minimum version of all nodes.
# Corresponds to the JSON property `currentNodeVersion`
# @return [String]
attr_accessor :current_node_version
# Configuration of etcd encryption.
# Corresponds to the JSON property `databaseEncryption`
# @return [Google::Apis::ContainerV1::DatabaseEncryption]
attr_accessor :database_encryption
# Constraints applied to pods.
# Corresponds to the JSON property `defaultMaxPodsConstraint`
# @return [Google::Apis::ContainerV1::MaxPodsConstraint]
attr_accessor :default_max_pods_constraint
# An optional description of this cluster.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# K8sBetaAPIConfig , configuration for beta APIs
# Corresponds to the JSON property `enableK8sBetaApis`
# @return [Google::Apis::ContainerV1::K8sBetaApiConfig]
attr_accessor :enable_k8s_beta_apis
# Kubernetes alpha features are enabled on this cluster. This includes alpha API
# groups (e.g. v1alpha1) and features that may not be production ready in the
# kubernetes version of the master and nodes. The cluster has no SLA for uptime
# and master/node upgrades are disabled. Alpha enabled clusters are
# automatically deleted thirty days after creation.
# Corresponds to the JSON property `enableKubernetesAlpha`
# @return [Boolean]
attr_accessor :enable_kubernetes_alpha
alias_method :enable_kubernetes_alpha?, :enable_kubernetes_alpha