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
|
namespace: gohorsejobsdev
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
# ESTRATÉGIA: Mata o pod antigo antes de subir o novo para liberar os 2Gi de RAM
|
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -17,22 +16,10 @@ spec:
|
||||||
app: gohorse-backoffice-dev
|
app: gohorse-backoffice-dev
|
||||||
env: development
|
env: development
|
||||||
spec:
|
spec:
|
||||||
# Reduz o tempo de espera para desligamento forçado
|
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: forgejo-registry-secret
|
- name: forgejo-registry-secret
|
||||||
initContainers:
|
# InitContainer de MTU removido: Configuração centralizada no Calico
|
||||||
- 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
|
|
||||||
containers:
|
containers:
|
||||||
- name: backoffice
|
- name: backoffice
|
||||||
image: pipe.gohorsejobs.com/bohessefm/backoffice:latest
|
image: pipe.gohorsejobs.com/bohessefm/backoffice:latest
|
||||||
|
|
@ -47,22 +34,28 @@ spec:
|
||||||
value: "0"
|
value: "0"
|
||||||
- name: NODE_ENV
|
- name: NODE_ENV
|
||||||
value: "development"
|
value: "development"
|
||||||
|
# Dica extra: Otimiza o uso de memória do Node.js
|
||||||
|
- name: NODE_OPTIONS
|
||||||
|
value: "--max-old-space-size=1536"
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "512Mi"
|
memory: "1024Mi" # Aumentado para evitar lentidão de leitura de disco
|
||||||
cpu: "300m"
|
cpu: "500m" # Meio núcleo garantido para o Event Loop do Node
|
||||||
limits:
|
limits:
|
||||||
memory: "2Gi"
|
memory: "2Gi"
|
||||||
cpu: "800m"
|
cpu: "1000m" # Aumentado para 1 core para aguentar picos de processamento
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
port: 3001
|
port: 3001
|
||||||
initialDelaySeconds: 70 # NestJS demora mais para subir que Go
|
initialDelaySeconds: 80 # NestJS em Dev é pesado para carregar
|
||||||
periodSeconds: 30
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 5 # Tolera lentidão no processamento do health check
|
||||||
|
failureThreshold: 3
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
port: 3001
|
port: 3001
|
||||||
initialDelaySeconds: 40
|
initialDelaySeconds: 40
|
||||||
periodSeconds: 15
|
periodSeconds: 20
|
||||||
|
timeoutSeconds: 3
|
||||||
Loading…
Reference in a new issue