Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for google_compute_autoscaler autoscalingPolicy.cpuUtilization.predictiveMethod #4523

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions mmv1/products/compute/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,16 @@ objects:
scales up until it reaches the maximum number of instances you
specified or until the average utilization reaches the target
utilization.
- !ruby/object:Api::Type::String
name: 'predictiveMethod'
min_version: beta
default_value: NONE
upodroid marked this conversation as resolved.
Show resolved Hide resolved
description: |
Indicates whether predictive autoscaling based on CPU metric is enabled. Valid values are:

- NONE (default). No predictive method is used. The autoscaler scales the group to meet current demand based on real-time metrics.

- OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by monitoring daily and weekly load patterns and scaling out ahead of anticipated demand.
- !ruby/object:Api::Type::Array
name: 'customMetricUtilizations'
description: |
Expand Down Expand Up @@ -9661,6 +9671,16 @@ objects:
scales up until it reaches the maximum number of instances you
specified or until the average utilization reaches the target
utilization.
- !ruby/object:Api::Type::String
name: 'predictiveMethod'
min_version: beta
default_value: NONE
description: |
Indicates whether predictive autoscaling based on CPU metric is enabled. Valid values are:

- NONE (default). No predictive method is used. The autoscaler scales the group to meet current demand based on real-time metrics.

- OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by monitoring daily and weekly load patterns and scaling out ahead of anticipated demand.
- !ruby/object:Api::Type::Array
name: 'customMetricUtilizations'
description: |
Expand Down
4 changes: 4 additions & 0 deletions mmv1/products/compute/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
autoscalingPolicy.cpuUtilization.utilizationTarget: !ruby/object:Overrides::Terraform::PropertyOverride
name: target
required: true # See comment for minReplicas
autoscalingPolicy.cpuUtilization.predictiveMethod: !ruby/object:Overrides::Terraform::PropertyOverride
custom_flatten: 'templates/terraform/custom_flatten/default_if_empty.erb'
autoscalingPolicy.customMetricUtilizations: !ruby/object:Overrides::Terraform::PropertyOverride
name: metric
autoscalingPolicy.customMetricUtilizations.metric: !ruby/object:Overrides::Terraform::PropertyOverride
Expand Down Expand Up @@ -1693,6 +1695,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
autoscalingPolicy.cpuUtilization.utilizationTarget: !ruby/object:Overrides::Terraform::PropertyOverride
name: target
required: true # See comment for minReplicas
autoscalingPolicy.cpuUtilization.predictiveMethod: !ruby/object:Overrides::Terraform::PropertyOverride
custom_flatten: 'templates/terraform/custom_flatten/default_if_empty.erb'
autoscalingPolicy.customMetricUtilizations: !ruby/object:Overrides::Terraform::PropertyOverride
name: metric
autoscalingPolicy.customMetricUtilizations.metric: !ruby/object:Overrides::Terraform::PropertyOverride
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ resource "google_compute_autoscaler" "foobar" {
cooldown_period = 60
cpu_utilization {
target = 0.5
predictive_method = "OPTIMIZE_AVAILABILITY"
}
scale_down_control {
max_scaled_down_replicas {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ resource "google_compute_region_autoscaler" "foobar" {
cooldown_period = 60
cpu_utilization {
target = 0.5
predictive_method = "OPTIMIZE_AVAILABILITY"
}
scale_down_control {
max_scaled_down_replicas {
Expand Down