mirror of
https://github.com/puppetmaster/typhoon.git
synced 2025-07-29 20:51:33 +02:00
Refresh instances in autoscaling group when launch configuration changes
* Changes to worker launch configurations start an autoscaling group instance refresh to replace instances * Instance refresh creates surge instances, waits for a warm-up period, then deletes old instances * Changing worker_type, disk_*, worker_price, worker_target_groups, or Butane worker_snippets on existing worker nodes will replace instances * New AMIs or changing `os_stream` will be ignored, to allow Fedora CoreOS or Flatcar Linux to keep themselves updated * Previously, new launch configurations were made in the same way, but not applied to instances unless manually replaced
This commit is contained in:
@ -22,6 +22,14 @@ resource "aws_autoscaling_group" "workers" {
|
||||
var.target_groups,
|
||||
])
|
||||
|
||||
instance_refresh {
|
||||
strategy = "Rolling"
|
||||
preferences {
|
||||
instance_warmup = 120
|
||||
min_healthy_percentage = 90
|
||||
}
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
# override the default destroy and replace update behavior
|
||||
create_before_destroy = true
|
||||
|
Reference in New Issue
Block a user