Skip to content

Commit

Permalink
Update autoscaling config to use metrics_providers
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestosilv committed Jun 17, 2024
1 parent b3a075b commit 78233f4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions paasta_tools/contrib/service_shard_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,14 @@ def main(args):
},
}
if args.metrics_provider is not None or args.setpoint is not None:
instance_config["autoscaling"] = {}
instance_config["autoscaling"] = {"metrics_providers": []}
metrics_provider_config = {}
if args.metrics_provider is not None:
instance_config["autoscaling"][
"metrics_provider"
] = args.metrics_provider
metrics_provider_config["type"] = args.metrics_provider
if args.setpoint is not None:
instance_config["autoscaling"]["setpoint"] = args.setpoint
metrics_provider_config["setpoint"] = args.setpoint
instance_config["autoscaling"]["metrics_providers"].append(metrics_provider_config)

if args.cpus is not None:
instance_config["cpus"] = args.cpus
if args.mem is not None:
Expand Down

0 comments on commit 78233f4

Please sign in to comment.