feat(config): added optional variable dns to node configuration

Signed-off-by: Christopher Macnichol <[email protected]>
This commit is contained in:
Christopher Macnichol
2025-03-23 14:03:37 +01:00
committed by Vegard Hagen
parent cab677855f
commit 1cf6031a53
4 changed files with 11 additions and 2 deletions
+1
View File
@@ -41,6 +41,7 @@ module "talos" {
host_node = "abel"
machine_type = "controlplane"
ip = "192.168.1.100"
#dns = ["1.1.1.1", "8.8.8.8"] # Optional Value.
mac_address = "BC:24:11:2E:C8:00"
vm_id = 800
cpu = 8
+1
View File
@@ -34,6 +34,7 @@ variable "nodes" {
machine_type = string
datastore_id = optional(string, "local-zfs")
ip = string
dns = optional(list(string))
mac_address = string
vm_id = number
cpu = number
@@ -51,6 +51,15 @@ resource "proxmox_virtual_environment_vm" "this" {
initialization {
datastore_id = each.value.datastore_id
# Optional DNS Block. Update Nodes with a list value to use.
dynamic "dns" {
for_each = try(each.value.dns, null) != null ? { "enabled" = each.value.dns } : {}
content {
servers = each.value.dns
}
}
ip_config {
ipv4 {
address = "${each.value.ip}/${var.cluster.subnet_mask}"
-2
View File
@@ -1,2 +0,0 @@
# Usage: sh upgrade-k8s.sh <controlplane node> or sh upgrade-k8s.sh <controlplane node> --dry-run (for a dry run)
talosctl $2 --nodes $1 upgrade-k8s --to 1.32.0 # renovate: github-releases=kubernetes/kubernetes