Update k8s/dev/backoffice-deployment-dev.yaml
This commit is contained in:
parent
375643d538
commit
83dd33b134
1 changed files with 12 additions and 19 deletions
|
|
@ -5,7 +5,6 @@ metadata:
|
|||
namespace: gohorsejobsdev
|
||||
spec:
|
||||
replicas: 1
|
||||
# ESTRATÉGIA: Mata o pod antigo antes de subir o novo para liberar os 2Gi de RAM
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
|
|
@ -17,22 +16,10 @@ spec:
|
|||
app: gohorse-backoffice-dev
|
||||
env: development
|
||||
spec:
|
||||
# Reduz o tempo de espera para desligamento forçado
|
||||
terminationGracePeriodSeconds: 10
|
||||
imagePullSecrets:
|
||||
- name: forgejo-registry-secret
|
||||
initContainers:
|
||||
- name: set-mtu
|
||||
image: busybox:latest
|
||||
command: ['sh', '-c', 'ifconfig eth0 mtu ${MTU_VALUE} || true']
|
||||
env:
|
||||
- name: MTU_VALUE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: backend-secrets
|
||||
key: MTU
|
||||
securityContext:
|
||||
privileged: true
|
||||
# InitContainer de MTU removido: Configuração centralizada no Calico
|
||||
containers:
|
||||
- name: backoffice
|
||||
image: pipe.gohorsejobs.com/bohessefm/backoffice:latest
|
||||
|
|
@ -47,22 +34,28 @@ spec:
|
|||
value: "0"
|
||||
- name: NODE_ENV
|
||||
value: "development"
|
||||
# Dica extra: Otimiza o uso de memória do Node.js
|
||||
- name: NODE_OPTIONS
|
||||
value: "--max-old-space-size=1536"
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
memory: "1024Mi" # Aumentado para evitar lentidão de leitura de disco
|
||||
cpu: "500m" # Meio núcleo garantido para o Event Loop do Node
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "800m"
|
||||
cpu: "1000m" # Aumentado para 1 core para aguentar picos de processamento
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 3001
|
||||
initialDelaySeconds: 70 # NestJS demora mais para subir que Go
|
||||
initialDelaySeconds: 80 # NestJS em Dev é pesado para carregar
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5 # Tolera lentidão no processamento do health check
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 3001
|
||||
initialDelaySeconds: 40
|
||||
periodSeconds: 15
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 3
|
||||
Loading…
Reference in a new issue