mirror of
https://github.com/apricote/home-cloud.git
synced 2026-02-07 10:17:01 +00:00
feat: reuse loadbalancer for ingress
This commit is contained in:
parent
9e528c9b7b
commit
da1b4c9082
8 changed files with 65 additions and 10 deletions
|
|
@ -20,3 +20,11 @@ resource "hcloud_server_network" "agents_network" {
|
|||
subnet_id = hcloud_network_subnet.k3s_nodes.id
|
||||
ip = cidrhost(hcloud_network_subnet.k3s_nodes.ip_range, 1 + var.control_count + count.index)
|
||||
}
|
||||
|
||||
resource "hcloud_load_balancer_target" "ingress" {
|
||||
count = var.compute_count
|
||||
type = "server"
|
||||
load_balancer_id = hcloud_load_balancer.k3s.id
|
||||
server_id = hcloud_server.agents[count.index].id
|
||||
use_private_ip = true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue