nebula/monitoring/cadvisor.tf

53 lines
967 B
Terraform
Raw Normal View History

2019-05-12 12:43:48 +00:00
module "cadvisor" {
source = "../modules/container"
2018-02-04 10:36:20 +00:00
name = "cadvisor"
image = "gcr.io/cadvisor/cadvisor"
2019-05-12 12:43:48 +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
privileged = true
2018-02-04 10:36:20 +00:00
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"
read_only = true
2019-05-12 12:43:48 +00:00
},
]
networks = ["monitoring"]
2019-05-12 12:43:48 +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
}
}