Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Changing value of automatically_upgrade_os has no effect on existing nodes #1489

Open
ggogel opened this issue Sep 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ggogel
Copy link

ggogel commented Sep 23, 2024

Description

I created a cluster with the default setting automatically_upgrade_os = true. I noticed that changing this value to false afterward has no effect. It only seems to be applied when a new node is created.

Steps to reproduce:

  1. Create a cluster with automatically_upgrade_os = true
  2. Change the value to automatically_upgrade_os = false
  3. Run terraform plan. No changes are detected.
  4. Run terraform apply.
  5. SSH into one of the nodes and execute systemctl status transactional-update.timer. The status still shows as enabled.

I don't know if this behavior is intended. It would be convenient being able to change this value across all nodes through terraform.

Changing the value automatically_upgrade_k3s applies the changes to the cluster as expected.

Kube.tf file

module "kube-hetzner" {
  providers = {
    hcloud = hcloud
  }
  hcloud_token = var.hcloud_token != "" ? var.hcloud_token : local.hcloud_token

  source = "kube-hetzner/kube-hetzner/hcloud"

  cluster_name = "k8s-prod03"

  ssh_public_key  = file("id_ed25519.pub")
  ssh_private_key = file("id_ed25519")

  network_region = "eu-central"

  control_plane_nodepools = [
    {
      name        = "control-plane-01"
      server_type = "cx22"
      location    = "fsn1"
      labels      = []
      taints      = []
      count       = 3
    }
  ]

  agent_nodepools = [
    {
      name        = "agent-pool-01"
      server_type = "cx32"
      location    = "fsn1"
      labels      = []
      taints      = []
      count       = 2
    }
  ]

  load_balancer_type     = "lb11"
  load_balancer_location = "fsn1"

  ingress_controller = "none"

  initial_k3s_channel = "v1.30"

  automatically_upgrade_os = false
  automatically_upgrade_k3s = true
}

provider "hcloud" {
  token = var.hcloud_token != "" ? var.hcloud_token : local.hcloud_token
}

terraform {
  required_version = ">= 1.5.0"
  required_providers {
    hcloud = {
      source  = "hetznercloud/hcloud"
      version = ">= 1.43.0"
    }
  }
}

output "kubeconfig" {
  value     = module.kube-hetzner.kubeconfig
  sensitive = true
}

variable "hcloud_token" {
  sensitive = true
  default   = ""
}

Screenshots

No response

Platform

Mac

@ggogel ggogel added the bug Something isn't working label Sep 23, 2024
@mysticaltech
Copy link
Collaborator

@ggogel Indeed, please see the upgrade section in the readme. For now you need to issue commands manually. We will try to have this feature via terraform in the future.

@ggogel
Copy link
Author

ggogel commented Sep 23, 2024

Thank you for the fast response and clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants