terraform-provider-talos
terraform-provider-talos copied to clipboard
Zero downtime upgrade
Would it be possible to enact Talos upgrades just by specifying a new image ID? By default, it seems that all VMs would be destroyed and recreated, which would probably break the cluster.
Terraform gives an example of zero downtime upgrades that utilises create_before_destroy = true
combined with a local-exec
to run a healthcheck before the original is destroyed:
resource "digitalocean_droplet" "web" {
count = 2
image = "${var.image}"
#...
lifecycle {
create_before_destroy = true
}
provisioner "local-exec" {
command = "./check_health.sh ${self.ipv4_address}"
}
Would it be possible to use local-exec
to execute talosctl health
? It would probably fail during initial cluster bootstrapping, so it'd need to workaround that to only run on upgrades.
This provider doesn't support talosctl upgrade
at the moment, and VM being re-created on image change is not related to this provider.