[ci skip] onlyoffice: bump CPU limit to 8, add custom LimitRange/Quota
Startup was throttled by allthemesgen and font generation hitting 2 CPU ceiling. Bumped to 8 CPU burst limit with custom LimitRange (max 8 CPU) and custom ResourceQuota. Disabled VPA and goldilocks opt-out labels.
This commit is contained in:
parent
07874f8021
commit
81e128acc4
1 changed files with 44 additions and 2 deletions
|
|
@ -13,6 +13,48 @@ resource "kubernetes_namespace" "onlyoffice" {
|
||||||
"istio-injection" : "disabled"
|
"istio-injection" : "disabled"
|
||||||
tier = local.tiers.edge
|
tier = local.tiers.edge
|
||||||
"goldilocks.fairwinds.com/vpa-update-mode" = "off"
|
"goldilocks.fairwinds.com/vpa-update-mode" = "off"
|
||||||
|
"resource-governance/custom-limitrange" = "true"
|
||||||
|
"resource-governance/custom-quota" = "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubernetes_limit_range" "onlyoffice" {
|
||||||
|
metadata {
|
||||||
|
name = "onlyoffice-limits"
|
||||||
|
namespace = kubernetes_namespace.onlyoffice.metadata[0].name
|
||||||
|
}
|
||||||
|
spec {
|
||||||
|
limit {
|
||||||
|
type = "Container"
|
||||||
|
default = {
|
||||||
|
cpu = "250m"
|
||||||
|
memory = "256Mi"
|
||||||
|
}
|
||||||
|
default_request = {
|
||||||
|
cpu = "25m"
|
||||||
|
memory = "64Mi"
|
||||||
|
}
|
||||||
|
max = {
|
||||||
|
cpu = "8"
|
||||||
|
memory = "8Gi"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubernetes_resource_quota" "onlyoffice" {
|
||||||
|
metadata {
|
||||||
|
name = "onlyoffice-quota"
|
||||||
|
namespace = kubernetes_namespace.onlyoffice.metadata[0].name
|
||||||
|
}
|
||||||
|
spec {
|
||||||
|
hard = {
|
||||||
|
"requests.cpu" = "4"
|
||||||
|
"requests.memory" = "4Gi"
|
||||||
|
"limits.cpu" = "16"
|
||||||
|
"limits.memory" = "16Gi"
|
||||||
|
pods = "10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -51,11 +93,11 @@ resource "kubernetes_deployment" "onlyoffice-document-server" {
|
||||||
image = "onlyoffice/documentserver:8.2.3"
|
image = "onlyoffice/documentserver:8.2.3"
|
||||||
resources {
|
resources {
|
||||||
requests = {
|
requests = {
|
||||||
cpu = "100m"
|
cpu = "250m"
|
||||||
memory = "512Mi"
|
memory = "512Mi"
|
||||||
}
|
}
|
||||||
limits = {
|
limits = {
|
||||||
cpu = "2"
|
cpu = "8"
|
||||||
memory = "4Gi"
|
memory = "4Gi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue