Fixed handling of install images
The default image was missing the qemu guest agent.
This commit is contained in:
@@ -40,6 +40,8 @@ tofu apply
|
||||
```
|
||||
|
||||
## Information Sources
|
||||
* [Talos Linux documentation](https://www.talos.dev/v1.8/)
|
||||
* [Talos Linux Image Factory](https://factory.talos.dev/)
|
||||
* Terraform providers/modules
|
||||
* [terraform-provider-proxmox](https://github.com/Telmate/terraform-provider-proxmox)
|
||||
* [terraform-provider-talos](https://github.com/siderolabs/terraform-provider-talos)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
resource "proxmox_storage_iso" "talos_linux_iso_image" {
|
||||
url = "https://factory.talos.dev/image/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515/v1.8.2/nocloud-amd64.iso"
|
||||
url = local.talos_linux_iso_image_url
|
||||
filename = local.talos_linux_iso_image_filename
|
||||
storage = "local"
|
||||
pve_node = var.proxmox_target_node
|
||||
|
||||
@@ -2,7 +2,9 @@ locals {
|
||||
repo_root = "${dirname(abspath(path.root))}"
|
||||
|
||||
# Talos Linux
|
||||
talos_linux_iso_image_filename = "talos-linux-qemu-guest-agent-amd64.iso"
|
||||
talos_linux_iso_image_url = "https://factory.talos.dev/image/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515/v1.8.2/nocloud-amd64.iso"
|
||||
talos_linux_iso_image_filename = "talos-linux-v1.8.2-qemu-guest-agent-amd64.iso"
|
||||
talos_linux_image_reference = "factory.talos.dev/installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.8.2"
|
||||
|
||||
# K8s control plane
|
||||
k8s_control_plane_ip_address = "192.168.1.150"
|
||||
|
||||
@@ -27,9 +27,10 @@ resource "talos_machine_configuration_apply" "controlplane" {
|
||||
for_each = var.node_data.controlplanes
|
||||
node = each.key
|
||||
config_patches = [
|
||||
templatefile("${path.module}/templates/machine_disk_and_hostname.yaml.tftmpl", {
|
||||
templatefile("${path.module}/templates/machine_config_patches.tftpl", {
|
||||
hostname = each.value.hostname == null ? format("%s-cp-%s", var.cluster_name, index(keys(var.node_data.controlplanes), each.key)) : each.value.hostname
|
||||
install_disk = each.value.install_disk
|
||||
install_image = each.value.install_image
|
||||
}),
|
||||
file("${path.module}/files/cp-scheduling.yaml"),
|
||||
]
|
||||
@@ -42,9 +43,10 @@ resource "talos_machine_configuration_apply" "worker" {
|
||||
for_each = var.node_data.workers
|
||||
node = each.key
|
||||
config_patches = [
|
||||
templatefile("${path.module}/templates/machine_disk_and_hostname.yaml.tftmpl", {
|
||||
templatefile("${path.module}/templates/machine_config_patches.tftpl", {
|
||||
hostname = each.value.hostname == null ? format("%s-worker-%s", var.cluster_name, index(keys(var.node_data.workers), each.key)) : each.value.hostname
|
||||
install_disk = each.value.install_disk
|
||||
install_image = each.value.install_image
|
||||
})
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
machine:
|
||||
install:
|
||||
disk: ${install_disk}
|
||||
image: ${install_image}
|
||||
network:
|
||||
hostname: ${hostname}
|
||||
@@ -31,10 +31,12 @@ variable "node_data" {
|
||||
type = object({
|
||||
controlplanes = map(object({
|
||||
install_disk = string
|
||||
install_image = string
|
||||
hostname = optional(string)
|
||||
}))
|
||||
workers = map(object({
|
||||
install_disk = string
|
||||
install_image = string
|
||||
hostname = optional(string)
|
||||
}))
|
||||
})
|
||||
@@ -42,14 +44,17 @@ variable "node_data" {
|
||||
controlplanes = {
|
||||
"192.168.1.150" = {
|
||||
install_disk = "/dev/vda"
|
||||
install_image = "factory.talos.dev/installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.8.2"
|
||||
},
|
||||
}
|
||||
workers = {
|
||||
"192.168.1.151" = {
|
||||
install_disk = "/dev/vda"
|
||||
install_image = "factory.talos.dev/installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.8.2"
|
||||
},
|
||||
"192.168.1.152" = {
|
||||
install_disk = "/dev/vda"
|
||||
install_image = "factory.talos.dev/installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.8.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user