1// Copyright 2017 Google Inc. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.container.v1alpha1; 18 19import "google/api/annotations.proto"; 20import "google/protobuf/empty.proto"; 21 22option go_package = "google.golang.org/genproto/googleapis/container/v1alpha1;container"; 23option java_multiple_files = true; 24option java_outer_classname = "ClusterServiceProto"; 25option java_package = "com.google.container.v1alpha1"; 26option csharp_namespace = "Google.Cloud.Container.V1Alpha1"; 27option php_namespace = "Google\\Cloud\\Container\\V1alpha1"; 28 29 30// Google Container Engine Cluster Manager v1alpha1 31service ClusterManager { 32 // Lists all clusters owned by a project in either the specified zone or all 33 // zones. 34 rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { 35 option (google.api.http) = { get: "/v1alpha1/{parent=projects/*/locations/*}/clusters" }; 36 } 37 38 // Gets the details of a specific cluster. 39 rpc GetCluster(GetClusterRequest) returns (Cluster) { 40 option (google.api.http) = { get: "/v1alpha1/{name=projects/*/locations/*/clusters/*}" }; 41 } 42 43 // Creates a cluster, consisting of the specified number and type of Google 44 // Compute Engine instances. 45 // 46 // By default, the cluster is created in the project's 47 // [default network](/compute/docs/networks-and-firewalls#networks). 48 // 49 // One firewall is added for the cluster. After cluster creation, 50 // the cluster creates routes for each node to allow the containers 51 // on that node to communicate with all other instances in the 52 // cluster. 53 // 54 // Finally, an entry is added to the project's global metadata indicating 55 // which CIDR range is being used by the cluster. 56 rpc CreateCluster(CreateClusterRequest) returns (Operation) { 57 option (google.api.http) = { post: "/v1alpha1/{parent=projects/*/locations/*}/clusters" body: "*" }; 58 } 59 60 // Updates the settings of a specific cluster. 61 rpc UpdateCluster(UpdateClusterRequest) returns (Operation) { 62 option (google.api.http) = { put: "/v1alpha1/{name=projects/*/locations/*/clusters/*}" body: "*" }; 63 } 64 65 // Updates the version and/or iamge type of a specific node pool. 66 rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) { 67 option (google.api.http) = { put: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}" body: "*" }; 68 } 69 70 // Sets the autoscaling settings of a specific node pool. 71 rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) returns (Operation) { 72 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling" body: "*" }; 73 } 74 75 // Sets the logging service of a specific cluster. 76 rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) { 77 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setLogging" body: "*" }; 78 } 79 80 // Sets the monitoring service of a specific cluster. 81 rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) { 82 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setMonitoring" body: "*" }; 83 } 84 85 // Sets the addons of a specific cluster. 86 rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) { 87 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setAddons" body: "*" }; 88 } 89 90 // Sets the locations of a specific cluster. 91 rpc SetLocations(SetLocationsRequest) returns (Operation) { 92 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setLocations" body: "*" }; 93 } 94 95 // Updates the master of a specific cluster. 96 rpc UpdateMaster(UpdateMasterRequest) returns (Operation) { 97 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:updateMaster" body: "*" }; 98 } 99 100 // Used to set master auth materials. Currently supports :- 101 // Changing the admin password of a specific cluster. 102 // This can be either via password generation or explicitly set. 103 // Modify basic_auth.csv and reset the K8S API server. 104 rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) { 105 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" body: "*" }; 106 } 107 108 // Deletes the cluster, including the Kubernetes endpoint and all worker 109 // nodes. 110 // 111 // Firewalls and routes that were configured during cluster creation 112 // are also deleted. 113 // 114 // Other Google Compute Engine resources that might be in use by the cluster 115 // (e.g. load balancer resources) will not be deleted if they weren't present 116 // at the initial create time. 117 rpc DeleteCluster(DeleteClusterRequest) returns (Operation) { 118 option (google.api.http) = { delete: "/v1alpha1/{name=projects/*/locations/*/clusters/*}" }; 119 } 120 121 // Lists all operations in a project in a specific zone or all zones. 122 rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { 123 option (google.api.http) = { get: "/v1alpha1/{parent=projects/*/locations/*}/operations" }; 124 } 125 126 // Gets the specified operation. 127 rpc GetOperation(GetOperationRequest) returns (Operation) { 128 option (google.api.http) = { get: "/v1alpha1/{name=projects/*/locations/*/operations/*}" }; 129 } 130 131 // Cancels the specified operation. 132 rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { 133 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel" body: "*" }; 134 } 135 136 // Returns configuration info about the Container Engine service. 137 rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) { 138 option (google.api.http) = { get: "/v1alpha1/{name=projects/*/locations/*}/serverConfig" }; 139 } 140 141 // Lists the node pools for a cluster. 142 rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) { 143 option (google.api.http) = { get: "/v1alpha1/{parent=projects/*/locations/*/clusters/*}/nodePools" }; 144 } 145 146 // Retrieves the node pool requested. 147 rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { 148 option (google.api.http) = { get: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}" }; 149 } 150 151 // Creates a node pool for a cluster. 152 rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) { 153 option (google.api.http) = { post: "/v1alpha1/{parent=projects/*/locations/*/clusters/*}/nodePools" body: "*" }; 154 } 155 156 // Deletes a node pool from a cluster. 157 rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) { 158 option (google.api.http) = { delete: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}" }; 159 } 160 161 // Roll back the previously Aborted or Failed NodePool upgrade. 162 // This will be an no-op if the last upgrade successfully completed. 163 rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) returns (Operation) { 164 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" body: "*" }; 165 } 166 167 // Sets the NodeManagement options for a node pool. 168 rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) { 169 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement" body: "*" }; 170 } 171 172 // Sets labels on a cluster. 173 rpc SetLabels(SetLabelsRequest) returns (Operation) { 174 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setResourceLabels" body: "*" }; 175 } 176 177 // Enables or disables the ABAC authorization mechanism on a cluster. 178 rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) { 179 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac" body: "*" }; 180 } 181 182 // Start master IP rotation. 183 rpc StartIPRotation(StartIPRotationRequest) returns (Operation) { 184 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:startIpRotation" body: "*" }; 185 } 186 187 // Completes master IP rotation. 188 rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) { 189 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:completeIpRotation" body: "*" }; 190 } 191 192 // Sets the size of a specific node pool. 193 rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) { 194 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize" body: "*" }; 195 } 196 197 // Enables/Disables Network Policy for a cluster. 198 rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) { 199 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" body: "*" }; 200 } 201 202 // Sets the maintenance policy for a cluster. 203 rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) { 204 option (google.api.http) = { post: "/v1alpha1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy" body: "*" }; 205 } 206} 207 208// Parameters that describe the nodes in a cluster. 209message NodeConfig { 210 // The name of a Google Compute Engine [machine 211 // type](/compute/docs/machine-types) (e.g. 212 // `n1-standard-1`). 213 // 214 // If unspecified, the default machine type is 215 // `n1-standard-1`. 216 string machine_type = 1; 217 218 // Size of the disk attached to each node, specified in GB. 219 // The smallest allowed disk size is 10GB. 220 // 221 // If unspecified, the default disk size is 100GB. 222 int32 disk_size_gb = 2; 223 224 // The set of Google API scopes to be made available on all of the 225 // node VMs under the "default" service account. 226 // 227 // The following scopes are recommended, but not required, and by default are 228 // not included: 229 // 230 // * `https://www.googleapis.com/auth/compute` is required for mounting 231 // persistent storage on your nodes. 232 // * `https://www.googleapis.com/auth/devstorage.read_only` is required for 233 // communicating with **gcr.io** 234 // (the [Google Container Registry](/container-registry/)). 235 // 236 // If unspecified, no scopes are added, unless Cloud Logging or Cloud 237 // Monitoring are enabled, in which case their required scopes will be added. 238 repeated string oauth_scopes = 3; 239 240 // The Google Cloud Platform Service Account to be used by the node VMs. If 241 // no Service Account is specified, the "default" service account is used. 242 string service_account = 9; 243 244 // The metadata key/value pairs assigned to instances in the cluster. 245 // 246 // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes 247 // in length. These are reflected as part of a URL in the metadata server. 248 // Additionally, to avoid ambiguity, keys must not conflict with any other 249 // metadata keys for the project or be one of the four reserved keys: 250 // "instance-template", "kube-env", "startup-script", and "user-data" 251 // 252 // Values are free-form strings, and only have meaning as interpreted by 253 // the image running in the instance. The only restriction placed on them is 254 // that each value's size must be less than or equal to 32 KB. 255 // 256 // The total size of all keys and values must be less than 512 KB. 257 map<string, string> metadata = 4; 258 259 // The image type to use for this node. Note that for a given image type, 260 // the latest version of it will be used. 261 string image_type = 5; 262 263 // The map of Kubernetes labels (key/value pairs) to be applied to each node. 264 // These will added in addition to any default label(s) that 265 // Kubernetes may apply to the node. 266 // In case of conflict in label keys, the applied set may differ depending on 267 // the Kubernetes version -- it's best to assume the behavior is undefined 268 // and conflicts should be avoided. 269 // For more information, including usage and the valid values, see: 270 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ 271 map<string, string> labels = 6; 272 273 // The number of local SSD disks to be attached to the node. 274 // 275 // The limit for this value is dependant upon the maximum number of 276 // disks available on a machine per zone. See: 277 // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits 278 // for more information. 279 int32 local_ssd_count = 7; 280 281 // The list of instance tags applied to all nodes. Tags are used to identify 282 // valid sources or targets for network firewalls and are specified by 283 // the client during cluster or node pool creation. Each tag within the list 284 // must comply with RFC1035. 285 repeated string tags = 8; 286 287 // Whether the nodes are created as preemptible VM instances. See: 288 // https://cloud.google.com/compute/docs/instances/preemptible for more 289 // inforamtion about preemptible VM instances. 290 bool preemptible = 10; 291 292 // A list of hardware accelerators to be attached to each node. 293 // See https://cloud.google.com/compute/docs/gpus for more information about 294 // support for GPUs. 295 repeated AcceleratorConfig accelerators = 11; 296 297 // Minimum CPU platform to be used by this instance. The instance may be 298 // scheduled on the specified or newer CPU platform. Applicable values are the 299 // friendly names of CPU platforms, such as 300 // <code>minCpuPlatform: "Intel Haswell"</code> or 301 // <code>minCpuPlatform: "Intel Sandy Bridge"</code>. For more 302 // information, read [how to specify min CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) 303 string min_cpu_platform = 13; 304 305 // List of kubernetes taints to be applied to each node. 306 // 307 // For more information, including usage and the valid values, see: 308 // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ 309 repeated NodeTaint taints = 15; 310} 311 312// Kubernetes taint is comprised of three fields: key, value, and effect. Effect 313// can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. 314// 315// For more information, including usage and the valid values, see: 316// https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ 317message NodeTaint { 318 // Possible values for Effect in taint. 319 enum Effect { 320 // Not set 321 EFFECT_UNSPECIFIED = 0; 322 323 // NoSchedule 324 NO_SCHEDULE = 1; 325 326 // PreferNoSchedule 327 PREFER_NO_SCHEDULE = 2; 328 329 // NoExecute 330 NO_EXECUTE = 3; 331 } 332 333 // Key for taint. 334 string key = 1; 335 336 // Value for taint. 337 string value = 2; 338 339 // Effect for taint. 340 Effect effect = 3; 341} 342 343// The authentication information for accessing the master endpoint. 344// Authentication can be done using HTTP basic auth or using client 345// certificates. 346message MasterAuth { 347 // The username to use for HTTP basic authentication to the master endpoint. 348 // For clusters v1.6.0 and later, you can disable basic authentication by 349 // providing an empty username. 350 string username = 1; 351 352 // The password to use for HTTP basic authentication to the master endpoint. 353 // Because the master endpoint is open to the Internet, you should create a 354 // strong password. If a password is provided for cluster creation, username 355 // must be non-empty. 356 string password = 2; 357 358 // Configuration for client certificate authentication on the cluster. If no 359 // configuration is specified, a client certificate is issued. 360 ClientCertificateConfig client_certificate_config = 3; 361 362 // [Output only] Base64-encoded public certificate that is the root of 363 // trust for the cluster. 364 string cluster_ca_certificate = 100; 365 366 // [Output only] Base64-encoded public certificate used by clients to 367 // authenticate to the cluster endpoint. 368 string client_certificate = 101; 369 370 // [Output only] Base64-encoded private key used by clients to authenticate 371 // to the cluster endpoint. 372 string client_key = 102; 373} 374 375// Configuration for client certificates on the cluster. 376message ClientCertificateConfig { 377 // Issue a client certificate. 378 bool issue_client_certificate = 1; 379} 380 381// Configuration for the addons that can be automatically spun up in the 382// cluster, enabling additional functionality. 383message AddonsConfig { 384 // Configuration for the HTTP (L7) load balancing controller addon, which 385 // makes it easy to set up HTTP load balancers for services in a cluster. 386 HttpLoadBalancing http_load_balancing = 1; 387 388 // Configuration for the horizontal pod autoscaling feature, which 389 // increases or decreases the number of replica pods a replication controller 390 // has based on the resource usage of the existing pods. 391 HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; 392 393 // Configuration for the Kubernetes Dashboard. 394 KubernetesDashboard kubernetes_dashboard = 3; 395 396 // Configuration for NetworkPolicy. This only tracks whether the addon 397 // is enabled or not on the Master, it does not track whether network policy 398 // is enabled for the nodes. 399 NetworkPolicyConfig network_policy_config = 4; 400} 401 402// Configuration options for the HTTP (L7) load balancing controller addon, 403// which makes it easy to set up HTTP load balancers for services in a cluster. 404message HttpLoadBalancing { 405 // Whether the HTTP Load Balancing controller is enabled in the cluster. 406 // When enabled, it runs a small pod in the cluster that manages the load 407 // balancers. 408 bool disabled = 1; 409} 410 411// Configuration options for the horizontal pod autoscaling feature, which 412// increases or decreases the number of replica pods a replication controller 413// has based on the resource usage of the existing pods. 414message HorizontalPodAutoscaling { 415 // Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. 416 // When enabled, it ensures that a Heapster pod is running in the cluster, 417 // which is also used by the Cloud Monitoring service. 418 bool disabled = 1; 419} 420 421// Configuration for the Kubernetes Dashboard. 422message KubernetesDashboard { 423 // Whether the Kubernetes Dashboard is enabled for this cluster. 424 bool disabled = 1; 425} 426 427// Configuration for NetworkPolicy. This only tracks whether the addon 428// is enabled or not on the Master, it does not track whether network policy 429// is enabled for the nodes. 430message NetworkPolicyConfig { 431 // Whether NetworkPolicy is enabled for this cluster. 432 bool disabled = 1; 433} 434 435// Configuration options for the master authorized networks feature. Enabled 436// master authorized networks will disallow all external traffic to access 437// Kubernetes master through HTTPS except traffic from the given CIDR blocks, 438// Google Compute Engine Public IPs and Google Prod IPs. 439message MasterAuthorizedNetworksConfig { 440 // CidrBlock contains an optional name and one CIDR block. 441 message CidrBlock { 442 // display_name is an optional field for users to identify CIDR blocks. 443 string display_name = 1; 444 445 // cidr_block must be specified in CIDR notation. 446 string cidr_block = 2; 447 } 448 449 // Whether or not master authorized networks is enabled. 450 bool enabled = 1; 451 452 // cidr_blocks define up to 10 external networks that could access 453 // Kubernetes master through HTTPS. 454 repeated CidrBlock cidr_blocks = 2; 455} 456 457// Configuration options for the NetworkPolicy feature. 458// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ 459message NetworkPolicy { 460 // Allowed Network Policy providers. 461 enum Provider { 462 // Not set 463 PROVIDER_UNSPECIFIED = 0; 464 465 // Tigera (Calico Felix). 466 CALICO = 1; 467 } 468 469 // The selected network policy provider. 470 Provider provider = 1; 471 472 // Whether network policy is enabled on the cluster. 473 bool enabled = 2; 474} 475 476// Configuration for controlling how IPs are allocated in the cluster. 477message IPAllocationPolicy { 478 // Whether alias IPs will be used for pod IPs in the cluster. 479 bool use_ip_aliases = 1; 480 481 // Whether a new subnetwork will be created automatically for the cluster. 482 // 483 // This field is only applicable when `use_ip_aliases` is true. 484 bool create_subnetwork = 2; 485 486 // A custom subnetwork name to be used if `create_subnetwork` is true. If 487 // this field is empty, then an automatic name will be chosen for the new 488 // subnetwork. 489 string subnetwork_name = 3; 490 491 // This field is deprecated, use cluster_ipv4_cidr_block. 492 string cluster_ipv4_cidr = 4; 493 494 // This field is deprecated, use node_ipv4_cidr_block. 495 string node_ipv4_cidr = 5; 496 497 // This field is deprecated, use services_ipv4_cidr_block. 498 string services_ipv4_cidr = 6; 499 500 // The name of the secondary range to be used for the cluster CIDR 501 // block. The secondary range will be used for pod IP 502 // addresses. This must be an existing secondary range associated 503 // with the cluster subnetwork. 504 // 505 // This field is only applicable if use_ip_aliases is true and 506 // create_subnetwork is false. 507 string cluster_secondary_range_name = 7; 508 509 // The name of the secondary range to be used as for the services 510 // CIDR block. The secondary range will be used for service 511 // ClusterIPs. This must be an existing secondary range associated 512 // with the cluster subnetwork. 513 // 514 // This field is only applicable with use_ip_aliases is true and 515 // create_subnetwork is false. 516 string services_secondary_range_name = 8; 517 518 // The IP address range for the cluster pod IPs. If this field is set, then 519 // `cluster.cluster_ipv4_cidr` must be left blank. 520 // 521 // This field is only applicable when `use_ip_aliases` is true. 522 // 523 // Set to blank to have a range chosen with the default size. 524 // 525 // Set to /netmask (e.g. `/14`) to have a range chosen with a specific 526 // netmask. 527 // 528 // Set to a 529 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 530 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. 531 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range 532 // to use. 533 string cluster_ipv4_cidr_block = 9; 534 535 // The IP address range of the instance IPs in this cluster. 536 // 537 // This is applicable only if `create_subnetwork` is true. 538 // 539 // Set to blank to have a range chosen with the default size. 540 // 541 // Set to /netmask (e.g. `/14`) to have a range chosen with a specific 542 // netmask. 543 // 544 // Set to a 545 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 546 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. 547 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range 548 // to use. 549 string node_ipv4_cidr_block = 10; 550 551 // The IP address range of the services IPs in this cluster. If blank, a range 552 // will be automatically chosen with the default size. 553 // 554 // This field is only applicable when `use_ip_aliases` is true. 555 // 556 // Set to blank to have a range chosen with the default size. 557 // 558 // Set to /netmask (e.g. `/14`) to have a range chosen with a specific 559 // netmask. 560 // 561 // Set to a 562 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 563 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. 564 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range 565 // to use. 566 string services_ipv4_cidr_block = 11; 567} 568 569// Configuration for the PodSecurityPolicy feature. 570message PodSecurityPolicyConfig { 571 // Enable the PodSecurityPolicy controller for this cluster. If enabled, pods 572 // must be valid under a PodSecurityPolicy to be created. 573 bool enabled = 1; 574} 575 576// A Google Container Engine cluster. 577message Cluster { 578 // The current status of the cluster. 579 enum Status { 580 // Not set. 581 STATUS_UNSPECIFIED = 0; 582 583 // The PROVISIONING state indicates the cluster is being created. 584 PROVISIONING = 1; 585 586 // The RUNNING state indicates the cluster has been created and is fully 587 // usable. 588 RUNNING = 2; 589 590 // The RECONCILING state indicates that some work is actively being done on 591 // the cluster, such as upgrading the master or node software. Details can 592 // be found in the `statusMessage` field. 593 RECONCILING = 3; 594 595 // The STOPPING state indicates the cluster is being deleted. 596 STOPPING = 4; 597 598 // The ERROR state indicates the cluster may be unusable. Details 599 // can be found in the `statusMessage` field. 600 ERROR = 5; 601 } 602 603 // The name of this cluster. The name must be unique within this project 604 // and zone, and can be up to 40 characters with the following restrictions: 605 // 606 // * Lowercase letters, numbers, and hyphens only. 607 // * Must start with a letter. 608 // * Must end with a number or a letter. 609 string name = 1; 610 611 // An optional description of this cluster. 612 string description = 2; 613 614 // The number of nodes to create in this cluster. You must ensure that your 615 // Compute Engine <a href="/compute/docs/resource-quotas">resource quota</a> 616 // is sufficient for this number of instances. You must also have available 617 // firewall and routes quota. 618 // For requests, this field should only be used in lieu of a 619 // "node_pool" object, since this configuration (along with the 620 // "node_config") will be used to create a "NodePool" object with an 621 // auto-generated name. Do not use this and a node_pool at the same time. 622 int32 initial_node_count = 3; 623 624 // Parameters used in creating the cluster's nodes. 625 // See `nodeConfig` for the description of its properties. 626 // For requests, this field should only be used in lieu of a 627 // "node_pool" object, since this configuration (along with the 628 // "initial_node_count") will be used to create a "NodePool" object with an 629 // auto-generated name. Do not use this and a node_pool at the same time. 630 // For responses, this field will be populated with the node configuration of 631 // the first node pool. 632 // 633 // If unspecified, the defaults are used. 634 NodeConfig node_config = 4; 635 636 // The authentication information for accessing the master endpoint. 637 MasterAuth master_auth = 5; 638 639 // The logging service the cluster should use to write logs. 640 // Currently available options: 641 // 642 // * `logging.googleapis.com` - the Google Cloud Logging service. 643 // * `none` - no logs will be exported from the cluster. 644 // * if left as an empty string,`logging.googleapis.com` will be used. 645 string logging_service = 6; 646 647 // The monitoring service the cluster should use to write metrics. 648 // Currently available options: 649 // 650 // * `monitoring.googleapis.com` - the Google Cloud Monitoring service. 651 // * `none` - no metrics will be exported from the cluster. 652 // * if left as an empty string, `monitoring.googleapis.com` will be used. 653 string monitoring_service = 7; 654 655 // The name of the Google Compute Engine 656 // [network](/compute/docs/networks-and-firewalls#networks) to which the 657 // cluster is connected. If left unspecified, the `default` network 658 // will be used. 659 string network = 8; 660 661 // The IP address range of the container pods in this cluster, in 662 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 663 // notation (e.g. `10.96.0.0/14`). Leave blank to have 664 // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. 665 string cluster_ipv4_cidr = 9; 666 667 // Configurations for the various addons available to run in the cluster. 668 AddonsConfig addons_config = 10; 669 670 // The name of the Google Compute Engine 671 // [subnetwork](/compute/docs/subnetworks) to which the 672 // cluster is connected. 673 string subnetwork = 11; 674 675 // The node pools associated with this cluster. 676 // This field should not be set if "node_config" or "initial_node_count" are 677 // specified. 678 repeated NodePool node_pools = 12; 679 680 // The list of Google Compute Engine 681 // [locations](/compute/docs/zones#available) in which the cluster's nodes 682 // should be located. 683 repeated string locations = 13; 684 685 // Kubernetes alpha features are enabled on this cluster. This includes alpha 686 // API groups (e.g. v1alpha1) and features that may not be production ready in 687 // the kubernetes version of the master and nodes. 688 // The cluster has no SLA for uptime and master/node upgrades are disabled. 689 // Alpha enabled clusters are automatically deleted thirty days after 690 // creation. 691 bool enable_kubernetes_alpha = 14; 692 693 // Configuration options for the NetworkPolicy feature. 694 NetworkPolicy network_policy = 19; 695 696 // Configuration for cluster IP allocation. 697 IPAllocationPolicy ip_allocation_policy = 20; 698 699 // The configuration options for master authorized networks feature. 700 MasterAuthorizedNetworksConfig master_authorized_networks_config = 22; 701 702 // Configure the maintenance policy for this cluster. 703 MaintenancePolicy maintenance_policy = 23; 704 705 // Configuration for the PodSecurityPolicy feature. 706 PodSecurityPolicyConfig pod_security_policy_config = 25; 707 708 // [Output only] Server-defined URL for the resource. 709 string self_link = 100; 710 711 // [Output only] The name of the Google Compute Engine 712 // [zone](/compute/docs/zones#available) in which the cluster 713 // resides. 714 // This field is deprecated, use location instead. 715 string zone = 101; 716 717 // [Output only] The IP address of this cluster's master endpoint. 718 // The endpoint can be accessed from the internet at 719 // `https://username:password@endpoint/`. 720 // 721 // See the `masterAuth` property of this resource for username and 722 // password information. 723 string endpoint = 102; 724 725 // The initial Kubernetes version for this cluster. Valid versions are those 726 // found in validMasterVersions returned by getServerConfig. The version can 727 // be upgraded over time; such upgrades are reflected in 728 // currentMasterVersion and currentNodeVersion. 729 string initial_cluster_version = 103; 730 731 // [Output only] The current software version of the master endpoint. 732 string current_master_version = 104; 733 734 // [Output only] The current version of the node software components. 735 // If they are currently at multiple versions because they're in the process 736 // of being upgraded, this reflects the minimum version of all nodes. 737 string current_node_version = 105; 738 739 // [Output only] The time the cluster was created, in 740 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 741 string create_time = 106; 742 743 // [Output only] The current status of this cluster. 744 Status status = 107; 745 746 // [Output only] Additional information about the current status of this 747 // cluster, if available. 748 string status_message = 108; 749 750 // [Output only] The size of the address space on each node for hosting 751 // containers. This is provisioned from within the `container_ipv4_cidr` 752 // range. 753 int32 node_ipv4_cidr_size = 109; 754 755 // [Output only] The IP address range of the Kubernetes services in 756 // this cluster, in 757 // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 758 // notation (e.g. `1.2.3.4/29`). Service addresses are 759 // typically put in the last `/16` from the container CIDR. 760 string services_ipv4_cidr = 110; 761 762 // [Output only] The resource URLs of [instance 763 // groups](/compute/docs/instance-groups/) associated with this 764 // cluster. 765 repeated string instance_group_urls = 111; 766 767 // [Output only] The number of nodes currently in the cluster. 768 int32 current_node_count = 112; 769 770 // [Output only] The time the cluster will be automatically 771 // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 772 string expire_time = 113; 773 774 // [Output only] The name of the Google Compute Engine 775 // [zone](/compute/docs/regions-zones/regions-zones#available) or 776 // [region](/compute/docs/regions-zones/regions-zones#available) in which 777 // the cluster resides. 778 string location = 114; 779} 780 781// ClusterUpdate describes an update to the cluster. Exactly one update can 782// be applied to a cluster with each request, so at most one field can be 783// provided. 784message ClusterUpdate { 785 // The Kubernetes version to change the nodes to (typically an 786 // upgrade). Use `-` to upgrade to the latest version supported by 787 // the server. 788 string desired_node_version = 4; 789 790 // The monitoring service the cluster should use to write metrics. 791 // Currently available options: 792 // 793 // * "monitoring.googleapis.com" - the Google Cloud Monitoring service 794 // * "none" - no metrics will be exported from the cluster 795 string desired_monitoring_service = 5; 796 797 // Configurations for the various addons available to run in the cluster. 798 AddonsConfig desired_addons_config = 6; 799 800 // The node pool to be upgraded. This field is mandatory if 801 // "desired_node_version", "desired_image_family" or 802 // "desired_node_pool_autoscaling" is specified and there is more than one 803 // node pool on the cluster. 804 string desired_node_pool_id = 7; 805 806 // The desired image type for the node pool. 807 // NOTE: Set the "desired_node_pool" field as well. 808 string desired_image_type = 8; 809 810 // Autoscaler configuration for the node pool specified in 811 // desired_node_pool_id. If there is only one pool in the 812 // cluster and desired_node_pool_id is not provided then 813 // the change applies to that single node pool. 814 NodePoolAutoscaling desired_node_pool_autoscaling = 9; 815 816 // The desired list of Google Compute Engine 817 // [locations](/compute/docs/zones#available) in which the cluster's nodes 818 // should be located. Changing the locations a cluster is in will result 819 // in nodes being either created or removed from the cluster, depending on 820 // whether locations are being added or removed. 821 // 822 // This list must always include the cluster's primary zone. 823 repeated string desired_locations = 10; 824 825 // The desired configuration options for master authorized networks feature. 826 MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; 827 828 // The desired configuration options for the PodSecurityPolicy feature. 829 PodSecurityPolicyConfig desired_pod_security_policy_config = 14; 830 831 // The Kubernetes version to change the master to. The only valid value is the 832 // latest supported version. Use "-" to have the server automatically select 833 // the latest version. 834 string desired_master_version = 100; 835} 836 837// This operation resource represents operations that may have happened or are 838// happening on the cluster. All fields are output only. 839message Operation { 840 // Current status of the operation. 841 enum Status { 842 // Not set. 843 STATUS_UNSPECIFIED = 0; 844 845 // The operation has been created. 846 PENDING = 1; 847 848 // The operation is currently running. 849 RUNNING = 2; 850 851 // The operation is done, either cancelled or completed. 852 DONE = 3; 853 854 // The operation is aborting. 855 ABORTING = 4; 856 } 857 858 // Operation type. 859 enum Type { 860 // Not set. 861 TYPE_UNSPECIFIED = 0; 862 863 // Cluster create. 864 CREATE_CLUSTER = 1; 865 866 // Cluster delete. 867 DELETE_CLUSTER = 2; 868 869 // A master upgrade. 870 UPGRADE_MASTER = 3; 871 872 // A node upgrade. 873 UPGRADE_NODES = 4; 874 875 // Cluster repair. 876 REPAIR_CLUSTER = 5; 877 878 // Cluster update. 879 UPDATE_CLUSTER = 6; 880 881 // Node pool create. 882 CREATE_NODE_POOL = 7; 883 884 // Node pool delete. 885 DELETE_NODE_POOL = 8; 886 887 // Set node pool management. 888 SET_NODE_POOL_MANAGEMENT = 9; 889 890 // Automatic node pool repair. 891 AUTO_REPAIR_NODES = 10; 892 893 // Automatic node upgrade. 894 AUTO_UPGRADE_NODES = 11; 895 896 // Set labels. 897 SET_LABELS = 12; 898 899 // Set/generate master auth materials 900 SET_MASTER_AUTH = 13; 901 902 // Set node pool size. 903 SET_NODE_POOL_SIZE = 14; 904 905 // Updates network policy for a cluster. 906 SET_NETWORK_POLICY = 15; 907 908 // Set the maintenance policy. 909 SET_MAINTENANCE_POLICY = 16; 910 } 911 912 // The server-assigned ID for the operation. 913 string name = 1; 914 915 // The name of the Google Compute Engine 916 // [zone](/compute/docs/zones#available) in which the operation 917 // is taking place. 918 // This field is deprecated, use location instead. 919 string zone = 2; 920 921 // The operation type. 922 Type operation_type = 3; 923 924 // The current status of the operation. 925 Status status = 4; 926 927 // Detailed operation progress, if available. 928 string detail = 8; 929 930 // If an error has occurred, a textual description of the error. 931 string status_message = 5; 932 933 // Server-defined URL for the resource. 934 string self_link = 6; 935 936 // Server-defined URL for the target of the operation. 937 string target_link = 7; 938 939 // [Output only] The name of the Google Compute Engine 940 // [zone](/compute/docs/regions-zones/regions-zones#available) or 941 // [region](/compute/docs/regions-zones/regions-zones#available) in which 942 // the cluster resides. 943 string location = 9; 944 945 // [Output only] The time the operation started, in 946 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 947 string start_time = 10; 948 949 // [Output only] The time the operation completed, in 950 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 951 string end_time = 11; 952} 953 954// CreateClusterRequest creates a cluster. 955message CreateClusterRequest { 956 // The Google Developers Console [project ID or project 957 // number](https://support.google.com/cloud/answer/6158840). 958 // This field is deprecated, use parent instead. 959 string project_id = 1; 960 961 // The name of the Google Compute Engine 962 // [zone](/compute/docs/zones#available) in which the cluster 963 // resides. 964 // This field is deprecated, use parent instead. 965 string zone = 2; 966 967 // A [cluster 968 // resource](/container-engine/reference/rest/v1alpha1/projects.zones.clusters) 969 Cluster cluster = 3; 970 971 // The parent (project and location) where the cluster will be created. 972 // Specified in the format 'projects/*/locations/*'. 973 string parent = 5; 974} 975 976// GetClusterRequest gets the settings of a cluster. 977message GetClusterRequest { 978 // The Google Developers Console [project ID or project 979 // number](https://support.google.com/cloud/answer/6158840). 980 // This field is deprecated, use name instead. 981 string project_id = 1; 982 983 // The name of the Google Compute Engine 984 // [zone](/compute/docs/zones#available) in which the cluster 985 // resides. 986 // This field is deprecated, use name instead. 987 string zone = 2; 988 989 // The name of the cluster to retrieve. 990 // This field is deprecated, use name instead. 991 string cluster_id = 3; 992 993 // The name (project, location, cluster) of the cluster to retrieve. 994 // Specified in the format 'projects/*/locations/*/clusters/*'. 995 string name = 5; 996} 997 998// UpdateClusterRequest updates the settings of a cluster. 999message UpdateClusterRequest { 1000 // The Google Developers Console [project ID or project 1001 // number](https://support.google.com/cloud/answer/6158840). 1002 // This field is deprecated, use name instead. 1003 string project_id = 1; 1004 1005 // The name of the Google Compute Engine 1006 // [zone](/compute/docs/zones#available) in which the cluster 1007 // resides. 1008 // This field is deprecated, use name instead. 1009 string zone = 2; 1010 1011 // The name of the cluster to upgrade. 1012 // This field is deprecated, use name instead. 1013 string cluster_id = 3; 1014 1015 // A description of the update. 1016 ClusterUpdate update = 4; 1017 1018 // The name (project, location, cluster) of the cluster to update. 1019 // Specified in the format 'projects/*/locations/*/clusters/*'. 1020 string name = 5; 1021} 1022 1023// SetNodePoolVersionRequest updates the version of a node pool. 1024message UpdateNodePoolRequest { 1025 // The Google Developers Console [project ID or project 1026 // number](https://support.google.com/cloud/answer/6158840). 1027 // This field is deprecated, use name instead. 1028 string project_id = 1; 1029 1030 // The name of the Google Compute Engine 1031 // [zone](/compute/docs/zones#available) in which the cluster 1032 // resides. 1033 // This field is deprecated, use name instead. 1034 string zone = 2; 1035 1036 // The name of the cluster to upgrade. 1037 // This field is deprecated, use name instead. 1038 string cluster_id = 3; 1039 1040 // The name of the node pool to upgrade. 1041 // This field is deprecated, use name instead. 1042 string node_pool_id = 4; 1043 1044 // The Kubernetes version to change the nodes to (typically an 1045 // upgrade). Use `-` to upgrade to the latest version supported by 1046 // the server. 1047 string node_version = 5; 1048 1049 // The desired image type for the node pool. 1050 string image_type = 6; 1051 1052 // The name (project, location, cluster, node pool) of the node pool to update. 1053 // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. 1054 string name = 8; 1055} 1056 1057// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. 1058message SetNodePoolAutoscalingRequest { 1059 // The Google Developers Console [project ID or project 1060 // number](https://support.google.com/cloud/answer/6158840). 1061 // This field is deprecated, use name instead. 1062 string project_id = 1; 1063 1064 // The name of the Google Compute Engine 1065 // [zone](/compute/docs/zones#available) in which the cluster 1066 // resides. 1067 // This field is deprecated, use name instead. 1068 string zone = 2; 1069 1070 // The name of the cluster to upgrade. 1071 // This field is deprecated, use name instead. 1072 string cluster_id = 3; 1073 1074 // The name of the node pool to upgrade. 1075 // This field is deprecated, use name instead. 1076 string node_pool_id = 4; 1077 1078 // Autoscaling configuration for the node pool. 1079 NodePoolAutoscaling autoscaling = 5; 1080 1081 // The name (project, location, cluster, node pool) of the node pool to set 1082 // autoscaler settings. Specified in the format 1083 // 'projects/*/locations/*/clusters/*/nodePools/*'. 1084 string name = 6; 1085} 1086 1087// SetLoggingServiceRequest sets the logging service of a cluster. 1088message SetLoggingServiceRequest { 1089 // The Google Developers Console [project ID or project 1090 // number](https://support.google.com/cloud/answer/6158840). 1091 // This field is deprecated, use name instead. 1092 string project_id = 1; 1093 1094 // The name of the Google Compute Engine 1095 // [zone](/compute/docs/zones#available) in which the cluster 1096 // resides. 1097 string zone = 2; 1098 1099 // The name of the cluster to upgrade. 1100 // This field is deprecated, use name instead. 1101 string cluster_id = 3; 1102 1103 // The logging service the cluster should use to write metrics. 1104 // Currently available options: 1105 // 1106 // * "logging.googleapis.com" - the Google Cloud Logging service 1107 // * "none" - no metrics will be exported from the cluster 1108 string logging_service = 4; 1109 1110 // The name (project, location, cluster) of the cluster to set logging. 1111 // Specified in the format 'projects/*/locations/*/clusters/*'. 1112 string name = 5; 1113} 1114 1115// SetMonitoringServiceRequest sets the monitoring service of a cluster. 1116message SetMonitoringServiceRequest { 1117 // The Google Developers Console [project ID or project 1118 // number](https://support.google.com/cloud/answer/6158840). 1119 // This field is deprecated, use name instead. 1120 string project_id = 1; 1121 1122 // The name of the Google Compute Engine 1123 // [zone](/compute/docs/zones#available) in which the cluster 1124 // resides. 1125 // This field is deprecated, use name instead. 1126 string zone = 2; 1127 1128 // The name of the cluster to upgrade. 1129 // This field is deprecated, use name instead. 1130 string cluster_id = 3; 1131 1132 // The monitoring service the cluster should use to write metrics. 1133 // Currently available options: 1134 // 1135 // * "monitoring.googleapis.com" - the Google Cloud Monitoring service 1136 // * "none" - no metrics will be exported from the cluster 1137 string monitoring_service = 4; 1138 1139 // The name (project, location, cluster) of the cluster to set monitoring. 1140 // Specified in the format 'projects/*/locations/*/clusters/*'. 1141 string name = 6; 1142} 1143 1144// SetAddonsRequest sets the addons associated with the cluster. 1145message SetAddonsConfigRequest { 1146 // The Google Developers Console [project ID or project 1147 // number](https://support.google.com/cloud/answer/6158840). 1148 // This field is deprecated, use name instead. 1149 string project_id = 1; 1150 1151 // The name of the Google Compute Engine 1152 // [zone](/compute/docs/zones#available) in which the cluster 1153 // resides. 1154 // This field is deprecated, use name instead. 1155 string zone = 2; 1156 1157 // The name of the cluster to upgrade. 1158 // This field is deprecated, use name instead. 1159 string cluster_id = 3; 1160 1161 // The desired configurations for the various addons available to run in the 1162 // cluster. 1163 AddonsConfig addons_config = 4; 1164 1165 // The name (project, location, cluster) of the cluster to set addons. 1166 // Specified in the format 'projects/*/locations/*/clusters/*'. 1167 string name = 6; 1168} 1169 1170// SetLocationsRequest sets the locations of the cluster. 1171message SetLocationsRequest { 1172 // The Google Developers Console [project ID or project 1173 // number](https://support.google.com/cloud/answer/6158840). 1174 // This field is deprecated, use name instead. 1175 string project_id = 1; 1176 1177 // The name of the Google Compute Engine 1178 // [zone](/compute/docs/zones#available) in which the cluster 1179 // resides. 1180 // This field is deprecated, use name instead. 1181 string zone = 2; 1182 1183 // The name of the cluster to upgrade. 1184 // This field is deprecated, use name instead. 1185 string cluster_id = 3; 1186 1187 // The desired list of Google Compute Engine 1188 // [locations](/compute/docs/zones#available) in which the cluster's nodes 1189 // should be located. Changing the locations a cluster is in will result 1190 // in nodes being either created or removed from the cluster, depending on 1191 // whether locations are being added or removed. 1192 // 1193 // This list must always include the cluster's primary zone. 1194 repeated string locations = 4; 1195 1196 // The name (project, location, cluster) of the cluster to set locations. 1197 // Specified in the format 'projects/*/locations/*/clusters/*'. 1198 string name = 6; 1199} 1200 1201// UpdateMasterRequest updates the master of the cluster. 1202message UpdateMasterRequest { 1203 // The Google Developers Console [project ID or project 1204 // number](https://support.google.com/cloud/answer/6158840). 1205 string project_id = 1; 1206 1207 // The name of the Google Compute Engine 1208 // [zone](/compute/docs/zones#available) in which the cluster 1209 // resides. 1210 // This field is deprecated, use name instead. 1211 string zone = 2; 1212 1213 // The name of the cluster to upgrade. 1214 // This field is deprecated, use name instead. 1215 string cluster_id = 3; 1216 1217 // The Kubernetes version to change the master to. The only valid value is the 1218 // latest supported version. Use "-" to have the server automatically select 1219 // the latest version. 1220 string master_version = 4; 1221 1222 // The name (project, location, cluster) of the cluster to update. 1223 // Specified in the format 'projects/*/locations/*/clusters/*'. 1224 string name = 7; 1225} 1226 1227// SetMasterAuthRequest updates the admin password of a cluster. 1228message SetMasterAuthRequest { 1229 // Operation type: what type update to perform. 1230 enum Action { 1231 // Operation is unknown and will error out. 1232 UNKNOWN = 0; 1233 1234 // Set the password to a user generated value. 1235 SET_PASSWORD = 1; 1236 1237 // Generate a new password and set it to that. 1238 GENERATE_PASSWORD = 2; 1239 1240 // Set the username. If an empty username is provided, basic authentication 1241 // is disabled for the cluster. If a non-empty username is provided, basic 1242 // authentication is enabled, with either a provided password or a generated 1243 // one. 1244 SET_USERNAME = 3; 1245 } 1246 1247 // The Google Developers Console [project ID or project 1248 // number](https://support.google.com/cloud/answer/6158840). 1249 // This field is deprecated, use name instead. 1250 string project_id = 1; 1251 1252 // The name of the Google Compute Engine 1253 // [zone](/compute/docs/zones#available) in which the cluster 1254 // resides. 1255 // This field is deprecated, use name instead. 1256 string zone = 2; 1257 1258 // The name of the cluster to upgrade. 1259 // This field is deprecated, use name instead. 1260 string cluster_id = 3; 1261 1262 // The exact form of action to be taken on the master auth. 1263 Action action = 4; 1264 1265 // A description of the update. 1266 MasterAuth update = 5; 1267 1268 // The name (project, location, cluster) of the cluster to set auth. 1269 // Specified in the format 'projects/*/locations/*/clusters/*'. 1270 string name = 7; 1271} 1272 1273// DeleteClusterRequest deletes a cluster. 1274message DeleteClusterRequest { 1275 // The Google Developers Console [project ID or project 1276 // number](https://support.google.com/cloud/answer/6158840). 1277 // This field is deprecated, use name instead. 1278 string project_id = 1; 1279 1280 // The name of the Google Compute Engine 1281 // [zone](/compute/docs/zones#available) in which the cluster 1282 // resides. 1283 // This field is deprecated, use name instead. 1284 string zone = 2; 1285 1286 // The name of the cluster to delete. 1287 // This field is deprecated, use name instead. 1288 string cluster_id = 3; 1289 1290 // The name (project, location, cluster) of the cluster to delete. 1291 // Specified in the format 'projects/*/locations/*/clusters/*'. 1292 string name = 4; 1293} 1294 1295// ListClustersRequest lists clusters. 1296message ListClustersRequest { 1297 // The Google Developers Console [project ID or project 1298 // number](https://support.google.com/cloud/answer/6158840). 1299 // This field is deprecated, use parent instead. 1300 string project_id = 1; 1301 1302 // The name of the Google Compute Engine 1303 // [zone](/compute/docs/zones#available) in which the cluster 1304 // resides, or "-" for all zones. 1305 // This field is deprecated, use parent instead. 1306 string zone = 2; 1307 1308 // The parent (project and location) where the clusters will be listed. 1309 // Specified in the format 'projects/*/locations/*'. 1310 // Location "-" matches all zones and all regions. 1311 string parent = 4; 1312} 1313 1314// ListClustersResponse is the result of ListClustersRequest. 1315message ListClustersResponse { 1316 // A list of clusters in the project in the specified zone, or 1317 // across all ones. 1318 repeated Cluster clusters = 1; 1319 1320 // If any zones are listed here, the list of clusters returned 1321 // may be missing those zones. 1322 repeated string missing_zones = 2; 1323} 1324 1325// GetOperationRequest gets a single operation. 1326message GetOperationRequest { 1327 // The Google Developers Console [project ID or project 1328 // number](https://support.google.com/cloud/answer/6158840). 1329 // This field is deprecated, use name instead. 1330 string project_id = 1; 1331 1332 // The name of the Google Compute Engine 1333 // [zone](/compute/docs/zones#available) in which the cluster 1334 // resides. 1335 // This field is deprecated, use name instead. 1336 string zone = 2; 1337 1338 // The server-assigned `name` of the operation. 1339 // This field is deprecated, use name instead. 1340 string operation_id = 3; 1341 1342 // The name (project, location, operation id) of the operation to get. 1343 // Specified in the format 'projects/*/locations/*/operations/*'. 1344 string name = 5; 1345} 1346 1347// ListOperationsRequest lists operations. 1348message ListOperationsRequest { 1349 // The Google Developers Console [project ID or project 1350 // number](https://support.google.com/cloud/answer/6158840). 1351 // This field is deprecated, use parent instead. 1352 string project_id = 1; 1353 1354 // The name of the Google Compute Engine [zone](/compute/docs/zones#available) 1355 // to return operations for, or `-` for all zones. 1356 // This field is deprecated, use parent instead. 1357 string zone = 2; 1358 1359 // The parent (project and location) where the operations will be listed. 1360 // Specified in the format 'projects/*/locations/*'. 1361 // Location "-" matches all zones and all regions. 1362 string parent = 4; 1363} 1364 1365// CancelOperationRequest cancels a single operation. 1366message CancelOperationRequest { 1367 // The Google Developers Console [project ID or project 1368 // number](https://support.google.com/cloud/answer/6158840). 1369 // This field is deprecated, use name instead. 1370 string project_id = 1; 1371 1372 // The name of the Google Compute Engine 1373 // [zone](/compute/docs/zones#available) in which the operation resides. 1374 // This field is deprecated, use name instead. 1375 string zone = 2; 1376 1377 // The server-assigned `name` of the operation. 1378 // This field is deprecated, use name instead. 1379 string operation_id = 3; 1380 1381 // The name (project, location, operation id) of the operation to cancel. 1382 // Specified in the format 'projects/*/locations/*/operations/*'. 1383 string name = 4; 1384} 1385 1386// ListOperationsResponse is the result of ListOperationsRequest. 1387message ListOperationsResponse { 1388 // A list of operations in the project in the specified zone. 1389 repeated Operation operations = 1; 1390 1391 // If any zones are listed here, the list of operations returned 1392 // may be missing the operations from those zones. 1393 repeated string missing_zones = 2; 1394} 1395 1396// Gets the current Container Engine service configuration. 1397message GetServerConfigRequest { 1398 // The Google Developers Console [project ID or project 1399 // number](https://support.google.com/cloud/answer/6158840). 1400 // This field is deprecated, use name instead. 1401 string project_id = 1; 1402 1403 // The name of the Google Compute Engine [zone](/compute/docs/zones#available) 1404 // to return operations for. 1405 // This field is deprecated, use name instead. 1406 string zone = 2; 1407 1408 // The name (project and location) of the server config to get 1409 // Specified in the format 'projects/*/locations/*'. 1410 string name = 4; 1411} 1412 1413// Container Engine service configuration. 1414message ServerConfig { 1415 // Version of Kubernetes the service deploys by default. 1416 string default_cluster_version = 1; 1417 1418 // List of valid node upgrade target versions. 1419 repeated string valid_node_versions = 3; 1420 1421 // Default image type. 1422 string default_image_type = 4; 1423 1424 // List of valid image types. 1425 repeated string valid_image_types = 5; 1426 1427 // List of valid master versions. 1428 repeated string valid_master_versions = 6; 1429} 1430 1431// CreateNodePoolRequest creates a node pool for a cluster. 1432message CreateNodePoolRequest { 1433 // The Google Developers Console [project ID or project 1434 // number](https://developers.google.com/console/help/new/#projectnumber). 1435 // This field is deprecated, use parent instead. 1436 string project_id = 1; 1437 1438 // The name of the Google Compute Engine 1439 // [zone](/compute/docs/zones#available) in which the cluster 1440 // resides. 1441 // This field is deprecated, use parent instead. 1442 string zone = 2; 1443 1444 // The name of the cluster. 1445 // This field is deprecated, use parent instead. 1446 string cluster_id = 3; 1447 1448 // The node pool to create. 1449 NodePool node_pool = 4; 1450 1451 // The parent (project, location, cluster id) where the node pool will be created. 1452 // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. 1453 string parent = 6; 1454} 1455 1456// DeleteNodePoolRequest deletes a node pool for a cluster. 1457message DeleteNodePoolRequest { 1458 // The Google Developers Console [project ID or project 1459 // number](https://developers.google.com/console/help/new/#projectnumber). 1460 // This field is deprecated, use name instead. 1461 string project_id = 1; 1462 1463 // The name of the Google Compute Engine 1464 // [zone](/compute/docs/zones#available) in which the cluster 1465 // resides. 1466 // This field is deprecated, use name instead. 1467 string zone = 2; 1468 1469 // The name of the cluster. 1470 // This field is deprecated, use name instead. 1471 string cluster_id = 3; 1472 1473 // The name of the node pool to delete. 1474 // This field is deprecated, use name instead. 1475 string node_pool_id = 4; 1476 1477 // The name (project, location, cluster, node pool id) of the node pool to delete. 1478 // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. 1479 string name = 6; 1480} 1481 1482// ListNodePoolsRequest lists the node pool(s) for a cluster. 1483message ListNodePoolsRequest { 1484 // The Google Developers Console [project ID or project 1485 // number](https://developers.google.com/console/help/new/#projectnumber). 1486 // This field is deprecated, use parent instead. 1487 string project_id = 1; 1488 1489 // The name of the Google Compute Engine 1490 // [zone](/compute/docs/zones#available) in which the cluster 1491 // resides. 1492 // This field is deprecated, use parent instead. 1493 string zone = 2; 1494 1495 // The name of the cluster. 1496 // This field is deprecated, use parent instead. 1497 string cluster_id = 3; 1498 1499 // The parent (project, location, cluster id) where the node pools will be listed. 1500 // Specified in the format 'projects/*/locations/*/clusters/*'. 1501 string parent = 5; 1502} 1503 1504// GetNodePoolRequest retrieves a node pool for a cluster. 1505message GetNodePoolRequest { 1506 // The Google Developers Console [project ID or project 1507 // number](https://developers.google.com/console/help/new/#projectnumber). 1508 // This field is deprecated, use name instead. 1509 string project_id = 1; 1510 1511 // The name of the Google Compute Engine 1512 // [zone](/compute/docs/zones#available) in which the cluster 1513 // resides. 1514 // This field is deprecated, use name instead. 1515 string zone = 2; 1516 1517 // The name of the cluster. 1518 // This field is deprecated, use name instead. 1519 string cluster_id = 3; 1520 1521 // The name of the node pool. 1522 // This field is deprecated, use name instead. 1523 string node_pool_id = 4; 1524 1525 // The name (project, location, cluster, node pool id) of the node pool to get. 1526 // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. 1527 string name = 6; 1528} 1529 1530// NodePool contains the name and configuration for a cluster's node pool. 1531// Node pools are a set of nodes (i.e. VM's), with a common configuration and 1532// specification, under the control of the cluster master. They may have a set 1533// of Kubernetes labels applied to them, which may be used to reference them 1534// during pod scheduling. They may also be resized up or down, to accommodate 1535// the workload. 1536message NodePool { 1537 // The current status of the node pool instance. 1538 enum Status { 1539 // Not set. 1540 STATUS_UNSPECIFIED = 0; 1541 1542 // The PROVISIONING state indicates the node pool is being created. 1543 PROVISIONING = 1; 1544 1545 // The RUNNING state indicates the node pool has been created 1546 // and is fully usable. 1547 RUNNING = 2; 1548 1549 // The RUNNING_WITH_ERROR state indicates the node pool has been created 1550 // and is partially usable. Some error state has occurred and some 1551 // functionality may be impaired. Customer may need to reissue a request 1552 // or trigger a new update. 1553 RUNNING_WITH_ERROR = 3; 1554 1555 // The RECONCILING state indicates that some work is actively being done on 1556 // the node pool, such as upgrading node software. Details can 1557 // be found in the `statusMessage` field. 1558 RECONCILING = 4; 1559 1560 // The STOPPING state indicates the node pool is being deleted. 1561 STOPPING = 5; 1562 1563 // The ERROR state indicates the node pool may be unusable. Details 1564 // can be found in the `statusMessage` field. 1565 ERROR = 6; 1566 } 1567 1568 // The name of the node pool. 1569 string name = 1; 1570 1571 // The node configuration of the pool. 1572 NodeConfig config = 2; 1573 1574 // The initial node count for the pool. You must ensure that your 1575 // Compute Engine <a href="/compute/docs/resource-quotas">resource quota</a> 1576 // is sufficient for this number of instances. You must also have available 1577 // firewall and routes quota. 1578 int32 initial_node_count = 3; 1579 1580 // Autoscaler configuration for this NodePool. Autoscaler is enabled 1581 // only if a valid configuration is present. 1582 NodePoolAutoscaling autoscaling = 4; 1583 1584 // NodeManagement configuration for this NodePool. 1585 NodeManagement management = 5; 1586 1587 // [Output only] Server-defined URL for the resource. 1588 string self_link = 100; 1589 1590 // [Output only] The version of the Kubernetes of this node. 1591 string version = 101; 1592 1593 // [Output only] The resource URLs of [instance 1594 // groups](/compute/docs/instance-groups/) associated with this 1595 // node pool. 1596 repeated string instance_group_urls = 102; 1597 1598 // [Output only] The status of the nodes in this pool instance. 1599 Status status = 103; 1600 1601 // [Output only] Additional information about the current status of this 1602 // node pool instance, if available. 1603 string status_message = 104; 1604} 1605 1606// NodeManagement defines the set of node management services turned on for the 1607// node pool. 1608message NodeManagement { 1609 // Whether the nodes will be automatically upgraded. 1610 bool auto_upgrade = 1; 1611 1612 // Whether the nodes will be automatically repaired. 1613 bool auto_repair = 2; 1614 1615 // Specifies the Auto Upgrade knobs for the node pool. 1616 AutoUpgradeOptions upgrade_options = 10; 1617} 1618 1619// AutoUpgradeOptions defines the set of options for the user to control how 1620// the Auto Upgrades will proceed. 1621message AutoUpgradeOptions { 1622 // [Output only] This field is set when upgrades are about to commence 1623 // with the approximate start time for the upgrades, in 1624 // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. 1625 string auto_upgrade_start_time = 1; 1626 1627 // [Output only] This field is set when upgrades are about to commence 1628 // with the description of the upgrade. 1629 string description = 2; 1630} 1631 1632// MaintenancePolicy defines the maintenance policy to be used for the cluster. 1633message MaintenancePolicy { 1634 // Specifies the maintenance window in which maintenance may be performed. 1635 MaintenanceWindow window = 1; 1636} 1637 1638// MaintenanceWindow defines the maintenance window to be used for the cluster. 1639message MaintenanceWindow { 1640 // Unimplemented, reserved for future use. 1641 // HourlyMaintenanceWindow hourly_maintenance_window = 1; 1642 oneof policy { 1643 // DailyMaintenanceWindow specifies a daily maintenance operation window. 1644 DailyMaintenanceWindow daily_maintenance_window = 2; 1645 } 1646} 1647 1648// Time window specified for daily maintenance operations. 1649message DailyMaintenanceWindow { 1650 // Time within the maintenance window to start the maintenance operations. 1651 // It must be in format "HH:MM”, where HH : [00-23] and MM : [00-59] GMT. 1652 string start_time = 2; 1653 1654 // [Output only] Duration of the time window, automatically chosen to be 1655 // smallest possible in the given scenario. 1656 string duration = 3; 1657} 1658 1659// SetNodePoolManagementRequest sets the node management properties of a node 1660// pool. 1661message SetNodePoolManagementRequest { 1662 // The Google Developers Console [project ID or project 1663 // number](https://support.google.com/cloud/answer/6158840). 1664 // This field is deprecated, use name instead. 1665 string project_id = 1; 1666 1667 // The name of the Google Compute Engine 1668 // [zone](/compute/docs/zones#available) in which the cluster 1669 // resides. 1670 // This field is deprecated, use name instead. 1671 string zone = 2; 1672 1673 // The name of the cluster to update. 1674 // This field is deprecated, use name instead. 1675 string cluster_id = 3; 1676 1677 // The name of the node pool to update. 1678 // This field is deprecated, use name instead. 1679 string node_pool_id = 4; 1680 1681 // NodeManagement configuration for the node pool. 1682 NodeManagement management = 5; 1683 1684 // The name (project, location, cluster, node pool id) of the node pool to set 1685 // management properties. Specified in the format 1686 // 'projects/*/locations/*/clusters/*/nodePools/*'. 1687 string name = 7; 1688} 1689 1690// SetNodePoolSizeRequest sets the size a node 1691// pool. 1692message SetNodePoolSizeRequest { 1693 // The Google Developers Console [project ID or project 1694 // number](https://support.google.com/cloud/answer/6158840). 1695 string project_id = 1; 1696 1697 // The name of the Google Compute Engine 1698 // [zone](/compute/docs/zones#available) in which the cluster 1699 // resides. 1700 // This field is deprecated, use name instead. 1701 string zone = 2; 1702 1703 // The name of the cluster to update. 1704 // This field is deprecated, use name instead. 1705 string cluster_id = 3; 1706 1707 // The name of the node pool to update. 1708 // This field is deprecated, use name instead. 1709 string node_pool_id = 4; 1710 1711 // The desired node count for the pool. 1712 int32 node_count = 5; 1713 1714 // The name (project, location, cluster, node pool id) of the node pool to set 1715 // size. 1716 // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. 1717 string name = 7; 1718} 1719 1720// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed 1721// NodePool upgrade. This will be an no-op if the last upgrade successfully 1722// completed. 1723message RollbackNodePoolUpgradeRequest { 1724 // The Google Developers Console [project ID or project 1725 // number](https://support.google.com/cloud/answer/6158840). 1726 // This field is deprecated, use name instead. 1727 string project_id = 1; 1728 1729 // The name of the Google Compute Engine 1730 // [zone](/compute/docs/zones#available) in which the cluster 1731 // resides. 1732 // This field is deprecated, use name instead. 1733 string zone = 2; 1734 1735 // The name of the cluster to rollback. 1736 // This field is deprecated, use name instead. 1737 string cluster_id = 3; 1738 1739 // The name of the node pool to rollback. 1740 // This field is deprecated, use name instead. 1741 string node_pool_id = 4; 1742 1743 // The name (project, location, cluster, node pool id) of the node poll to 1744 // rollback upgrade. 1745 // Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'. 1746 string name = 6; 1747} 1748 1749// ListNodePoolsResponse is the result of ListNodePoolsRequest. 1750message ListNodePoolsResponse { 1751 // A list of node pools for a cluster. 1752 repeated NodePool node_pools = 1; 1753} 1754 1755// NodePoolAutoscaling contains information required by cluster autoscaler to 1756// adjust the size of the node pool to the current cluster usage. 1757message NodePoolAutoscaling { 1758 // Is autoscaling enabled for this node pool. 1759 bool enabled = 1; 1760 1761 // Minimum number of nodes in the NodePool. Must be >= 1 and <= 1762 // max_node_count. 1763 int32 min_node_count = 2; 1764 1765 // Maximum number of nodes in the NodePool. Must be >= min_node_count. There 1766 // has to enough quota to scale up the cluster. 1767 int32 max_node_count = 3; 1768} 1769 1770// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container 1771// Engine cluster, which will in turn set them for Google Compute Engine 1772// resources used by that cluster 1773message SetLabelsRequest { 1774 // The Google Developers Console [project ID or project 1775 // number](https://developers.google.com/console/help/new/#projectnumber). 1776 // This field is deprecated, use name instead. 1777 string project_id = 1; 1778 1779 // The name of the Google Compute Engine 1780 // [zone](/compute/docs/zones#available) in which the cluster 1781 // resides. 1782 // This field is deprecated, use name instead. 1783 string zone = 2; 1784 1785 // The name of the cluster. 1786 // This field is deprecated, use name instead. 1787 string cluster_id = 3; 1788 1789 // The labels to set for that cluster. 1790 map<string, string> resource_labels = 4; 1791 1792 // The fingerprint of the previous set of labels for this resource, 1793 // used to detect conflicts. The fingerprint is initially generated by 1794 // Container Engine and changes after every request to modify or update 1795 // labels. You must always provide an up-to-date fingerprint hash when 1796 // updating or changing labels. Make a <code>get()</code> request to the 1797 // resource to get the latest fingerprint. 1798 string label_fingerprint = 5; 1799 1800 // The name (project, location, cluster id) of the cluster to set labels. 1801 // Specified in the format 'projects/*/locations/*/clusters/*'. 1802 string name = 7; 1803} 1804 1805// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for 1806// a cluster. 1807message SetLegacyAbacRequest { 1808 // The Google Developers Console [project ID or project 1809 // number](https://support.google.com/cloud/answer/6158840). 1810 // This field is deprecated, use name instead. 1811 string project_id = 1; 1812 1813 // The name of the Google Compute Engine 1814 // [zone](/compute/docs/zones#available) in which the cluster 1815 // resides. 1816 // This field is deprecated, use name instead. 1817 string zone = 2; 1818 1819 // The name of the cluster to update. 1820 // This field is deprecated, use name instead. 1821 string cluster_id = 3; 1822 1823 // Whether ABAC authorization will be enabled in the cluster. 1824 bool enabled = 4; 1825 1826 // The name (project, location, cluster id) of the cluster to set legacy abac. 1827 // Specified in the format 'projects/*/locations/*/clusters/*'. 1828 string name = 6; 1829} 1830 1831// StartIPRotationRequest creates a new IP for the cluster and then performs 1832// a node upgrade on each node pool to point to the new IP. 1833message StartIPRotationRequest { 1834 // The Google Developers Console [project ID or project 1835 // number](https://developers.google.com/console/help/new/#projectnumber). 1836 // This field is deprecated, use name instead. 1837 string project_id = 1; 1838 1839 // The name of the Google Compute Engine 1840 // [zone](/compute/docs/zones#available) in which the cluster 1841 // resides. 1842 // This field is deprecated, use name instead. 1843 string zone = 2; 1844 1845 // The name of the cluster. 1846 // This field is deprecated, use name instead. 1847 string cluster_id = 3; 1848 1849 // The name (project, location, cluster id) of the cluster to start IP rotation. 1850 // Specified in the format 'projects/*/locations/*/clusters/*'. 1851 string name = 6; 1852} 1853 1854// CompleteIPRotationRequest moves the cluster master back into single-IP mode. 1855message CompleteIPRotationRequest { 1856 // The Google Developers Console [project ID or project 1857 // number](https://developers.google.com/console/help/new/#projectnumber). 1858 // This field is deprecated, use name instead. 1859 string project_id = 1; 1860 1861 // The name of the Google Compute Engine 1862 // [zone](/compute/docs/zones#available) in which the cluster 1863 // resides. 1864 // This field is deprecated, use name instead. 1865 string zone = 2; 1866 1867 // The name of the cluster. 1868 // This field is deprecated, use name instead. 1869 string cluster_id = 3; 1870 1871 // The name (project, location, cluster id) of the cluster to complete IP rotation. 1872 // Specified in the format 'projects/*/locations/*/clusters/*'. 1873 string name = 7; 1874} 1875 1876// AcceleratorConfig represents a Hardware Accelerator request. 1877message AcceleratorConfig { 1878 // The number of the accelerator cards exposed to an instance. 1879 int64 accelerator_count = 1; 1880 1881 // The accelerator type resource name. List of supported accelerators 1882 // [here](/compute/docs/gpus/#Introduction) 1883 string accelerator_type = 2; 1884} 1885 1886// SetNetworkPolicyRequest enables/disables network policy for a cluster. 1887message SetNetworkPolicyRequest { 1888 // The Google Developers Console [project ID or project 1889 // number](https://developers.google.com/console/help/new/#projectnumber). 1890 // This field is deprecated, use name instead. 1891 string project_id = 1; 1892 1893 // The name of the Google Compute Engine 1894 // [zone](/compute/docs/zones#available) in which the cluster 1895 // resides. 1896 // This field is deprecated, use name instead. 1897 string zone = 2; 1898 1899 // The name of the cluster. 1900 // This field is deprecated, use name instead. 1901 string cluster_id = 3; 1902 1903 // Configuration options for the NetworkPolicy feature. 1904 NetworkPolicy network_policy = 4; 1905 1906 // The name (project, location, cluster id) of the cluster to set networking 1907 // policy. 1908 // Specified in the format 'projects/*/locations/*/clusters/*'. 1909 string name = 6; 1910} 1911 1912// SetMaintenancePolicyRequest sets the maintenance policy for a cluster. 1913message SetMaintenancePolicyRequest { 1914 // The Google Developers Console [project ID or project 1915 // number](https://support.google.com/cloud/answer/6158840). 1916 string project_id = 1; 1917 1918 // The name of the Google Compute Engine 1919 // [zone](/compute/docs/zones#available) in which the cluster 1920 // resides. 1921 string zone = 2; 1922 1923 // The name of the cluster to update. 1924 string cluster_id = 3; 1925 1926 // The maintenance policy to be set for the cluster. An empty field 1927 // clears the existing maintenance policy. 1928 MaintenancePolicy maintenance_policy = 4; 1929 1930 // The name (project, location, cluster id) of the cluster to set maintenance 1931 // policy. 1932 // Specified in the format 'projects/*/locations/*/clusters/*'. 1933 string name = 5; 1934} 1935