terraform-provider-talos icon indicating copy to clipboard operation
terraform-provider-talos copied to clipboard

Zero downtime upgrade

Open alubbock opened this issue 1 year ago • 1 comments

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.

alubbock avatar Mar 14 '23 12:03 alubbock

This provider doesn't support talosctl upgrade at the moment, and VM being re-created on image change is not related to this provider.

smira avatar Mar 06 '24 15:03 smira