fix: eliminate memory overcommit to prevent node OOM crashes
Set requests = limits (Guaranteed QoS) across LimitRange defaults and explicit pod resources. Node2 crashed 2026-03-14 from 250% memory overcommit (61GB limits on 24GB node). Changes: - LimitRange: default = defaultRequest for all 6 tiers - Grafana: 3 → 2 replicas - Grampsweb: document why replicas=0 - Prometheus: 1Gi/4Gi → 3Gi/3Gi - OpenClaw: 512Mi/2Gi → 768Mi/768Mi - Immich server: 256Mi/2Gi → 512Mi/512Mi - Immich postgresql: 256Mi/1Gi → 512Mi/512Mi - Calibre: 256Mi/1536Mi → 256Mi/256Mi - Linkwarden: 256Mi/1536Mi → 768Mi/768Mi - N8N: 256Mi/1Gi → 512Mi/512Mi - MySQL cluster: 1Gi/3-4Gi → 2Gi/2Gi - pg-cluster (CNPG): 512Mi/4Gi → 512Mi/512Mi - DBaaS ResourceQuota limits.memory: 64Gi → 12Gi [ci skip]
This commit is contained in:
parent
27fa8ea18f
commit
2be858f616
10 changed files with 70 additions and 30 deletions
|
|
@ -36,7 +36,7 @@ resource "kubernetes_resource_quota" "dbaas" {
|
|||
hard = {
|
||||
"requests.cpu" = "8"
|
||||
"requests.memory" = "12Gi"
|
||||
"limits.memory" = "64Gi"
|
||||
"limits.memory" = "12Gi"
|
||||
pods = "30"
|
||||
}
|
||||
}
|
||||
|
|
@ -181,10 +181,10 @@ resource "helm_release" "mysql_cluster" {
|
|||
resources = {
|
||||
requests = {
|
||||
cpu = "250m"
|
||||
memory = "1Gi"
|
||||
memory = "2Gi"
|
||||
}
|
||||
limits = {
|
||||
memory = "4Gi"
|
||||
memory = "2Gi"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -216,11 +216,11 @@ resource "helm_release" "mysql_cluster" {
|
|||
name = "mysql"
|
||||
resources = {
|
||||
requests = {
|
||||
memory = "1Gi"
|
||||
memory = "2Gi"
|
||||
cpu = "250m"
|
||||
}
|
||||
limits = {
|
||||
memory = "3Gi"
|
||||
memory = "2Gi"
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
|
@ -229,21 +229,21 @@ resource "helm_release" "mysql_cluster" {
|
|||
name = "fixdatadir"
|
||||
resources = {
|
||||
requests = { memory = "64Mi", cpu = "25m" }
|
||||
limits = { memory = "256Mi" }
|
||||
limits = { memory = "64Mi" }
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "initconf"
|
||||
resources = {
|
||||
requests = { memory = "256Mi", cpu = "50m" }
|
||||
limits = { memory = "1Gi" }
|
||||
limits = { memory = "256Mi" }
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "initmysql"
|
||||
resources = {
|
||||
requests = { memory = "512Mi", cpu = "250m" }
|
||||
limits = { memory = "2Gi" }
|
||||
limits = { memory = "512Mi" }
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -842,7 +842,7 @@ resource "null_resource" "pg_cluster" {
|
|||
image = "ghcr.io/cloudnative-pg/postgis:16"
|
||||
storage_size = "20Gi"
|
||||
storage_class = "iscsi-truenas"
|
||||
memory_limit = "4Gi"
|
||||
memory_limit = "512Mi"
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -870,7 +870,7 @@ resource "null_resource" "pg_cluster" {
|
|||
cpu: "50m"
|
||||
memory: "512Mi"
|
||||
limits:
|
||||
memory: "4Gi"
|
||||
memory: "512Mi"
|
||||
EOF
|
||||
EOT
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue