2019-05-12 12:43:48 +00:00
|
|
|
module "cadvisor" {
|
|
|
|
source = "../modules/container"
|
2018-02-04 10:36:20 +00:00
|
|
|
name = "cadvisor"
|
2019-05-12 12:43:48 +00:00
|
|
|
image = "google/cadvisor:latest"
|
|
|
|
|
2021-10-15 12:54:13 +00:00
|
|
|
resource = {
|
2019-05-12 12:43:48 +00:00
|
|
|
memory = 512
|
|
|
|
memory_swap = 512
|
|
|
|
}
|
2018-02-04 10:36:20 +00:00
|
|
|
|
|
|
|
restart = "unless-stopped"
|
|
|
|
destroy_grace_seconds = 10
|
|
|
|
must_run = true
|
|
|
|
|
2019-05-12 12:43:48 +00:00
|
|
|
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"
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
2021-10-15 12:54:13 +00:00
|
|
|
networks = ["monitoring"]
|
2019-05-12 12:43:48 +00:00
|
|
|
|
2021-10-15 12:54:13 +00:00
|
|
|
web = {
|
2019-05-12 12:43:48 +00:00
|
|
|
expose = true
|
|
|
|
port = 8080
|
|
|
|
auth = true
|
2018-02-04 10:36:20 +00:00
|
|
|
}
|
|
|
|
}
|
2021-10-15 12:54:13 +00:00
|
|
|
|