diff --git a/stacks/actualbudget/factory/main.tf b/stacks/actualbudget/factory/main.tf index 95663e4d..18614ccf 100644 --- a/stacks/actualbudget/factory/main.tf +++ b/stacks/actualbudget/factory/main.tf @@ -149,10 +149,10 @@ resource "kubernetes_deployment" "actualbudget-http-api" { resources { requests = { cpu = "50m" - memory = "384Mi" + memory = "768Mi" } limits = { - memory = "384Mi" + memory = "768Mi" } } diff --git a/stacks/changedetection/main.tf b/stacks/changedetection/main.tf index 93f7752d..a40e73dc 100644 --- a/stacks/changedetection/main.tf +++ b/stacks/changedetection/main.tf @@ -76,7 +76,8 @@ resource "kubernetes_deployment" "changedetection" { } } spec { - replicas = 1 + # Disabled: chronic OOM at 64Mi limit, not worth the memory cost to increase + replicas = 0 strategy { type = "Recreate" } diff --git a/stacks/immich/main.tf b/stacks/immich/main.tf index 34c7bb29..975a3ddc 100644 --- a/stacks/immich/main.tf +++ b/stacks/immich/main.tf @@ -284,10 +284,10 @@ resource "kubernetes_deployment" "immich_server" { resources { requests = { cpu = "100m" - memory = "512Mi" + memory = "1700Mi" } limits = { - memory = "1Gi" + memory = "1700Mi" } } } diff --git a/stacks/rybbit/main.tf b/stacks/rybbit/main.tf index 4ecf5a7e..44713396 100644 --- a/stacks/rybbit/main.tf +++ b/stacks/rybbit/main.tf @@ -70,6 +70,20 @@ module "nfs_clickhouse_data" { nfs_path = "/mnt/main/clickhouse" } +resource "kubernetes_config_map" "clickhouse_memory" { + metadata { + name = "clickhouse-memory-config" + namespace = kubernetes_namespace.rybbit.metadata[0].name + } + data = { + "memory.xml" = <<-EOF + + 838860800 + + EOF + } +} + resource "kubernetes_deployment" "clickhouse" { metadata { name = "clickhouse" @@ -144,6 +158,11 @@ resource "kubernetes_deployment" "clickhouse" { name = "data" mount_path = "/var/lib/clickhouse" } + volume_mount { + name = "memory-config" + mount_path = "/etc/clickhouse-server/config.d/memory.xml" + sub_path = "memory.xml" + } resources { requests = { cpu = "500m" @@ -160,6 +179,12 @@ resource "kubernetes_deployment" "clickhouse" { claim_name = module.nfs_clickhouse_data.claim_name } } + volume { + name = "memory-config" + config_map { + name = kubernetes_config_map.clickhouse_memory.metadata[0].name + } + } } } }