mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-07 14:03:01 +07:00
Add haproxy node
This commit is contained in:
parent
b82b38b792
commit
ad4b19b2f7
@ -77,3 +77,36 @@ resource "lxd_container" "kubernetes_workers" {
|
||||
EXEC
|
||||
}
|
||||
}
|
||||
|
||||
resource "lxd_container" "haproxy" {
|
||||
count = 1
|
||||
name = "haproxy"
|
||||
image = "images:ubuntu/18.04"
|
||||
ephemeral = false
|
||||
|
||||
config = {
|
||||
"boot.autostart" = true
|
||||
}
|
||||
|
||||
limits = {
|
||||
cpu = 2
|
||||
}
|
||||
|
||||
device {
|
||||
name = "eth0"
|
||||
type = "nic"
|
||||
|
||||
properties = {
|
||||
nictype = "bridged"
|
||||
parent = "${lxd_network.kubernetes_network.name}"
|
||||
}
|
||||
}
|
||||
|
||||
provisioner "local-exec" {
|
||||
command = <<EXEC
|
||||
lxc exec ${self.name} -- bash -xe -c '
|
||||
touch /hello
|
||||
'
|
||||
EXEC
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user