refactor: remove old node pool and cleanup dns records
This commit is contained in:
parent
b8b0a7ce22
commit
0523a8907b
3 changed files with 8 additions and 85 deletions
44
machines.tf
44
machines.tf
|
|
@ -51,50 +51,6 @@ resource "hcloud_server" "cthulhu_control_plane" {
|
|||
}
|
||||
}
|
||||
|
||||
resource "random_string" "workers_suffix" {
|
||||
length = 4
|
||||
special = false
|
||||
upper = false
|
||||
}
|
||||
|
||||
resource "hcloud_server" "cthulhu_workers" {
|
||||
count = 3
|
||||
|
||||
name = "worker-${random_string.workers_suffix.result}-${count.index}"
|
||||
image = "rocky-9"
|
||||
server_type = "cax21"
|
||||
location = "fsn1"
|
||||
|
||||
backups = false
|
||||
shutdown_before_deletion = true
|
||||
|
||||
placement_group_id = hcloud_placement_group.cthulhu_workers.id
|
||||
|
||||
# firewall_ids = [
|
||||
# hcloud_firewall.cthulhu_nodes_public.id,
|
||||
# hcloud_firewall.cthulhu_nodes_private.id,
|
||||
# ]
|
||||
|
||||
ssh_keys = [data.hcloud_ssh_key.vojtechmares.id]
|
||||
|
||||
labels = {
|
||||
"k8s.node.role" = "worker"
|
||||
"k8s.node.name" = "worker-${random_string.workers_suffix.result}-${count.index}"
|
||||
"k8s.cluster.name" = "cthulhu"
|
||||
"k8s.node.pool" = random_string.workers_suffix.result
|
||||
}
|
||||
|
||||
public_net {
|
||||
ipv4_enabled = true
|
||||
ipv6_enabled = true
|
||||
}
|
||||
|
||||
network {
|
||||
network_id = hcloud_network.cthulhu.id
|
||||
ip = cidrhost(hcloud_network_subnet.workers.ip_range, count.index + 1)
|
||||
}
|
||||
}
|
||||
|
||||
module "workers_v2" {
|
||||
source = "./modules/node-pool/v1"
|
||||
|
||||
|
|
|
|||
Reference in a new issue