From ba9c2b639edfccfe65574c352b2fb5c9aacd9ad3 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Fri, 21 Nov 2025 23:12:07 +1100 Subject: [PATCH] feat: add externaldns hosts - two slaves, one master --- config/instances/ausyd1nxvm2127/config.yaml | 7 +++ .../instances/ausyd1nxvm2127/terragrunt.hcl | 54 +++++++++++++++++++ config/instances/ausyd1nxvm2128/config.yaml | 7 +++ .../instances/ausyd1nxvm2128/terragrunt.hcl | 54 +++++++++++++++++++ config/instances/ausyd1nxvm2129/config.yaml | 7 +++ .../instances/ausyd1nxvm2129/terragrunt.hcl | 54 +++++++++++++++++++ 6 files changed, 183 insertions(+) create mode 100644 config/instances/ausyd1nxvm2127/config.yaml create mode 100644 config/instances/ausyd1nxvm2127/terragrunt.hcl create mode 100644 config/instances/ausyd1nxvm2128/config.yaml create mode 100644 config/instances/ausyd1nxvm2128/terragrunt.hcl create mode 100644 config/instances/ausyd1nxvm2129/config.yaml create mode 100644 config/instances/ausyd1nxvm2129/terragrunt.hcl diff --git a/config/instances/ausyd1nxvm2127/config.yaml b/config/instances/ausyd1nxvm2127/config.yaml new file mode 100644 index 0000000..e8edd21 --- /dev/null +++ b/config/instances/ausyd1nxvm2127/config.yaml @@ -0,0 +1,7 @@ +description: ExternalDNS For K8S +cobbler_mgmt_classes: + - roles::infra::dns::externaldns +profiles: + - disk20 + - net_com1_eth0 + - 2core3072 diff --git a/config/instances/ausyd1nxvm2127/terragrunt.hcl b/config/instances/ausyd1nxvm2127/terragrunt.hcl new file mode 100644 index 0000000..49a3bc0 --- /dev/null +++ b/config/instances/ausyd1nxvm2127/terragrunt.hcl @@ -0,0 +1,54 @@ +locals { + node_name = "prodnxsr0010" + config_common = yamldecode(file("${get_terragrunt_dir()}/../config_common.yaml")) + config_specific = yamldecode(file("${get_terragrunt_dir()}/config.yaml")) + config = merge(local.config_common, local.config_specific) + instance_name = basename(get_terragrunt_dir()) +} + +inputs = merge( + { + name = local.instance_name + }, + local.config +) + +include "root" { + path = find_in_parent_folders("root.hcl") +} + +include "instances" { + path = find_in_parent_folders("instances.hcl") + expose = true + merge_strategy = "deep" +} + +dependencies { + paths = ["${get_repo_root()}/config/nodes/${local.node_name}"] +} + + +generate "incus" { + path = "incus.tf" + if_exists = "overwrite_terragrunt" + contents = <<-EOF + provider "incus" { + generate_client_certificates = false + accept_remote_certificate = true + config_dir = "${get_env("INCUS_CONFIG_DIR")}" + + remote { + name = "${basename(get_terragrunt_dir())}" + scheme = "https" + address = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_addr}" + port = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_port}" + token = "${get_env("INCUS_TOKEN_${upper(local.node_name)}")}" + default = true + } + } + EOF +} +terraform { + source = "${get_repo_root()}/modules/instance" +} + diff --git a/config/instances/ausyd1nxvm2128/config.yaml b/config/instances/ausyd1nxvm2128/config.yaml new file mode 100644 index 0000000..e8edd21 --- /dev/null +++ b/config/instances/ausyd1nxvm2128/config.yaml @@ -0,0 +1,7 @@ +description: ExternalDNS For K8S +cobbler_mgmt_classes: + - roles::infra::dns::externaldns +profiles: + - disk20 + - net_com1_eth0 + - 2core3072 diff --git a/config/instances/ausyd1nxvm2128/terragrunt.hcl b/config/instances/ausyd1nxvm2128/terragrunt.hcl new file mode 100644 index 0000000..5cf894f --- /dev/null +++ b/config/instances/ausyd1nxvm2128/terragrunt.hcl @@ -0,0 +1,54 @@ +locals { + node_name = "prodnxsr0011" + config_common = yamldecode(file("${get_terragrunt_dir()}/../config_common.yaml")) + config_specific = yamldecode(file("${get_terragrunt_dir()}/config.yaml")) + config = merge(local.config_common, local.config_specific) + instance_name = basename(get_terragrunt_dir()) +} + +inputs = merge( + { + name = local.instance_name + }, + local.config +) + +include "root" { + path = find_in_parent_folders("root.hcl") +} + +include "instances" { + path = find_in_parent_folders("instances.hcl") + expose = true + merge_strategy = "deep" +} + +dependencies { + paths = ["${get_repo_root()}/config/nodes/${local.node_name}"] +} + + +generate "incus" { + path = "incus.tf" + if_exists = "overwrite_terragrunt" + contents = <<-EOF + provider "incus" { + generate_client_certificates = false + accept_remote_certificate = true + config_dir = "${get_env("INCUS_CONFIG_DIR")}" + + remote { + name = "${basename(get_terragrunt_dir())}" + scheme = "https" + address = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_addr}" + port = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_port}" + token = "${get_env("INCUS_TOKEN_${upper(local.node_name)}")}" + default = true + } + } + EOF +} +terraform { + source = "${get_repo_root()}/modules/instance" +} + diff --git a/config/instances/ausyd1nxvm2129/config.yaml b/config/instances/ausyd1nxvm2129/config.yaml new file mode 100644 index 0000000..e8edd21 --- /dev/null +++ b/config/instances/ausyd1nxvm2129/config.yaml @@ -0,0 +1,7 @@ +description: ExternalDNS For K8S +cobbler_mgmt_classes: + - roles::infra::dns::externaldns +profiles: + - disk20 + - net_com1_eth0 + - 2core3072 diff --git a/config/instances/ausyd1nxvm2129/terragrunt.hcl b/config/instances/ausyd1nxvm2129/terragrunt.hcl new file mode 100644 index 0000000..218e8ad --- /dev/null +++ b/config/instances/ausyd1nxvm2129/terragrunt.hcl @@ -0,0 +1,54 @@ +locals { + node_name = "prodnxsr0012" + config_common = yamldecode(file("${get_terragrunt_dir()}/../config_common.yaml")) + config_specific = yamldecode(file("${get_terragrunt_dir()}/config.yaml")) + config = merge(local.config_common, local.config_specific) + instance_name = basename(get_terragrunt_dir()) +} + +inputs = merge( + { + name = local.instance_name + }, + local.config +) + +include "root" { + path = find_in_parent_folders("root.hcl") +} + +include "instances" { + path = find_in_parent_folders("instances.hcl") + expose = true + merge_strategy = "deep" +} + +dependencies { + paths = ["${get_repo_root()}/config/nodes/${local.node_name}"] +} + + +generate "incus" { + path = "incus.tf" + if_exists = "overwrite_terragrunt" + contents = <<-EOF + provider "incus" { + generate_client_certificates = false + accept_remote_certificate = true + config_dir = "${get_env("INCUS_CONFIG_DIR")}" + + remote { + name = "${basename(get_terragrunt_dir())}" + scheme = "https" + address = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_addr}" + port = "${yamldecode(file("${get_repo_root()}/config/nodes/${local.node_name}/config.yaml")).node_port}" + token = "${get_env("INCUS_TOKEN_${upper(local.node_name)}")}" + default = true + } + } + EOF +} +terraform { + source = "${get_repo_root()}/modules/instance" +} +