feat: Add storage nic to worker nodes
This commit is contained in:
parent
c533c7c070
commit
30d3b3b478
3 changed files with 18 additions and 0 deletions
|
|
@ -93,6 +93,7 @@ module "controlplanes" {
|
|||
|
||||
node = {
|
||||
id = local.vm-id_prefix + 10 + tonumber(replace(each.key, "cp", ""))
|
||||
type = "controlplane"
|
||||
name = format("k8s-wheatley-%s", each.value.name)
|
||||
ipv4_address = each.value.ip_address
|
||||
cpu = local.controlplanes.cpu
|
||||
|
|
@ -114,6 +115,7 @@ module "workers" {
|
|||
|
||||
node = {
|
||||
id = local.vm-id_prefix + 20 + tonumber(replace(each.key, "worker", ""))
|
||||
type = "worker"
|
||||
name = format("k8s-wheatley-%s", each.value.name)
|
||||
ipv4_address = each.value.ip_address
|
||||
cpu = local.workers.cpu
|
||||
|
|
|
|||
|
|
@ -45,6 +45,21 @@ resource "proxmox_virtual_environment_vm" "talos-node" {
|
|||
}
|
||||
}
|
||||
|
||||
network_device {
|
||||
bridge = "vmbr1"
|
||||
model = "virtio"
|
||||
mtu = 1500
|
||||
}
|
||||
|
||||
dynamic "network_device" {
|
||||
for_each = var.node.type == "worker" ? [1] : []
|
||||
content {
|
||||
bridge = "vmbr2"
|
||||
model = "virtio"
|
||||
mtu = 9000
|
||||
}
|
||||
}
|
||||
|
||||
initialization {
|
||||
datastore_id = var.node.storagepool
|
||||
ip_config {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ variable "node" {
|
|||
description = "Basic configuration for the Talos node"
|
||||
type = object({
|
||||
id = number
|
||||
type = string
|
||||
name = string
|
||||
ipv4_address = string
|
||||
ipv4_gateway = string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue