From df275c36b388fc4f91763acf130632341a70c8d1 Mon Sep 17 00:00:00 2001 From: Vegard Hagen Date: Sun, 23 Mar 2025 12:55:31 +0100 Subject: [PATCH] chore(talos): update machine config version --- tofu/kubernetes/main.tf | 4 +++- tofu/kubernetes/talos/config.tf | 4 ++-- tofu/kubernetes/talos/variables.tf | 14 +++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tofu/kubernetes/main.tf b/tofu/kubernetes/main.tf index 4ba6116..74edb22 100644 --- a/tofu/kubernetes/main.tf +++ b/tofu/kubernetes/main.tf @@ -29,7 +29,9 @@ module "talos" { # Omit this if devices are not connected on layer 2 vip = "192.168.1.99" gateway = "192.168.1.1" - talos_version = "v1.8" + # The version of talos features to use in generated machine configuration. Generally the same as image version. + # See https://github.com/siderolabs/terraform-provider-talos/blob/main/docs/data-sources/machine_configuration.md + talos_machine_config_version = "v1.9.2" proxmox_cluster = "homelab" kubernetes_version = "1.32.0" # renovate: github-releases=kubernetes/kubernetes base_domain = "stonegarden.dev" diff --git a/tofu/kubernetes/talos/config.tf b/tofu/kubernetes/talos/config.tf index 7b3db9f..3e2b0e3 100644 --- a/tofu/kubernetes/talos/config.tf +++ b/tofu/kubernetes/talos/config.tf @@ -1,5 +1,5 @@ resource "talos_machine_secrets" "this" { - talos_version = var.cluster.talos_version + talos_version = var.cluster.talos_machine_config_version } data "talos_client_configuration" "this" { @@ -17,7 +17,7 @@ data "talos_machine_configuration" "this" { # This is the Kubernetes API Server endpoint. # ref - https://www.talos.dev/v1.9/introduction/prodnotes/#decide-the-kubernetes-endpoint cluster_endpoint = "https://${var.cluster.endpoint}:6443" - talos_version = var.cluster.talos_version + talos_version = var.cluster.talos_machine_config_version machine_type = each.value.machine_type machine_secrets = talos_machine_secrets.this.machine_secrets config_patches = [ diff --git a/tofu/kubernetes/talos/variables.tf b/tofu/kubernetes/talos/variables.tf index c2089c9..64052dc 100644 --- a/tofu/kubernetes/talos/variables.tf +++ b/tofu/kubernetes/talos/variables.tf @@ -15,15 +15,15 @@ variable "image" { variable "cluster" { description = "Cluster configuration" type = object({ - name = string - endpoint = string + name = string + endpoint = string vip = optional(string) - gateway = string + gateway = string subnet_mask = optional(string, "24") - talos_version = string - proxmox_cluster = string - kubernetes_version = string - base_domain = string + talos_machine_config_version = string + proxmox_cluster = string + kubernetes_version = string + base_domain = string }) }