Update k8s/dev/backend-deployment-dev.yaml
This commit is contained in:
parent
657d696bbb
commit
b07cf94dcb
1 changed files with 6 additions and 7 deletions
|
|
@ -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
|
||||
Loading…
Reference in a new issue