51 lines
917 B
HCL
51 lines
917 B
HCL
module "cadvisor" {
|
|
source = "../modules/container"
|
|
name = "cadvisor"
|
|
image = "google/cadvisor:latest"
|
|
|
|
resource = {
|
|
memory = 512
|
|
memory_swap = 512
|
|
}
|
|
|
|
restart = "unless-stopped"
|
|
destroy_grace_seconds = 10
|
|
must_run = true
|
|
|
|
volumes = [
|
|
{
|
|
host_path = "/sys"
|
|
container_path = "/sys"
|
|
read_only = true
|
|
},
|
|
{
|
|
host_path = "/"
|
|
container_path = "/rootfs"
|
|
read_only = true
|
|
},
|
|
{
|
|
host_path = "/var/lib/docker"
|
|
container_path = "/var/lib/docker"
|
|
read_only = true
|
|
},
|
|
{
|
|
host_path = "/dev/disk"
|
|
container_path = "/dev/disk"
|
|
read_only = true
|
|
},
|
|
{
|
|
host_path = "/var/run"
|
|
container_path = "/var/run"
|
|
},
|
|
]
|
|
|
|
networks = ["monitoring"]
|
|
|
|
web = {
|
|
expose = true
|
|
port = 8080
|
|
auth = true
|
|
}
|
|
}
|
|
|