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