Skip to content

Commit

Permalink
Configure autoscaling profile in GKE clusters (#3076) (#5659)
Browse files Browse the repository at this point in the history
* GKE Cluster Autoscaling profile

* autoscaling profile and tests

* fix sqladmin api usage

* fixes

* update documentation

* fix sql api url and base path

* merge upstream changes to sql

* fix indentation character

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Feb 12, 2020
1 parent 28a091a commit 04866cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/3076.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:REPLACEME
Configure autoscaling profile in GKE clusters (https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler#autoscaling_profiles)
```
1 change: 1 addition & 0 deletions google/resource_container_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2221,6 +2221,7 @@ func flattenClusterAutoscaling(a *containerBeta.ClusterAutoscaling) []map[string
r["enabled"] = true
r["auto_provisioning_defaults"] = flattenAutoProvisioningDefaults(a.AutoprovisioningNodePoolDefaults)
}

return []map[string]interface{}{r}
}

Expand Down
5 changes: 5 additions & 0 deletions website/docs/r/container_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,11 @@ in addition to node auto-provisioning. Structure is documented below.
* `auto_provisioning_defaults` - (Optional) Contains defaults for a node pool created by NAP.
Structure is documented below.

* `autoscaling_profile` - (Optional, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) Configuration
options for the [Autoscaling profile](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler#autoscaling_profiles)
feature, which lets you choose whether the cluster autoscaler should optimize for resource utilization or resource availability
when deciding to remove nodes from a cluster. Can be `BALANCED` or `OPTIMIZE_UTILIZATION`. Defaults to `BALANCED`.

The `resource_limits` block supports:

* `resource_type` - (Required) The type of the resource. For example, `cpu` and
Expand Down

0 comments on commit 04866cc

Please sign in to comment.