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

This commit is contained in:
bohessefm 2026-01-30 21:53:55 +00:00
parent 657d696bbb
commit b07cf94dcb

View file

@ -19,8 +19,8 @@ spec:
initContainers:
- name: set-mtu
image: busybox
# CORREÇÃO: Usando ${MTU_VALUE} para o shell entender que é uma variável
command: ['sh', '-c', 'ifconfig eth0 mtu ${MTU_VALUE} || true']
# CORREÇÃO: Usando a sintaxe $(VAR) para o K8s injetar a variável no comando
command: ['sh', '-c', 'ifconfig eth0 mtu $(MTU_VALUE) || true']
env:
- name: MTU_VALUE
valueFrom:
@ -35,14 +35,13 @@ spec:
imagePullPolicy: Always
ports:
- containerPort: 8521
# Isso injeta DATABASE_URL, JWT_SECRET e MTU direto no seu código Go/Node
envFrom:
- secretRef:
name: backend-secrets
resources:
requests:
memory: "512Mi"
cpu: "300m"
memory: "256Mi" # Reduzi um pouco para evitar despejo (Eviction)
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "1000m"
@ -50,11 +49,11 @@ spec:
httpGet:
path: /health
port: 8521
initialDelaySeconds: 15
initialDelaySeconds: 30 # Aumentado para dar tempo de conectar no banco
periodSeconds: 20
readinessProbe:
httpGet:
path: /health
port: 8521
initialDelaySeconds: 5
initialDelaySeconds: 15 # Aumentado para o app estabilizar
periodSeconds: 10