Skip to content

Commit 508f0ff

Browse files
feat: Exposing total CPU related fields in AutoscalingConfig (#2490)
* feat: Exposing total CPU related fields in AutoscalingConfig docs: Update high_priority_cpu_utilization_percent in AutoscalingConfig to be Optional and clarify its behavior when not specified PiperOrigin-RevId: 845819318 Source-Link: googleapis/googleapis@6e20492 Source-Link: googleapis/googleapis-gen@3bb618d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2JiNjE4ZDE3OTI1MzIzMTcyZWQ4YzE1M2ZiYWJkMzFkNjExMGExMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 7347a16 commit 508f0ff

File tree

4 files changed

+215
-4
lines changed

4 files changed

+215
-4
lines changed

protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -933,12 +933,25 @@ message AutoscalingConfig {
933933

934934
// The autoscaling targets for an instance.
935935
message AutoscalingTargets {
936-
// Required. The target high priority cpu utilization percentage that the
936+
// Optional. The target high priority cpu utilization percentage that the
937937
// autoscaler should be trying to achieve for the instance. This number is
938938
// on a scale from 0 (no utilization) to 100 (full utilization). The valid
939-
// range is [10, 90] inclusive.
939+
// range is [10, 90] inclusive. If not specified or set to 0, the autoscaler
940+
// skips scaling based on high priority CPU utilization.
940941
int32 high_priority_cpu_utilization_percent = 1
941-
[(google.api.field_behavior) = REQUIRED];
942+
[(google.api.field_behavior) = OPTIONAL];
943+
944+
// Optional. The target total CPU utilization percentage that the autoscaler
945+
// should be trying to achieve for the instance. This number is on a scale
946+
// from 0 (no utilization) to 100 (full utilization). The valid range is
947+
// [10, 90] inclusive. If not specified or set to 0, the autoscaler skips
948+
// scaling based on total CPU utilization. If both
949+
// `high_priority_cpu_utilization_percent` and
950+
// `total_cpu_utilization_percent` are specified, the autoscaler provisions
951+
// the larger of the two required compute capacities to satisfy both
952+
// targets.
953+
int32 total_cpu_utilization_percent = 4
954+
[(google.api.field_behavior) = OPTIONAL];
942955

943956
// Required. The target storage utilization percentage that the autoscaler
944957
// should be trying to achieve for the instance. This number is on a scale
@@ -966,6 +979,60 @@ message AutoscalingConfig {
966979
// configuration for the selected replicas.
967980
int32 autoscaling_target_high_priority_cpu_utilization_percent = 2
968981
[(google.api.field_behavior) = OPTIONAL];
982+
983+
// Optional. If specified, overrides the
984+
// autoscaling target `total_cpu_utilization_percent`
985+
// in the top-level autoscaling configuration for the selected replicas.
986+
int32 autoscaling_target_total_cpu_utilization_percent = 4
987+
[(google.api.field_behavior) = OPTIONAL];
988+
989+
// Optional. If true, disables high priority CPU autoscaling for the
990+
// selected replicas and ignores
991+
// [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
992+
// in the top-level autoscaling configuration.
993+
//
994+
// When setting this field to true, setting
995+
// [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
996+
// field to a non-zero value for the same replica is not supported.
997+
//
998+
// If false, the
999+
// [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
1000+
// field in the replica will be used if set to a non-zero value.
1001+
// Otherwise, the
1002+
// [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
1003+
// field in the top-level autoscaling configuration will be used.
1004+
//
1005+
// Setting both
1006+
// [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
1007+
// and
1008+
// [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
1009+
// to true for the same replica is not supported.
1010+
bool disable_high_priority_cpu_autoscaling = 5
1011+
[(google.api.field_behavior) = OPTIONAL];
1012+
1013+
// Optional. If true, disables total CPU autoscaling for the selected
1014+
// replicas and ignores
1015+
// [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
1016+
// in the top-level autoscaling configuration.
1017+
//
1018+
// When setting this field to true, setting
1019+
// [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
1020+
// field to a non-zero value for the same replica is not supported.
1021+
//
1022+
// If false, the
1023+
// [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
1024+
// field in the replica will be used if set to a non-zero value.
1025+
// Otherwise, the
1026+
// [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
1027+
// field in the top-level autoscaling configuration will be used.
1028+
//
1029+
// Setting both
1030+
// [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
1031+
// and
1032+
// [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
1033+
// to true for the same replica is not supported.
1034+
bool disable_total_cpu_autoscaling = 6
1035+
[(google.api.field_behavior) = OPTIONAL];
9691036
}
9701037

9711038
// Required. Selects the replicas to which this AsymmetricAutoscalingOption

protos/protos.d.ts

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)