Update k8s/dev/backend-deployment-dev.yaml
This commit is contained in:
parent
83dd33b134
commit
d94eadee6e
1 changed files with 12 additions and 6 deletions
|
|
@ -19,7 +19,6 @@ spec:
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: forgejo-registry-secret
|
- name: forgejo-registry-secret
|
||||||
# InitContainer de MTU removido: Configuração agora é centralizada no Calico
|
|
||||||
containers:
|
containers:
|
||||||
- name: backend
|
- name: backend
|
||||||
image: pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
|
image: pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
|
||||||
|
|
@ -29,10 +28,17 @@ spec:
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: backend-secrets
|
name: backend-secrets
|
||||||
|
env:
|
||||||
|
# Força o modo performance do framework
|
||||||
|
- name: NODE_ENV
|
||||||
|
value: "production"
|
||||||
|
# Tunagem do Garbage Collector para eliminar oscilação de latência
|
||||||
|
- name: NODE_OPTIONS
|
||||||
|
value: "--max-old-space-size=768 --min-semi-space-size=64 --max-semi-space-size=128"
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "512Mi" # Aumentado para evitar swap
|
memory: "768Mi" # Alinhado com o heap do Node
|
||||||
cpu: "500m" # GARANTIA de performance para eliminar picos de 0.7s
|
cpu: "500m" # Prioridade de CPU garantida
|
||||||
limits:
|
limits:
|
||||||
memory: "1024Mi"
|
memory: "1024Mi"
|
||||||
cpu: "1000m"
|
cpu: "1000m"
|
||||||
|
|
@ -41,9 +47,9 @@ spec:
|
||||||
path: /health
|
path: /health
|
||||||
port: 8521
|
port: 8521
|
||||||
initialDelaySeconds: 50
|
initialDelaySeconds: 50
|
||||||
periodSeconds: 30 # Menos estresse no backend
|
periodSeconds: 30
|
||||||
timeoutSeconds: 5 # Se demorar mais que 5s, algo está errado
|
timeoutSeconds: 5
|
||||||
failureThreshold: 3 # Tolera 3 falhas antes de reiniciar
|
failureThreshold: 3
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue