make sure control-plane ip dynamic

This commit is contained in:
jodhi 2022-02-24 23:19:31 +07:00
parent 58c630ba78
commit bb5ab6bd9a
2 changed files with 6 additions and 7 deletions

View File

@ -12,7 +12,6 @@ module "control_planes" {
placement_group_id = hcloud_placement_group.k3s.id placement_group_id = hcloud_placement_group.k3s.id
location = var.location location = var.location
network_id = hcloud_network.k3s.id network_id = hcloud_network.k3s.id
ip = cidrhost(hcloud_network_subnet.k3s.ip_range, 257 + count.index)
server_type = var.control_plane_server_type server_type = var.control_plane_server_type
labels = { labels = {

View File

@ -16,16 +16,16 @@ lb_server_type = "lb11"
servers_num = 3 servers_num = 3
# For agent nodes, at least 2 is recommended for HA, but you can keep automatic upgrades. # For agent nodes, at least 2 is recommended for HA, but you can keep automatic upgrades.
agents_num = 2
agent_nodepools = { agent_nodepools = {
big = { big = {
server_type = "cpx31", server_type = "cpx31",
count = 3 count = 1
}
small = {
server_type = "cpx21",
} }
# Will fail because of the ip address collision (we use index number)
# small = {
# server_type = "cpx31",
# count = 3
# }
} }
# If you want to use a specific Hetzner CCM and CSI version, set them below, otherwise leave as is for the latest versions # If you want to use a specific Hetzner CCM and CSI version, set them below, otherwise leave as is for the latest versions