fix: add missing spot args for docker autoscaler#1368
Conversation
- Update variables for `docker_autoscaler_worker_asg` to expose `spot_price` - Update `aws_launch_template` to add spot price if given
|
Hey @chrisgurley! 👋 Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process. Make sure that this PR clearly explains:
With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE. The following ChatOps commands are supported:
Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command. This message was generated automatically. You are welcome to improve it. |
|
/help Hello, please let me know if there is anything else I can do to help get this PR into an approved state. Thanks! |
There was a problem hiding this comment.
Good idea to amend this. Thanks!
When spot_price set AND enable_mixed_instances_policy=true with on_demand_base_capacity > 0:
- ASG requests on-demand instances
- Launch template forces market_type = "spot"
Is this a problem? Have you tried to create this setup? We might have to go with 2 differerent launch templates to fix that, if it is a problem.
docker_autoscaler_worker_asgto exposespot_priceaws_launch_templateto add spot price if givenDescription
This PR updates adds
var.runner_worker_docker_autoscaler_asg.spot_priceas a new valid configuration and updates the Docker Autoscaler launch template to use this value. The launch template for docker autoscaler is updated to use the same logic asvar.runner_instance.spot_price.As a note, if you attempt to use both
var.runner_worker_docker_autoscaler_asg.spot_priceandvar.runner_worker_docker_autoscaler_asg.instance_requirements, the AWS API will reject this as you cannot set instance requirements onto an ASG while a launch template is using spot pricing.Migrations required
No
Verification
var.runner_worker_docker_autoscaler_asg, setspot_priceto a reasonable number.