fix resource limits for grafana,cadvisor

This commit is contained in:
Nemo 2023-10-26 13:08:14 +05:30
parent 09c1094fc5
commit dfd0f94662
2 changed files with 11 additions and 4 deletions

View File

@ -1,7 +1,7 @@
module "cadvisor" { module "cadvisor" {
source = "../modules/container" source = "../modules/container"
name = "cadvisor" name = "cadvisor"
image = "google/cadvisor:latest" image = "gcr.io/cadvisor/cadvisor"
resource = { resource = {
memory = 512 memory = 512
@ -11,6 +11,7 @@ module "cadvisor" {
restart = "unless-stopped" restart = "unless-stopped"
destroy_grace_seconds = 10 destroy_grace_seconds = 10
must_run = true must_run = true
privileged = true
volumes = [ volumes = [
{ {
@ -36,6 +37,7 @@ module "cadvisor" {
{ {
host_path = "/var/run" host_path = "/var/run"
container_path = "/var/run" container_path = "/var/run"
read_only = true
}, },
] ]

View File

@ -2,10 +2,15 @@
module "grafana" { module "grafana" {
name = "grafana" name = "grafana"
source = "../modules/container" source = "../modules/container"
image = "grafana/grafana:latest" image = "grafana/grafana-oss:latest"
// grafana:grafana // grafana
user = "984:982" user = "472"
resource = {
memory = 512
memory_swap = 512
}
web = { web = {
port = 3000 port = 3000