forked from googleapis/google-cloud-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCluster.php
More file actions
3164 lines (2889 loc) · 114 KB
/
Copy pathCluster.php
File metadata and controls
3164 lines (2889 loc) · 114 KB
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
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/container/v1/cluster_service.proto
namespace Google\Cloud\Container\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* A Google Kubernetes Engine cluster.
*
* Generated from protobuf message <code>google.container.v1.Cluster</code>
*/
class Cluster extends \Google\Protobuf\Internal\Message
{
/**
* The name of this cluster. The name must be unique within this project
* and location (e.g. zone or region), and can be up to 40 characters with
* the following restrictions:
* * Lowercase letters, numbers, and hyphens only.
* * Must start with a letter.
* * Must end with a number or a letter.
*
* Generated from protobuf field <code>string name = 1;</code>
*/
private $name = '';
/**
* An optional description of this cluster.
*
* Generated from protobuf field <code>string description = 2;</code>
*/
private $description = '';
/**
* The number of nodes to create in this cluster. You must ensure that your
* Compute Engine [resource quota](https://cloud.google.com/compute/quotas)
* is sufficient for this number of instances. You must also have available
* firewall and routes quota.
* For requests, this field should only be used in lieu of a
* "node_pool" object, since this configuration (along with the
* "node_config") will be used to create a "NodePool" object with an
* auto-generated name. Do not use this and a node_pool at the same time.
* This field is deprecated, use node_pool.initial_node_count instead.
*
* Generated from protobuf field <code>int32 initial_node_count = 3 [deprecated = true];</code>
* @deprecated
*/
protected $initial_node_count = 0;
/**
* Parameters used in creating the cluster's nodes.
* For requests, this field should only be used in lieu of a
* "node_pool" object, since this configuration (along with the
* "initial_node_count") will be used to create a "NodePool" object with an
* auto-generated name. Do not use this and a node_pool at the same time.
* For responses, this field will be populated with the node configuration of
* the first node pool. (For configuration of each node pool, see
* `node_pool.config`)
* If unspecified, the defaults are used.
* This field is deprecated, use node_pool.config instead.
*
* Generated from protobuf field <code>.google.container.v1.NodeConfig node_config = 4 [deprecated = true];</code>
* @deprecated
*/
protected $node_config = null;
/**
* The authentication information for accessing the master endpoint.
* If unspecified, the defaults are used:
* For clusters before v1.12, if master_auth is unspecified, `username` will
* be set to "admin", a random password will be generated, and a client
* certificate will be issued.
*
* Generated from protobuf field <code>.google.container.v1.MasterAuth master_auth = 5;</code>
*/
private $master_auth = null;
/**
* The logging service the cluster should use to write logs.
* Currently available options:
* * `logging.googleapis.com/kubernetes` - The Cloud Logging
* service with a Kubernetes-native resource model
* * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
* available as of GKE 1.15).
* * `none` - no logs will be exported from the cluster.
* If left as an empty string,`logging.googleapis.com/kubernetes` will be
* used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
*
* Generated from protobuf field <code>string logging_service = 6;</code>
*/
private $logging_service = '';
/**
* The monitoring service the cluster should use to write metrics.
* Currently available options:
* * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring
* service with a Kubernetes-native resource model
* * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
* longer available as of GKE 1.15).
* * `none` - No metrics will be exported from the cluster.
* If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
* used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
*
* Generated from protobuf field <code>string monitoring_service = 7;</code>
*/
private $monitoring_service = '';
/**
* The name of the Google Compute Engine
* [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
* to which the cluster is connected. If left unspecified, the `default`
* network will be used.
*
* Generated from protobuf field <code>string network = 8;</code>
*/
private $network = '';
/**
* 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`.
*
* Generated from protobuf field <code>string cluster_ipv4_cidr = 9;</code>
*/
private $cluster_ipv4_cidr = '';
/**
* Configurations for the various addons available to run in the cluster.
*
* Generated from protobuf field <code>.google.container.v1.AddonsConfig addons_config = 10;</code>
*/
private $addons_config = null;
/**
* The name of the Google Compute Engine
* [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which
* the cluster is connected.
*
* Generated from protobuf field <code>string subnetwork = 11;</code>
*/
private $subnetwork = '';
/**
* The node pools associated with this cluster.
* This field should not be set if "node_config" or "initial_node_count" are
* specified.
*
* Generated from protobuf field <code>repeated .google.container.v1.NodePool node_pools = 12;</code>
*/
private $node_pools;
/**
* The list of Google Compute Engine
* [zones](https://cloud.google.com/compute/docs/zones#available) in which the
* cluster's nodes should be located.
* This field provides a default value if
* [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
* are not specified during node pool creation.
* Warning: changing cluster locations will update the
* [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
* of all node pools and will result in nodes being added and/or removed.
*
* Generated from protobuf field <code>repeated string locations = 13;</code>
*/
private $locations;
/**
* 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.
*
* Generated from protobuf field <code>bool enable_kubernetes_alpha = 14;</code>
*/
private $enable_kubernetes_alpha = false;
/**
* The resource labels for the cluster to use to annotate any related
* Google Compute Engine resources.
*
* Generated from protobuf field <code>map<string, string> resource_labels = 15;</code>
*/
private $resource_labels;
/**
* The fingerprint of the set of labels for this cluster.
*
* Generated from protobuf field <code>string label_fingerprint = 16;</code>
*/
private $label_fingerprint = '';
/**
* Configuration for the legacy ABAC authorization mode.
*
* Generated from protobuf field <code>.google.container.v1.LegacyAbac legacy_abac = 18;</code>
*/
private $legacy_abac = null;
/**
* Configuration options for the NetworkPolicy feature.
*
* Generated from protobuf field <code>.google.container.v1.NetworkPolicy network_policy = 19;</code>
*/
private $network_policy = null;
/**
* Configuration for cluster IP allocation.
*
* Generated from protobuf field <code>.google.container.v1.IPAllocationPolicy ip_allocation_policy = 20;</code>
*/
private $ip_allocation_policy = null;
/**
* The configuration options for master authorized networks feature.
*
* Generated from protobuf field <code>.google.container.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 22;</code>
*/
private $master_authorized_networks_config = null;
/**
* Configure the maintenance policy for this cluster.
*
* Generated from protobuf field <code>.google.container.v1.MaintenancePolicy maintenance_policy = 23;</code>
*/
private $maintenance_policy = null;
/**
* Configuration for Binary Authorization.
*
* Generated from protobuf field <code>.google.container.v1.BinaryAuthorization binary_authorization = 24;</code>
*/
private $binary_authorization = null;
/**
* Cluster-level autoscaling configuration.
*
* Generated from protobuf field <code>.google.container.v1.ClusterAutoscaling autoscaling = 26;</code>
*/
private $autoscaling = null;
/**
* Configuration for cluster networking.
*
* Generated from protobuf field <code>.google.container.v1.NetworkConfig network_config = 27;</code>
*/
private $network_config = null;
/**
* The default constraint on the maximum number of pods that can be run
* simultaneously on a node in the node pool of this cluster. Only honored
* if cluster created with IP Alias support.
*
* Generated from protobuf field <code>.google.container.v1.MaxPodsConstraint default_max_pods_constraint = 30;</code>
*/
private $default_max_pods_constraint = null;
/**
* Configuration for exporting resource usages. Resource usage export is
* disabled when this config is unspecified.
*
* Generated from protobuf field <code>.google.container.v1.ResourceUsageExportConfig resource_usage_export_config = 33;</code>
*/
private $resource_usage_export_config = null;
/**
* Configuration controlling RBAC group membership information.
*
* Generated from protobuf field <code>.google.container.v1.AuthenticatorGroupsConfig authenticator_groups_config = 34;</code>
*/
private $authenticator_groups_config = null;
/**
* Configuration for private cluster.
*
* Generated from protobuf field <code>.google.container.v1.PrivateClusterConfig private_cluster_config = 37;</code>
*/
private $private_cluster_config = null;
/**
* Configuration of etcd encryption.
*
* Generated from protobuf field <code>.google.container.v1.DatabaseEncryption database_encryption = 38;</code>
*/
private $database_encryption = null;
/**
* Cluster-level Vertical Pod Autoscaling configuration.
*
* Generated from protobuf field <code>.google.container.v1.VerticalPodAutoscaling vertical_pod_autoscaling = 39;</code>
*/
private $vertical_pod_autoscaling = null;
/**
* Shielded Nodes configuration.
*
* Generated from protobuf field <code>.google.container.v1.ShieldedNodes shielded_nodes = 40;</code>
*/
private $shielded_nodes = null;
/**
* Release channel configuration. If left unspecified on cluster creation and
* a version is specified, the cluster is enrolled in the most mature release
* channel where the version is available (first checking STABLE, then
* REGULAR, and finally RAPID). Otherwise, if no release channel
* configuration and no version is specified, the cluster is enrolled in the
* REGULAR channel with its default version.
*
* Generated from protobuf field <code>.google.container.v1.ReleaseChannel release_channel = 41;</code>
*/
private $release_channel = null;
/**
* Configuration for the use of Kubernetes Service Accounts in GCP IAM
* policies.
*
* Generated from protobuf field <code>.google.container.v1.WorkloadIdentityConfig workload_identity_config = 43;</code>
*/
private $workload_identity_config = null;
/**
* Configuration for issuance of mTLS keys and certificates to Kubernetes
* pods.
*
* Generated from protobuf field <code>.google.container.v1.MeshCertificates mesh_certificates = 67;</code>
*/
private $mesh_certificates = null;
/**
* Configuration for the fine-grained cost management feature.
*
* Generated from protobuf field <code>.google.container.v1.CostManagementConfig cost_management_config = 45;</code>
*/
private $cost_management_config = null;
/**
* Notification configuration of the cluster.
*
* Generated from protobuf field <code>.google.container.v1.NotificationConfig notification_config = 49;</code>
*/
private $notification_config = null;
/**
* Configuration of Confidential Nodes.
* All the nodes in the cluster will be Confidential VM once enabled.
*
* Generated from protobuf field <code>.google.container.v1.ConfidentialNodes confidential_nodes = 50;</code>
*/
private $confidential_nodes = null;
/**
* Configuration for Identity Service component.
*
* Generated from protobuf field <code>.google.container.v1.IdentityServiceConfig identity_service_config = 54;</code>
*/
private $identity_service_config = null;
/**
* [Output only] Server-defined URL for the resource.
*
* Generated from protobuf field <code>string self_link = 100;</code>
*/
private $self_link = '';
/**
* [Output only] The name of the Google Compute Engine
* [zone](https://cloud.google.com/compute/docs/zones#available) in which the
* cluster resides. This field is deprecated, use location instead.
*
* Generated from protobuf field <code>string zone = 101 [deprecated = true];</code>
* @deprecated
*/
protected $zone = '';
/**
* [Output only] The IP address of this cluster's master endpoint.
* The endpoint can be accessed from the internet at
* `https://username:password@endpoint/`.
* See the `masterAuth` property of this resource for username and
* password information.
*
* Generated from protobuf field <code>string endpoint = 102;</code>
*/
private $endpoint = '';
/**
* The initial Kubernetes version for this cluster. Valid versions are those
* found in validMasterVersions returned by getServerConfig. The version can
* be upgraded over time; such upgrades are reflected in
* currentMasterVersion and currentNodeVersion.
* Users may specify either explicit versions offered by
* Kubernetes Engine or version aliases, which have the following behavior:
* - "latest": picks the highest valid Kubernetes version
* - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
* - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
* - "1.X.Y-gke.N": picks an explicit Kubernetes version
* - "","-": picks the default Kubernetes version
*
* Generated from protobuf field <code>string initial_cluster_version = 103;</code>
*/
private $initial_cluster_version = '';
/**
* [Output only] The current software version of the master endpoint.
*
* Generated from protobuf field <code>string current_master_version = 104;</code>
*/
private $current_master_version = '';
/**
* [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.
*
* Generated from protobuf field <code>string current_node_version = 105 [deprecated = true];</code>
* @deprecated
*/
protected $current_node_version = '';
/**
* [Output only] The time the cluster was created, in
* [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
* Generated from protobuf field <code>string create_time = 106;</code>
*/
private $create_time = '';
/**
* [Output only] The current status of this cluster.
*
* Generated from protobuf field <code>.google.container.v1.Cluster.Status status = 107;</code>
*/
private $status = 0;
/**
* [Output only] Deprecated. Use conditions instead.
* Additional information about the current status of this
* cluster, if available.
*
* Generated from protobuf field <code>string status_message = 108 [deprecated = true];</code>
* @deprecated
*/
protected $status_message = '';
/**
* [Output only] The size of the address space on each node for hosting
* containers. This is provisioned from within the `container_ipv4_cidr`
* range. This field will only be set when cluster is in route-based network
* mode.
*
* Generated from protobuf field <code>int32 node_ipv4_cidr_size = 109;</code>
*/
private $node_ipv4_cidr_size = 0;
/**
* [Output only] The IP address range of the Kubernetes services in
* this cluster, in
* [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
* notation (e.g. `1.2.3.4/29`). Service addresses are
* typically put in the last `/16` from the container CIDR.
*
* Generated from protobuf field <code>string services_ipv4_cidr = 110;</code>
*/
private $services_ipv4_cidr = '';
/**
* Deprecated. Use node_pools.instance_group_urls.
*
* Generated from protobuf field <code>repeated string instance_group_urls = 111 [deprecated = true];</code>
* @deprecated
*/
private $instance_group_urls;
/**
* [Output only] The number of nodes currently in the cluster. Deprecated.
* Call Kubernetes API directly to retrieve node information.
*
* Generated from protobuf field <code>int32 current_node_count = 112 [deprecated = true];</code>
* @deprecated
*/
protected $current_node_count = 0;
/**
* [Output only] The time the cluster will be automatically
* deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
* Generated from protobuf field <code>string expire_time = 113;</code>
*/
private $expire_time = '';
/**
* [Output only] The name of the Google Compute Engine
* [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
* or
* [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
* in which the cluster resides.
*
* Generated from protobuf field <code>string location = 114;</code>
*/
private $location = '';
/**
* Enable the ability to use Cloud TPUs in this cluster.
*
* Generated from protobuf field <code>bool enable_tpu = 115;</code>
*/
private $enable_tpu = false;
/**
* [Output only] The IP address range of the Cloud TPUs in this cluster, in
* [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
* notation (e.g. `1.2.3.4/29`).
*
* Generated from protobuf field <code>string tpu_ipv4_cidr_block = 116;</code>
*/
private $tpu_ipv4_cidr_block = '';
/**
* Which conditions caused the current cluster state.
*
* Generated from protobuf field <code>repeated .google.container.v1.StatusCondition conditions = 118;</code>
*/
private $conditions;
/**
* Autopilot configuration for the cluster.
*
* Generated from protobuf field <code>.google.container.v1.Autopilot autopilot = 128;</code>
*/
private $autopilot = null;
/**
* Output only. Unique id for the cluster.
*
* Generated from protobuf field <code>string id = 129 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $id = '';
/**
* Default NodePool settings for the entire cluster. These settings are
* overridden if specified on the specific NodePool object.
*
* Generated from protobuf field <code>optional .google.container.v1.NodePoolDefaults node_pool_defaults = 131;</code>
*/
private $node_pool_defaults = null;
/**
* Logging configuration for the cluster.
*
* Generated from protobuf field <code>.google.container.v1.LoggingConfig logging_config = 132;</code>
*/
private $logging_config = null;
/**
* Monitoring configuration for the cluster.
*
* Generated from protobuf field <code>.google.container.v1.MonitoringConfig monitoring_config = 133;</code>
*/
private $monitoring_config = null;
/**
* Node pool configs that apply to all auto-provisioned node pools
* in autopilot clusters and node auto-provisioning enabled clusters.
*
* Generated from protobuf field <code>.google.container.v1.NodePoolAutoConfig node_pool_auto_config = 136;</code>
*/
private $node_pool_auto_config = null;
/**
* This checksum is computed by the server based on the value of cluster
* fields, and may be sent on update requests to ensure the client has an
* up-to-date value before proceeding.
*
* Generated from protobuf field <code>string etag = 139;</code>
*/
private $etag = '';
/**
* Fleet information for the cluster.
*
* Generated from protobuf field <code>.google.container.v1.Fleet fleet = 140;</code>
*/
private $fleet = null;
/**
* Enable/Disable Security Posture API features for the cluster.
*
* Generated from protobuf field <code>.google.container.v1.SecurityPostureConfig security_posture_config = 145;</code>
*/
private $security_posture_config = null;
/**
* Beta APIs Config
*
* Generated from protobuf field <code>.google.container.v1.K8sBetaAPIConfig enable_k8s_beta_apis = 143;</code>
*/
private $enable_k8s_beta_apis = null;
/**
* GKE Enterprise Configuration.
*
* Generated from protobuf field <code>.google.container.v1.EnterpriseConfig enterprise_config = 149;</code>
*/
private $enterprise_config = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* The name of this cluster. The name must be unique within this project
* and location (e.g. zone or region), and can be up to 40 characters with
* the following restrictions:
* * Lowercase letters, numbers, and hyphens only.
* * Must start with a letter.
* * Must end with a number or a letter.
* @type string $description
* An optional description of this cluster.
* @type int $initial_node_count
* The number of nodes to create in this cluster. You must ensure that your
* Compute Engine [resource quota](https://cloud.google.com/compute/quotas)
* is sufficient for this number of instances. You must also have available
* firewall and routes quota.
* For requests, this field should only be used in lieu of a
* "node_pool" object, since this configuration (along with the
* "node_config") will be used to create a "NodePool" object with an
* auto-generated name. Do not use this and a node_pool at the same time.
* This field is deprecated, use node_pool.initial_node_count instead.
* @type \Google\Cloud\Container\V1\NodeConfig $node_config
* Parameters used in creating the cluster's nodes.
* For requests, this field should only be used in lieu of a
* "node_pool" object, since this configuration (along with the
* "initial_node_count") will be used to create a "NodePool" object with an
* auto-generated name. Do not use this and a node_pool at the same time.
* For responses, this field will be populated with the node configuration of
* the first node pool. (For configuration of each node pool, see
* `node_pool.config`)
* If unspecified, the defaults are used.
* This field is deprecated, use node_pool.config instead.
* @type \Google\Cloud\Container\V1\MasterAuth $master_auth
* The authentication information for accessing the master endpoint.
* If unspecified, the defaults are used:
* For clusters before v1.12, if master_auth is unspecified, `username` will
* be set to "admin", a random password will be generated, and a client
* certificate will be issued.
* @type string $logging_service
* The logging service the cluster should use to write logs.
* Currently available options:
* * `logging.googleapis.com/kubernetes` - The Cloud Logging
* service with a Kubernetes-native resource model
* * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
* available as of GKE 1.15).
* * `none` - no logs will be exported from the cluster.
* If left as an empty string,`logging.googleapis.com/kubernetes` will be
* used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
* @type string $monitoring_service
* The monitoring service the cluster should use to write metrics.
* Currently available options:
* * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring
* service with a Kubernetes-native resource model
* * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
* longer available as of GKE 1.15).
* * `none` - No metrics will be exported from the cluster.
* If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
* used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
* @type string $network
* The name of the Google Compute Engine
* [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
* to which the cluster is connected. If left unspecified, the `default`
* network will be used.
* @type string $cluster_ipv4_cidr
* 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`.
* @type \Google\Cloud\Container\V1\AddonsConfig $addons_config
* Configurations for the various addons available to run in the cluster.
* @type string $subnetwork
* The name of the Google Compute Engine
* [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which
* the cluster is connected.
* @type array<\Google\Cloud\Container\V1\NodePool>|\Google\Protobuf\Internal\RepeatedField $node_pools
* The node pools associated with this cluster.
* This field should not be set if "node_config" or "initial_node_count" are
* specified.
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $locations
* The list of Google Compute Engine
* [zones](https://cloud.google.com/compute/docs/zones#available) in which the
* cluster's nodes should be located.
* This field provides a default value if
* [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
* are not specified during node pool creation.
* Warning: changing cluster locations will update the
* [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations)
* of all node pools and will result in nodes being added and/or removed.
* @type bool $enable_kubernetes_alpha
* 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.
* @type array|\Google\Protobuf\Internal\MapField $resource_labels
* The resource labels for the cluster to use to annotate any related
* Google Compute Engine resources.
* @type string $label_fingerprint
* The fingerprint of the set of labels for this cluster.
* @type \Google\Cloud\Container\V1\LegacyAbac $legacy_abac
* Configuration for the legacy ABAC authorization mode.
* @type \Google\Cloud\Container\V1\NetworkPolicy $network_policy
* Configuration options for the NetworkPolicy feature.
* @type \Google\Cloud\Container\V1\IPAllocationPolicy $ip_allocation_policy
* Configuration for cluster IP allocation.
* @type \Google\Cloud\Container\V1\MasterAuthorizedNetworksConfig $master_authorized_networks_config
* The configuration options for master authorized networks feature.
* @type \Google\Cloud\Container\V1\MaintenancePolicy $maintenance_policy
* Configure the maintenance policy for this cluster.
* @type \Google\Cloud\Container\V1\BinaryAuthorization $binary_authorization
* Configuration for Binary Authorization.
* @type \Google\Cloud\Container\V1\ClusterAutoscaling $autoscaling
* Cluster-level autoscaling configuration.
* @type \Google\Cloud\Container\V1\NetworkConfig $network_config
* Configuration for cluster networking.
* @type \Google\Cloud\Container\V1\MaxPodsConstraint $default_max_pods_constraint
* The default constraint on the maximum number of pods that can be run
* simultaneously on a node in the node pool of this cluster. Only honored
* if cluster created with IP Alias support.
* @type \Google\Cloud\Container\V1\ResourceUsageExportConfig $resource_usage_export_config
* Configuration for exporting resource usages. Resource usage export is
* disabled when this config is unspecified.
* @type \Google\Cloud\Container\V1\AuthenticatorGroupsConfig $authenticator_groups_config
* Configuration controlling RBAC group membership information.
* @type \Google\Cloud\Container\V1\PrivateClusterConfig $private_cluster_config
* Configuration for private cluster.
* @type \Google\Cloud\Container\V1\DatabaseEncryption $database_encryption
* Configuration of etcd encryption.
* @type \Google\Cloud\Container\V1\VerticalPodAutoscaling $vertical_pod_autoscaling
* Cluster-level Vertical Pod Autoscaling configuration.
* @type \Google\Cloud\Container\V1\ShieldedNodes $shielded_nodes
* Shielded Nodes configuration.
* @type \Google\Cloud\Container\V1\ReleaseChannel $release_channel
* Release channel configuration. If left unspecified on cluster creation and
* a version is specified, the cluster is enrolled in the most mature release
* channel where the version is available (first checking STABLE, then
* REGULAR, and finally RAPID). Otherwise, if no release channel
* configuration and no version is specified, the cluster is enrolled in the
* REGULAR channel with its default version.
* @type \Google\Cloud\Container\V1\WorkloadIdentityConfig $workload_identity_config
* Configuration for the use of Kubernetes Service Accounts in GCP IAM
* policies.
* @type \Google\Cloud\Container\V1\MeshCertificates $mesh_certificates
* Configuration for issuance of mTLS keys and certificates to Kubernetes
* pods.
* @type \Google\Cloud\Container\V1\CostManagementConfig $cost_management_config
* Configuration for the fine-grained cost management feature.
* @type \Google\Cloud\Container\V1\NotificationConfig $notification_config
* Notification configuration of the cluster.
* @type \Google\Cloud\Container\V1\ConfidentialNodes $confidential_nodes
* Configuration of Confidential Nodes.
* All the nodes in the cluster will be Confidential VM once enabled.
* @type \Google\Cloud\Container\V1\IdentityServiceConfig $identity_service_config
* Configuration for Identity Service component.
* @type string $self_link
* [Output only] Server-defined URL for the resource.
* @type string $zone
* [Output only] The name of the Google Compute Engine
* [zone](https://cloud.google.com/compute/docs/zones#available) in which the
* cluster resides. This field is deprecated, use location instead.
* @type string $endpoint
* [Output only] The IP address of this cluster's master endpoint.
* The endpoint can be accessed from the internet at
* `https://username:password@endpoint/`.
* See the `masterAuth` property of this resource for username and
* password information.
* @type string $initial_cluster_version
* The initial Kubernetes version for this cluster. Valid versions are those
* found in validMasterVersions returned by getServerConfig. The version can
* be upgraded over time; such upgrades are reflected in
* currentMasterVersion and currentNodeVersion.
* Users may specify either explicit versions offered by
* Kubernetes Engine or version aliases, which have the following behavior:
* - "latest": picks the highest valid Kubernetes version
* - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
* - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
* - "1.X.Y-gke.N": picks an explicit Kubernetes version
* - "","-": picks the default Kubernetes version
* @type string $current_master_version
* [Output only] The current software version of the master endpoint.
* @type string $current_node_version
* [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.
* @type string $create_time
* [Output only] The time the cluster was created, in
* [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
* @type int $status
* [Output only] The current status of this cluster.
* @type string $status_message
* [Output only] Deprecated. Use conditions instead.
* Additional information about the current status of this
* cluster, if available.
* @type int $node_ipv4_cidr_size
* [Output only] The size of the address space on each node for hosting
* containers. This is provisioned from within the `container_ipv4_cidr`
* range. This field will only be set when cluster is in route-based network
* mode.
* @type string $services_ipv4_cidr
* [Output only] The IP address range of the Kubernetes services in
* this cluster, in
* [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
* notation (e.g. `1.2.3.4/29`). Service addresses are
* typically put in the last `/16` from the container CIDR.
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $instance_group_urls
* Deprecated. Use node_pools.instance_group_urls.
* @type int $current_node_count
* [Output only] The number of nodes currently in the cluster. Deprecated.
* Call Kubernetes API directly to retrieve node information.
* @type string $expire_time
* [Output only] The time the cluster will be automatically
* deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
* @type string $location
* [Output only] The name of the Google Compute Engine
* [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
* or
* [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
* in which the cluster resides.
* @type bool $enable_tpu
* Enable the ability to use Cloud TPUs in this cluster.
* @type string $tpu_ipv4_cidr_block
* [Output only] The IP address range of the Cloud TPUs in this cluster, in
* [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
* notation (e.g. `1.2.3.4/29`).
* @type array<\Google\Cloud\Container\V1\StatusCondition>|\Google\Protobuf\Internal\RepeatedField $conditions
* Which conditions caused the current cluster state.
* @type \Google\Cloud\Container\V1\Autopilot $autopilot
* Autopilot configuration for the cluster.
* @type string $id
* Output only. Unique id for the cluster.
* @type \Google\Cloud\Container\V1\NodePoolDefaults $node_pool_defaults
* Default NodePool settings for the entire cluster. These settings are
* overridden if specified on the specific NodePool object.
* @type \Google\Cloud\Container\V1\LoggingConfig $logging_config
* Logging configuration for the cluster.
* @type \Google\Cloud\Container\V1\MonitoringConfig $monitoring_config
* Monitoring configuration for the cluster.
* @type \Google\Cloud\Container\V1\NodePoolAutoConfig $node_pool_auto_config
* Node pool configs that apply to all auto-provisioned node pools
* in autopilot clusters and node auto-provisioning enabled clusters.
* @type string $etag
* This checksum is computed by the server based on the value of cluster
* fields, and may be sent on update requests to ensure the client has an
* up-to-date value before proceeding.
* @type \Google\Cloud\Container\V1\Fleet $fleet
* Fleet information for the cluster.
* @type \Google\Cloud\Container\V1\SecurityPostureConfig $security_posture_config
* Enable/Disable Security Posture API features for the cluster.
* @type \Google\Cloud\Container\V1\K8sBetaAPIConfig $enable_k8s_beta_apis
* Beta APIs Config
* @type \Google\Cloud\Container\V1\EnterpriseConfig $enterprise_config
* GKE Enterprise Configuration.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Container\V1\ClusterService::initOnce();
parent::__construct($data);
}
/**
* The name of this cluster. The name must be unique within this project
* and location (e.g. zone or region), and can be up to 40 characters with
* the following restrictions:
* * Lowercase letters, numbers, and hyphens only.
* * Must start with a letter.
* * Must end with a number or a letter.
*
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The name of this cluster. The name must be unique within this project
* and location (e.g. zone or region), and can be up to 40 characters with
* the following restrictions:
* * Lowercase letters, numbers, and hyphens only.
* * Must start with a letter.
* * Must end with a number or a letter.
*
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* An optional description of this cluster.
*
* Generated from protobuf field <code>string description = 2;</code>
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* An optional description of this cluster.
*
* Generated from protobuf field <code>string description = 2;</code>
* @param string $var
* @return $this
*/
public function setDescription($var)
{
GPBUtil::checkString($var, True);
$this->description = $var;
return $this;
}
/**
* The number of nodes to create in this cluster. You must ensure that your
* Compute Engine [resource quota](https://cloud.google.com/compute/quotas)
* is sufficient for this number of instances. You must also have available
* firewall and routes quota.
* For requests, this field should only be used in lieu of a
* "node_pool" object, since this configuration (along with the
* "node_config") will be used to create a "NodePool" object with an
* auto-generated name. Do not use this and a node_pool at the same time.
* This field is deprecated, use node_pool.initial_node_count instead.
*
* Generated from protobuf field <code>int32 initial_node_count = 3 [deprecated = true];</code>
* @return int
* @deprecated
*/
public function getInitialNodeCount()
{
@trigger_error('initial_node_count is deprecated.', E_USER_DEPRECATED);
return $this->initial_node_count;
}
/**
* The number of nodes to create in this cluster. You must ensure that your
* Compute Engine [resource quota](https://cloud.google.com/compute/quotas)
* is sufficient for this number of instances. You must also have available
* firewall and routes quota.
* For requests, this field should only be used in lieu of a
* "node_pool" object, since this configuration (along with the
* "node_config") will be used to create a "NodePool" object with an
* auto-generated name. Do not use this and a node_pool at the same time.
* This field is deprecated, use node_pool.initial_node_count instead.
*
* Generated from protobuf field <code>int32 initial_node_count = 3 [deprecated = true];</code>
* @param int $var
* @return $this
* @deprecated
*/
public function setInitialNodeCount($var)
{
@trigger_error('initial_node_count is deprecated.', E_USER_DEPRECATED);
GPBUtil::checkInt32($var);
$this->initial_node_count = $var;
return $this;
}
/**
* Parameters used in creating the cluster's nodes.
* For requests, this field should only be used in lieu of a
* "node_pool" object, since this configuration (along with the
* "initial_node_count") will be used to create a "NodePool" object with an
* auto-generated name. Do not use this and a node_pool at the same time.
* For responses, this field will be populated with the node configuration of
* the first node pool. (For configuration of each node pool, see
* `node_pool.config`)
* If unspecified, the defaults are used.
* This field is deprecated, use node_pool.config instead.
*
* Generated from protobuf field <code>.google.container.v1.NodeConfig node_config = 4 [deprecated = true];</code>
* @return \Google\Cloud\Container\V1\NodeConfig|null
* @deprecated
*/
public function getNodeConfig()
{
@trigger_error('node_config is deprecated.', E_USER_DEPRECATED);
return $this->node_config;
}
public function hasNodeConfig()
{
@trigger_error('node_config is deprecated.', E_USER_DEPRECATED);
return isset($this->node_config);
}
public function clearNodeConfig()
{
@trigger_error('node_config is deprecated.', E_USER_DEPRECATED);
unset($this->node_config);
}
/**
* Parameters used in creating the cluster's nodes.
* For requests, this field should only be used in lieu of a
* "node_pool" object, since this configuration (along with the
* "initial_node_count") will be used to create a "NodePool" object with an
* auto-generated name. Do not use this and a node_pool at the same time.
* For responses, this field will be populated with the node configuration of
* the first node pool. (For configuration of each node pool, see
* `node_pool.config`)
* If unspecified, the defaults are used.
* This field is deprecated, use node_pool.config instead.
*
* Generated from protobuf field <code>.google.container.v1.NodeConfig node_config = 4 [deprecated = true];</code>
* @param \Google\Cloud\Container\V1\NodeConfig $var
* @return $this
* @deprecated
*/
public function setNodeConfig($var)
{
@trigger_error('node_config is deprecated.', E_USER_DEPRECATED);
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NodeConfig::class);
$this->node_config = $var;
return $this;
}
/**
* The authentication information for accessing the master endpoint.
* If unspecified, the defaults are used:
* For clusters before v1.12, if master_auth is unspecified, `username` will
* be set to "admin", a random password will be generated, and a client
* certificate will be issued.
*
* Generated from protobuf field <code>.google.container.v1.MasterAuth master_auth = 5;</code>
* @return \Google\Cloud\Container\V1\MasterAuth|null
*/
public function getMasterAuth()
{
return $this->master_auth;
}
public function hasMasterAuth()
{
return isset($this->master_auth);
}