Update k8s/dev/backend-deployment-dev.yaml

This commit is contained in:
bohessefm 2026-02-01 19:30:29 +00:00
parent 6c88fde36a
commit 375643d538

View file

@ -5,7 +5,6 @@ metadata:
namespace: gohorsejobsdev
spec:
replicas: 1
# ESTRATÉGIA: Mata o pod antigo antes de iniciar o novo (ideal para pouca RAM)
strategy:
type: Recreate
selector:
@ -17,22 +16,10 @@ spec:
app: gohorse-backend-dev
env: development
spec:
# Tempo para o pod antigo desligar (padrão é 30s, reduzimos para 10s)
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 agora é centralizada no Calico
containers:
- name: backend
image: pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
@ -44,8 +31,8 @@ spec:
name: backend-secrets
resources:
requests:
memory: "256Mi"
cpu: "100m"
memory: "512Mi" # Aumentado para evitar swap
cpu: "500m" # GARANTIA de performance para eliminar picos de 0.7s
limits:
memory: "1024Mi"
cpu: "1000m"
@ -53,11 +40,14 @@ spec:
httpGet:
path: /health
port: 8521
initialDelaySeconds: 45 # Aumentado para evitar restart loop inicial
periodSeconds: 20
initialDelaySeconds: 50
periodSeconds: 30 # Menos estresse no backend
timeoutSeconds: 5 # Se demorar mais que 5s, algo está errado
failureThreshold: 3 # Tolera 3 falhas antes de reiniciar
readinessProbe:
httpGet:
path: /health
port: 8521
initialDelaySeconds: 20
periodSeconds: 10
periodSeconds: 15
timeoutSeconds: 3