fix: bump tier-1-cluster LimitRange max to 8Gi for MySQL 6Gi limit
Kyverno's tier-1-cluster LimitRange had max=4Gi which blocked mysql-cluster-2 from starting after we bumped MySQL to 6Gi limit. Also added custom LimitRange in dbaas stack (for when Terraform manages it directly).
This commit is contained in:
parent
aa62e789e5
commit
ae0585048a
2 changed files with 24 additions and 1 deletions
|
|
@ -27,6 +27,29 @@ resource "kubernetes_namespace" "dbaas" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Override Kyverno tier-1-cluster LimitRange (max 4Gi) to allow MySQL 6Gi limit
|
||||||
|
resource "kubernetes_limit_range" "dbaas" {
|
||||||
|
metadata {
|
||||||
|
name = "tier-defaults"
|
||||||
|
namespace = kubernetes_namespace.dbaas.metadata[0].name
|
||||||
|
}
|
||||||
|
spec {
|
||||||
|
limit {
|
||||||
|
type = "Container"
|
||||||
|
default = {
|
||||||
|
memory = "256Mi"
|
||||||
|
}
|
||||||
|
default_request = {
|
||||||
|
cpu = "50m"
|
||||||
|
memory = "256Mi"
|
||||||
|
}
|
||||||
|
max = {
|
||||||
|
memory = "8Gi"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resource "kubernetes_resource_quota" "dbaas" {
|
resource "kubernetes_resource_quota" "dbaas" {
|
||||||
metadata {
|
metadata {
|
||||||
name = "dbaas-quota"
|
name = "dbaas-quota"
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ resource "kubernetes_manifest" "generate_limitrange_by_tier" {
|
||||||
memory = "256Mi"
|
memory = "256Mi"
|
||||||
}
|
}
|
||||||
max = {
|
max = {
|
||||||
memory = "4Gi"
|
memory = "8Gi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue