Add OTP resource limits and scale up
OTP was crash-looping with Java OOM at the default 256Mi LimitRange. Added explicit resource limits (1Gi request, 2Gi limit) and -Xmx1536m JVM flag. Scaled replicas from 0 back to 1.
This commit is contained in:
parent
9a46ae68c6
commit
1db9c65cd6
1 changed files with 16 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
variable "tls_secret_name" {
|
variable "tls_secret_name" {
|
||||||
type = string
|
type = string
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
variable "nfs_server" { type = string }
|
variable "nfs_server" { type = string }
|
||||||
|
|
@ -204,7 +204,7 @@ resource "kubernetes_deployment" "otp" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spec {
|
spec {
|
||||||
replicas = 0 # Scaled down: TfL GTFS data expired, OTP crash-loops on build
|
replicas = 1
|
||||||
strategy {
|
strategy {
|
||||||
type = "Recreate"
|
type = "Recreate"
|
||||||
}
|
}
|
||||||
|
|
@ -233,6 +233,20 @@ resource "kubernetes_deployment" "otp" {
|
||||||
name = "otp-data"
|
name = "otp-data"
|
||||||
mount_path = "/var/opentripplanner"
|
mount_path = "/var/opentripplanner"
|
||||||
}
|
}
|
||||||
|
env {
|
||||||
|
name = "JAVA_TOOL_OPTIONS"
|
||||||
|
value = "-Xmx1536m"
|
||||||
|
}
|
||||||
|
resources {
|
||||||
|
requests = {
|
||||||
|
cpu = "100m"
|
||||||
|
memory = "1Gi"
|
||||||
|
}
|
||||||
|
limits = {
|
||||||
|
cpu = "2"
|
||||||
|
memory = "2Gi"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
volume {
|
volume {
|
||||||
name = "otp-data"
|
name = "otp-data"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue