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

Update backend service default values #11117

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
14 changes: 0 additions & 14 deletions mmv1/products/compute/BackendService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ properties:

See the [Backend Services Overview](https://cloud.google.com/load-balancing/docs/backend-service#balancing-mode)
for an explanation of load balancing modes.

From version 6.0.0 default value will be UTILIZATION to match default GCP value.
- !ruby/object:Api::Type::Double
name: 'capacityScaler'
send_empty_value: true
Expand Down Expand Up @@ -964,9 +962,6 @@ properties:
Settings controlling eviction of unhealthy hosts from the load balancing pool.
Applicable backend service types can be a global backend service with the
loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED.

From version 6.0.0 outlierDetection default terraform values will be removed to match default GCP value.
Default values are enforce by GCP without providing them.
properties:
- !ruby/object:Api::Type::NestedObject
name: 'baseEjectionTime'
Expand Down Expand Up @@ -1013,7 +1008,6 @@ properties:
- outlier_detection.0.success_rate_minimum_hosts
- outlier_detection.0.success_rate_request_volume
- outlier_detection.0.success_rate_stdev_factor
default_value: 5
description: |
Number of errors before a host is ejected from the connection pool. When the
backend host is accessed over HTTP, a 5xx return code qualifies as an error.
Expand All @@ -1032,7 +1026,6 @@ properties:
- outlier_detection.0.success_rate_minimum_hosts
- outlier_detection.0.success_rate_request_volume
- outlier_detection.0.success_rate_stdev_factor
default_value: 5
description: |
The number of consecutive gateway failures (502, 503, 504 status or connection
errors that are mapped to one of those status codes) before a consecutive
Expand All @@ -1051,7 +1044,6 @@ properties:
- outlier_detection.0.success_rate_minimum_hosts
- outlier_detection.0.success_rate_request_volume
- outlier_detection.0.success_rate_stdev_factor
default_value: 100
description: |
The percentage chance that a host will be actually ejected when an outlier
status is detected through consecutive 5xx. This setting can be used to disable
Expand All @@ -1070,7 +1062,6 @@ properties:
- outlier_detection.0.success_rate_minimum_hosts
- outlier_detection.0.success_rate_request_volume
- outlier_detection.0.success_rate_stdev_factor
default_value: 0
description: |
The percentage chance that a host will be actually ejected when an outlier
status is detected through consecutive gateway failures. This setting can be
Expand All @@ -1089,7 +1080,6 @@ properties:
- outlier_detection.0.success_rate_minimum_hosts
- outlier_detection.0.success_rate_request_volume
- outlier_detection.0.success_rate_stdev_factor
default_value: 100
description: |
The percentage chance that a host will be actually ejected when an outlier
status is detected through success rate statistics. This setting can be used to
Expand Down Expand Up @@ -1138,7 +1128,6 @@ properties:
- outlier_detection.0.success_rate_minimum_hosts
- outlier_detection.0.success_rate_request_volume
- outlier_detection.0.success_rate_stdev_factor
default_value: 10
description: |
Maximum percentage of hosts in the load balancing pool for the backend service
that can be ejected. Defaults to 10%.
Expand All @@ -1156,7 +1145,6 @@ properties:
- outlier_detection.0.success_rate_minimum_hosts
- outlier_detection.0.success_rate_request_volume
- outlier_detection.0.success_rate_stdev_factor
default_value: 5
description: |
The number of hosts in a cluster that must have enough request volume to detect
success rate outliers. If the number of hosts is less than this setting, outlier
Expand All @@ -1176,7 +1164,6 @@ properties:
- outlier_detection.0.success_rate_minimum_hosts
- outlier_detection.0.success_rate_request_volume
- outlier_detection.0.success_rate_stdev_factor
default_value: 100
description: |
The minimum number of total requests that must be collected in one interval (as
defined by the interval duration above) to include this host in success rate
Expand All @@ -1197,7 +1184,6 @@ properties:
- outlier_detection.0.success_rate_minimum_hosts
- outlier_detection.0.success_rate_request_volume
- outlier_detection.0.success_rate_stdev_factor
default_value: 1900
description: |
This factor is used to determine the ejection threshold for success rate outlier
ejection. The ejection threshold is the difference between the mean success
Expand Down
20 changes: 2 additions & 18 deletions mmv1/products/compute/RegionBackendService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ properties:
properties:
- !ruby/object:Api::Type::Enum
name: 'balancingMode'
default_value: :CONNECTION
default_value: :UTILIZATION
values:
- :UTILIZATION
- :RATE
Expand All @@ -164,8 +164,6 @@ properties:

See the [Backend Services Overview](https://cloud.google.com/load-balancing/docs/backend-service#balancing-mode)
for an explanation of load balancing modes.

From version 6.0.0 default value will be UTILIZATION to match default GCP value.
- !ruby/object:Api::Type::Double
name: 'capacityScaler'
description: |
Expand Down Expand Up @@ -655,13 +653,11 @@ properties:
- !ruby/object:Api::Type::Integer
name: 'connection_draining_timeout_sec'
api_name: drainingTimeoutSec
default_value: 0
default_value: 300
send_empty_value: true
description: |
Time for which instance will be drained (not accept new
connections, but still work to finish started).

From version 6.0.0 ConnectionDrainingTimeoutSec default value will be 300 to match default GCP value.
- !ruby/object:Api::Type::Time
name: 'creationTimestamp'
description: |
Expand Down Expand Up @@ -875,9 +871,6 @@ properties:
Settings controlling eviction of unhealthy hosts from the load balancing pool.
This field is applicable only when the `load_balancing_scheme` is set
to INTERNAL_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2.

From version 6.0.0 outlierDetection default terraform values will be removed to match default GCP value.
Default values are enforce by GCP without providing them.
properties:
- !ruby/object:Api::Type::NestedObject
name: 'baseEjectionTime'
Expand Down Expand Up @@ -912,7 +905,6 @@ properties:
`nanos` field. Must be from 0 to 999,999,999 inclusive.
- !ruby/object:Api::Type::Integer
name: 'consecutiveErrors'
default_value: 5
at_least_one_of:
- outlier_detection.0.base_ejection_time
- outlier_detection.0.consecutive_errors
Expand All @@ -931,7 +923,6 @@ properties:
Defaults to 5.
- !ruby/object:Api::Type::Integer
name: 'consecutiveGatewayFailure'
default_value: 5
at_least_one_of:
- outlier_detection.0.base_ejection_time
- outlier_detection.0.consecutive_errors
Expand All @@ -950,7 +941,6 @@ properties:
gateway failure ejection occurs. Defaults to 5.
- !ruby/object:Api::Type::Integer
name: 'enforcingConsecutiveErrors'
default_value: 100
at_least_one_of:
- outlier_detection.0.base_ejection_time
- outlier_detection.0.consecutive_errors
Expand All @@ -969,7 +959,6 @@ properties:
ejection or to ramp it up slowly. Defaults to 100.
- !ruby/object:Api::Type::Integer
name: 'enforcingConsecutiveGatewayFailure'
default_value: 0
at_least_one_of:
- outlier_detection.0.base_ejection_time
- outlier_detection.0.consecutive_errors
Expand All @@ -988,7 +977,6 @@ properties:
used to disable ejection or to ramp it up slowly. Defaults to 0.
- !ruby/object:Api::Type::Integer
name: 'enforcingSuccessRate'
default_value: 100
at_least_one_of:
- outlier_detection.0.base_ejection_time
- outlier_detection.0.consecutive_errors
Expand Down Expand Up @@ -1037,7 +1025,6 @@ properties:
`nanos` field. Must be from 0 to 999,999,999 inclusive.
- !ruby/object:Api::Type::Integer
name: 'maxEjectionPercent'
default_value: 10
at_least_one_of:
- outlier_detection.0.base_ejection_time
- outlier_detection.0.consecutive_errors
Expand All @@ -1055,7 +1042,6 @@ properties:
that can be ejected. Defaults to 10%.
- !ruby/object:Api::Type::Integer
name: 'successRateMinimumHosts'
default_value: 5
at_least_one_of:
- outlier_detection.0.base_ejection_time
- outlier_detection.0.consecutive_errors
Expand All @@ -1075,7 +1061,6 @@ properties:
cluster. Defaults to 5.
- !ruby/object:Api::Type::Integer
name: 'successRateRequestVolume'
default_value: 100
at_least_one_of:
- outlier_detection.0.base_ejection_time
- outlier_detection.0.consecutive_errors
Expand All @@ -1096,7 +1081,6 @@ properties:
to 100.
- !ruby/object:Api::Type::Integer
name: 'successRateStdevFactor'
default_value: 1900
at_least_one_of:
- outlier_detection.0.base_ejection_time
- outlier_detection.0.consecutive_errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ resource "google_compute_backend_service" "<%= ctx[:primary_resource_id] %>" {
}
}
outlier_detection {
consecutive_errors = 2
consecutive_errors = 2
consecutive_gateway_failure = 5
enforcing_consecutive_errors = 100
enforcing_consecutive_gateway_failure = 0
enforcing_success_rate = 100
max_ejection_percent = 10
success_rate_minimum_hosts = 5
success_rate_request_volume = 100
success_rate_stdev_factor = 1900
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ resource "google_compute_region_backend_service" "default" {
capacity_scaler = 1.0
}

region = "us-central1"
name = "{{index $.Vars "region_backend_service_name"}}"
protocol = "HTTP"
timeout_sec = 10

health_checks = [google_compute_region_health_check.default.id]
region = "us-central1"
name = "{{index $.Vars "region_backend_service_name"}}"
protocol = "HTTP"
timeout_sec = 10
connection_draining_timeout_sec = 0
health_checks = [google_compute_region_health_check.default.id]
}

data "google_compute_image" "debian_image" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ resource "google_compute_region_backend_service" "foobar" {
health_checks = [google_compute_health_check.zero.self_link]
region = "us-central1"

protocol = "%s"
protocol = "%s"
connection_draining_timeout_sec = 0
failover_policy {
# Disable connection drain on failover cannot be set when the protocol is UDP
drop_traffic_if_unhealthy = "%s"
Expand All @@ -616,7 +617,8 @@ resource "google_compute_region_backend_service" "foobar" {
health_checks = [google_compute_health_check.zero.self_link]
region = "us-central1"

protocol = "%s"
protocol = "%s"
connection_draining_timeout_sec = 0
failover_policy {
# Disable connection drain on failover cannot be set when the protocol is UDP
drop_traffic_if_unhealthy = "%s"
Expand Down Expand Up @@ -704,6 +706,7 @@ resource "google_compute_region_backend_service" "lipsum" {

backend {
group = google_compute_instance_group_manager.foobar.instance_group
balancing_mode = "CONNECTION"
<% unless version.nil? || version == 'ga' -%>
failover = true
}
Expand Down Expand Up @@ -773,6 +776,7 @@ resource "google_compute_region_backend_service" "lipsum" {

backend {
group = google_compute_instance_group_manager.foobar.instance_group
balancing_mode = "CONNECTION"
<% unless version.nil? || version == 'ga' -%>
failover = true
}
Expand Down Expand Up @@ -875,6 +879,7 @@ resource "google_compute_region_backend_service" "lipsum" {
backend {
group = google_compute_instance_group_manager.foobar.instance_group
capacity_scaler = 1.0
balancing_mode = "CONNECTION"
}

health_checks = [google_compute_health_check.default.self_link]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,25 @@ Removed in favor of field `settings.ip_configuration.ssl_mode`.

### `schema_settings` no longer has a default value

An empty value means the setting should be cleared.
An empty value means the setting should be cleared.

## Resource: `google_compute_backend_service`

### `outlier_detection` subfields default values removed

Empty values mean the setting should be cleared.

## Resource: `google_compute_region_backend_service`

### `outlier_detection` subfields default values removed

Empty values mean the setting should be cleared.

### `connection_draining_timeout_sec` default value changed

An empty value now means 300.

### `balancing_mode` default value changed

An empty value now means UTILIZATION.