Add support for max pods per node to node pool. (#2038)

This commit is contained in:
Nathan McKinley 2018-09-12 17:49:26 -07:00 committed by GitHub
parent 51108005fa
commit 81f8befbb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 616 additions and 35 deletions

View File

@ -84,6 +84,11 @@ var schemaNodePool = map[string]*schema.Schema{
},
},
"max_pods_per_node": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
},
"initial_node_count": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
@ -468,6 +473,12 @@ func expandNodePool(d *schema.ResourceData, prefix string) (*containerBeta.NodeP
}
}
if v, ok := d.GetOk(prefix + "max_pods_per_node"); ok {
np.MaxPodsConstraint = &containerBeta.MaxPodsConstraint{
MaxPodsPerNode: int64(v.(int)),
}
}
if v, ok := d.GetOk(prefix + "management"); ok {
managementConfig := v.([]interface{})[0].(map[string]interface{})
np.Management = &containerBeta.NodeManagement{}
@ -520,6 +531,10 @@ func flattenNodePool(d *schema.ResourceData, config *Config, np *containerBeta.N
}
}
if np.MaxPodsConstraint != nil {
nodePool["max_pods_per_node"] = np.MaxPodsConstraint.MaxPodsPerNode
}
nodePool["management"] = []map[string]interface{}{
{
"auto_repair": np.Management.AutoRepair,

View File

@ -32,6 +32,29 @@ func TestAccContainerNodePool_basic(t *testing.T) {
})
}
func TestAccContainerNodePool_maxPodsPerNode(t *testing.T) {
t.Parallel()
cluster := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
np := fmt.Sprintf("tf-nodepool-test-%s", acctest.RandString(10))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckContainerNodePoolDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccContainerNodePool_maxPodsPerNode(cluster, np),
},
resource.TestStep{
ResourceName: "google_container_node_pool.np",
ImportState: true,
ImportStateVerify: true,
},
},
})
}
func TestAccContainerNodePool_namePrefix(t *testing.T) {
t.Parallel()
@ -513,6 +536,58 @@ resource "google_container_node_pool" "np" {
}`, cluster, np)
}
func testAccContainerNodePool_maxPodsPerNode(cluster, np string) string {
return fmt.Sprintf(`
resource "google_compute_network" "container_network" {
name = "container-net-%s"
auto_create_subnetworks = false
}
resource "google_compute_subnetwork" "container_subnetwork" {
name = "${google_compute_network.container_network.name}"
network = "${google_compute_network.container_network.name}"
ip_cidr_range = "10.0.36.0/24"
region = "us-central1"
private_ip_google_access = true
secondary_ip_range {
range_name = "pod"
ip_cidr_range = "10.0.0.0/19"
}
secondary_ip_range {
range_name = "svc"
ip_cidr_range = "10.0.32.0/22"
}
}
resource "google_container_cluster" "cluster" {
name = "%s"
zone = "us-central1-a"
initial_node_count = 3
network = "${google_compute_network.container_network.name}"
subnetwork = "${google_compute_subnetwork.container_subnetwork.name}"
private_cluster = true
master_ipv4_cidr_block = "10.42.0.0/28"
ip_allocation_policy {
cluster_secondary_range_name = "${google_compute_subnetwork.container_subnetwork.secondary_ip_range.0.range_name}"
services_secondary_range_name = "${google_compute_subnetwork.container_subnetwork.secondary_ip_range.1.range_name}"
}
master_authorized_networks_config {
cidr_blocks = []
}
}
resource "google_container_node_pool" "np" {
name = "%s"
zone = "us-central1-a"
cluster = "${google_container_cluster.cluster.name}"
max_pods_per_node = 30
initial_node_count = 2
}`, cluster, cluster, np)
}
func testAccContainerNodePool_regionalClusters(cluster, np string) string {
return fmt.Sprintf(`
resource "google_container_cluster" "cluster" {

View File

@ -2435,7 +2435,7 @@
}
}
},
"revision": "20180713",
"revision": "20180824",
"rootUrl": "https://container.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
@ -2560,6 +2560,10 @@
"$ref": "AddonsConfig",
"description": "Configurations for the various addons available to run in the cluster."
},
"autoscaling": {
"$ref": "ClusterAutoscaling",
"description": "Cluster-level autoscaling configuration."
},
"binaryAuthorization": {
"$ref": "BinaryAuthorization",
"description": "Configuration for Binary Authorization."
@ -2568,6 +2572,13 @@
"description": "The IP address range of the container pods in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`). Leave blank to have\none automatically chosen or specify a `/14` block in `10.0.0.0/8`.",
"type": "string"
},
"conditions": {
"description": "Which conditions caused the current cluster state.",
"items": {
"$ref": "StatusCondition"
},
"type": "array"
},
"createTime": {
"description": "[Output only] The time the cluster was created, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.",
"type": "string"
@ -2582,9 +2593,13 @@
"type": "integer"
},
"currentNodeVersion": {
"description": "[Output only] The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.",
"description": "[Output only] Deprecated, use\n[NodePool.version](/kubernetes-engine/docs/reference/rest/v1beta1/projects.zones.clusters.nodePool)\ninstead. The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.",
"type": "string"
},
"defaultMaxPodsConstraint": {
"$ref": "MaxPodsConstraint",
"description": "The default constraint on the maximum number of pods that can be run\nsimultaneously on a node in the node pool of this cluster. Only honored\nif cluster created with IP Alias support."
},
"description": {
"description": "An optional description of this cluster.",
"type": "string"
@ -2768,6 +2783,24 @@
},
"type": "object"
},
"ClusterAutoscaling": {
"description": "ClusterAutoscaling contains global, per-cluster information\nrequired by Cluster Autoscaler to automatically adjust\nthe size of the cluster and create/delete\nnode pools based on the current needs.",
"id": "ClusterAutoscaling",
"properties": {
"enableNodeAutoprovisioning": {
"description": "Enables automatic node pool creation and deletion.",
"type": "boolean"
},
"resourceLimits": {
"description": "Contains global constraints regarding minimum and maximum\namount of resources in the cluster.",
"items": {
"$ref": "ResourceLimit"
},
"type": "array"
}
},
"type": "object"
},
"ClusterUpdate": {
"description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided.",
"id": "ClusterUpdate",
@ -2780,6 +2813,10 @@
"$ref": "BinaryAuthorization",
"description": "The desired configuration options for the Binary Authorization feature."
},
"desiredClusterAutoscaling": {
"$ref": "ClusterAutoscaling",
"description": "Cluster-level autoscaling configuration."
},
"desiredImageType": {
"description": "The desired image type for the node pool.\nNOTE: Set the \"desired_node_pool\" field as well.",
"type": "string"
@ -3176,7 +3213,7 @@
},
"clientCertificateConfig": {
"$ref": "ClientCertificateConfig",
"description": "Configuration for client certificate authentication on the cluster. If no\nconfiguration is specified, a client certificate is issued."
"description": "Configuration for client certificate authentication on the cluster. For\nclusters before v1.12, if no configuration is specified, a client\ncertificate is issued."
},
"clientKey": {
"description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.",
@ -3215,6 +3252,18 @@
},
"type": "object"
},
"MaxPodsConstraint": {
"description": "Constraints applied to pods.",
"id": "MaxPodsConstraint",
"properties": {
"maxPodsPerNode": {
"description": "Constraint enforced on the max num of pods per node.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"Metric": {
"description": "Progress metric is (string, int|float|string) pair.",
"id": "Metric",
@ -3245,11 +3294,11 @@
"id": "NetworkConfig",
"properties": {
"network": {
"description": "Output only. The name of the Google Compute Engine\nnetwork(/compute/docs/networks-and-firewalls#networks).\nExample: projects/my-project/global/networks/my-network",
"description": "Output only. The relative name of the Google Compute Engine\nnetwork(/compute/docs/networks-and-firewalls#networks) to which\nthe cluster is connected.\nExample: projects/my-project/global/networks/my-network",
"type": "string"
},
"subnetwork": {
"description": "Output only. The name of the Google Compute Engine\n[subnetwork](/compute/docs/vpc).\nExample: projects/my-project/regions/us-central1/subnetworks/my-subnet",
"description": "Output only. The relative name of the Google Compute Engine\n[subnetwork](/compute/docs/vpc) to which the cluster is connected.\nExample: projects/my-project/regions/us-central1/subnetworks/my-subnet",
"type": "string"
}
},
@ -3333,7 +3382,7 @@
"additionalProperties": {
"type": "string"
},
"description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"gci-update-strategy\"\n \"gci-ensure-gke-docker\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.",
"description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"enable-oslogin\"\n \"gci-ensure-gke-docker\"\n \"gci-update-strategy\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.",
"type": "object"
},
"minCpuPlatform": {
@ -3403,6 +3452,13 @@
"$ref": "NodePoolAutoscaling",
"description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present."
},
"conditions": {
"description": "Which conditions caused the current node pool state.",
"items": {
"$ref": "StatusCondition"
},
"type": "array"
},
"config": {
"$ref": "NodeConfig",
"description": "The node configuration of the pool."
@ -3423,6 +3479,10 @@
"$ref": "NodeManagement",
"description": "NodeManagement configuration for this NodePool."
},
"maxPodsConstraint": {
"$ref": "MaxPodsConstraint",
"description": "The constraint on the maximum number of pods that can be run\nsimultaneously on a node in the node pool."
},
"name": {
"description": "The name of the node pool.",
"type": "string"
@ -3468,6 +3528,10 @@
"description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage.",
"id": "NodePoolAutoscaling",
"properties": {
"autoprovisioned": {
"description": "Can this node pool be deleted automatically.",
"type": "boolean"
},
"enabled": {
"description": "Is autoscaling enabled for this node pool.",
"type": "boolean"
@ -3520,6 +3584,13 @@
"description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only.",
"id": "Operation",
"properties": {
"clusterConditions": {
"description": "Which conditions caused the current cluster state.",
"items": {
"$ref": "StatusCondition"
},
"type": "array"
},
"detail": {
"description": "Detailed operation progress, if available.",
"type": "string"
@ -3536,6 +3607,13 @@
"description": "The server-assigned ID for the operation.",
"type": "string"
},
"nodepoolConditions": {
"description": "Which conditions caused the current node pool state.",
"items": {
"$ref": "StatusCondition"
},
"type": "array"
},
"operationType": {
"description": "The operation type.",
"enum": [
@ -3704,6 +3782,27 @@
},
"type": "object"
},
"ResourceLimit": {
"description": "Contains information about amount of some resource in the cluster.\nFor memory, value should be in GB.",
"id": "ResourceLimit",
"properties": {
"maximum": {
"description": "Maximum amount of the resource in the cluster.",
"format": "int64",
"type": "string"
},
"minimum": {
"description": "Minimum amount of the resource in the cluster.",
"format": "int64",
"type": "string"
},
"resourceType": {
"description": "Resource name \"cpu\", \"memory\" or gpu-specific string.",
"type": "string"
}
},
"type": "object"
},
"RollbackNodePoolUpgradeRequest": {
"description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed\nNodePool upgrade. This will be an no-op if the last upgrade successfully\ncompleted.",
"id": "RollbackNodePoolUpgradeRequest",
@ -4157,6 +4256,31 @@
},
"type": "object"
},
"StatusCondition": {
"description": "StatusCondition describes why a cluster or a node pool has a certain status\n(e.g., ERROR or DEGRADED).",
"id": "StatusCondition",
"properties": {
"code": {
"description": "Machine-friendly representation of the condition",
"enum": [
"UNKNOWN",
"GCE_STOCKOUT",
"GKE_SERVICE_ACCOUNT_DELETED"
],
"enumDescriptions": [
"UNKNOWN indicates a generic condition.",
"GCE_STOCKOUT indicates a GCE stockout.",
"GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot\nservice account.\nMore codes TBA"
],
"type": "string"
},
"message": {
"description": "Human-friendly representation of the condition",
"type": "string"
}
},
"type": "object"
},
"UpdateClusterRequest": {
"description": "UpdateClusterRequest updates the settings of a cluster.",
"id": "UpdateClusterRequest",
@ -4258,6 +4382,17 @@
"description": "Network Name.\nExample: projects/my-project/global/networks/my-network",
"type": "string"
},
"secondaryIpRanges": {
"description": "Secondary IP ranges.",
"items": {
"$ref": "UsableSubnetworkSecondaryRange"
},
"type": "array"
},
"statusMessage": {
"description": "A human readable status message representing the reasons for cases where\nthe caller cannot use the secondary ranges under the subnet. For example if\nthe secondary_ip_ranges is empty due to a permission issue, an insufficient\npermission message will be given by status_message.",
"type": "string"
},
"subnetwork": {
"description": "Subnetwork Name.\nExample: projects/my-project/regions/us-central1/subnetworks/my-subnet",
"type": "string"
@ -4265,6 +4400,39 @@
},
"type": "object"
},
"UsableSubnetworkSecondaryRange": {
"description": "Secondary IP range of a usable subnetwork.",
"id": "UsableSubnetworkSecondaryRange",
"properties": {
"ipCidrRange": {
"description": "The range of IP addresses belonging to this subnetwork secondary range.",
"type": "string"
},
"rangeName": {
"description": "The name associated with this subnetwork secondary range, used when adding\nan alias IP range to a VM instance.",
"type": "string"
},
"status": {
"description": "This field is to determine the status of the secondary range programmably.",
"enum": [
"UNKNOWN",
"UNUSED",
"IN_USE_SERVICE",
"IN_USE_SHAREABLE_POD",
"IN_USE_MANAGED_POD"
],
"enumDescriptions": [
"UNKNOWN is the zero value of the Status enum. It's not a valid status.",
"UNUSED denotes that this range is unclaimed by any cluster.",
"IN_USE_SERVICE denotes that this range is claimed by a cluster for\nservices. It cannot be used for other clusters.",
"IN_USE_SHAREABLE_POD denotes this range was created by the network admin\nand is currently claimed by a cluster for pods. It can only be used by\nother clusters as a pod range.",
"IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed\nfor pods. It cannot be used for other clusters."
],
"type": "string"
}
},
"type": "object"
},
"WorkloadMetadataConfig": {
"description": "WorkloadMetadataConfig defines the metadata configuration to expose to\nworkloads on the node pool.",
"id": "WorkloadMetadataConfig",

View File

@ -482,6 +482,9 @@ type Cluster struct {
// in the cluster.
AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"`
// Autoscaling: Cluster-level autoscaling configuration.
Autoscaling *ClusterAutoscaling `json:"autoscaling,omitempty"`
// BinaryAuthorization: Configuration for Binary Authorization.
BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"`
@ -494,6 +497,9 @@ type Cluster struct {
// one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"`
// Conditions: Which conditions caused the current cluster state.
Conditions []*StatusCondition `json:"conditions,omitempty"`
// CreateTime: [Output only] The time the cluster was created,
// in
// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
@ -507,13 +513,23 @@ type Cluster struct {
// cluster.
CurrentNodeCount int64 `json:"currentNodeCount,omitempty"`
// CurrentNodeVersion: [Output only] The current version of the node
// software components.
// CurrentNodeVersion: [Output only] Deprecated,
// use
// [NodePool.version](/kubernetes-engine/docs/reference/rest/v1beta1/
// projects.zones.clusters.nodePool)
// 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.
CurrentNodeVersion string `json:"currentNodeVersion,omitempty"`
// DefaultMaxPodsConstraint: 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.
DefaultMaxPodsConstraint *MaxPodsConstraint `json:"defaultMaxPodsConstraint,omitempty"`
// Description: An optional description of this cluster.
Description string `json:"description,omitempty"`
@ -823,6 +839,46 @@ func (s *Cluster) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClusterAutoscaling: ClusterAutoscaling contains global, per-cluster
// information
// required by Cluster Autoscaler to automatically adjust
// the size of the cluster and create/delete
// node pools based on the current needs.
type ClusterAutoscaling struct {
// EnableNodeAutoprovisioning: Enables automatic node pool creation and
// deletion.
EnableNodeAutoprovisioning bool `json:"enableNodeAutoprovisioning,omitempty"`
// ResourceLimits: Contains global constraints regarding minimum and
// maximum
// amount of resources in the cluster.
ResourceLimits []*ResourceLimit `json:"resourceLimits,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "EnableNodeAutoprovisioning") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "EnableNodeAutoprovisioning") to include in API requests with the
// JSON null value. By default, fields with empty values are omitted
// from API requests. However, any field with an empty value appearing
// in NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClusterAutoscaling) MarshalJSON() ([]byte, error) {
type NoMethod ClusterAutoscaling
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClusterUpdate: ClusterUpdate describes an update to the cluster.
// Exactly one update can
// be applied to a cluster with each request, so at most one field can
@ -837,6 +893,9 @@ type ClusterUpdate struct {
// Binary Authorization feature.
DesiredBinaryAuthorization *BinaryAuthorization `json:"desiredBinaryAuthorization,omitempty"`
// DesiredClusterAutoscaling: Cluster-level autoscaling configuration.
DesiredClusterAutoscaling *ClusterAutoscaling `json:"desiredClusterAutoscaling,omitempty"`
// DesiredImageType: The desired image type for the node pool.
// NOTE: Set the "desired_node_pool" field as well.
DesiredImageType string `json:"desiredImageType,omitempty"`
@ -1814,8 +1873,10 @@ type MasterAuth struct {
ClientCertificate string `json:"clientCertificate,omitempty"`
// ClientCertificateConfig: Configuration for client certificate
// authentication on the cluster. If no
// configuration is specified, a client certificate is issued.
// authentication on the cluster. For
// clusters before v1.12, if no configuration is specified, a
// client
// certificate is issued.
ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"`
// ClientKey: [Output only] Base64-encoded private key used by clients
@ -1907,6 +1968,35 @@ func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MaxPodsConstraint: Constraints applied to pods.
type MaxPodsConstraint struct {
// MaxPodsPerNode: Constraint enforced on the max num of pods per node.
MaxPodsPerNode int64 `json:"maxPodsPerNode,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "MaxPodsPerNode") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *MaxPodsConstraint) MarshalJSON() ([]byte, error) {
type NoMethod MaxPodsConstraint
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Metric: Progress metric is (string, int|float|string) pair.
type Metric struct {
// DoubleValue: For metrics with floating point value.
@ -1963,16 +2053,17 @@ func (s *Metric) UnmarshalJSON(data []byte) error {
// NetworkConfig: NetworkConfig reports the relative names of network &
// subnetwork.
type NetworkConfig struct {
// Network: Output only. The name of the Google Compute
// Network: Output only. The relative name of the Google Compute
// Engine
// network(/compute/docs/networks-and-firewalls#networks).
// Example
// : projects/my-project/global/networks/my-network
// network(/compute/docs/networks-and-firewalls#networks) to which
// the cluster is connected.
// Example: projects/my-project/global/networks/my-network
Network string `json:"network,omitempty"`
// Subnetwork: Output only. The name of the Google Compute
// Subnetwork: Output only. The relative name of the Google Compute
// Engine
// [subnetwork](/compute/docs/vpc).
// [subnetwork](/compute/docs/vpc) to which the cluster is
// connected.
// Example:
// projects/my-project/regions/us-central1/subnetworks/my-subnet
Subnetwork string `json:"subnetwork,omitempty"`
@ -2147,8 +2238,9 @@ type NodeConfig struct {
// "cluster-name"
// "cluster-uid"
// "configure-sh"
// "gci-update-strategy"
// "enable-oslogin"
// "gci-ensure-gke-docker"
// "gci-update-strategy"
// "instance-template"
// "kube-env"
// "startup-script"
@ -2311,6 +2403,9 @@ type NodePool struct {
// only if a valid configuration is present.
Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"`
// Conditions: Which conditions caused the current node pool state.
Conditions []*StatusCondition `json:"conditions,omitempty"`
// Config: The node configuration of the pool.
Config *NodeConfig `json:"config,omitempty"`
@ -2333,6 +2428,11 @@ type NodePool struct {
// Management: NodeManagement configuration for this NodePool.
Management *NodeManagement `json:"management,omitempty"`
// MaxPodsConstraint: The constraint on the maximum number of pods that
// can be run
// simultaneously on a node in the node pool.
MaxPodsConstraint *MaxPodsConstraint `json:"maxPodsConstraint,omitempty"`
// Name: The name of the node pool.
Name string `json:"name,omitempty"`
@ -2405,6 +2505,9 @@ func (s *NodePool) MarshalJSON() ([]byte, error) {
// required by cluster autoscaler to
// adjust the size of the node pool to the current cluster usage.
type NodePoolAutoscaling struct {
// Autoprovisioned: Can this node pool be deleted automatically.
Autoprovisioned bool `json:"autoprovisioned,omitempty"`
// Enabled: Is autoscaling enabled for this node pool.
Enabled bool `json:"enabled,omitempty"`
@ -2418,7 +2521,7 @@ type NodePoolAutoscaling struct {
// max_node_count.
MinNodeCount int64 `json:"minNodeCount,omitempty"`
// ForceSendFields is a list of field names (e.g. "Enabled") to
// ForceSendFields is a list of field names (e.g. "Autoprovisioned") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
@ -2426,12 +2529,13 @@ type NodePoolAutoscaling struct {
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Enabled") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
// NullFields is a list of field names (e.g. "Autoprovisioned") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
@ -2493,6 +2597,9 @@ func (s *NodeTaint) MarshalJSON() ([]byte, error) {
// have happened or are
// happening on the cluster. All fields are output only.
type Operation struct {
// ClusterConditions: Which conditions caused the current cluster state.
ClusterConditions []*StatusCondition `json:"clusterConditions,omitempty"`
// Detail: Detailed operation progress, if available.
Detail string `json:"detail,omitempty"`
@ -2513,6 +2620,10 @@ type Operation struct {
// Name: The server-assigned ID for the operation.
Name string `json:"name,omitempty"`
// NodepoolConditions: Which conditions caused the current node pool
// state.
NodepoolConditions []*StatusCondition `json:"nodepoolConditions,omitempty"`
// OperationType: The operation type.
//
// Possible values:
@ -2574,20 +2685,21 @@ type Operation struct {
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Detail") to
// unconditionally include in API requests. By default, fields with
// ForceSendFields is a list of field names (e.g. "ClusterConditions")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Detail") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
// NullFields is a list of field names (e.g. "ClusterConditions") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
@ -2731,6 +2843,42 @@ func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ResourceLimit: Contains information about amount of some resource in
// the cluster.
// For memory, value should be in GB.
type ResourceLimit struct {
// Maximum: Maximum amount of the resource in the cluster.
Maximum int64 `json:"maximum,omitempty,string"`
// Minimum: Minimum amount of the resource in the cluster.
Minimum int64 `json:"minimum,omitempty,string"`
// ResourceType: Resource name "cpu", "memory" or gpu-specific string.
ResourceType string `json:"resourceType,omitempty"`
// ForceSendFields is a list of field names (e.g. "Maximum") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Maximum") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ResourceLimit) MarshalJSON() ([]byte, error) {
type NoMethod ResourceLimit
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest
// rollbacks the previously Aborted or Failed
// NodePool upgrade. This will be an no-op if the last upgrade
@ -3600,6 +3748,47 @@ func (s *StartIPRotationRequest) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// StatusCondition: StatusCondition describes why a cluster or a node
// pool has a certain status
// (e.g., ERROR or DEGRADED).
type StatusCondition struct {
// Code: Machine-friendly representation of the condition
//
// Possible values:
// "UNKNOWN" - UNKNOWN indicates a generic condition.
// "GCE_STOCKOUT" - GCE_STOCKOUT indicates a GCE stockout.
// "GKE_SERVICE_ACCOUNT_DELETED" - GKE_SERVICE_ACCOUNT_DELETED
// indicates that the user deleted their robot
// service account.
// More codes TBA
Code string `json:"code,omitempty"`
// Message: Human-friendly representation of the condition
Message string `json:"message,omitempty"`
// ForceSendFields is a list of field names (e.g. "Code") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Code") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *StatusCondition) MarshalJSON() ([]byte, error) {
type NoMethod StatusCondition
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// UpdateClusterRequest: UpdateClusterRequest updates the settings of a
// cluster.
type UpdateClusterRequest struct {
@ -3804,6 +3993,18 @@ type UsableSubnetwork struct {
// Example: projects/my-project/global/networks/my-network
Network string `json:"network,omitempty"`
// SecondaryIpRanges: Secondary IP ranges.
SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"`
// StatusMessage: A human readable status message representing the
// reasons for cases where
// the caller cannot use the secondary ranges under the subnet. For
// example if
// the secondary_ip_ranges is empty due to a permission issue, an
// insufficient
// permission message will be given by status_message.
StatusMessage string `json:"statusMessage,omitempty"`
// Subnetwork: Subnetwork Name.
// Example:
// projects/my-project/regions/us-central1/subnetworks/my-subnet
@ -3832,6 +4033,62 @@ func (s *UsableSubnetwork) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// UsableSubnetworkSecondaryRange: Secondary IP range of a usable
// subnetwork.
type UsableSubnetworkSecondaryRange struct {
// IpCidrRange: The range of IP addresses belonging to this subnetwork
// secondary range.
IpCidrRange string `json:"ipCidrRange,omitempty"`
// RangeName: The name associated with this subnetwork secondary range,
// used when adding
// an alias IP range to a VM instance.
RangeName string `json:"rangeName,omitempty"`
// Status: This field is to determine the status of the secondary range
// programmably.
//
// Possible values:
// "UNKNOWN" - UNKNOWN is the zero value of the Status enum. It's not
// a valid status.
// "UNUSED" - UNUSED denotes that this range is unclaimed by any
// cluster.
// "IN_USE_SERVICE" - IN_USE_SERVICE denotes that this range is
// claimed by a cluster for
// services. It cannot be used for other clusters.
// "IN_USE_SHAREABLE_POD" - IN_USE_SHAREABLE_POD denotes this range
// was created by the network admin
// and is currently claimed by a cluster for pods. It can only be used
// by
// other clusters as a pod range.
// "IN_USE_MANAGED_POD" - IN_USE_MANAGED_POD denotes this range was
// created by GKE and is claimed
// for pods. It cannot be used for other clusters.
Status string `json:"status,omitempty"`
// ForceSendFields is a list of field names (e.g. "IpCidrRange") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "IpCidrRange") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) {
type NoMethod UsableSubnetworkSecondaryRange
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// WorkloadMetadataConfig: WorkloadMetadataConfig defines the metadata
// configuration to expose to
// workloads on the node pool.
@ -3978,6 +4235,7 @@ func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*ht
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/aggregated/usableSubnetworks")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -4175,6 +4433,7 @@ func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Resp
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/serverConfig")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -4324,6 +4583,7 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/locations")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -4456,6 +4716,7 @@ func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string)
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:completeIpRotation")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -4607,6 +4868,7 @@ func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Respo
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -4776,6 +5038,7 @@ func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Respo
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
@ -4960,6 +5223,7 @@ func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -5137,6 +5401,7 @@ func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Respons
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -5279,6 +5544,7 @@ func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Re
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAddons")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -5415,6 +5681,7 @@ func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*htt
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLegacyAbac")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -5550,6 +5817,7 @@ func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLocations")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -5685,6 +5953,7 @@ func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.R
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLogging")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -5820,6 +6089,7 @@ func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMaintenancePolicy")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -5959,6 +6229,7 @@ func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*htt
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMasterAuth")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -6094,6 +6365,7 @@ func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*htt
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMonitoring")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -6229,6 +6501,7 @@ func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (*
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setNetworkPolicy")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -6364,6 +6637,7 @@ func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) (
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setResourceLabels")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -6499,6 +6773,7 @@ func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*h
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:startIpRotation")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -6634,6 +6909,7 @@ func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Respo
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PUT", urls, body)
@ -6769,6 +7045,7 @@ func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:updateMaster")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -6904,6 +7181,7 @@ func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*h
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -7070,6 +7348,7 @@ func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*h
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
@ -7267,6 +7546,7 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -7456,6 +7736,7 @@ func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*htt
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -7605,6 +7886,7 @@ func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) (
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -7741,6 +8023,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt str
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAutoscaling")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -7876,6 +8159,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt stri
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setManagement")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -8011,6 +8295,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (*
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setSize")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -8147,6 +8432,7 @@ func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*h
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PUT", urls, body)
@ -8282,6 +8568,7 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -8454,6 +8741,7 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -8631,6 +8919,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/operations")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -8791,6 +9080,7 @@ func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/serverconfig")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -8939,6 +9229,7 @@ func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response,
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -9093,6 +9384,7 @@ func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*ht
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -9261,6 +9553,7 @@ func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response,
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -9419,6 +9712,7 @@ func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response,
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
@ -9590,6 +9884,7 @@ func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, er
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -9747,6 +10042,7 @@ func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Respo
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -9917,6 +10213,7 @@ func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, e
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -10065,6 +10362,7 @@ func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Respon
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -10219,6 +10517,7 @@ func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -10373,6 +10672,7 @@ func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response,
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -10527,6 +10827,7 @@ func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Respo
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -10681,6 +10982,7 @@ func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.R
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -10835,6 +11137,7 @@ func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (*
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -10993,6 +11296,7 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Re
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -11147,6 +11451,7 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -11301,6 +11606,7 @@ func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -11455,6 +11761,7 @@ func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response,
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PUT", urls, body)
@ -11611,6 +11918,7 @@ func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -11773,6 +12081,7 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -11932,6 +12241,7 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
@ -12115,6 +12425,7 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Res
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -12294,6 +12605,7 @@ func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Re
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -12454,6 +12766,7 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*htt
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -12618,6 +12931,7 @@ func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string)
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -12782,6 +13096,7 @@ func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -12947,6 +13262,7 @@ func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -13109,6 +13425,7 @@ func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Respons
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
@ -13278,6 +13595,7 @@ func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response,
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
@ -13449,6 +13767,7 @@ func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response,
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)

6
vendor/vendor.json vendored
View File

@ -1316,10 +1316,10 @@
"revisionTime": "2017-10-21T00:03:56Z"
},
{
"checksumSHA1": "fPjdgvz7HJGaoi+SRAelRopu8tM=",
"checksumSHA1": "joNKYN3Ys9p72vEzXyMTVlSI5q0=",
"path": "google.golang.org/api/container/v1beta1",
"revision": "0e8d13b5c025da6a7cf249bb854e5869921dd459",
"revisionTime": "2018-08-14T00:05:10Z"
"revision": "7ca32eb868bf53ea2fc406698eb98583a8073d19",
"revisionTime": "2018-09-10T00:04:50Z"
},
{
"checksumSHA1": "pxXDGWhDrfcAOCQCjgxLfZA4NOw=",

View File

@ -129,6 +129,10 @@ Note: You must be provide region for regional clusters and zone for zonal cluste
* `management` - (Optional) Node management configuration, wherein auto-repair and
auto-upgrade is configured. Structure is documented below.
* `max_pods_per_node` - (Optional) The maximum number of pods per node in this node pool.
Note that this does not work on node pools which are "route-based" - that is, node
pools belonging to clusters that do not have IP Aliasing enabled.
* `name` - (Optional) The name of the node pool. If left blank, Terraform will
auto-generate a unique name.