PERF(repo): apply CPU/Memory limits based on VPA
- Set CPU request to VPA recommendation - Set CPU limit to VPA × 1.5 for burst allowance - Set Memory limit to VPA × 1.5 to prevent OOM - Prevent cascading failure on node failure
This commit is contained in:
@@ -43,8 +43,11 @@ service:
|
||||
# Resource limits
|
||||
resources:
|
||||
requests:
|
||||
cpu: 5m # Reduced from 50m based on actual usage (1m)
|
||||
memory: 128Mi # Reduced from 1Gi - actual usage ~105Mi
|
||||
cpu: 15m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 23m
|
||||
memory: 768Mi
|
||||
|
||||
# Security context
|
||||
securityContext:
|
||||
|
||||
@@ -10,10 +10,11 @@ image:
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
cpu: 35m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
memory: 2Gi
|
||||
cpu: 53m
|
||||
memory: 192Mi
|
||||
|
||||
# Disable default probes (Crafty HTTPS needs time to initialize)
|
||||
livenessProbe:
|
||||
|
||||
@@ -32,10 +32,11 @@ controllers:
|
||||
tag: alpine
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
cpu: 15m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
memory: 128Mi
|
||||
cpu: 23m
|
||||
memory: 150Mi
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
|
||||
@@ -103,10 +103,11 @@ ingress:
|
||||
# =============================================================================
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
cpu: 15m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
memory: 512Mi
|
||||
cpu: 23m
|
||||
memory: 150Mi
|
||||
|
||||
# =============================================================================
|
||||
# POD CONFIGURATION
|
||||
|
||||
@@ -21,10 +21,11 @@ service:
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
cpu: 15m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
memory: 128Mi
|
||||
cpu: 23m
|
||||
memory: 150Mi
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
|
||||
@@ -35,8 +35,11 @@ controllers:
|
||||
pullPolicy: IfNotPresent
|
||||
resources:
|
||||
requests:
|
||||
cpu: 5m
|
||||
memory: 64Mi
|
||||
cpu: 15m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 23m
|
||||
memory: 150Mi
|
||||
|
||||
service:
|
||||
main:
|
||||
|
||||
@@ -58,10 +58,11 @@ server:
|
||||
main:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 256Mi
|
||||
cpu: 15m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
memory: 1Gi
|
||||
cpu: 23m
|
||||
memory: 768Mi
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
@@ -88,10 +89,11 @@ machine-learning:
|
||||
main:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 512Mi
|
||||
cpu: 15m
|
||||
memory: 2Gi
|
||||
limits:
|
||||
memory: 4Gi
|
||||
cpu: 23m
|
||||
memory: 3Gi
|
||||
persistence:
|
||||
cache:
|
||||
enabled: false
|
||||
|
||||
@@ -44,10 +44,11 @@ controllers:
|
||||
REDIS_URL: "redis://redis:6379/0"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
cpu: 15m
|
||||
memory: 150Mi
|
||||
limits:
|
||||
memory: 1Gi
|
||||
cpu: 23m
|
||||
memory: 225Mi
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
|
||||
@@ -39,8 +39,11 @@ service:
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 5m # Reduced from 30m based on actual usage (1m)
|
||||
memory: 256Mi
|
||||
cpu: 15m
|
||||
memory: 384Mi
|
||||
limits:
|
||||
cpu: 23m
|
||||
memory: 576Mi
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user