Update k8s/dev/backend-deployment-dev.yaml
This commit is contained in:
parent
6c88fde36a
commit
375643d538
1 changed files with 9 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 iniciar o novo (ideal para pouca RAM)
|
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -17,22 +16,10 @@ spec:
|
||||||
app: gohorse-backend-dev
|
app: gohorse-backend-dev
|
||||||
env: development
|
env: development
|
||||||
spec:
|
spec:
|
||||||
# Tempo para o pod antigo desligar (padrão é 30s, reduzimos para 10s)
|
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: forgejo-registry-secret
|
- name: forgejo-registry-secret
|
||||||
initContainers:
|
# InitContainer de MTU removido: Configuração agora é 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: backend
|
- name: backend
|
||||||
image: pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
|
image: pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
|
||||||
|
|
@ -44,8 +31,8 @@ spec:
|
||||||
name: backend-secrets
|
name: backend-secrets
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "256Mi"
|
memory: "512Mi" # Aumentado para evitar swap
|
||||||
cpu: "100m"
|
cpu: "500m" # GARANTIA de performance para eliminar picos de 0.7s
|
||||||
limits:
|
limits:
|
||||||
memory: "1024Mi"
|
memory: "1024Mi"
|
||||||
cpu: "1000m"
|
cpu: "1000m"
|
||||||
|
|
@ -53,11 +40,14 @@ spec:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
port: 8521
|
port: 8521
|
||||||
initialDelaySeconds: 45 # Aumentado para evitar restart loop inicial
|
initialDelaySeconds: 50
|
||||||
periodSeconds: 20
|
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:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
port: 8521
|
port: 8521
|
||||||
initialDelaySeconds: 20
|
initialDelaySeconds: 20
|
||||||
periodSeconds: 10
|
periodSeconds: 15
|
||||||
|
timeoutSeconds: 3
|
||||||
Loading…
Reference in a new issue