upgrade to talos 1.8.0

This commit is contained in:
Rui Lopes
2024-09-26 08:38:50 +01:00
parent ea20095f53
commit e232c6f7d7
8 changed files with 49 additions and 48 deletions

34
.terraform.lock.hcl generated
View File

@@ -74,24 +74,24 @@ provider "registry.terraform.io/rgl/kustomizer" {
}
provider "registry.terraform.io/siderolabs/talos" {
version = "0.5.0"
constraints = "0.5.0"
version = "0.6.0"
constraints = "0.6.0"
hashes = [
"h1:xogkLLCrJJmd278E+vNMnmQgaMD05Gd1QXN914xgVec=",
"zh:0f71f2624576224c9bc924b136b601b734243efa7a7ad8280dfd8bd583e4afa5",
"h1:x0bfOliszbDzSOhJ78B/5RxnyfTb4mkQqto2XGYqddc=",
"zh:0fa82a384b25a58b65523e0ea4768fa1212b1f5cfc0c9379d31162454fedcc9d",
"zh:33c50dacc5029fa20caed702001fb1439899c94f203b1f37dccb970f504bca45",
"zh:3c97a6e2692b88d3f4631a3f8769146f602c210e881b46fa1b3b82c545e51cd1",
"zh:44077a137613bcfe29eef00315b5aa50d83390c3c727580a4ff0f4b87f22d228",
"zh:5bd02f278aec5567f94dd057d1c758363998ce581ff17b0869515bb682c02186",
"zh:80f40939bc3b55f0005c03b77122ceea86ec4deb82f5557950a97ad96fbb1557",
"zh:94c1b17f25bc30eacde926e46f196f1f135032674730d9f50c986ef6b7a854f0",
"zh:95ad665b2fdeed38180f5c471164833a34d07c1ef0470c1652565fe8cf4e9c4a",
"zh:a50ef6088afcb129c176dd4ba86c345e9be7b14358bb3b21c34f06930d8f39ef",
"zh:aa71da1da00ed66f1dddf1b69c10b829f24ac89e207de07d32c455dd04482096",
"zh:abb7eeb2b089081b4814ed80a295673e1a92f82ce092dde37b5bc92e75efec2c",
"zh:db9b9b54a0db5ae151376d5a73e0d28497c3e06181840e71ef8349213ac03e50",
"zh:e50ed8aa90b736508fce63680e8339240cecb74709ab9563d34d2c2ce7bc8445",
"zh:f3a279723ff31a095d7bfff21857abfcc9a2cfdeeea8521d179630ae6565d581",
"zh:29451cec35bbcc7da9c0049a574e5e078371454baad6b2c78749d731f2d1552d",
"zh:2c4eb1c58c9e4e8f6cd0c6de772f736cf9ab2e724ae8863f7874bc8a653ab016",
"zh:312c1aa40fbbb8175153534b5325debef07f21e73a39b9fd940a141fdf804495",
"zh:4c7678d5e4c20a4ce8684ca64cb1e43b77c5657f51f23fc2e2290669ea4560b8",
"zh:5a27d0674570d35216b9592a93edde0a32e0fc6535fe2f713b0307e0c343f047",
"zh:5f37e8c21e2857a15c8a6200b2b5aa7302e99936a579933e652dd7d389f62146",
"zh:7d08e856af3d27e6df034bb784fc108fe0942c34a470229402b8be949682f8c9",
"zh:8c0486bc71f3251959d1a3e47b09dcdadacf98c37e6de878e611fd06ff74b029",
"zh:9954f90c8af90d8ca561acef3c8c5f8d2c39e71f30e47b8699e87494ad855973",
"zh:9a81702c1d33245d82d5161e486bab9049e1b7d4ae8e34469436dd789df31009",
"zh:a1cee48d0862dabac5b4f5ae75bf9f38acdcb371319d06f293e45b149993c9ed",
"zh:cb574c6ff8488209547bb07d8f0748cc735385a197e82c35866867be7fad918d",
"zh:ceb8a639bf410a5a2dd73d94400e833a3772d01f58cc26b8b90d06907a372699",
"zh:dcd71a888fdac8329273abffae1d57ac5d4b7c1cf13807a3dae5abcb7d29f5ab",
]
}

View File

@@ -89,7 +89,7 @@ Install talosctl:
```bash
# see https://github.com/siderolabs/talos/releases
# renovate: datasource=github-releases depName=siderolabs/talos
talos_version='1.7.6'
talos_version='1.8.0'
wget https://github.com/siderolabs/talos/releases/download/v$talos_version/talosctl-linux-amd64
sudo install talosctl-linux-amd64 /usr/local/bin/talosctl
rm talosctl-linux-amd64
@@ -506,7 +506,7 @@ Update the talos extensions to match the talos version:
Talos:
```bash
# see https://www.talos.dev/v1.7/advanced/troubleshooting-control-plane/
# see https://www.talos.dev/v1.8/advanced/troubleshooting-control-plane/
talosctl -n $all support && rm -rf support && 7z x -osupport support.zip && code support
talosctl -n $c0 service ext-qemu-guest-agent status
talosctl -n $c0 service etcd status

View File

@@ -44,7 +44,7 @@ locals {
cilium_external_lb_manifest = join("---\n", [for d in local.cilium_external_lb_manifests : yamlencode(d)])
}
// see https://www.talos.dev/v1.7/kubernetes-guides/network/deploying-cilium/#method-4-helm-manifests-inline-install
// see https://www.talos.dev/v1.8/kubernetes-guides/network/deploying-cilium/#method-4-helm-manifests-inline-install
// see https://docs.cilium.io/en/stable/network/servicemesh/ingress/
// see https://docs.cilium.io/en/stable/gettingstarted/hubble_setup/
// see https://docs.cilium.io/en/stable/gettingstarted/hubble/

19
do
View File

@@ -8,20 +8,20 @@ talos_image_builder="image_factory"
# see https://github.com/siderolabs/talos/releases
# renovate: datasource=github-releases depName=siderolabs/talos
talos_version="1.7.6"
talos_version="1.8.0"
# see https://github.com/siderolabs/extensions/pkgs/container/qemu-guest-agent
# see https://github.com/siderolabs/extensions/tree/main/guest-agents/qemu-guest-agent
talos_qemu_guest_agent_extension_tag="8.2.2@sha256:e8020f513f891896fd3bb506c7af8a763a3c70b063e4901caaad073b5e6e0815"
talos_qemu_guest_agent_extension_tag="9.1.0@sha256:cd8154036a0711f6f0a2ec9d6ce8539219d0e46a78e0eca22598d4d884f3f52c"
# see https://github.com/siderolabs/extensions/pkgs/container/drbd
# see https://github.com/siderolabs/extensions/tree/main/storage/drbd
# see https://github.com/LINBIT/drbd
talos_drbd_extension_tag="9.2.8-v1.7.6@sha256:acd871c1367ce94121689d069fd563c54ca0edac8698325f34a41dd3456eceea"
talos_drbd_extension_tag="9.2.11-v1.8.0@sha256:e58f07bdc0184a075f1b7e1864ca2c6487b96c5a848d24440162fcff3eb45d96"
# see https://github.com/siderolabs/extensions/pkgs/container/spin
# see https://github.com/siderolabs/extensions/tree/main/container-runtime/spin
talos_spin_extension_tag="v0.15.0@sha256:0ec7613913960c95413699a46745a788d4c22776942c2d24ebd0457f11e6be33"
talos_spin_extension_tag="v0.15.1@sha256:642488eadb94d4ddb30f9e65d8ed6836a4c00d699889e060019492308735af9b"
# see https://github.com/piraeusdatastore/piraeus-operator/releases
# renovate: datasource=github-releases depName=piraeusdatastore/piraeus-operator
@@ -64,9 +64,9 @@ function update-talos-extensions {
}
function build_talos_image__imager {
# see https://www.talos.dev/v1.7/talos-guides/install/boot-assets/
# see https://www.talos.dev/v1.7/advanced/metal-network-configuration/
# see Profile type at https://github.com/siderolabs/talos/blob/v1.7.6/pkg/imager/profile/profile.go#L22-L45
# see https://www.talos.dev/v1.8/talos-guides/install/boot-assets/
# see https://www.talos.dev/v1.8/advanced/metal-network-configuration/
# see Profile type at https://github.com/siderolabs/talos/blob/v1.8.0/pkg/imager/profile/profile.go#L24-L47
local talos_version_tag="v$talos_version"
rm -rf tmp/talos
mkdir -p tmp/talos
@@ -219,7 +219,7 @@ function piraeus-install {
# see https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#ch-kubernetes
# see 5.7.1. Available Parameters in a Storage Class at https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-kubernetes-sc-parameters
# see https://linbit.com/drbd-user-guide/drbd-guide-9_0-en/
# see https://www.talos.dev/v1.7/kubernetes-guides/configuration/storage/#piraeus--linstor
# see https://www.talos.dev/v1.8/kubernetes-guides/configuration/storage/#piraeus--linstor
step 'piraeus install'
kubectl apply --server-side -k "https://github.com/piraeusdatastore/piraeus-operator//config/default?ref=v$piraeus_operator_version"
step 'piraeus wait'
@@ -319,7 +319,8 @@ function info {
# NB there can be multiple machineconfigs in a machine. we only want to see
# the ones with an id that looks like a version tag.
talosctl -n $n get machineconfigs -o json \
| jq -r 'select(.metadata.id | test("v\\d+")) | .spec.machine.install.image' \
| jq -r 'select(.metadata.id | test("v\\d+")) | .spec' \
| yq -r '.machine.install.image' \
| sed -E "s,(.+),$n: \1,g"
done
step 'talos node os-release'

View File

@@ -4,7 +4,7 @@ output "talosconfig" {
}
output "kubeconfig" {
value = data.talos_cluster_kubeconfig.talos.kubeconfig_raw
value = talos_cluster_kubeconfig.talos.kubeconfig_raw
sensitive = true
}

View File

@@ -18,7 +18,7 @@ terraform {
# see https://github.com/siderolabs/terraform-provider-talos
talos = {
source = "siderolabs/talos"
version = "0.5.0"
version = "0.6.0"
}
# see https://registry.terraform.io/providers/hashicorp/helm
# see https://github.com/hashicorp/terraform-provider-helm

View File

@@ -18,7 +18,7 @@ locals {
# talos image, which is created in the installed state.
#install = {}
features = {
# see https://www.talos.dev/v1.7/kubernetes-guides/configuration/kubeprism/
# see https://www.talos.dev/v1.8/kubernetes-guides/configuration/kubeprism/
# see talosctl -n $c0 read /etc/kubernetes/kubeconfig-kubelet | yq .clusters[].cluster.server
# NB if you use a non-default CNI, you must configure it to use the
# https://localhost:7445 kube-apiserver endpoint.
@@ -75,8 +75,8 @@ locals {
}
}
cluster = {
# see https://www.talos.dev/v1.7/talos-guides/discovery/
# see https://www.talos.dev/v1.7/reference/configuration/#clusterdiscoveryconfig
# see https://www.talos.dev/v1.8/talos-guides/discovery/
# see https://www.talos.dev/v1.8/reference/configuration/#clusterdiscoveryconfig
discovery = {
enabled = true
registries = {
@@ -100,12 +100,12 @@ locals {
}
}
// see https://registry.terraform.io/providers/siderolabs/talos/0.5.0/docs/resources/machine_secrets
// see https://registry.terraform.io/providers/siderolabs/talos/0.6.0/docs/resources/machine_secrets
resource "talos_machine_secrets" "talos" {
talos_version = "v${var.talos_version}"
}
// see https://registry.terraform.io/providers/siderolabs/talos/0.5.0/docs/data-sources/machine_configuration
// see https://registry.terraform.io/providers/siderolabs/talos/0.6.0/docs/data-sources/machine_configuration
data "talos_machine_configuration" "controller" {
cluster_name = var.cluster_name
cluster_endpoint = var.cluster_endpoint
@@ -121,7 +121,7 @@ data "talos_machine_configuration" "controller" {
machine = {
network = {
interfaces = [
# see https://www.talos.dev/v1.7/talos-guides/network/vip/
# see https://www.talos.dev/v1.8/talos-guides/network/vip/
{
interface = "eth0"
dhcp = true
@@ -203,7 +203,7 @@ data "talos_machine_configuration" "controller" {
]
}
// see https://registry.terraform.io/providers/siderolabs/talos/0.5.0/docs/data-sources/machine_configuration
// see https://registry.terraform.io/providers/siderolabs/talos/0.6.0/docs/data-sources/machine_configuration
data "talos_machine_configuration" "worker" {
cluster_name = var.cluster_name
cluster_endpoint = var.cluster_endpoint
@@ -218,15 +218,15 @@ data "talos_machine_configuration" "worker" {
]
}
// see https://registry.terraform.io/providers/siderolabs/talos/0.5.0/docs/data-sources/client_configuration
// see https://registry.terraform.io/providers/siderolabs/talos/0.6.0/docs/data-sources/client_configuration
data "talos_client_configuration" "talos" {
cluster_name = var.cluster_name
client_configuration = talos_machine_secrets.talos.client_configuration
endpoints = [for node in local.controller_nodes : node.address]
}
// see https://registry.terraform.io/providers/siderolabs/talos/0.5.0/docs/data-sources/cluster_kubeconfig
data "talos_cluster_kubeconfig" "talos" {
// see https://registry.terraform.io/providers/siderolabs/talos/0.6.0/docs/resources/cluster_kubeconfig
resource "talos_cluster_kubeconfig" "talos" {
client_configuration = talos_machine_secrets.talos.client_configuration
endpoint = local.controller_nodes[0].address
node = local.controller_nodes[0].address
@@ -235,7 +235,7 @@ data "talos_cluster_kubeconfig" "talos" {
]
}
// see https://registry.terraform.io/providers/siderolabs/talos/0.5.0/docs/resources/machine_configuration_apply
// see https://registry.terraform.io/providers/siderolabs/talos/0.6.0/docs/resources/machine_configuration_apply
resource "talos_machine_configuration_apply" "controller" {
count = var.controller_count
client_configuration = talos_machine_secrets.talos.client_configuration
@@ -256,7 +256,7 @@ resource "talos_machine_configuration_apply" "controller" {
]
}
// see https://registry.terraform.io/providers/siderolabs/talos/0.5.0/docs/resources/machine_configuration_apply
// see https://registry.terraform.io/providers/siderolabs/talos/0.6.0/docs/resources/machine_configuration_apply
resource "talos_machine_configuration_apply" "worker" {
count = var.worker_count
client_configuration = talos_machine_secrets.talos.client_configuration
@@ -277,7 +277,7 @@ resource "talos_machine_configuration_apply" "worker" {
]
}
// see https://registry.terraform.io/providers/siderolabs/talos/0.5.0/docs/resources/machine_bootstrap
// see https://registry.terraform.io/providers/siderolabs/talos/0.6.0/docs/resources/machine_bootstrap
resource "talos_machine_bootstrap" "talos" {
client_configuration = talos_machine_secrets.talos.client_configuration
endpoint = local.controller_nodes[0].address

View File

@@ -1,9 +1,9 @@
# see https://github.com/siderolabs/talos/releases
# see https://www.talos.dev/v1.7/introduction/support-matrix/
# see https://www.talos.dev/v1.8/introduction/support-matrix/
variable "talos_version" {
type = string
# renovate: datasource=github-releases depName=siderolabs/talos
default = "1.7.6"
default = "1.8.0"
validation {
condition = can(regex("^\\d+(\\.\\d+)+", var.talos_version))
error_message = "Must be a version number."
@@ -11,7 +11,7 @@ variable "talos_version" {
}
# see https://github.com/siderolabs/kubelet/pkgs/container/kubelet
# see https://www.talos.dev/v1.7/introduction/support-matrix/
# see https://www.talos.dev/v1.8/introduction/support-matrix/
variable "kubernetes_version" {
type = string
# renovate: datasource=github-releases depName=siderolabs/kubelet
@@ -102,7 +102,7 @@ variable "worker_count" {
variable "talos_libvirt_base_volume_name" {
type = string
default = "talos-1.7.6.qcow2"
default = "talos-1.8.0.qcow2"
validation {
condition = can(regex(".+\\.qcow2+$", var.talos_libvirt_base_volume_name))
error_message = "Must be a name with a .qcow2 extension."